Finding fonts

In addition to any font already installed on the operating system, more fonts may be added to the ones detected by FontConfig (and thus available in LilyPond scores) by the following commands:

#(ly:font-config-add-font "path/to/font-file")
#(ly:font-config-add-directory "path/to/directory/")

Both commands accept either absolute or relative paths, which makes it possible to compile a score on any system by simply distributing the relevant font files together with the LilyPond input files.

To verify that the desired fonts are found by FontConfig, use the command #(ly:font-config-display-fonts), which prints the complete list of available fonts to the console log. It also shows the actual font names to be used with LilyPond; these may differ from the file names themselves. Alternatively, running lilypond -dshow-available-fonts in a terminal has the same effect.

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