summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2007-01-07 18:19:46 +0100
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2007-01-07 18:19:46 +0100
commit72e6cf1054e2550ac8c9701da6cf78f5941981a0 (patch)
tree38364d1b2fa321ac98286337ea4c66d94d084bd7
parentd771d5a7b8a491e97ae07beb4330709318e50160 (diff)
Fix #226.
And move the dot in case of a flag.
-rw-r--r--input/regression/markup-note-dot.ly20
-rw-r--r--scm/define-markup-commands.scm14
2 files changed, 26 insertions, 8 deletions
diff --git a/input/regression/markup-note-dot.ly b/input/regression/markup-note-dot.ly
new file mode 100644
index 0000000000..517f541653
--- /dev/null
+++ b/input/regression/markup-note-dot.ly
@@ -0,0 +1,20 @@
+
+\header {
+
+ texidoc = " A dotted whole note displayed via the @code{\\note}
+ command must separate the note head and the dot. The dot avoids the upflag."
+
+ }
+\paper {
+ packed = ##T
+}
+
+\version "2.10.10"
+
+
+\relative {
+ c^\markup { \note #"1." #1 }
+ c^\markup { \note #"2." #1 }
+ c^\markup { \note #"8." #1 }
+}
+
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index 436d2c2378..8f5728c31b 100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -1263,8 +1263,8 @@ figured bass notation"
(apply ly:stencil-add
(map (lambda (x)
(ly:stencil-translate-axis
- dot (* (+ 1 (* 2 x)) dotwid) X))
- (iota dot-count 1)))))
+ dot (* 2 x dotwid) X))
+ (iota dot-count)))))
(flaggl (and (> log 2)
(ly:stencil-translate
(ly:font-get-glyph font
@@ -1272,6 +1272,9 @@ figured bass notation"
(if (> dir 0) "u" "d")
(number->string log)))
(cons (+ (car attach-off) (/ stem-thickness 2)) stemy)))))
+
+ (if (and flaggl (> dir 0))
+ (set! dots (ly:stencil-translate-axis dots 0.35 X)))
(if flaggl
(set! stem-glyph (ly:stencil-add flaggl stem-glyph)))
(if (ly:stencil? stem-glyph)
@@ -1282,12 +1285,7 @@ figured bass notation"
(ly:stencil-add
(ly:stencil-translate-axis
dots
- (+ (if (and (> dir 0) (> log 2))
- (* 1.5 dotwid)
- 0)
- ;; huh ? why not necessary?
- ;;(cdr (ly:stencil-extent head-glyph X))
- dotwid)
+ (+ (cdr (ly:stencil-extent head-glyph X)) dotwid)
X)
stem-glyph)))
stem-glyph))