> in the example below, why does overriding font-name work, but not
> overriding font-series? The way Frescobaldi displays the available
> fonts, it seems like the Black font weight is right there with the
> other weights (bold and [medium]).
> 
> Best, Simon
> 
> \version "2.25.23"
> 
> \paper {
>   %% https://www.fontsquirrel.com/fonts/alegreya
>   property-defaults.fonts.serif = "Alegreya"
> }
> 
> \markup \bold \column {
>   test
>   \override #'(font-name . "Alegreya Black") test
>   \override #'(font-series . black) test
> }

[Testing with Alegreya 2.008 from 2018-08-08]

LilyPond generates a warning while processing your input file:

  Warning: unknown font-series value black; allowed values are thin,
           ultralight, light, semilight, book, normal, medium,
           semibold, bold, ultrabold, heavy and ultraheavy

As can be seen there is no 'black' weight.  However, if you look up
the FontConfig documentation

  https://fontconfig.pages.freedesktop.org/fontconfig/fontconfig-user.html

you can see that 'black' has exactly the same weight as 'heavy'.  So if
you try

```
\version "2.25.23"

\paper {
  property-defaults.fonts.serif = "Alegreya"
}

\markup \bold \column {
  \override #'(font-name . "Alegreya Black") test
  \override #'(font-series . heavy) test
}

\paper {
  tagline = ##f
}
```

you can check with `pdffonts` (or a similar tool) that indeed only a
single font gets used for this markup, which means that they are
identical.  In other words, use 'heavy' instead of 'black'.

I've submitted a MR to add more keywords, see

  https://gitlab.com/lilypond/lilypond/-/merge_requests/2587


     Werner

Reply via email to