lilypond-devel
[Top][All Lists]
Advanced

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

Re: Accessing emmentaler glyph-names in scheme


From: Carl D. Sorensen
Subject: Re: Accessing emmentaler glyph-names in scheme
Date: Sun, 15 Mar 2009 14:51:29 -0600



On 3/15/09 9:44 AM, "address@hidden" <address@hidden>
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





reply via email to

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