Next: Score layout, Previous: Setting global staff size, Up: Music layout
The easiest method of setting the font size of any context, is by
setting the fontSize
property.
c8 \set fontSize = #-4 c f \set fontSize = #3 g
It does not change the size of variable symbols, such as beams or slurs.
Internally, the fontSize
context property will cause the
font-size
property to be set in all layout objects. The value
of font-size
is a number indicating the size relative to the
standard size for the current staff height. Each step up is an
increase of approximately 12% of the font size. Six steps is exactly a
factor two. The Scheme function magstep
converts a
font-size
number to a scaling factor.
c8 \override NoteHead #'font-size = #-4 c f \override NoteHead #'font-size = #3 g
LilyPond has fonts in different design sizes. The music fonts for
smaller sizes are chubbier, while the text fonts are relatively wider.
Font size changes are achieved by scaling the design size that is
closest to the desired size. The standard font size (for
font-size
equals 0), depends on the standard staff height. For
a 20pt staff, a 10pt font is selected.
The font-size
property can only be set on layout objects that
use fonts. These are the ones supporting the
font-interface layout interface.
The following commands set fontSize
for the current voice:
This page is for LilyPond-2.8.8 (stable-branch).