2

Fira Sans fonts are displaying incorrectly in Firefox. When I use 'Fira Sans Extra Bold' in Google docs, it doesn't show extra bold, but only in Firefox. In Chrome, the font displays just fine.

It's almost like Firefox is limiting which Fira fonts display?

I'm using Ubuntu 22.04 by the way.

Why would Firefox not show Fira Sans?

For example:

enter image description here

Update

It seems if I change the firefox settings fonts section to list Fira Sans for everything, then it updates to Fira Sans, but in Google Docs, I can't choose Fira Sans ExtraBold or Fira Sans Black or any other styles. What gives? What's messed up in the wiring?

By the way, everything works fine in Chrome, so it seems it's Firefox on Ubuntu that's the issue.

If I change Firefox default font setting to a different font, Google Docs still thinks Fira Sans is whatever the other default I picked.

2 Answers2

2

First make sure that the Fira Sans font files are available in a proper place. You can for instance create this directory:

sudo mkdir -p /usr/local/share/fonts/firasans

and copy the files into it.

Next: Google docs is a web site, right? The fonts used by default when browsing the web is determined by fontconfig. So you need to tell fontconfig that you prefer Fira Sans fonts when using Firefox:

  • Create a directory for your Firefox fontconfig preferences:

    mkdir -p ~/snap/firefox/current/.config/fontconfig/conf.d
    
  • Create a file named 10-prefer-firasans.conf in that directory and give it this content:

    <fontconfig>
      <alias>
        <family>sans-serif</family>
        <prefer>
          <family>Fira Sans</family>
        </prefer>
      </alias>    
    </fontconfig>
    

Finally restart Firefox.

1

Since Ubuntu 22.04 some (not all) applications are shipped in "snap packages". These are "sand boxed", meaning they do have any access to your environment. I assume Google has the fonts packaged within , whereas Firefox hasn't. (Since they're google fonts)

My approach would be to remove snap (I described that here) and download the font. The fonts need to go to a special location:

sudo cp -r /home/username/Downloads/Fira_Sans /usr/share/fonts/truetype/

The combination of a snap free Firefox and the font you need installed, should solve the problem.

kanehekili
  • 7,426