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: Mark Knoop
Subject: Re: TextScript vertical alignment in Dynamics context
Date: Wed, 06 Apr 2022 07:27:04 +0100
User-agent: mu4e 1.7.12; emacs 29.0.50

At 12:21 on 05 Apr 2022, Jean Abou Samra wrote:
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

Thanks Jean!


--
Mark Knoop



reply via email to

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