From 3c81184302e37ef7dd54c229be5da5e27708fd81 Mon Sep 17 00:00:00 2001 From: Nicolas Sceaux Date: Sun, 15 May 2011 12:28:51 +0200 Subject: [PATCH] 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. --- scm/define-markup-commands.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))))) -- 2.39.5