CSS now has the ability to override some font metrics, so you shouldn't need to edit the font files directly.<p>And these overrides can be applied to local fonts as well (generally used to ensure the metrics of the local fallback font matches the yet-to-be-downloaded web font, preventing a layout shift when the web font is swapped in)<p>ascent-override - <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/ascent-override" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/...</a><p>descent-override - <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/descent-override" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/...</a><p>line-gap-override - <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/line-gap-override" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/...</a><p>size-adjust - <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/size-adjust" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/...</a>
Re the stuff about @-moz-document at the end, does anyone remember exploiting IE bugs in parsing CSS to present different rules for IE vs firefox, especially to work around IE's broken box model? I remember actually using this[0] hack somewhere long ago:<p><pre><code> div.content {
width:400px;
voice-family: "\"}\"";
voice-family:inherit;
width:300px;
}
</code></pre>
I can't believe the stuff we used to go through.<p>[0] <a href="http://tantek.com/CSS/Examples/boxmodelhack.html" rel="nofollow">http://tantek.com/CSS/Examples/boxmodelhack.html</a>
Speaking of font differences, the default Windows emoji font is so bad I don't understand why Google doesn't just ship their Android emoji font with Chrome and default to that.
Using FontForge to regenerate an export is kinda drastic. What you want is ttx from the fontTools font manipulation toolset. ttx can generate an editable XML file with the font’s tables that are easy to make changes in. hhea is obvious to find; for “win”, you probably want to look inside OS/2. If you can afford it, the go to application for this sort of post-production alterations is DTL OTMaster.
Macs are king when it comes to font rendering. It was prioritized in the original Macintosh and Apple still has the most solid font engine to this day.
Fun fact on the first Windows 95 fonts in Arabic, is that Microsoft decided to go cheap. and not to pay Boutros Fonts, a London-based type foundry that design Arabic fonts, and bought a cheaper derivative 'pirated' copy of that same font for $5k. A lengthy legal battle ensued with Microsoft ultimately winning it out of might of its $$ and legal team.
I struggled with this recently, upgrading qtwebkit from Qt5 to Qt6. Qt5 used platform-specific height values, while Qt6 now uses win height values, for consistent rendering across all platforms. It’s better in concept, the only issue is that the really big cross-platform browser _doesn’t_ so it turns into “why doesn’t this font rendering look like Chrome on Mac/linux?”
> The ascent is the distance from the baseline to the top of the tallest glyph, so typically 1em. The descent is the distance from the baseline to the lowest point in any glyph. The descent can be different because on web fonts, glyphs like g or p can have tails that extend below the baseline.<p>Huh? Different from what? It's described as exactly the same thing as the ascent, but down. And why does the author specify web fonts? This sounds like it applies to fonts in general.<p>Edit: I think the author is just trying to say the descent varies across fonts, even measured in em. I think "web fonts" and "glyphs can have tails" are just red herrings.
The blog text intersects with the mountains at the bottom, literally unreadable<p><a href="https://imgur.com/02xrZ2q.png" rel="nofollow">https://imgur.com/02xrZ2q.png</a>
> What's that? You say you want even more infuriating font stories? Well don't you worry, I'll be back soon with another diatribe about font thickness and antialiasing on the web on Mac vs. Windows.<p>Did he ever write about this? I can't see anything about it in his list of articles.