]> git.donarmstrong.com Git - lilypond.git/commitdiff
Tablature -- add head-offset to TabNoteHead 'details
authorCarl Sorensen <c_sorensen@byu.edu>
Mon, 6 Dec 2010 23:52:57 +0000 (16:52 -0700)
committerCarl Sorensen <c_sorensen@byu.edu>
Mon, 6 Dec 2010 23:52:57 +0000 (16:52 -0700)
  Add a new element to details for TabNoteHead
  Adjust the value of head-offset to 3/5.

scm/define-grobs.scm
scm/tablature.scm

index 82636f32882461c8039155aeaa12d50adb338b25..9666d63030f0cab6450b20747512ca0611943790 100644 (file)
 
     (TabNoteHead
      . (
-       (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible)
-                                       (parenthesize . #t)))
-                   (repeat-tied-properties . ((note-head-visible . #t)
-                                              (parenthesize . #t)))
+       (details . ((cautionary-properties . ((angularity . 0.4)
+                                             (half-thickness . 0.075)
+                                             (padding . 0)
+                                             (procedure . ,parenthesize-stencil)
+                                             (width . 0.25)))
+                   (head-offset . 3/5)
                    (harmonic-properties . ((angularity . 2)
                                            (half-thickness . 0.075)
                                            (padding . 0)
                                            (procedure . ,parenthesize-stencil)
                                            (width . 0.25)))
-                   (cautionary-properties . ((angularity . 0.4)
-                                             (half-thickness . 0.075)
-                                             (padding . 0)
-                                             (procedure . ,parenthesize-stencil)
-                                             (width . 0.25)))))
+                   (repeat-tied-properties . ((note-head-visible . #t)
+                                              (parenthesize . #t)))
+                   (tied-properties . ((break-visibility . ,begin-of-line-visible)
+                                       (parenthesize . #t)))))
 
        (direction . ,CENTER)
        (duration-log . ,note-head::calc-duration-log)
index 83ad8bdf31597cb082bc819a3baaaac9ae984e40..7865b9bff5edbb1cc1f986bb1370aedee4f78e79 100644 (file)
         (cautionary-width (assoc-get 'width cautionary-props 0.25))
          (output-grob (ly:text-interface::print grob))
         (ref-grob (grob-interpret-markup grob "8"))
-        (column-offset (interval-length
-                           (ly:stencil-extent
-                             (grob-interpret-markup grob "8")
-                             X))))
+        (offset-factor (assoc-get 'head-offset details 3/5))
+        (column-offset (* offset-factor
+                          (interval-length
+                            (ly:stencil-extent
+                              (grob-interpret-markup grob "8")
+                              X)))))
 
     (if (is-harmonic? grob)
         (set! output-grob (harmonic-proc output-grob