Important!
This is a workaround for a FreeType/fontconfig problem, but my be applicable in other cases as well. For Gentoo users, the related bug is 631502.Recently, after updating to Mozilla Firefox to version 52 or later (55.0.2, in my case), and Mozilla Thunderbird to version 52 or later (52.3.0, in my case), I found that fonts were rendering horribly under Linux. It looked essentially like there was no anti-aliasing or hinting at all.
Come to find out, this was due to a change in the content rendering engine, which is briefly mentioned in the release notes for Firefox 52 (but it also applies to Thunderbird). Basically, in Linux, the default engine changed from cairo to Google’s Skia.
For each application, the easiest method for getting the fonts to render nicely again is to make two changes directly in the configuration editor. To do so in Firefox, simply go to the address bar and type about:config
. Within Thunderbird, it can be launched by going to Menu > Preferences > Advanced > Config Editor. Once there, the two keys that need to change are:
gfx.canvas.azure.backends
gfx.content.azure.backends
They likely have values of “skia” or a comma-separated list with “skia” being the first value. On my Linux hosts, I changed the value from skia
back to cairo
, restarted the applications, and all was again right in the world (or at least in the Mozilla font world ๐ ).
Hope that helps.
Cheers,
Zach
24 comments
Skip to comment form
Thank you for fixing my Thunderbird v 52.2.1
Author
Hi Chris,
I’m glad that the article helped you with the problem in Thunderbird!
Cheers,
Zach
Thank you for this post. This is a solution of firefox mac but how to disable Java in Google Chrome because I do not disable this so what is the solution of this query
Author
That question is not really related to this post at all, but disabling Java within Google Chrome on Mac can generally be done following these instructions:
https://www.podfeet.com/blog/tutorials-5/how-to-disable-java-in-chrome/
Hi,
as I suspected this were a cryptic problem, I have unmerged gentoo Firefox and installed 57.0b3 in /usr/local. Looks are good again, plus other benefits.
VT
Author
Very interesting findings. Have you filed a bug for the Mozilla Team within Gentoo with details?
Cheers,
Zach
No, because I found this bug were reported, and 57.0b3, being quite a radical rewrite, was certainly supposed to be free of this bug.
VT
Haha,
I halso had this problem.
Saw this post while i just had fired off a emerge -uDav @world and not seen the list of changes yet.
Made the workaround and the problem was gone.
Got back to my emerge console and saw a new version of freetype.
Emerged it and changed the settings back to skia in Firefox. Solved again ๐
Author
Can you let me know the versions of Firefox and freetype that you’re using where you don’t need this workaround? I’m on freetype-2.8.1 and Firefox 55.0.2, and the workaround is still needed. I don’t see an available update to freetype, but I do see one to Firefox (to 56.0), and I’m wondering if that fixes it (however, that wouldn’t fix it in Thunderbird).
Cheers,
Zach
I’m on firefox-55.0.2 and freetype-2.8 and all is good.
I’m on a full ~amd64 profile. Maybe something else is also chipping in. Or it’s some USE flag.
I’m doing a full emerge now so I will also be on freetype-2.8.1 soon (and a newer firefox). Maybe the problem resurfaces. I’ll let you know.
And now the problem is back.
firefox-55.0.2 and freetype-2.8.1.
And now when my emerge is finished with firefox updated to v56 everything’s fine again. ๐
So Firefox-56 + freetype-2.8.1 is all right here.
Actually, this looks like the freetype-2.8.1 font rendering problem: https://bugs.gentoo.org/631502
Author
Indeed, this is related to that bug. Falling back to Cairo is a workaround until a better fix is in place.
Cheers,
Zach
I have the same problem, but it results in several characters being underscored all the time. E.g. all the โtโs in these comments, and all dashes and slashes in the URL bar.
BTW: Wonโt changing the config values like that result in problems in the long run? E.g. when the cairo backend will be removed, or something like that.
Because I sure as hell wonโt remember any of this when that happens. I would love there to be an automatic trigger in that case.
Author
It could if Cairo is removed, and there isn’t a check for modified configurations. However, this is a workaround for now.
Mozilla is working on a fix, see https://bugs.gentoo.org/631284, https://bugzilla.mozilla.org/show_bug.cgi?id=1393467 and https://bugzilla.mozilla.org/show_bug.cgi?id=1400721.
It may be related to latest freetype upgrade – https://bugs.gentoo.org/631502.
Author
Indeed, this is related to that bug. Falling back to Cairo is a workaround until a better fix is in place.
Cheers,
Zach
Both values are “skia” for me, but I have no problem with rendering (under KDE).
Author
Thanks for letting me know, Anton. It must be something related to my particular environment, then. I use Openbox, but I don’t think that the WM should matter. It’s probably more an issue with the graphics driver that is being used, or possibly the X server version. It may require some further investigation, but for now, it is an option for those having trouble with Skia.
Cheers,
Zach
Same here, I have no font rendering issues in either Firefox and Thunderbird. I haven’t tweaked Firefox configuration nor its use flags aside from disabling the cleartype_hinting USE flag in freetype which is one of the dependencies. You might want to check your fontconfig configuration because that’s often the cause of ugly/weird font rendering. Try seeing if something is amiss with ‘eselect fontconfig list’.
Author
Yes, this is a workaround regarding fontconfig, and more importantly, freetype: https://bugs.gentoo.org/631502
Cheers,
Zach