On Mon, Jan 19, 2009 at 6:10 AM, Werner LEMBERG <w...@gnu.org> wrote:
>
>> It says that each can "Retrieve a stencil", which strikes me as
>> useful. I was actually looking for a scheme-way of accessing
>> stencils, but the function description is bewildering to me.
>
> Well, improvements are welcome :-)
>
>> Can I somehow use it like this...
>> \once \override NoteHead #'stencil = #(ly:get-glyph font index)

You can't do it this easily.  The font elements within stencils must
constructed correctly to correspond with scaling factors: LilyPond
sets up the font sizes such that 1.0 unit of distance corresponds with
a staff-space.  Since this depends on \paper and \layout settings, you
have to have a font as returned by (for example) ly:grob-default-font.
Typically, this happens from within a grob callback.

Grep for ly:font-get-glyph in the scm directory for examples.

ly:get-glyph should probably be removed as it presupposes some kind of
unspecified encoding.

-- 
Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to