On 2022-01-20 3:05 am, Simon Albrecht wrote:
when setting self-alignment-X on a lyric syllable that is narrower
than its corresponding note-head, it takes the opposite effect of what
should be expected:
%%%%%%%%%%%%%%%%%%
\version "2.23.5"
<<
{ 1 1 }
\addlyrics {
\tweak self-alignment-X #3 test
\tweak self-alignment-X #3 i
}
%%%%%%%%%%%%%%%%%%
Firstly, alignment values outside the interval [-1, 1] in general behave
oddly as the result depends on the size of the object in question.
Larger things do end up moving more.
Secondly, LyricText has parent-alignment-X set to '() which, as far as I
can tell, results in inheriting self-alignment-X. Choosing #RIGHT, for
example, means to have the right side of the text align with the right
edge of the note.
Combine those quirks together and do you get some very unusual results
with out-of-range alignments. A value of (* 3 RIGHT) would mean you are
aligning to a point much to the right of the note in question. And the
same so-called "super-right-aligning" of the text also means its
reference point is beyond the right bound. Wider text like "test" has
the reference point much farther to the right, pushing it farther left
compared to "i".
Try setting parent-alignment-X to, say, #CENTER (0) to remove a variable
from the equation. "test" will still move more than "i", but it should
hopefully be easier to see that both texts are moving in the same
direction (relative to the note center).
Perhaps an unspecified parent-alignment-X should take self-alignment-X's
value but clamped to [LEFT, RIGHT]:
%%%%
\override LyricText.parent-alignment-X =
#(lambda (grob) (max LEFT (min RIGHT (ly:grob-property grob
'self-alignment-X))))
%%%%
-- Aaron Hill
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond