Friday 22 September 2017

linux - Bad font anti-aliasing in Ubuntu


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.


Comparing Fedora 8 and Ubuntu 9.04 font anti-aliasing.


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: none

GNOME settings:


~% gconftool-2 -a /desktop/gnome/font_rendering
antialiasing = grayscale
hinting = full
dpi = 96
rgba_order = rgb

So, the question is: What should I change in the new box (Ubuntu) in order to get anti-aliasing like in the old box (Fedora)?



Answer



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:







true




Before:


alt text


After:


alt text


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...