<--  | Map  | Index  | Search

News | Archives | Links | About LF
This document is available in: English  Castellano  Deutsch  Francais  Italiano  Nederlands  Turkce  Polish  

[Photo of the Author]
by Guido Socher (homepage)

About the author:

Guido has still a few tips he can post here but not in unlimited numbers. If you like this one or any previous tip and you have also some ideas for tips that could be useful then send them to me in an e-mail. They will be posted here under your name. A picture of you does not have to be included. It is optional.


LF Tip: Switching off font anti-aliasing



This is a small tip. From now on LinuxFocus will have at least one new tip every month. If you have some ideas for a new tip then send them to guido(Q)linuxfocus.org

_________________ _________________ _________________



Font anti-aliasing is a method of making fonts more smooth and round by adding grey dots at the edges and corners. To use anti-aliasing is unfortunately the default setting in most of the newer linux distributions.

I hate it because those fuzzy looking letters cause headaches when I read text on the screen. I prefer a high quality, sharp font in shells and text editors.  

The solution

Here is how to turn it off for gdk based applications:
setenv GDK_USE_XFT 0
export GDK_USE_XFT=0
and for Qt based applications this can be done with:
setenv QT_XFT 0
export QT_XFT=0
KDE based Qt applications overwrite this unfortunately and you have to use the KDE control center (see below) even if you do not run KDE.

Here is how this looks like. Left is a screen shot from a shell window with anti-aliasing and right without.
Setting the "Font Rendering" option in the gnome-control-center to Monochrome turns anti-aliasing also off (but not everybody uses the gnome desktop). Under KDE you can unselect the Appearance&Themes->Fonts->Anti-Aliasing option from kcontrol.

It is possible to finetune the anti-aliasing behaviour on a per font bases. You can e.g disable it for just the lucida fixed width font if you are using this font in your texteditor/shell. Edit the file /usr/X11R6/lib/X11/XftConfig:
        any family == "lucida"
        edit antialias = false;

To not anti-alias small font sizes you can use:
           any size < 15
           antialias = false;
Be aware that some distributions generate and overwrite this XftConfig file (look at modification time of the file). Hopefully this file has then a line like 'includeif "~/.xftconfig"' in which case you can add you personal modifications to ~/.xftconfig in your home directory.  

Talkback form for this article

Every article has its own talkback page. On this page you can submit a comment or look at comments from other readers:

Webpages maintained by the LinuxFocus Editor team
© Guido Socher
"some rights reserved" see linuxfocus.org/license/
Translation information:
en --> -- : Guido Socher (homepage)

2005-01-14, generated by lfparser version 2.52