lilypond-user
[Top][All Lists]
Advanced

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

using ly:get-glyph, ly:font-get-glyph


From: Mark Polesky
Subject: using ly:get-glyph, ly:font-get-glyph
Date: Sun, 18 Jan 2009 22:07:51 -0800 (PST)

Two interesting-looking functions (ly:get-glyph, 
ly:font-get-glyph) are listed here...
http://lilypond.org/doc/v2.12/Documentation/user/lilypond-internals/Scheme-functions
...but I can't seem to get them to do anything.

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.

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")
(ly:font-get-glyph 'Emmentaler 'sm1)
(ly:font-get-glyph 'fetaMusic '"Half notehead")
(ly:font-get-glyph 'fetaMusic 'sm1)
(ly:get-glyph "emmentaler-20" 5)
(ly:get-glyph "emmentaler-20" "noteheads.s1")
(ly:get-glyph 'emmentaler-20 'noteheads.s1)
(ly:get-glyph "fetaMusic" 5)
(ly:get-glyph 'fetaMusic 'noteheads.s1)

Also, this warning came up alot:
warning: type check for `stencil' failed;
value `#<unspecified>' must be of type `unknown'

What does this mean? Does the parser freak out
if it knows what the stencil-type is? Is there 
some sort of ly:unspecified->unknown procedure?

Looking forward to learning...
- Mark


      




reply via email to

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