lilypond-user
[Top][All Lists]
Advanced

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

Re: TextScript vertical alignment in Dynamics context


From: Jean Abou Samra
Subject: Re: TextScript vertical alignment in Dynamics context
Date: Tue, 5 Apr 2022 12:21:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

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




reply via email to

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