[icon]

GNU LilyPond

Welcome to the home of the GNU Music Typesetter

What is LilyPond
General information
Simple examples
Complex examples
Download
GNU/Linux binaries
Windows
Source code
Documentation
Tutorial
Manual
Glossary
other ...

Support
Mailing lists
Search
WikiWiki
FAQs

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

Node:Font selection, Next:, Previous:What to tune?, Up:Tuning output



Font selection

Most graphics in LilyPond are composed of characters of fonts. You can alter the characteristics of the font by setting certain grob properties. The mechanism that is used for this resembles LaTeX's New Font Selection Scheme. Within this scheme, a font is entirely characterized by its font name.

For each grob that uses fonts (in other words, each grob that supports font-interface) a font-name must be selected before it can be printed. The font name is selected by looking at a number of grob properties:

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), 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. Scalable type faces such TrueType and Adobe Type1 usually come as "one design fits all sizes".

font-name
The name of the font, without the design size, e.g. cmr, cmti, etc. Setting this overrides font-family, font-shape and font-series.

The font is selected by taking the first font that satisfies all qualifiers specified. You can override any of these fields through \override and \revert. The special value * matches any value for that qualifier.

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

There are also pre-cooked font selection qualifiers. These are selected through the grob 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.

BUGS

Relative size is not linked to any real size.

There is no mechanism to select magnification of particular fonts, meaning that you don't have access to continuously scaled fonts. You can scale the entire output, of course, see Output scaling.

There is no style sheet provided for other fonts besides the TeX family.

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 lilypond@packages.debian.org

Copyright (c) 1997--2001 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.4.12 (stable-branch) by

Anthony Fok <lilypond@packages.debian.org>, Tue Mar 12 01:35:39 2002 HKT.