From: Nicolas Sceaux Date: Sun, 15 May 2011 10:28:51 +0000 (+0200) Subject: Fix \fill-with-pattern X-Git-Tag: release/2.15.0-1~44 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3c81184302e37ef7dd54c229be5da5e27708fd81;p=lilypond.git Fix \fill-with-pattern When the `left' and `right' markups are already wider than the line width, then the middle filler width shall be forced to null, iso. being negative. --- diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 125a34339f..3e8953afdf 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -3556,7 +3556,7 @@ Patterns are aligned to the @var{dir} markup. (pattern-width (interval-length pattern-x-extent)) (left-width (interval-length (ly:stencil-extent (interpret-markup layout props left) X))) (right-width (interval-length (ly:stencil-extent (interpret-markup layout props right) X))) - (middle-width (- line-width (+ (+ left-width right-width) (* word-space 2)))) + (middle-width (max 0 (- line-width (+ (+ left-width right-width) (* word-space 2))))) (period (+ space pattern-width)) (count (truncate (/ (- middle-width pattern-width) period))) (x-offset (+ (* (- (- middle-width (* count period)) pattern-width) (/ (1+ dir) 2)) (abs (car pattern-x-extent)))))