4

I disabled font hinting in Gnome tweaks, but Firefox sometimes (for certain fonts I think) ignores that and tries to align glyphs to pixel grid, resulting in uneven spacing between letters and/or distorted glyphs. I'd like to force Firefox to never use hinting, if possible, are there ways to do so?

Font settings in Gnome tweaks: Font settings in Gnome tweaks

An example of bad font rendering (this is a line from gmail web interface where it shows the list of threads; there are extra spaces between letters in some places where they should not be, in particular "release" reads as "relea se"): An example of a problematic line

Same line after changing the zoom a bit (see how the bogus spaces are in different positions): Same line after changing the zoom a bit

Firefox 64.0, installed from Ubuntu repositories via apt as usual, Ubuntu 18.04, with all recent updates. The display is not HiDPI, it has "regular" pixel density.

I tried to change font hinting by moving fontconfig files as described here https://askubuntu.com/a/29834/351113 (but used the /etc/fonts/conf.avail/10-hinting-none.conf as the source, of course) and it didn't solve this issue (after clearing Firefox cache and reboot)

Just to check it with something really obvious, I tried to disable font antialiasing in Gnome tweaks (which makes fonts obviously hideous) and it doesn't change font appearance in Firefox, so I'm pretty sure Firefox ignores Gnome font settings.

Creating ~/.fonts.conf with the appropriate contents also had no effect in Firefox.

As suggested in comments, I tried Firefox ESR and it is affected too.

  • Just as an Idea I have seen few issues with recent Firefox, But I have installed Firefox long term support version which seems to be more stable. Maybe have a look into it ? – Oskar L Dec 17 '18 at 10:21
  • @OskarL is there an official PPA for the long term support version of Firefox? – Sarge Borsch Dec 17 '18 at 10:30
  • 1
    Yes, ppa:mozillateam/ppa – Oskar L Dec 17 '18 at 10:38
  • 1
    @OskarL so I tried it. Firefox ESR renders text exactly the same as regular Firefox and ignores Gnome settings too. – Sarge Borsch Dec 18 '18 at 12:18
-1

Configuration files and directories: ~/.fonts.conf/, ~/.fonts.conf.d/ and ~/.fontconfig/*.cache-* are deprecated since fontconfig 2.10.1 and will not be read by default in the future versions of the package. New paths are $XDG_CONFIG_HOME/fontconfig/fonts.conf, $XDG_CONFIG_HOME/fontconfig/conf.d/NN-name.conf and $XDG_CACHE_HOME/fontconfig/*.cache-* respectively.

Ref: Fontconfig commit

Update: See thread Full font hinting not working in Ubuntu 18.04

  • XDG_CONFIG_HOME is not defined on my system. I searched the web and found that if it's undefined, it's assumed to be ~/.config/fontconfig/. I copied over all these files and directories from /etc/fonts/ and ~/.fonts.conf to this location. I ran sudo dpkg-reconfigure fontconfig and also rebooted. Nothing has changed so far. – Sarge Borsch Jan 20 at 10:34
  • I can not find in my Ubuntu 18.10 where it is defined. The reference I find is in user-dirs.conf. See this image: imgur.com/a/YgrnLEG – Carlos Dagorret Jan 21 at 1:01
  • What should I do with this file? – Sarge Borsch Jan 21 at 12:59
  • Just because those are deprecated doesn't mean these directories are ignored. These dirs aren't ignored. It's a wrong answer – Anwar Aug 16 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.