On 3/15/09 9:44 AM, "tao_lilypondu...@gmx.net" <tao_lilypondu...@gmx.net>
wrote:

> Hi lists,
> 
> I am trying to get glyphs from the emmentaler font as it is explained in the
> manual by the functions ly:system-font-load and ly:font-get-glyph.
> So far it seems to work to access the glyphs and checking with ly:stencil? it
> tells me that I really got a stencil but when I try to use that stencil to
> override the stencil property of the NoteHead grob I get some errors I don't
> understand.
> 
> Any help is appreciated.
> 
> test =
> #(define-music-function (parser location music) (ly:music?)
>    (let* ((font (ly:system-font-load "emmentaler-20"))
>           (glyph (ly:font-get-glyph font "noteheads.s2")))
>          (display (ly:stencil? glyph))
>          #{
>                  \once \override NoteHead #'stencil = $glyph
>                  $music
>          #}))
>   
> <<
> \test c'1


The 'stencil property of an object is not a stencil, but a procedure that
produces a stencil.

So what you want to do is to set 'stencil to something like
ly:text-interface::print and then set the 'text property of the NoteHead to
$glyph.

HTH,

Carl



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

Reply via email to