Setting Up Anti-aliasing Fonts in SuSE Linux 7.2

Support knowledgebase (chofman_ttf_72)
Applies to

SuSE Linux: Version 7.2
This article refers to an older version of SuSE Linux. Therefore some of the informations given in this article may be outdated or the article may contain stale links.

Kernel: Version 2.4.4
XFree86: Version 4.03

Situation

You want to integrate TrueType fonts into SuSE Linux 7.2 and you want them to be displayed in anti-aliasing mode by the X server.

Requirements

Some basic facts about TrueType fonts: TrueType fonts are supported by the X server from XFree86 version 4.0 on. The anti-aliasing support for TrueType fonts is included in XFree86 version 4.01 or higher. This article focuses on KDE2, based on the QT library, which in turn supports the anti-aliasing of TrueType fonts. All programs basing either on KDE2 libraries or on QT (e.g. KOffice, KWrite, KEdit, Quanta, etc.) use AA fonts.
The font anti aliasing is not yet implemented for Gnome, Windowmaker, and other window managers.

In addition, since the graphics card driver is in charge of displaying fonts in anti-aliasing mode, it must be equipped with the RENDER extension.

Note: Numerous Truetype fonts are subject to copyright regulations. For this reason, we cannot include such well-known fonts as "arial", "times new roman", or "verdana" in the distribution.
Thank you for your understanding!

Procedure

1. Check whether your graphics card supports rendering of TrueType fonts.

To do this, enter the following command in an X console as a normal user:
xdpyinfo |grep RENDER
The next line should display the output:
RENDER
If this is not the case, please make sure that you have installed XFree86 version 4.0.3.
The command xf86version will tell you what version of XFree86 is currently running on your system.
If you are still running XFree86 version 3.x, please change to XFree86 4.0.3 or higher with the help of SaX2. You will find additional help in our support database or in the reference manual.

2. Activating anti aliasing in KDE

To activate anti aliasing in KDE, start the KDE control center, select "look&feel", and then "style". Check the box for Anti Aliasing. From SuSE Linux 7.2 on, the standard QT library includes support for anti aliased fonts.

KDE2 programs can use anti aliasing even when running under a different window manager like Windowmaker. This only works if an environment variable is globally set. To do this, edit the file /etc/profile.local as "root" user. If this file does not exist, you can easily create it by executing:

touch /etc/profile.local
Insert the following entry:
export QT_XFT=1

3. Fonts installation.

As of August 12, 2002, Microsoft offers the possibility to freely download True Type fonts like "arial", "arial black", "times new roman", "verdana", etc. Thus, the program fetchmsttfonts (included in SuSE Linux up to version 8.0) is no longer usable. Please refer to the following URL for further information:

http://www.microsoft.com/typography/fontpack/default.htm

Nevertheless, you can further install any Truetype fonts of your choice. Write them to the directory /usr/X11R6/lib/X11/fonts/truetype/ and execute the following command (we recommend you to use cut&paste) as root user in the console:

cd /usr/X11R6/lib/X11/fonts/truetype/
/usr/X11R6/bin/ttmkfdir|sed s/^[0-9]*// > fonts.scale.neu

By doing this, the Truetype fonts will be made usable for SuSE Linux. Finally, restart SuSEconfig and your X server.

Note: Please note that the names of Truetype fonts must always be written in lowercase. They must not contain any special characters or umlauts. If necessary, you will have to rename the fonts.

4.Checking anti-aliasing fonts.

The command xmag enlarges any part of your desktop. Start xmag from a console and click on the small edge on a text of your choice, e.g. a KDE2 menu. If you can see pixels in different shades of grey or other colors between the pixels of the normal font in the xmag window, then the anti-aliasing font is activated.

5.Tip for LCD display's or laptop's owners:

An additional option has proved to be very helpful in order to improve the quality of anti-aliasing fonts when using a LCD display. For this purpose, you only have to edit a file (or to create it in case it does not exist) as a normal user in your home directory.

touch .xftconfig

Edit the file with an editor of your choice (e.g. pico) and insert the line:

match edit rgba = rgb;

This option is not mandatory. Use it only if it results in a better display. In some cases (e.g. with a CRT display), this option has proved to have a disturbing effect.

Have a lot of fun!


Keywords: FONT, TRUETYPE, WINDOWS, ANTIALIASING, AA, ARIAL, TIMES, VERDANA

Categories: X Applications

SDB-chofman_ttf_72, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 27. Jun 2001
SuSE Linux AG - Last generated: 19. Aug 2002 by sdb (sdb_gen 1.40.0)