Nimbus Sans font substituting Helvetica is not being displayed correctly while using Mozilla Firefox

Bug #1874842 reported by Juozas Pocius
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Incomplete
Undecided
Unassigned
fonts-urw-base35 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The problem: When using Mozilla Firefox 75.0 on Xubuntu 20.04 to view some sites such as Facebook or GitHub some fonts such as Nimbus Sans from fonts-urw-base35 package substituting Helvetica are not being displayed correctly. There would be gap below the text including the affected font, while using the original font should be no such gap. If the affected font were included in font family and sans-serif were one of the next, it would be marked no matter if fonts before it would be installed and working correctly.
The expected result: The pages with currently affected fonts would be displayed correctly, substituted fonts not being distorted and/or alternative font package(s) were available to replace such fonts.

---

Workaround for bad substitute for Helvetica: Set toolkit.legacyUserProfileCustomizations.stylesheets about:config preference to true, create chrome/userContent.css if not exist & add css from below to replace Helvetica with Liberation sans. Restart the browser for changes to take effect.
@font-face {
 font-family: Helvetica;
 src: local('Liberation Sans Regular');
 font-weight: normal;
 font-style: normal;
}
@font-face {
 font-family: Helvetica;
 src: local('Liberation Sans Italic');
 font-weight: normal;
 font-style: italic;
}
@font-face {
 font-family: Helvetica;
 src: local('Liberation Sans Bold');
 font-weight: bold;
 font-style: normal;
}
@font-face {
 font-family: Helvetica;
 src: local('Liberation Sans Bold Italic');
 font-weight: bold;
 font-style: italic;
}
Test on any page that includes the Helvetica font
Tested on Xubuntu 20.04 LTS upgraded from 18.04 LTS, Firefox 75.0 (75.0+build3-0ubuntu1, amd64), also tested on Xubuntu 20.04 LTS Live DVD, same results. Also tested Tested Arial, Nimbus Sans L, Noto Sans fonts for Helvetica replacement, Arial looks very similar to Liberation Sans (which looks best so far to me)

---

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: firefox 75.0+build3-0ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
BuildID: 20200403170909
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Fri Apr 24 18:29:17 2020
DefaultProfileExtensions: extensions.sqlite corrupt or missing
DefaultProfileIncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
DefaultProfileLocales: extensions.sqlite corrupt or missing
DefaultProfilePrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
DefaultProfilePrefSources: prefs.js
DefaultProfileThemes: extensions.sqlite corrupt or missing
Profile1Extensions: extensions.sqlite corrupt or missing
Profile1IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile1Locales: extensions.sqlite corrupt or missing
Profile1PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile1PrefSources: prefs.js
Profile1Themes: extensions.sqlite corrupt or missing
Profile2Extensions: extensions.sqlite corrupt or missing
Profile2IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile2Locales: extensions.sqlite corrupt or missing
Profile2PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile2PrefSources: prefs.js
Profile2Themes: extensions.sqlite corrupt or missing
Profile3Extensions: extensions.sqlite corrupt or missing
Profile3IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile3Locales: extensions.sqlite corrupt or missing
Profile3PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile3PrefSources: prefs.js
Profile3Themes: extensions.sqlite corrupt or missing
Profile4Extensions: extensions.sqlite corrupt or missing
Profile4IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile4Locales: extensions.sqlite corrupt or missing
Profile4Plugins: Shockwave Flash - /usr/lib/adobe-flashplugin/libflashplayer.so (adobe-flashplugin)
Profile4PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile4PrefSources: prefs.js
Profile4Themes: extensions.sqlite corrupt or missing
Profile5Extensions: extensions.sqlite corrupt or missing
Profile5IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile5Locales: extensions.sqlite corrupt or missing
Profile5PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile5PrefSources: prefs.js
Profile5Themes: extensions.sqlite corrupt or missing
Profile6Extensions: extensions.sqlite corrupt or missing
Profile6IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile6Locales: extensions.sqlite corrupt or missing
Profile6PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile6PrefSources: prefs.js
Profile6Themes: extensions.sqlite corrupt or missing
Profile7Extensions: extensions.sqlite corrupt or missing
Profile7IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile7Locales: extensions.sqlite corrupt or missing
Profile7PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile7PrefSources: prefs.js
Profile7Themes: extensions.sqlite corrupt or missing
Profile8Extensions: extensions.sqlite corrupt or missing
Profile8IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile8Locales: extensions.sqlite corrupt or missing
Profile8PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:733
Profile8PrefSources: prefs.js
Profile8Themes: extensions.sqlite corrupt or missing
SourcePackage: firefox
UpgradeStatus: Upgraded to focal on 2020-04-24 (0 days ago)

