Paul Morris <p...@paulwmorris.com> writes:

> Just to make sure I'm communicating my other idea (above)... you're
> saying the following wouldn't work well either (but would end up an
> invasive mess)?
>
> The code that handles overriding stencils could accept either a
> stencil or a markup, and when it received a markup it would convert it
> to a stencil using grob-interpret-markup, since it always has access
> to the grob and thus the layout/properties.

There is not one "code that handles overriding stencils".  Overrides are
a general mechanism.  So we are talking about the code _interpreting_
stencils.  This code will tend to be some get_property ("stencil") call.
There are a lot of those from a lot of different engravers.

Making this consistently workable would require tampering with a lot of
call sites.

> You know the code and I trust your judgement.  I'm just curious.  In
> any case, a command like \appearance would get the job done and be
> simpler for the user.  I suppose it could accept either a markup or a
> stencil and just pass the stencil through to the override (or tweak)
> if a stencil was supplied.

A user-level command could indeed accept either markup or stencil and
create a suitable override depending on which it gets.  There is,
however, also the possibility to write \markup \stencil #... in order to
let a markup pass through a stencil.  It's just more verbose and more
back-and-forth.

-- 
David Kastrup

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to