latex3 / fontspec

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

Investigate patching XeTeX to allow filename lookup #398

Open wspr opened 4 years ago

wspr commented 4 years ago

Description

XeTeX can only look up fonts in a texmf tree by filename, and when it fails then looks to Metafont to fill the gaps, which it can never do obviously. It would actually be quite sensible to patch the XeTeX engine to allow the fallback here to run some other script instead to make it all work...

Check/indicate

davidcarlisle commented 4 years ago

Isn't this only an issue if you haven't configured fontconfig to look in the texlive fonts area?

khaledhosny commented 4 years ago

XeTeX itself can tell FontConfig to look into additional font directories without user action, though I hesitated doing this when I was still working on XeTeX as TeX Live often include multiple version of the same font (e.g. TrueType, OpenType and/or Type 1 versions) and which version FontConfig would end up picking did not seem to be very defined.

kberry commented 4 years ago

Using fontconfig makes a document completely unportable and unreliable wrt fonts chosen. I can't tell you how much time I've lost because of this. So I give +1 to Will's original idea, although I admit I've never needed any kind of fallback like "mktexxefont" or something; when a font lookup fails, I need to fix it in the document.

wspr commented 4 years ago

Doesn't XeTeX only use fontconfig on certain platforms? I've never come across it on a Mac.

wspr commented 4 years ago

@kberry — I'm 100% with you, but for some reason people REALLY LIKE using a font's real name :)

kberry commented 4 years ago

xetex uses fontconfig on every platform except Macs.

As for real names ... well, they are just wrong :).