lilypond-user
[Top][All Lists]
Advanced

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

Re: Replacing glyph visuals with arbitrary unicode character


From: Schneidy
Subject: Re: Replacing glyph visuals with arbitrary unicode character
Date: Sun, 23 Mar 2014 08:32:21 -0700 (PDT)

JoeyD wrote
> I'm looking for a method to replace glyphs (in this case, clefs and
> certain
> rests) with unicode values from a preinstalled font.
> 
> I can access the character I want with the standard \char ##xyyyy where
> yyyy is hexadecimal, but I would like to find a way to replace a glyph
> with
> the character without affecting its functionality.

Here you go :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.2"

myClef = \markup \magnify #3 \lower #1 \scale #'(0.8 . 1) "G" % or your
\char ##xyyyy
mrRest = \markup "R" % or your \char ##xyyyy

{
   \once\override Staff.Clef.stencil = #(lambda (grob)
         ly:clef::print (grob-interpret-markup grob myClef))
   c'' 
   \override Rest.stencil = #(lambda (grob)
           ly:clef::print (grob-interpret-markup grob mrRest))
   c\rest
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

HTH,
~Pierre



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Replacing-glyph-visuals-with-arbitrary-unicode-character-tp160741p160742.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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