Re: self-alignment-X has the opposite effect on Lyric syllables narrower than the note-head

2022-02-27 Thread Jean Abou Samra



Le 01/02/2022 à 22:41, Simon Albrecht a écrit :

Hi Aaron,

thanks for looking into this.

On 20/01/2022 14:07, Aaron Hill wrote:
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.


Well, I wouldn’t call that ‘odd’ since it is a very useful effect and 
I very often use alignment values other than -1 or 1, which makes it 
intuitive to work with. The step from 0.8 to 1 is the same as the step 
from 1 to 1.2.



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. 


That’s unexpected and explains it perfectly. I will set 
parent-alignment-X to 0 in my default style sheet.


However, it may be worthwhile opening a ticket like “Unset 
parent-alignment-X causes unexpected behaviour” IMO.


Best, Simon



Opened ticket
https://gitlab.com/lilypond/lilypond/-/issues/6295

Jean

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: self-alignment-X has the opposite effect on Lyric syllables narrower than the note-head

2022-02-01 Thread Simon Albrecht

Hi Aaron,

thanks for looking into this.

On 20/01/2022 14:07, Aaron Hill wrote:
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.


Well, I wouldn’t call that ‘odd’ since it is a very useful effect and I 
very often use alignment values other than -1 or 1, which makes it 
intuitive to work with. The step from 0.8 to 1 is the same as the step 
from 1 to 1.2.



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. 


That’s unexpected and explains it perfectly. I will set 
parent-alignment-X to 0 in my default style sheet.


However, it may be worthwhile opening a ticket like “Unset 
parent-alignment-X causes unexpected behaviour” IMO.


Best, Simon


___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: self-alignment-X has the opposite effect on Lyric syllables narrower than the note-head

2022-01-20 Thread Aaron Hill

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