I'm switching from Fedora 8 to Ubuntu 9.04, and I can't seem to get it to get a good font anti-aliasing to work. It seems that Ubuntu's fontconfig tries to keep characters in integral pixel widths. This makes text more difficult to read, when 1 pixel is too thin and 2 pixels is too thick.
Check the image below. In Fedora, when fontconfig anti-aliasing is enabled, fonts have their thickness proportional to the font size. Below, the thickness is different for 8, 9 and 10pt sizes. In Ubuntu, on the other hand, even when anti-aliasing is enabled, all 8, 9 and 10pt sizes have 1 pixel thickness. This makes reading larges amount of text difficult.
I'm using the very same home directory, and I already checked that X resources are the same in both systems:
~% xrdb -query | grep Xft
Xft.antialias: 1
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: noneGNOME settings:
~% gconftool-2 -a /desktop/gnome/font_rendering antialiasing = grayscale hinting = full dpi = 96 rgba_order = rgbSo, the question is: What should I change in the new box (Ubuntu) in order to get anti-aliasing like in the old box (Fedora)?
64 Answers
There is an old trick to make fonts smoother on Ubuntu (and pretty much every distro running Gnome):
Open up .fonts.conf under your home directory (~/.fonts.conf) and paste this in:
<?xml version="1.0" ?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <edit name="autohint" mode="assign"> <bool>true</bool> </edit> </match>
</fontconfig>Before:
After:
As John said it, the ~/.fonts.conf file is useful to tweak your font configuration.
I eventually figured out how it works after reading this article :
Although not directly repsonsive to OP, the answer I came here looking for, and which would have saved me about 60 minutes was:
Don't forget to try turning down your monitor sharpness.
In Windows, I'd used its font-adjustment tool which somehow compensated for my monitor's overly-high sharpness setting. Switching to Ubuntu with the same monitor, I was like "bleagh why does everything look awful". All fonts looked terrible, and also made the color depth look low. Only after trying a wide variety of options, mostly within Ubuntu, did I just start trying every setting on my monitor, and reducing sharpness to zero that solved it.
1The latest versions of Ubuntu allows changing these settings via Preferences > Appearance > Fonts > Details
I find Medium hinting to be the most pleasing on my LCD screen.
1