It seems to me that the major distros are all shipping a broken version of the Nimbus font, causing all sorts of issues for web developers, including the developers of Github.
I’m trying to drill down and figure out where this problem is actually coming from, and where it needs to be fixed. Correct me if I’m wrong, but I’m thinking there needs to be a concerted effort by distro maintainers to ship a fixed version of the font to resolve all the downstream issues.
Any time a web page uses the Helvetica font on Linux, it falls back to Nimbus, which has known vertical alignment problems.
Here you can see the problem on Github, but follow the links in this thread for more examples:
For a full description of the issue, see here: https://nolanlawson.com/2020/05/02/customizing-fonts-in-firefox-on-linux/
Chromium doesn’t use the system
fontconfig for font substitution, but Firefox does… so this issue only reveals itself when using Firefox… but it’s ultimately a system-level font problem. It’s not Firefox’s fault that it relies on
fontconfig for substitution… that’s what the browser should be doing in my opinion. Chromium overrides system font substitution and falls back to Liberation Sans when Helvetica is used on Linux, but Liberation Sans is more in the Arial family.
- The Github developers are struggling with the issue https://github.com/primer/css/issues/1209
- The Quasar framework is dealing with it https://github.com/quasarframework/quasar/issues/13186
- It’s been reported to the Ubuntu maintainers https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1874842
- It’s been reported Bugzilla for the Firefox developers to deal with https://bugzilla.mozilla.org/show_bug.cgi?id=553580#c22
There is, I believe (have not personally tested it), a fixed version of the Nimbus font available here:
This is GPL’d URW++ Nimbus Sans and Nimbus Sans Narrow fonts. It’s a close relative of Helvetica/Arial/etc. This particular set has slightly modified vertical metrics to make it align properly under GNU/Linux.
Specifically, “Win Ascent” and “Win Descent” were decreased/increased respectively by 44 points. Additionally, “HHead Ascent” and “HHead Descent” has been assigned corresponding values from “Win…” counterparts, and “HHead Line Gap” has been set to “0”.
What do you folks think, am I right in thinking that the “correct” solution is for distros to ship the fixed font?