Hi,

I have a font (Lexicon No1) that comes in 4 weight variants (A, B, C,
D). Roman font selects A. But \bold and '(font-series . bold) do select
the D variant. How can I make LilyPond choose C instead?

A solution is write a markup function:

#(define-markup-command (bold layout props arg)
  (markup?)
  #:category font
  "Switch to Lexicon No1 C when we are in roman mode"
  (interpret-markup layout
    (if (eq? (chain-assoc-get 'font-family props 'roman) 'roman)
      (prepend-alist-chain 'font-name "Lexicon No1 C" props)
      (prepend-alist-chain 'font-series 'bold props))
    arg))

This works. But the font name is hard coded, and it does not work for
texts that are printed with the 'font-series 'bold layout property set.

So I guess there is a place where LilyPond determines the weight to use
for 'bold and consecutively, the font to load. I guess that it is
possible to edit ~/.fonts.conf to have fontconfig then select the "C"
font instead of "D", based on the weight.

But where can I find how LilyPond selects the font weight and/or font
for the bold font series?


Thanks for any pointers.

-- 
Wilbert Berendsen
(http://www.wilbertberendsen.nl)


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to