>>> For Japanese fonts, I suggest HaranoAji. >>> It is the default Japanese font from TeX Live 2020. >>> >>> https://www.ctan.org/pkg/haranoaji >> >> OK, thanks for the suggestion. > > After some thinking I'm not sure whether HaranoAji is the best > solution. Given that both LilyPond and ghostscript need the fonts, a > TeXLive package doesn't help much – usually, FontConfig doesn't scan > TeXLive font directories. Additionally, older GNU/Linux distributions > don't provide a separate package for this font. > > I'm not sure how to tackle both the building of the Japanese texinfo > PDFs and the Japanese demo stuff in the LilyPond example files at the > same time. > > Suggestions? Ideas?
If I understand correctly, LilyPond needs to find the HaranoAji font, but Ghostscript does not need to find it. If LilyPond uses the HaranoAji font, the font will be embedded in the generated Postscript file. Even if you use `-dgs-never-embed-fonts`, you can still pass the font to Ghostscript with `-dfont-ps-resdir`. In Texinfo PDF building, you don't need Japanese fonts if only the included figure PDFs use the Japanese fonts. If you want to use Japanese characters in the text instead of PDF figures of Texinfo, you need the Japanese font. Of course, it is required that Fontconfig can find the HaranoAji font. Most environments do not have Japanese fonts. How about using generic font names (e.g serif and sans-serif etc.) for Japanese font fall back? This selects the generic serif font if the environment that doesn't have the HaranoAji font. ``` \override #'(font-name . "HaranoAjiMincho-Regular,serif") ```