latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
276 stars 34 forks source link

Fonts used in test files #465

Closed zauguin closed 6 months ago

zauguin commented 2 years ago

fontspec's tests use a bunch of fonts which are either not part of a typical TeX Live installation and sometimes also commercial and therefore not easily available on many systems.

This makes development and especially testing much harder on systems without these fonts and also makes it impossible to automatically run the tests e.g. using GitHub Actions or similar.

In particular this currently affects (on my system at least) the following fonts:

Free fonts:

Non-free fonts:

I would suggest to rename STIX2Text-Regular.otf to STIXTwoText-Regular.otf and add NotoSansCJK-Regular.ttc and Vollkorn-Regular.otf as support files. Which would leave the two non free fonts. Is there some specific reason why these fonts have to be tested or can they be substituted with other fonts?

wspr commented 2 years ago

Sorry, I probably forgot to document how I do this. By checking out this repo and running install.sh you should be okay:

https://github.com/wspr/fontspec-test-fonts

I no longer specifically recall the licensing status of the non-free fonts, but I wouldn't have included them if I knew for sure they shouldn't be included (i.e., I'm happy to ditch them if need be, would definitely prefer to use freely available fonts for testing).

The Times font is a little unique because it is missing small caps in some shapes but not others — it showed up an edge case some time back.

The CODE2000 font just has a really good repertoire of glyphs, so it should be easy enough nowadays to replace it with something like Noto which I suspect covers the code points I needed/wanted for that mapping test.

zauguin commented 2 years ago

Thanks, fontspec-test-fonts definitely solves my immediate issues except for the STIX2/STIXTwo thing. After looking into it a bit more the STIXTwo name is also used by the official upstream, so I'll create a PR to change that.

The CODE2000 font just has a really good repertoire of glyphs, so it should be easy enough nowadays to replace it with something like Noto which I suspect covers the code points I needed/wanted for that mapping test.

Well, Noto at least has all kinds of glyphs but splits them over different fonts, so if the test requires them to be in the same font it might be problematic. I can take a closer look if it can be changed when I have some time.

wspr commented 6 months ago

Coming back to this, do you think we should just add the fonts we need to a (sub)folder of the test suite in the main repository? I don't exactly remember why I didn't go that way originally... perhaps to keep the repo file size small(er)