I'm sure this information is available somewhere, but all I can find is how to change the font for specific parts, not the entire document. Can you help me?
1 Answer
Look here at the bottom: https://lilypond.org/doc/v2.24/Documentation/notation/fonts
So you need to do
\paper {
myStaffSize = #20
#(define fonts
(make-pango-font-tree "Sans Font"
"Sans Font"
"Typewriter Font"
(/ myStaffSize 20)))
}
to change the default serif font to sans. With 2.25 this gets a bit more user friendly: https://lilypond.org/doc/v2.25/Documentation/notation/changing-fonts
\paper {
property-defaults.fonts.serif = "Sans Font"
}
Note that this changes the default font to sans. If you want to have the choice to still use serif you can also (with 2.25) change the default family:
\paper {
property-defaults.font-family = #'sans
}
\markup { Test \serif Test }
This might lead to use of serifs for certain markups where this is explicitely demanded, but since this is the default this should be uncommon I think.