| [ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
| [ < Font families ] | [ Up : Fonts ] | [ Single entry fonts > ] |
Font features
When using OpenType fonts, font features can be used.1 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).
\markup { \override #'(font-name . "TeX Gyre Schola") normal style: Hello HELLO } \markup { \override #'(font-name . "TeX Gyre Schola") \caps { small caps: Hello } } \markup { \override #'(font-name . "TeX Gyre Schola") \override #'(font-features . ("smcp")) { true small caps: Hello } } \markup { \override #'(font-name . "TeX Gyre Schola") normal number style: 0123456789 } \markup { \override #'(font-name . "TeX Gyre Schola") \override #'(font-features . ("onum")) { old number style: 0123456789 } } \markup { \override #'(font-name . "TeX Gyre Schola") \override #'(font-features . ("salt 0")) { stylistic alternate 0: εφπρθ } } \markup { \override #'(font-name . "TeX Gyre Schola") \override #'(font-features . ("salt 1")) { stylistic alternate 1: εφπρθ } } \markup { \override #'(font-name . "TeX Gyre Schola") \override #'(font-features . ("onum" "smcp" "salt 1")) { multiple features: Hello 0123456789 εφπρθ } }
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.
Although it is easy to switch between preconfigured fonts, it is also possible to use other fonts. For more information, see Single entry fonts and Entire document fonts.
See also
Notation Reference: The Emmentaler font, Music notation inside markup, Rotating objects, Selecting font and font size, Font markup.
| [ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
| [ < Font families ] | [ Up : Fonts ] | [ Single entry fonts > ] |
![[image of music]](../3e/lily-f731d5f9.png)