4

I was reading this here blog entry and the page was driving my eyes NUTS.

Seems like it's the fault of Firefox on Ubuntu 12.04. It's had this problem before, it seems but it should be fixed.


Firefox making my eyes bleed:

firefox


Chrome doing the Right Thing:

chrome


Firefox doing the Right Thing at work on the same monitor:

firefoxwork

Is there anything I should be doing to make Firefox behave? Or is this strictly a bug?

1 Answer 1

3

Firefox does not seem to read the GTK configuration, but it does read and honor your ~/.fonts.conf which basically just contains the font configuration, including the sub-pixel order.

This is derived from my own .fonts.conf (which is derived from some blog post from somewhere around 2005...or so, no idea), what you most likely want to change is the rgba value (sub-pixel order) to match your LCD and maybe the antialias value.

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
    <match target="font">
        <edit mode="assign" name="autohint">
            <bool>false</bool>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="rgba">
            <const>rgb</const>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="hinting">
            <bool>true</bool>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="hintstyle">
            <const>hintfull</const>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="antialias">
            <bool>true</bool>
        </edit>
    </match>
</fontconfig>

The Arch Wiki also contains a lot of information about this.

3
  • OK… now neither of my systems has a .fonts.conf, but it looks OK at work on a similar system. I'll try this out later. Moar testing!
    – MikeyB
    Jun 12, 2013 at 14:39
  • This needs to be marked as the answer. This (editing ~/.fonts.conf) works, but editing ~/.config/fontconfig/fonts.conf, or editing /etc/fonts/fonts.conf (or the equivalent fonts.conf.d files) does not work. Looks like a firefox bug that no one else noticed, assuming no one would have different configurations. I use this file to disable antialiasing altogether, and my eyes thank me!
    – Wyatt Ward
    Nov 2, 2014 at 22:57
  • FYI: You can find out the current system-wide settings by running gsettings list-recursively org.gnome.settings-daemon.plugins.xsettings. Then you can fill in those values in the XML posted above. You can find out the available options for the XML entries here.
    – jmiserez
    Jun 1, 2015 at 10:38

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.