4

I have been experiencing strange font rendering in Firefox on Ubuntu for the last couple of months. The letters in certain texts have very wide spacing (see the screenshot). It started on 21.10 a couple of months ago and continued after I have recently upgraded to 22.04. In Chrome font rendering is fine. So it looks like a Firefox issue.

enter image description hereenter image description here

foxy123
  • 417
  • 8
  • 13
  • Sometimes the Firefox cache messes up a font, try ctrl+shift+R to reload the page. Fixes things like the down-arrow in the tensorflow.org menus -- the cached font spells the character out instead of using a black triangle. – ubfan1 Sep 12 '22 at 19:33

3 Answers3

1

Try refreshing your font cache. Delete the current font cache:

  • For Firefox installed as a snap:
      rm -rf ~/snap/chromium/common/.cache/fontconfig/
    
  • For regular applications
      rm -rf ~/.cache/fontconfig
    

Then refresh the cache

fc-cache -r -v
vanadium
  • 88,010
  • I had exactly the same issue with both Firefox from Snap and .deb. The above worked. Thanks for sharing. Is there an upstream or Launchpad bug report about this? – benjaoming Jul 15 '22 at 11:38
  • 1
    Sorry, I must have missed the answer. The solution unfortunately did not work for me. I've got a feeling that the problem started after I installed some emoji fonts because I could not get colour emojis. Probably some of the fonts messed things up. I try to reset all Ubuntu fonts but without any success. – foxy123 Aug 10 '22 at 18:14
1

I had a similar issue as well; neither the font cache refreshing nor installing another font set helped. For me, the issue was a bug in the Firefox snap on Ubuntu. A fix has been committed a few days ago; more info and a workaround can be found here: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1971608

Here's the workaround they suggest until the fix is deployed:

$ mkdir ~/snap/firefox/current/.config/fontconfig/conf.d
$ cp /etc/fonts/conf.d/* ~/snap/firefox/current/.config/fontconfig/conf.d
0

This is an issue with the snap version of firefox. Uninstalling the snap version and installing the apt version fixes this problem.

A tutorial for Ubuntu 22.04 can be found here: How to install Firefox as a traditional deb package (without snap) in Ubuntu 22.04 (jammy)