Disabling anti-aliasing in X

Originally published in my blog 2005-06-01. Please note that the information can be dated.
Back to the overview.


For some reason that I do not quite get, everyone seems to be loving anti-aliasing of text that is displayed on screen. Personally I think it is quite terribly bad, at least for text in normal body type size, I keep having problems focusing the text – it simply feels like I was trying to read the text without having my glasses on. It works well for images, but not for text.

Since everyone else does seem to love it, it is by default enabled in most Linux distributions, and is not always that easy to disable. But now I have looked around for a while and found a couple of tips that I thought I would write down, both as a reference for myself in the future, and for others that do not like it either.

In modern versions of Gnome, there is a setting for disabling anti-aliasing, in version 2.8 that I have installed I find it under Foot menu → Applications → Desktop Preferences → Font.

[Font Preferences in Gnome]

I assume that it is also configurable from KDE, but since I do not run that myself, I cannot answer how to configure it there. However, I did find a discussion in a web forum on how to disable it globally for fontconfig, which seems to work with most X software; by adding the following lines to /etc/fonts/local.conf (create the file if it does not exist already) the fuzziness disappears from text in the font sizes where it does most harm:

 <!-- Turn off antialiasing for fonts in the 9-16 pt. range -->
 <match target="font">
 <test qual="all" name="size" compare="more">
 <int>9</int>
 </test>
 <test qual="all" name="size" compare="less">
 <int>16</int>
 </test>
 <edit name="antialias" mode="assign">
 <bool>false</bool>
 </edit>
 </match>

With that line in my freshly updated Debian system my eyes no longer hurt, of which I am thankful.