Open callegar opened 3 weeks ago
XeTeX finds fonts by symbolic name only for system fonts and not the one from the TeX distribution. You can set a link from the system fonts to the TeX fonts, e.g. for macOS in ~/Library/Fonts
ln -s /usr/local/texlive/2024/texmf-dist/fonts/opentype/ ~/Library/Fonts/tl-opentype
with updating the font catalog with fc-cache -v -f
it will find the font by symbolic name.
LuaTeX is different, because it handles the font search by an own font list for system and TeX fonts.
Description
In unicode engines it should be possible to resolve fonts both by name (e.g. "TeX Gyre Termes") or by filename (e.g. "latinmodern-math.otf).
Unfortunately, this is broken for math fonts when using
unicode-math
in combination with xelatex.In the template for providing a minimal test case you say "filename only please", but selection by "preferred family name" should work too, and works just fine with LuaLaTeX.
Add info or delete as appropriate:
Minimal example demonstrating the issue
In this case, when it comes to resolve
TeX Gyre Termes Math
, fontspec/unicode-math happily get something else (most likelyTeX Gyre Termes
), complaints that the font does not have the Math Script, and goes on typesetting math using Latin Modern Math.However, on my system resolving
TeX Gyre Termes Math
is fine:The main issue here is not that the font is not found. It is that fontspec/unicode-math believe that they have found a font, yet getting the wrong one.
Unclear to me if the issue is with fontspec or unicode-math or xetex itself, though.
Further details