lilypond-user
[Top][All Lists]
Advanced

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

Re: Force text on line without using \textLengthOn


From: Thomas Morley
Subject: Re: Force text on line without using \textLengthOn
Date: Sun, 28 Oct 2018 22:43:46 +0100

Am Fr., 26. Okt. 2018 um 13:58 Uhr schrieb Thomas Morley
<address@hidden>:

> currently I've not the time to dive deeper in your code, maybe later
> today or during the upcoming weekend.

Hi Urs,

I haven't looked deeply into your code, but I think it will not work as desired.

First some general words about (Text)Spanner.
A (Text)Spanner is spanned between it's left/right bound, usually
without affecting spacing of the spanned NoteColumns at all.
If you enlarge the (Text)Spanners width, Lilypond will now use this to
space the covered NoteColumns following the built-in rules.

Example:
{
  c'8 c' c' c'
  \override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
  \override TextSpanner.minimum-length = 20
  c'8\startTextSpan c' c' c'\stopTextSpan
}
Here the different spacing is obvious but each is even.


In my approach I therefore tried to end (Text)Spanners as late as
possible to benefit from this behaviour.

I'm aware I mentioned the possibility to insert <>\stopTextSpanner via
a function right after the \startTextSpan, i.e. before the next event.
Your function follows those lines.
Though, now you don't benefit from the even spacing of the covered
NoteColumn, because you only have the start and end.
{
  c'8 c' c' c'
  \override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
  \override TextSpanner.minimum-length = 20
  c'8\startTextSpan <>\stopTextSpan c' c' c'
}

The fiddling to find the correct minimum-length of the (Text)Spanner
is of secondary importance. With or without empty dimensions of the
(Text)Spanners text.

Sorry, if I pointed in a wrong direction.
I currently don't have further insights or hints as well :(

Though, Kieren pointed to his ignore(H/V)-definitions.

Admittedly I don't know what they are about.

Testing them with

ignoreH =
   \propertyTweak horizontal-skylines ##f
   \propertyTweak extra-spacing-width #empty-interval
   \etc

ignoreV =
   \propertyTweak vertical-skylines ##f
   \propertyTweak extra-spacing-height #empty-interval
   \etc

ignore = \ignoreH \ignoreV \etc

{
  c'8-\ignore ^"foo"
  c'8-\ignore ^"bar"
}

returns a segfault:

warning: cannot find skylines - strange alignment will follow
  c'8
     -\ignore ^"foo"
lilypond: 
/home/gub/NewGub/gub/target/linux-64/src/lilypond-git.sv.gnu.org--lilypond.git-stable-2.20/lily/skyline.cc:660:
Real Skyline::internal_distance(const Skyline&, Real*) const:
Assertion `sky_ == -other.sky_' failed.
Aborted (core dumped)

Kieren, could you propose some use-cases?


Cheers,
  Harm



reply via email to

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