The most common thing to change about the appearance of fonts is their
size. The font size of any context can be easily changed by setting
the fontSize
property for that context. Its value is a number:
negative numbers make the font smaller, positive numbers larger. An
example is given below:
c4 c4 \set fontSize = #-3 f4 g4
This command will set font-size
(see below) in all layout
objects in the current context. It does not change the size of
variable symbols, such as beams or slurs.
The font size is set by modifying the font-size
property. Its
value is a number indicating the size relative to the standard size.
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.
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 font-size
mechanism does not work for fonts selected
through font-name
. These may be scaled with
font-magnification
.
One of the uses of fontSize
is to get smaller symbols for cue
notes. An elaborate example of those is in
input/test/cue-notes.ly.
The following commands set fontSize
for the current voice:
Read comments on this page, or
add one.
This page is for LilyPond-2.2.6 (stable-branch). |