Re: font problems
> If I understand correctly, LilyPond needs to find the HaranoAji > font, but Ghostscript does not need to find it. OK. > In Texinfo PDF building, you don't need Japanese fonts if only the > included figure PDFs use the Japanese fonts. Yes. > If you want to use Japanese characters in the text instead of PDF > figures of Texinfo, you need the Japanese font. Correct. > Of course, it is required that Fontconfig can find the HaranoAji > font. The thing is that this doesn't happen automatically if you install a TeXLive package. On the other hand, if you install a font that is provided by a GNU/Linux package manager (like `rpm`), it is available to both LilyPond and xelatex. Thus I think that maybe Source Han is a better choice. > 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? Exactly this I want to avoid. The idea is to have reproducible builds as much as possible, so I want to specify all fonts in the PDF documentation. > This selects the generic serif font if the environment that doesn't > have the HaranoAji font. > > ``` > \override #'(font-name . "HaranoAjiMincho-Regular,serif") > ``` Appending 'serif' is a good idea for people who are going to compile the LilyPond tarball directly, and who don't mind if the resulting PDF is slightly different w.r.t. fonts. Werner
Re: strange formatting with involved `\break`
> Added to the tracker as > https://gitlab.com/lilypond/lilypond/-/issues/6057. Thanks. > For the future, maybe this kind of quirks can be reported there > directly (which would save them from the risk of getting lost under > the volume of email). Well, in most cases it's just my own clumsiness, and the problem is not a problem with LilyPond per se. This time, however, I seem to have found a real bug :-) Werner
Re: font problems
>>> 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") ```
Re: strange formatting with involved `\break`
Le 16/10/2020 à 16:34, Jean Abou Samra a écrit : Folks, can someone please explain to me why the following code { \compressEmptyMeasures c'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | \break R4*120 | \break c'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | c'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | c'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | c'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | } causes such an uneven formatting after the multi-measure? And is there a work-around available? Werner Hi, (Excuse the bad email threading, which will get fixed next time I reply.) Interesting. The example can be made even more minimal, without \compressEmptyMeasures: { c'1 \break \repeat unfold 35 { c'1 } } This produces the same bad output in 2.20. In 2.18, the output is still suboptimal, but different (files attached). A workaround would be \paper { page-breaking = #ly:minimal-breaking } Both ly:optimal-page-breaking and ly:page-turn-breaking are faulty; ly:one-page-breaking is not. This issue could be related: https://gitlab.com/lilypond/lilypond/-/issues/5488 Regards, Jean Hi Werner, Added to the tracker as https://gitlab.com/lilypond/lilypond/-/issues/6057. For the future, maybe this kind of quirks can be reported there directly (which would save them from the risk of getting lost under the volume of email). Cheers, Jean
Re: font problems
>>> [for Japanese] → Source Han Serif >> >> 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? Werner
Re: font problems
Am Sonntag, den 18.10.2020, 06:53 +0200 schrieb Werner LEMBERG: > > > * Reduce the number of extra fonts as much as possible to not > > > increase the size of the documentation additionally. [Not much > > > a problem I think since most fonts will be subsetted by > > > ghostscript.] > > > > I'd prefer to focus on fonts that are widely available. DejaVu and > > Libertine are, I'm not sure about Iosevka and Libertinus (but maybe > > the packages just have different names?). > > Iosevka seems to be an excellent font, but there are good > alternatives. Libertinus is the (maintained) successor of Libertine, > fixing buglets here and there. Okay, but are there packages for the major distributions? Building LilyPond is already hard (especially the documentation) and I don't think we should add fonts that users have to download and install manually. > > Source Sans and Source Serif are by Adobe, are there equivalent > > replacements? > > What's the problem with those Adobe fonts? They are completely free > even in the GNU sense... Okay. Jonas > > Werner signature.asc Description: This is a digitally signed message part