[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using ly:get-glyph, ly:font-get-glyph
From: |
Werner LEMBERG |
Subject: |
Re: using ly:get-glyph, ly:font-get-glyph |
Date: |
Mon, 19 Jan 2009 09:10:44 +0100 (CET) |
> 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)
> ?
>
> Is font a string, symbol, or an actual font?
> Is index a number? How do I know what number
> a particular glyph is? How does this work???
>
> None of these seemed to work (don't laugh, but
> I'm seriously stabbing in the dark here):
> (ly:font-get-glyph 'Emmentaler '"Half notehead")
You can't directly access the font name, it seems. Look at the
definition of the `musicglyph' markup command in
define-markup-commands.scm which uses ly:paper-get-font to get a font
handle for ly:font-get-glyph.
I assume the same is true for ly:get-glyph -- there is no example code
in lilypond which uses this function (which is, admittedly, not very
useful in general).
Werner