Hi, In scm/define-grobs.scm we can see that the following grobs: MultiMeasureRestNumber MultiMeasureRestText PercentRepeatCounter DoublePercentRepeatCounter have their X-offsets initialized to a sum of return values from two functions: x-aligned-on-self and x-centered-on-y-parent. Now, the x-aligned-on-self is quite clear, but i'm puzzled by x-centered-on-y-parent: why would we derive grob's horizontal position from its *vertical* parent?? Isn't it the job of horizontal parent to be the base for horizontal position? In other words, if MultiMeasureRestNumber's Y-parent (which is a MultiMeasureRest) should be the basis for MultiMeasureRestNumber's X-placement, then maybe we should simply set MultiMeasureRestNumber's X-parent to be that MultiMeasureRest?
I tried git archeology to learn about the motivation of this design, but i didn't get anything meaningful - the only thing i know is that Han-Wen wrote that code ;) so i'm ccing him. I did some testing and it seems that my idea is correct (i.e. we should just set appropriate X-parent and use that for alignment), but i don't know how to set that parent - the obvious way failed... Check out attached patch, and the testfile. Ideas? cheers, Janek
0001-set-X-parents-of-MMRest-numbers-and-PercRep.-correct.patch
Description: Binary data
double-percent-repeat.ly
Description: Binary data
_______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
