lilypond-user
[Top][All Lists]
Advanced

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

Re: [HELP] Change notehead font-size depending on note duration


From: Jean Abou Samra
Subject: Re: [HELP] Change notehead font-size depending on note duration
Date: Wed, 2 Mar 2022 07:37:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Le 01/03/2022 à 20:34, Valentin Petzel a écrit :
Hello Robert,

the problem here is that the font-size property of the NoteHead is not
evaluated. (This happens from time to time, and I’m not sure why this is so.)



Look at Font_interface::get_default_font. It takes a property alist
chain from the grob and then applies the font selection mechanism
to this alist chain. If there are callbacks, they won't be understood,
and the grob is not available in this part. This is a known dark
corner in LilyPond's design, caused by the interaction between
markups and grobs. Font selection works with alist chains because
that's all you have when working with a markup. Similarly, this
means that the properties used by a markup that gets interpreted
by grob-interpret-markup are not automatically evaluated if
they are callbacks. Better would be changing markups not to use
alist chain but some kind of overarching data structure that
could come with a grob or not, and would automatically execute
callbacks transparently on property accesses. Another possibility
would be to make the interpretation of standalone markups
actually handled by a special grob. Yet another one would be
traversing the markup to resolve all properties it uses (as
declared by the markup command definitions) beforehand.
The last one would be less flexible though.

Best,
Jean




reply via email to

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