[LinuxFocus-icon]
LinuxFocus article number 353
http://linuxfocus.org

[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

idea

Abstract:

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

_________________ _________________ _________________

 

Introduction

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:
#csh:
setenv GDK_USE_XFT 0
#bash
export GDK_USE_XFT=0
and for Qt based applications this can be done with:
#csh:
setenv QT_XFT 0
#bash
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:
match
        any family == "lucida"
        edit antialias = false;


To not anti-alias small font sizes you can use:
match
           any size < 15
     edit
           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.

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

2005-01-15, generated by lfparser_pdf version 2.51