]> git.donarmstrong.com Git - lilypond.git/commitdiff
use (sign dir) for computing attachment points.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 02:05:38 +0000 (03:05 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 02:05:38 +0000 (03:05 +0100)
scm/define-markup-commands.scm

index 73e243a6a185d879e8f24238ff2f7828c969bae5..745b42f940c005527d58369dc4cc9d99d09c670b 100644 (file)
@@ -1190,6 +1190,7 @@ figured bass notation"
 (define-markup-command (note-by-number layout props log dot-count dir) (number? number? number?)
   "Construct a note symbol, with stem.  By using fractional values for
 @var{dir}, you can obtain longer or shorter stems."
+
   (define (get-glyph-name-candidates dir log style)
     (map (lambda (dir-name)
      (format "noteheads.~a~a~a" dir-name (min log 2)
@@ -1211,15 +1212,15 @@ figured bass notation"
         (size-factor (magstep (chain-assoc-get 'font-size props 0)))
         (style (chain-assoc-get 'style props '()))
          (stem-length (*  size-factor (max 3 (- log 1))))
-         (head-glyph-name (get-glyph-name font (get-glyph-name-candidates dir log style)))
+         (head-glyph-name (get-glyph-name font (get-glyph-name-candidates (sign dir) log style)))
          (head-glyph (ly:font-get-glyph font head-glyph-name))
         (attach-indices (ly:note-head::stem-attachment font head-glyph-name))
          (stem-thickness (* size-factor 0.13))
          (stemy (* dir stem-length))
          (attach-off (cons (interval-index
                            (ly:stencil-extent head-glyph X)
-                           (* dir (car attach-indices)))
-                          (* dir       ; fixme, this is inconsistent between X & Y.
+                           (* (sign dir) (car attach-indices)))
+                          (* (sign dir)        ; fixme, this is inconsistent between X & Y.
                              (interval-index
                               (ly:stencil-extent head-glyph Y)
                               (cdr attach-indices)))))