Tight Anti-Aliased Fonts in CentOS/RHEL

A while back I posted on configuring sharp/non anti-aliased fonts in CentOS, Fedora, and RHEL. Well now I’ve found some settings that make anti-aliasing look not only bearable, but awesome in Linux. I don’t know if the font rendering has been improved in the more recent distros or if my tastes just changed.

The only annoying piece in this is recompiling Freetype with the bytecode interpreter enabled, but it’s pretty easy to follow the steps here.

wget http://mirrors.adams.net/centos/5.3/updates/SRPMS/freetype-2.2.1-21.el5_3.src.rpm

rpm -ivh freetype-2.2.1-21.el5_3.src.rpm

Update the paths below to wherever you’re keeping your source RPM data. For root it’s usually /usr/src/redhat.

vi /usr/src/redhat/SPECS/freetype.spec

change the bytecode setting to “0”. It’s usually the first uncommented line:

%define without_bytecode_interpreter    0

Then build the RPMs:

rpmbuild -bb /usr/src/redhat/SPECS/freetype.spec

Install them:

rpm -ivh /usr/src/redhat/RPMS/freetype*.rpm

Then tell yum to ignore Freetype so it doesn’t remove your custom RPM:

vi /etc/yum.conf

exclude = freetype*

Restart X to load the new Freetype, and in Gnome go to System > Preferences > Fonts.

Set the Fixed width font to “Monospace 10”

Set all the other fonts to “Sans 8”

Set Font Rendering to “Subpixel smoothing”

And you’re good to go. Looks nice, doesn’t it?


About this entry