File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
notation-snippets/pedal-decorations Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ pedalWithArrowsAndTextCallback =
8080 (#:sans
8181 (#:upright
8282 (#:whiteout (#:box (#:pad-markup 0.3 lhs-text)))))))))
83+ (text-stil-x-extent (ly:stencil-extent text-stil X))
84+ (text-stil-x-length (interval-length text-stil-x-extent))
8385
8486 ; ; get a list of spanners bounded by PianoPedalBrackets
8587 ; ; left-bound, which is PaperColumn or NonMusicalPaperColumn
@@ -102,13 +104,17 @@ pedalWithArrowsAndTextCallback =
102104 (bounded-piano-brackets-per-column
103105 (delete-duplicates piano-pedal-brackets))
104106
107+ ; ; add text
105108 ; ; only add text-stil, if current Column does not have two
106109 ; ; PianoPedalBrackets
107- ; ; TODO is this condition really sufficient?
110+ ; ; TODO is this condition re columns really sufficient?
111+ ; ; also, do not add text-stil if the segment is too short.
108112 (new-stil
109- (if (= (length bounded-piano-brackets-per-column) 2 )
113+ (if (or
114+ (= (length bounded-piano-brackets-per-column) 2 )
115+ (< stil-x-length text-stil-x-length))
110116 new-stil
111- (ly:stencil-stack new-stil X LEFT text-stil -6 ))))
117+ (ly:stencil-stack new-stil X LEFT text-stil -8 ))))
112118
113119 (ly:grob-set-property! grobber 'stencil new-stil))))
114120
You can’t perform that action at this time.
0 commit comments