[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `\textLengthOn` for `TextSpanner` grobs
From: |
Werner LEMBERG |
Subject: |
Re: `\textLengthOn` for `TextSpanner` grobs |
Date: |
Sun, 28 Nov 2021 15:10:23 +0000 (UTC) |
>> please have a look at this example
>>
>> ```
>> {
>> \set Score.skipBars = ##t
>> \override TextSpanner.bound-details.left.text = "poco a poco tempo I"
>> \override TextSpanner.bound-details.right.text = "Tempo I"
>> R1*4\startTextSpan |
>> R1\stopTextSpan
>> }
>> ```
>>
>> What is the equivalent of `\textLengthOn` for `TextSpanner` grobs so
>> that the multi-measure rest gets properly stretched horizontally?
>
> Use
>
> \override TextSpanner.minimum-length = 30
> \override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
Thanks. Alas, doesn't work correctly for broken spanners:
```
\paper {
line-width = 100\mm
}
{
\set Score.skipBars = ##t
\override TextSpanner.bound-details.left.text = "poco a poco tempo I"
\override TextSpanner.bound-details.left-broken.text = ""
\override TextSpanner.bound-details.right.text = "Tempo I"
\override TextSpanner.bound-details.right-broken.text = ""
\override TextSpanner.minimum-length = 34
\override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
R1*4\startTextSpan | \break
R1*4\stopTextSpan |
R1 |
}
```
I also wonder whether there is a solution (or should be a solution)
that doesn't need manual entering of a minimum length value that can
only be found by trial and error. For example, wouldn't it be
sensible to have the possibility of
```
\override TextSpanner.bound-details
.left.extra-spacing-height = #'(-inf.0 . +inf.0)
\override TextSpanner.bound-details
.right.extra-spacing-height = #'(-inf.0 . +inf.0)
```
in combination with the `extra-spacing-width` property to get
automatically the correct value(s)?
Werner