Author: Sven Knispel
Updated for Fedora Core 5 on 2006-04-17
Ever since I am using Fedora Core I have been complaining about the poor rendering of fonts: they look ugly and unsharp.
The reason of the poor rendering is that FreeType is compiled by default with the bytecode interpreter switched off. I didn't find the real reason for that but it seems related to some patent issues.
This article is about reconfiguring Fedora Core for a neat font rendering. It has been tested with Fedora Core 4 and 5:
Fortunately it is quite simple to turn the bytecode interpreter on by recompiling freetype after a slight change:
First we must heck for current version of freetype:
# rpm --query freetype
Then download the sources, e.g. from rpm.bone: http://rpm.pbone.net/index.php3/stat/4/idpl/1981137/com/freetype-2.1.9-2.i386.rpm.html
(I suggest downloading the binary rpm as well in case of dammage as we will freshen the installed one)
Install the sources:
sudo rpm -ivh ./Desktop/freetype-2.1.9-2.src.rpm
Change to the directory
/usr/src/redhat/SPECS and edit
What we are looking for is:
%define without_bytecode_interpreter 1
and we want to replace it by:
%define without_bytecode_interpreter 0
in order to enable the bytecode interpreter.
After having changed the code we need to rebuild the RPMs:
rpmbuild -bb freetype.spec
(if you get errors make sure that XFree86-devel is installed as freetype depends on it)
If the build was successfull the result can be found in
[~]$ cd /usr/src/redhat/RPMS/i386/
Now check for the ones you need to reinstall with
[i386]$ ls -l
-rw-r--r-- 1 root root 824001 Oct 21 15:28 freetype-2.1.9-2.i386.rpm
-rw-r--r-- 1 root root 1781435 Oct 21 15:28 freetype-debuginfo-2.1.9-2.i386.rpm
-rw-r--r-- 1 root root 105464 Oct 21 15:28 freetype-demos-2.1.9-2.i386.rpm
-rw-r--r-- 1 root root 585133 Oct 21 15:28 freetype-devel-2.1.9-2.i386.rpm
-rw-r--r-- 1 root root 25476 Oct 21 15:28 freetype-utils-2.1.9-2.i386.rpm
rpm --query <package-name>
rpm --query freetype-devel) and reinstall whatever is required with the force option as they are already installed in the
rpm -Uvh --force freetype-2.1.9-2.i386.rpm
rpm -Uvh --force freetype-devel-2.1.9-2.i386.rpm
Now just restart X and enjoy...
The quality of rendering, especially for small sizes is depending on the quality of the fonts. The Microsoft fonts Verdana and Tahoma are famous for their crispness, even all small sizes like 8 pt. If you don't have a problem with patented fonts I recommend installing these. They can be found in the webcore fonts package, or you can copy them from an installed Windows.
Antialiasing is a technique for "bluring" edges of fonts in order for them to look sharper. I a font reders wenn at small sizes I recommend turning antialiasing off. My setting is to turn antialiasing off for all sizes < 9 pt.
And here is the comparison before and after:
If you are using KDE you may have noticed that the settings from KDE are not inherited to Qt applications. Especially Firefox keeps showing bigger fonts not corresponding to the KDE font-settings.
After some research I found out how to force the fonts for non KDE applications:
gnome-font-propertiesand select e.g. Tahoma 8 as default font
gnome-settings-daemonmus be started: this can be done e.g. by adding a symlink to
ln -s /usr/libexec/gnome-settings-daemon ~/.kde/Autostart/gnome-settings-daemon)
control-centerin order to get