(nevermind) It seems most Linux distributions are shipping a broken Nimbus font (Helvetica substitution) and it's causing a lot of problems

Hey all.

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.

There is, I believe (have not personally tested it), a fixed version of the Nimbus font available here:

:point_right: https://github.com/scriptableorg/NimbusSans

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?

Nimbus is not installed by default and is only in the aur? Can’t see a repo package.

Hmm… interesting… I figured it would be. It’s the default substitution for Helvetica in fontconfig so I figured it would come packaged with the distros. I can’t recall ever installing any fonts from the aur, but I could be wrong

yay nimbus
2 aur/otf-nimbus-mono 1.0-1 (+1 0.00)
    Nimbus Mono typeface - A serif, typewriter typeface
1 aur/nimbus-git 1.0.r7.g172733a-1 (+1 0.00)
    The default OpenIndiana theme

So no, only aur.

Odd. Neither package is installed on my system, but that’s what it shows on the Firefox inspector as being used for rendering.


Looks like maybe this is coming from gsfonts



1 Like

It is and required from evince (Gnome) at least.

LANG=C pacman -Qi gsfonts | grep ^Required
Required By     : evince  graphviz

LANG=C pacman -Qi evince | grep ^Required
Required By     : gnome-books  gnome-documents  sushi


pactree -r gsfonts
│ ├─gnome-books
│ ├─gnome-documents
│ └─sushi
│ ├─gimp
│ └─vala

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.