You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand it, Latin Modern Math has two variants for the prime, and Chrome is supposed to select the "lower" variant when prime appears in <msup> (as Firefox does), but Chrome doesn't.
Now, one way to fix this, is to have only the lower variant in the font file. You can achieve this by using Libertinus Math and then using the font feature ssty. ssty refers to alternative characters that are supposed to be used in "script style" which is the style used in subscripts and superscripts. For most characters, the difference between normal style and script style is very small: the characters are a little thicker and a little wider. But for primes, the difference is very large. And I don't actually see where in MathML I need to use the "normal style" primes.
So, what I would ideally have is a Latin Modern Math font file where prime only has the lower variant. As I understand it, that's what the Temml font provides, but the Temml font seems to only have the primes in it (and calligraphic math characters; it's still only 10kB). I'm guessing it was done this way so that the locally installed Latin Modern Math can still be used for everything that is not primes, but it has of course the downside that I need to specify a custom class for all primes.
It's so weird: the latinmodern-math.otf should have the ssty feature (otfinfo says so) but I can't activate it in Chrome. I tried with .otf, .ttf, .woff2. And the thing is, for LibertinusMath-Regular.woff2 it works! I can toggle the ssty font feature in the Chrome inspection tool and I see the result. But somehow the ssty font feature doesn't work for latinmodern-math.otf.
Maybe it's because the feature got lost in the conversion to woff2 (which I did with this tool). The Libertinus font file is directly created as a woff2, so maybe that works better in Chrome.
On the other hand, I did try it with the otf file directly, and Chrome still didn't do the right thing. So, it must be that the otf is already wrong for Chrome.
I used the program FontForge to replace the normal prime glyphs with the lowered prime glyphs in the Latin Modern Math otf file (simply by selecting the lowered glyph, pressing ctrl+c, selecting the normal glyph and pressing ctrl+v).
Activity
tmke8 commentedon Sep 24, 2024
It's so weird: the
latinmodern-math.otfshould have the ssty feature (otfinfosays so) but I can't activate it in Chrome. I tried with.otf,.ttf,.woff2. And the thing is, forLibertinusMath-Regular.woff2it works! I can toggle thesstyfont feature in the Chrome inspection tool and I see the result. But somehow thesstyfont feature doesn't work forlatinmodern-math.otf.Maybe it's because the feature got lost in the conversion to
woff2(which I did with this tool). The Libertinus font file is directly created as awoff2, so maybe that works better in Chrome.On the other hand, I did try it with the otf file directly, and Chrome still didn't do the right thing. So, it must be that the
otfis already wrong for Chrome.I also tried the woff2 file from https://github.com/fred-wang/MathFonts but as those are based on the same otf file I used, it was not surprising that those also didn't work.
tmke8 commentedon Sep 24, 2024
I used the program FontForge to replace the normal prime glyphs with the lowered prime glyphs in the Latin Modern Math otf file (simply by selecting the lowered glyph, pressing ctrl+c, selecting the normal glyph and pressing ctrl+v).
This then worked in Chrome.
tmke8 commentedon Sep 25, 2024
I guess this is solve for now by #247