Previous: Entire document fonts, Up: 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.
font-encoding
is a symbol that sets layout of the glyphs. This should only be
set to select different types of non-text fonts, e.g.
fetaBraces
for piano staff braces, fetaMusic
the
standard music font, including ancient glyphs, fetaDynamic
for dynamic signs and fetaNumber
for the number font.
font-family
is a symbol indicating the general class of the typeface.
Supported are roman
(Computer Modern), sans
, and
typewriter
.
font-shape
is a symbol indicating the shape of the font. There are typically
several font shapes available for each font family. Choices are
italic
, caps
, and upright
.
font-series
is a symbol indicating the series of the font. There are
typically several font series for each font family and shape.
Choices are medium
and bold
.
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 } } }
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.
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.