1

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 1

3

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.

1
  • That worked, thank you so much!
    – Niklas
    Commented Jun 4 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.