Previous: Entire document fonts, Up: Fonts


1.8.3.2 Single entry fonts

By setting the object properties described below, you can select a font from the preconfigured font families. LilyPond has default support for the feta music fonts. Text fonts are selected through Pango/FontConfig. The serif font defaults to New Century Schoolbook, the sans and typewriter to whatever the Pango installation defaults to.

Fonts selected in the way sketched above come from a predefined style sheet. If you want to use a font from outside the style sheet, then set the font-name property,

{
  \override Staff.TimeSignature #'font-name = #"Charter"
  \override Staff.TimeSignature #'font-size = #2
  \time 3/4
  c'1_\markup {
    \override #'(font-name . "Vera Bold")
      { This text is in Vera Bold }
  }
}

[image of music]

Any font can be used, as long as it is available to Pango/FontConfig. To get a full list of all available fonts, run the command

lilypond -dshow-available-fonts blabla

(the last argument of the command can be anything, but has to be present).

The size of the font may be set with the font-size property. The resulting size is taken relative to the text-font-size as defined in the \paper block.

See also

Snippets: Text.

This page is for LilyPond-2.11.58 (development-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Your suggestions for the documentation are welcome.

Other languages: espaƱol.