[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with extending 'magnetic snapping lyrics' engraver
From: |
Werner LEMBERG |
Subject: |
Re: problem with extending 'magnetic snapping lyrics' engraver |
Date: |
Wed, 06 Apr 2022 10:06:01 +0000 (UTC) |
> It's uncomfortable to have grob properties of procedure type, since
> they are automatically resolved as callbacks. You set
> LyricWord.hyphen-formatter to ly:lyric-hyphen::print. Then, when
> you do
>
> (ly:grob-property grob 'hyphen-formatter)
>
> this not only looks up ly:lyric-hyphen::print in the property, but
> executes it on the LyricWord and returns the result. Since
> ly:lyric-hyphen::print is written to work on a LyricHyphen and not a
> LyricWord, it gives up and returns '(). Then you try to apply the
> "formatter" '() to the hyphen, which goes wrong. You could use
> ly:grob-property-data, which skips callbacks, [...]
Thanks a lot for the explanation!
> but how about just
> changing
>
> (let* ((hyphen-sten (ly:lyric-hyphen::print hyphen))
>
> to
>
> (let* ((hyphen-sten (ly:grob-property hyphen 'stencil))
>
>
> ? Then you can do \override LyricHyphen.stencil = #what-you-want to
> get the result.
D'oh, so simple, thanks again!
Werner