Revision history for this message
Juozas Pocius (juozaspo) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Can you please give a more concrete example. E.g. what webpage is displaying the problem (ideally a public URL that doesn't require a login of some sort), what font family the page requests, what font you expect to be used, and which one is used instead?

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
Juozas Pocius (juozaspo) wrote :

Github example (public repository): https://github.com/minetest/minetest/issues
The labels are displaying incorrectly even on a new profile
Facebook main page input labels are showing gap below text larger then above text when logging in.

Revision history for this message
Juozas Pocius (juozaspo) wrote :
Revision history for this message
Juozas Pocius (juozaspo) wrote :

Github font family:
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
Actually used font: sans-serif (incorrect)
Facebook font family:
font-family: Helvetica, Arial, sans-serif;
Actually used font: Arial (correct), though text input fields has a space below

Revision history for this message
Juozas Pocius (juozaspo) wrote :

Erasing text "Helvetica," from font family rule on Github using inspector fixes display of arial font somehow

Revision history for this message
Juozas Pocius (juozaspo) wrote :

After some googling & investigation I found out that Nimbus Sans substitutes Helvetica when fonts-urw-base35 package is installed but it does not render correctly on some sites compared to Soto Sans or Arial. Running 'fc-match Helvetica' returns 'NimbusSans-Regular.otf: "Nimbus Sans" "Regular"'
Workaround would be to add an override to chrome/userContent.css file in the profile folder and then restart the browser:
@font-face {
 font-family: Helvetica;
 src: local('Noto Sans');
}
Alternate method would be creating ~/.config/fontconfig/fonts.conf xml file if it doesn't exist and adding override there, but it would be not as easy syntax-wise compared to the above method.

Revision history for this message
Juozas Pocius (juozaspo) wrote :

Updated the css workaround with correct font names, now works with all combinations of bold/italic, including test html below
@font-face {
 font-family: Helvetica;
 src: local('Noto Sans Regular');
 font-weight: normal;
 font-style: normal;
}
@font-face {
 font-family: Helvetica;
 src: local('Noto Sans Italic');
 font-weight: normal;
 font-style: italic;
}
@font-face {
 font-family: Helvetica;
 src: local('Noto Sans Bold');
 font-weight: bold;
 font-style: normal;
}
@font-face {
 font-family: Helvetica;
 src: local('Noto Sans Bold Italic');
 font-weight: bold;
 font-style: italic;
}
Test html page
<html>
 <head>
  <title>Test</title>
  <style>
   * {
    font-family: Helvetica;
   }
  </style>
 </head>
 <body>
  <h1>Helvetica Test</h1>
  <p>Regular <i>Italic</i> <b>Bold <i>Bold Italic</i></b></p>
 </body>
</html>

Juozas Pocius (juozaspo)
description: updated
description: updated
Juozas Pocius (juozaspo)
description: updated
no longer affects: msttcorefonts (Ubuntu)
Juozas Pocius (juozaspo)
summary: - Fonts installed using msttfcorefonts package (ttf-mscorefonts-installer)
- are not detected by some sites
+ Nimbus Sans font from fonts-urw-base35 package substituting Helvetica is
+ not being displayed correctly while using Mozilla Firefox
summary: - Nimbus Sans font from fonts-urw-base35 package substituting Helvetica is
- not being displayed correctly while using Mozilla Firefox
+ Nimbus Sans font (from fonts-urw-base35 package) substituting Helvetica
+ is not being displayed correctly while using Mozilla Firefox
summary: - Nimbus Sans font (from fonts-urw-base35 package) substituting Helvetica
- is not being displayed correctly while using Mozilla Firefox
+ Nimbus Sans font substituting Helvetica is not being displayed correctly
+ while using Mozilla Firefox
Juozas Pocius (juozaspo)
description: updated
Juozas Pocius (juozaspo)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fonts-urw-base35 (Ubuntu):
status: New → Confirmed
Revision history for this message
Carsten Fuchs (carsten78) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.