>> I see, thanks.  Alas, this is actually another bug in FontConfig;
>> it doesn't properly handle Font Variations in TTCs.  I've reported
>> it just now as
>>
>> https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/488
> 
> After some more thinking I now believe that this is a bug in
> LilyPond.  My understanding is that function `link-ps-resdir-font`
> in `framework-ps.scm` has to be adjusted – it should accept Font
> Variations that don't access the variation part but only the default
> instance (which is 'NotoSerifCJKjp-ExtraLight' for the font in
> question).
> 
> Masamichi-san, please have a look!

Aaand I'm wrong again :-)

The very reason the problem occurs is that Federico's
`NotoSerifCJK-VF.ttc` is actually the renamed font file
`NotoSerifCJK-VF.otf.ttc`, and this font uses the 'CFF2' format.  Such
fonts can't be embedded into a PS file; consequently we get an error.

A solution to this particular problem is now easy: Replace
`NotoSerifCJK-VF.otf.ttc` with the fully equivalent (but slightly
larger) file `NotoSerifCJK-VF.ttf.ttc`, which can be found here:

  
https://github.com/notofonts/noto-cjk/blob/main/Serif/Variable/OTC/NotoSerifCJK-VF.ttf.ttc

Alternatively, use LilyPond's `-dbackend=cairo` command-line switch to
make it handle fonts in 'CFF2' format.

I'll submit a PR to make LilyPond emit a better error message.

Irrespective of the solution I suggest to replace
`NotoSerifCJK-VF.ttc` with something else.  For technical reasons,
Google sets the default instance of this font (i.e., the glyphs you
see if you access the font in the normal, non-variation way) to
'ExtraLight'.  This doesn't fit well with standard typesetting, which
normally uses 'regular' or 'medium'.


    Werner

Reply via email to