-
Notifications
You must be signed in to change notification settings - Fork 45
Different rendering on windows #42
Description
Some fonts define a different ascent and descent value for windows.
Here is, for example, how capsize shows Tajawal's metrics on Windows vs. Mac:
| Mac | Windows |
|
|
I've run a script against all google fonts, and around 30% have different ascent or descent values for windows than for other operating systems.
To align fonts with their cap size reliably across operating systems, we have to take the Win Ascent and Descent numbers into account and use them instead of the "normal" HHead metrics on Windows systems.
This is not really an issue with capsize itself because capsize doesn't care where the user gets their font metrics from. If they provide the Windows metrics in browsers on Windows and the other metrics in all other operating systems, it works fine. It's just that probably a lot of people aren't aware of this.
Maybe we can add this to the FAQ section on the website? Additionally, we could extend the automatic font metrics detection logic on the site to use the windows metrics when being viewed on Windows. (The fontkit library only seems to provide the HHead numbers. I've had success with opentype.js to extract also the Win numbers.)
I'm happy to help on this if wanted/needed 🙋♂️.

