lilypond-user
[Top][All Lists]
Advanced

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

Re: Temporary font change?


From: tisimst
Subject: Re: Temporary font change?
Date: Thu, 19 Feb 2015 08:12:34 -0700 (MST)

Urs Liska wrote
> Am 19.02.2015 um 15:25 schrieb Klaus Blum:
>> Dear LilyPond fellows,
>>
>> is there a way to temporarily change the notation font?
>> For example, only some notes or one voice in a hand-written look like
>> "improviso"?
> 
> https://sites.google.com/site/tisimst/Home/custom-font-how-to#localized-font-changes
> ?
>>
>> I'm trying something like
>> <http://lilypond.1069038.n5.nabble.com/file/n172083/Zwischenablage01.png>
>>
>> by a code like this:
>>
>> % -------------------------------------------------
>> \version "2.18.2"
>> <<
>>    \new Staff {
>>      <<
>>        { c'1^"Complete the following intervals:"  f' dis'}
>>        \\
>>        {
>>          \override NoteHead.color   = #blue
>>          \override Accidental.color = #blue
>>          % do some magic here to change to "improviso" font
>>          a'1 a' ais'
>>        }
>>      >>
>>    }
>>    \new Lyrics \lyricmode { "major 6th        "1 "major 3rd        "
>> "perf.
>> 5th        " }
>> % -------------------------------------------------
>>
>> Thanks in advance for your thoughts,
>> Klaus

Klaus,

Urs has pointed you to the easiest way (thanks, Urs!) and you can copy +
paste it right into your file. Here's an abridged version for a single font
(it should come AFTER you set the global staff size and set the global
document fonts), which might be better if you don't have all the others
installed:

  \paper {
    #(add-music-fonts fonts 
        'improviso  ; the font-family name
        "improviso"   ; the music font
        "improviso"   ; the brace font
        feta-design-size-mapping  ; don't change this
        (/ staff-height pt 20))  ; don't change this either
  }

You can also download a pre-made stylesheet that automatically has this
built-in from  fonts.openlilylib.org
<http://fonts.openlilylib.org/docs.html#stylesheets>  . Coincidentally, it
is also called "font-register.ily" like on the site that Urs pointed you to.
However, it attempts to make ALL the alternative fonts available to your
file, which may be a problem if they aren't all installed. 

Once that is in your LilyPond path and "\include"-ed in your file, then all
you have to do is

  \override [GROB].font-family = #'improviso

for any GROB you want to change to Improviso and back with

  \revert [GROB].font-family

Regards,
Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Temporary-font-change-tp172083p172086.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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