[icon]

GNU LilyPond

-- --

What is LilyPond
Home
Examples
Templates
Download
GNU/Linux binaries
Windows binaries
Source code
Documentation
Tutorial
Manual
Glossary
Index

Support
Mailing lists
Search
WikiWiki

External sites
lilypond.org/stable
lilypond.org/development
savannah.gnu.org
ftp.lilypond.org
Mutopia
Other music online

Font selection

The most common thing to change about the appearance of fonts is their size. The font size of a Voice , Staff or Thread context, can be easily changed by setting the fontSize property for that context:

[picture of music]
This command will not change the size of variable symbols, such as beams or slurs. You can use this command to get smaller symbol for cue notes, but that involves some more subtleties. An elaborate example of those is in input/test/cue-notes.ly.

The font used for printing a object can be selected by setting font-name, e.g.

       \property Staff.TimeSignature
         \set #'font-name = #"cmr17"
     
You may use any font which is available to TeX, such as foreign fonts or fonts that do not belong to the Computer Modern font family. Font selection for the standard fonts, TeX's Computer Modern fonts, can also be adjusted with a more fine-grained mechanism. By setting the object properties described below, you can select a different font. All three mechanisms work for every object that supports font-interface.
font-family
A symbol indicating the general class of the typeface. Supported are roman (Computer Modern), braces (for piano staff braces), music (the standard music font), ancient (the ancient notation font) dynamic (font for dynamic signs) and typewriter.
font-shape
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
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.
font-relative-size
A number indicating the size relative the standard size. For example, with 20pt staff height, relative size -1 corresponds to 16pt staff height, and relative size +1 corresponds to 23 pt staff height.
font-design-size
A number indicating the design size of the font.

This is a feature of the Computer Modern Font: each point size has a slightly different design. Smaller design sizes are relatively wider, which enhances readability.

For any of these properties, the value * (i.e. the symbol, *, entered as #'*), acts as a wildcard. This can be used to override default setting, which are always present. For example:

       \property Lyrics.LyricText \override #'font-series = #'bold
       \property Lyrics.LyricText \override #'font-family = #'typewriter
       \property Lyrics.LyricText \override #'font-shape  = #'*
     

There are also pre-cooked font selection qualifiers. These are selected through the object property font-style. For example, the style finger selects family number and relative size -3. Styles available include volta, finger, tuplet, timesig, mmrest, script, large, Large and dynamic. The style sheets and tables for selecting fonts are located in scm/font.scm. Refer to this file for more information.

The size of the font may be scaled with the object property font-magnification. For example, 2.0 blows up all letters by a factor 2 in both directions.

BUGS

Relative size is not linked to any real size.

There is no style sheet provided for other fonts besides the TeX family, and the style sheet can not be modified easily.

Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to (address unknown)

Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.7.14 (development-branch) by

Buchan Milne <(address unknown)>, Thu Mar 6 21:11:35 2003 CET.