openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
119 stars 39 forks source link

Add options to choose text typefaces together with the notation font. #151

Closed mrtnnbr closed 7 years ago

mrtnnbr commented 8 years ago

Cleaned up change set as following Urs' comments.

mrtnnbr commented 8 years ago

Unfortunately the verbosity is needed to make the font change actually work. There seem to be two possible ways to get rid of the redundancy:

  1. Leave out the initial value in the calls to registerOption
  2. Use #{ \setOption stylesheets.font.roman #} instead of "serif" inside the definition of useNotationFont (and analogous calls for the other font families.) I'm not sure which one to favour, though.
mrtnnbr commented 8 years ago

Okay, I opted for the first approach, as the second one doesn't work. (Sort of, I meant to use \getOption, which doesn't work, while the typo \setOption does oddly enough, but looks just wrong.)

Sorry for the churn.