-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font selection by "family name" not working with unicode-math and xelatex #533
Comments
well xelatex finds |
Thanks for looking into it. So "TeXGyreTermesMath-Companion.otf" is not a math font despite its name? |
isn't that a bug in the font though?, all the other internal names are variants on TeX Gyre Termes Math Companion @callegar if I hide /usr/local/texlive/2024/texmf-dist/fonts/opentype/public/context-companion-fonts/TeXGyreTermesMath-Companion.otf then your document works with no warnings in xetex |
All this looks a bit weird. My though was that TeXGyreTermesMath-Companion.otf was the same as texgyretermes-math.otf that had to be made available under a different name to make context happy. |
No the font is obviously not a math font. You can also try |
This looks like incorrect font meta data, Running
So FontConfig is giving also priority to the typographic family and subfamily (as it should), so it is likely if the font is installed system-wide many other applications might pick it for “TeX Gyre Termes Math”. |
macOS is also confused by the font names. Using
|
I've went back and tested and it looks like this issue has been present since around June 30th. One solution that seems to fix this is blacklisting the companion fonts with fontconfig: <!-- $TEXMFSYSVAR/fonts/conf/texlive-fontconfig.conf -->
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/usr/local/texlive/2024/texmf-dist/fonts/opentype</dir>
<dir>/usr/local/texlive/2024/texmf-dist/fonts/truetype</dir>
<dir>/usr/local/texlive/2024/texmf-dist/fonts/type1</dir>
<selectfont>
<rejectfont>
<pattern>
<patelt name="style">
<string>Companion</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
</fontconfig> But if this is a problem with the fonts themselves, then we should probably get this fixed upstream (which I think is @mpsmath and @hanshagen). Even if the fonts are correct and it's XeTeX that is wrong, it's going to be much easier to change the fonts than to change XeTeX. |
@gucci-on-fleek We were about to fix the lookup issue in Xe(La)TeX, but maybe changing a few names is less work. |
Thanks everybody for looking into this so promptly, both here and in the texlive ml! |
I’d keep name ID 1 as it is, change name ID 2 to Regular, and drop name IDs 16 and 17 as they are not needed at all. |
That is more or less what happened. |
Ok, I uploaded the files from contextgarden/context-distribution-fonts@5131d69 in (Long-term, it would probably be good for you/Hans/Mojca to add the files to CTAN so that the update process is slightly less manual, although it doesn't really matter too much either way if the updates are infrequent.) |
Well, the files now have slightly different names, so I'm afraid you will break ConTeXt in TL24 if the fonts are replaced without also changing configuration files. |
Uhhhh, so should I rename those files to what they were called before, or should I pull in the (cc: @kberry) |
I don't know what the procedures are for TeXLive, but I had sent an email to Karl explaining the situation. Maybe it is best to undo the upload and wait for Karl to wake up? |
Since the problem will go away with TL25, my gut reaction is to revert
back to the original companion fonts so ctx keeps working, and let
xelatex people live with it. As I understood it, it is not that hard to
use one of the other names that does not clash and still get Termes Math
if desired. --thanks, karl.
|
Ok, I updated the font goodie files in TL to the versions from the LMTX upstream in
I use the ConTeXt from TL24 for almost everything, so if something breaks I'll hopefully be the first to notice. |
Sounds good to me. I trust you to keep an eye on it :). Thanks. |
Description
A sentence or two describing the issue.
Trying to set the math font to "TeX Gyre Termes Math" with unicode math and xelatex does not work.
Fontspec/unicode-math end up finding a font, but pick the wrong one, then say the font has no Math script, and discard it. Most likely they end up with "TeX Gyre Termes", but I do not know how to see what the code does internally.
Check/indicate
Minimal example demonstrating the issue
Further details
On my system the TeX Gyre Termes Math font gets resolved correctly by
fc-match "TeX Gyre Termes Math"
astexgyretermes-math.otf
.Lualatex has no issue either.
The text was updated successfully, but these errors were encountered: