From: Han-Wen Nienhuys Date: Tue, 7 Nov 2006 02:05:38 +0000 (+0100) Subject: use (sign dir) for computing attachment points. X-Git-Tag: release/2.10.0-2~32^2~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=21a579724638e56c6b473bc80112b74712ad6349;p=lilypond.git use (sign dir) for computing attachment points. --- diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 73e243a6a1..745b42f940 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -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)))))