lilypond-user
[Top][All Lists]
Advanced

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

RE: Changing text fonts


From: James Lowe
Subject: RE: Changing text fonts
Date: Thu, 10 Mar 2011 16:54:59 +0000

Hannes,

)-----Original Message-----
)From: address@hidden
)[mailto:address@hidden On
)Behalf Of Hannes Kuhnert
)Sent: 10 March 2011 15:49
)To: address@hidden
)Subject: Re: Changing text fonts
)
)James Lowe schrieb:
)> If you wanted to override the font on a 'TextSpanner' you can use
)> something like
)>
)> \override TextSpanner #'(font-name) = "Baskerville"
)>
)> So you can use the same method to choose a font for chord markups.
)
)Thanks for your reply!
)
)I already assumed that it works that way. But what do I have to insert for
)“TextSpanner”,

    \override TextSpanner #'(font-name) = "Baskerville" for example. You can 
put this in your score construct so

--snip---

\version "2.13.51"

MyMusic = \relative c' { a\startTextSpanner b c d | a b c d | a b c 
d\stopTextSpanner }

\score {
  \new Staff {
    \override TextSpanner #'(font-size) = #-2
    \override TextSpanner #'(font-name) = "Baskerville"
    \relative c'' { 
      \MyMusic
    }
  }
}

--snip--

You can also put the override at the start of the music itself in a simple file

--snip--

\version "2.13.51"

\relative c' { 
    \override TextSpanner #'(font-size) = #-2
    \override TextSpanner #'(font-name) = "Baskerville"
   a\starTextSpanner b c d | a b c d | a b c d\stoptextSpanner 
}

---snip---


)if I want to change the font for chord markups? …

I'm guessing (because I don't use chords) by looking in the internals that if 
you look for 'font-name' you get a hit in the section 'font-interface'.

Then if you look in 'Internal properties' lower down you can see all the 'grob 
interfaces' that use this and I can see, for example 'ChordName' so you could 
try

\override ChordName #'(font-name) = "Baskerville" or whatever font you want.



)or for
)the lyrics or the header?

Well I showed you how to change the fonts already for the header just use the 
construct like

\header {
  title = \markup { \override #'(font-name . "Optima") " This is my Header" }
}

)
)For example “Score.ChordNames” doesn’t exist or at least doesn’t bear
)the font properties for the chord markup.
)
)> http://lilypond.org/doc/v2.13/Documentation/notation/fonts#entire-
)docu
)> ment-
)> fonts
)>
)> Where you can set the entire document so that \sans or anything that
)> uses 'sans' as its value will use whatever font you need to use.
)
)I read that before. I don’t want to change the generic aliases, but I want
)to choose them for objects where I don’t know how to do it.

You also need to take some time and look in the Learning Manual, specifically

http://lilypond.org/doc/v2.13/Documentation/learning/the-internals-reference-manual

This is a very good introduction and one I learnt from on how to find this kind 
of information.

James



reply via email to

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