Font smoothing, Firefox, *ubuntu
I’ve found the font smoothing in Firefox on *ubuntu not to be quite doing its job. Some fonts are OK, but ones containing e.g. precise sub-pixel hinting or advanced ligatures just look bad. Just as an example, install Calibri and use it as the default font. Then open a page in Wikipedia and you’ll see how dodgy the rendering is.
What’s the solution then?
There are three steps, all quite simple, and they just require a restart of the browser.
Enable quality rendering in Cairo for smaller font sizes.
This can be done through about:config. Find browser.display.auto_quality_min_font_size and set it to a pixel value of your choice. If it’s zero, all text will be rendered in quality mode. Note that this will affect performance, so you may want to skip this step.
Make Firefox use GTK settings for smoothing.
This is also done through about:config. Find gfx.use_text_smoothing_setting and change it to true.
Enable autohinting in GTK.
Open a file called
.fonts.confin your home directory. Add the following section to it:
<match target="font"> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> </match>
(If the file does not exist, you can see its structure here.)
Now, just restart the browser and enjoy smooth fonts!