Le 05/04/2022 à 09:48, Mark Knoop a écrit :
Hi,
I'm trying to align markups in a Dynamics context to their baseline, but they
always align their tops. Can't figure out what property to set to achieve this.
Example follows - I'd like the markups on the first line (which are in a
Dynamics context) to align DOWN rather than UP, i.e. to match the behaviour of
the markups on the second line (which are in a Voice context).
Thanks in advance for any help on this.
The alignment of text scripts is done via side positioning
(side-position-interface). Here they position against nothing, so the alignment
code just keeps them aligned on a fictive line at 0. The direction of these
text scripts is DOWN, so in effect they align on their tops. If you want them
aligned on their bottoms, set them to the other direction.
\new Dynamics \with {
\override TextScript.direction = #UP
} ...
Alternatively, use a mechanism that makes more sense for your use case, self
alignment (self-alignment-interface).
\new Dynamics \with {
\override TextScript.Y-offset =
#ly:self-alignment-interface::y-aligned-on-self
\override TextScript.self-alignment-Y = #DOWN
} ...
Best,
Jean