[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behaviour with after-line-breaking and minimum-length-after-br

From: Jean Abou Samra
Subject: Re: Weird behaviour with after-line-breaking and minimum-length-after-break
Date: Sat, 3 Apr 2021 11:09:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Le 02/04/2021 à 10:28, Thomas Morley a écrit :

consider the following code:

\version "2.23.1"

\paper { ragged-right = ##t }

   \override TrillSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
   \override TrillSpanner.minimum-length-after-break = 60
   \override TrillSpanner.minimum-length = 60
   \override TrillSpanner.after-line-breaking = ##t

   b1\startTrillSpan \break b\stopTrillSpan

I see two bugs here:
Setting after-line-breaking = ##t should enable printing the
TrillSpanner on second line.
It does not - for every tested version, starting with 2.12.3.

(2) minimum-length-after-break takes affect on second line although
TrillSpanner is not continued there.
If minimum-length-after-break is unset, minimum-length is applied to
the not printed part of the broken TrillSpanner.
This happens even if after-line-breaking = ##f

We currently have seven grobs with after-line-breaking set to
DurationLine, Glissando, Hairpin, LyricHyphen, TrillSpanner,
VoiceFollower and VowelTransition

TrillSpanner is the only one with bug (1)
All of them suffer from bug (2)


Hi Harm, Regarding bug (1): maybe this is because there is not enough room for the TrillSpanner? Looking at the output of

\version "2.22.0" \paper { ragged-right = ##t } {   \override TrillSpanner.springs-and-rods = #ly:spanner::set-spacing-rods   \override TrillSpanner.minimum-length-after-break = 100   \override TrillSpanner.minimum-length = 100   b1\startTrillSpan \break b b b\stopTrillSpan } I can see that the "Tr" mark is placed just above the note. I applied the following diff:

diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index cc848d4cc7..48679448f2 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -331,9 +331,11 @@ Line_spanner::print (SCM smob)    Offset dz_dir = dz.direction ();    if (gaps[LEFT] + gaps[RIGHT] > dz.length ())      { +      message ("Not enough room for line spanner.");        return SCM_EOL;      } +  message ("About to print line spanner");    Stencil line;    for (LEFT_and_RIGHT (d))      {

Then, on the example

\version "2.22.0" \paper { ragged-right = ##t } {   \override TrillSpanner.springs-and-rods = #ly:spanner::set-spacing-rods   \override TrillSpanner.minimum-length-after-break = 50   \override TrillSpanner.minimum-length = 50   \override TrillSpanner.after-line-breaking = ##t   b1\startTrillSpan \break b\stopTrillSpan } I get the log:

Drawing systems...

Refusing to print line spanner because it is too short.

About to print line spanner

Not sure if something can be done about this.

Bug (2) is clearly unexpected. Though, I can see that VowelTransition does ignore minimum-distance-after-break when invisible, at least in this test case:

\version "2.23.2" { c1 1 } \addlyrics { Ah \tweak minimum-length-after-break 100 %\tweak after-line-breaking ##t \vowelTransition \break oh }

There is code in lily/vowel-transition.cc that accesses after-line-breaking. ly:spanner::set-spacing-rods should probably do something along the same lines.

Best regards, Jean

reply via email to

[Prev in Thread] Current Thread [Next in Thread]