Font features

When using OpenType fonts, font features can be used.3 Note that not all OpenType fonts have all features. If you request a feature that does not exist in the chosen font, the feature is simply ignored. The example below uses the font ‘TeX Gyre Schola’ (this is, the roman style of the family).

\paper {
  property-defaults.fonts.serif = "TeX Gyre Schola"
}

\markup "normal style: Hello HELLO"

\markup \caps "small caps: Hello"

\markup \override #'(font-features . ("smcp")) "true small caps: Hello"

\markup "normal number style: 0123456789"

\markup \override #'(font-features . ("onum"))
  "old number style: 0123456789"

\markup \override #'(font-features . ("salt 0"))
  "stylistic alternate 0: εφπρθ"

\markup \override #'(font-features . ("salt 1"))
  "stylistic alternate 1: εφπρθ"

\markup \override #'(font-features . ("onum" "smcp" "salt 1"))
  "multiple features: Hello 0123456789 εφπρθ"

[image of music]

For the full OpenType font feature list see https://www.microsoft.com/typography/otspec/featurelist.htm; for identifying features of OpenType fonts see https://lists.gnu.org/archive/html/lilypond-devel/2017-08/msg00004.html.

See also

Notation Reference: The Emmentaler font, Music notation inside markup, Rotating objects, Selecting font and font size, Font markup.

See also

Notation Reference: Finding fonts, Font families, Changing fonts.

Snippets: Text.


Footnotes

(3)

Selecting OpenType font scripts and languages is not supported yet.


LilyPond Notation Reference v2.25.15 (development-branch).