This is a reproduction of a page I gound on the internet. Here is the <a href="http://cri.ch/linux/docs/sk0017.html">original page</a>.
Nicer fonts for Fedora Core 4
Author: Sven Knispel
Updated: 01-11-2005
Feedback welcome: linux@cri.ch
Free service provided by: www.cri.ch
Ever since I am using Fedora Core I have been complaining about the poor rendering of fonts: they look ugly and unsharp.
One week ago I switched my desktop PC from Windows to Linux and I really couldn't stand it so I started a little research.
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.
Fortunately it is quite simple to turn the bytecode interpreter on by recompiling freetype after a slight change.
This article is about recompiling freetype with the bytecode interpreter switched on:
* get the source rpm
* make the required changed
* recompile and install the modified freetype version
1. Getting the sources
First we must heck for current version of freetype:
# rpm --query freetype
# freetype-2.1.9-2
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
2. Enabling the bytecode interpreter
Change to the directory /usr/src/redhat/SPECS and edit freetype.spec.
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.
3. Rebuild and install
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 /usr/src/redhat/RPMS/i386/: [~]$ cd /usr/src/redhat/RPMS/i386/
[i386]$ ls -l
total 3268
-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
Now check for the ones you need to reinstall with rpm --query <package-name> (e.g. rpm --query freetype-devel) and reinstall whatever is required with the force option as they are already installed in the original version: rpm -Uvh --force freetype-2.1.9-2.i386.rpm
rpm -Uvh --force freetype-devel-2.1.9-2.i386.rpm
That's it!
Now just restart X and enjoy...
4. Settings
If you use a TFT I recommend deactivating anti-aliasing for even crisper fonts.
4. Results
And here is the comparison before and after:
before after
5. Consistent font for all applications (updated 31.10.2005)
If you are using KDE you may have noticed that the settings from KDE are not inherited to Qt applications. Especially Firefox kept showing bigger fonts not corresponding to me KDE font-settings.
After some research I found out how to force the fonts for non KDE applications:
* the gnome font-settings must be changed. This can be done by exectuting gnome-font-properties and select e.g. Tahoma 8 as default font
* under KDE the gnome-settings-daemon mus be started: this can be done e.g. by adding a symlink to /usr/libexec/gnome-settings-daemon from ~/.kde/Autostart (ln -s /usr/libexec/gnome-settings-daemon ~/.kde/Autostart/gnome-settings-daemon)
After these changes all my apps have neat and consistent fonts...