Font hinting until very recently has been a patented technology. The patents that lead to subpixel font hinting being turned of by default in the freetype2 library have now expired. It is now turned on by default going forward. Unfortunately openSUSE 11.4 ships with a version that does not have the bytecode intepreter turned on. This howto sets out how to get a version with it enabled.
This howto is for openSUSE 11.4. Click the link for a howto for font hinting on openSUSE 11.3
Install Muzlocker Repo
The first step is to install a new repo from the openSUSE build service. Do this by running the following commands:
sudo zypper addrepo http://download.opensuse.org/repositories/home:/muzlocker/openSUSE_11.4/ subpixel sudo zypper ref sudo zypper dup
This will add a new repository, refresh your package list and upgrade the freetype and associated packages to packages with font hinting.
Then create a new file called .Xdefaults in your home directory, containing the following text:
Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintslight Xft.hinting: 1 Xft.antialias: 1 Xft.dpi: 96 Xft.rgba: rgb
You can play with the third line by changing it to Xft.hintstyle: hintfull. I find that this works best on my machine. However, try both to see which looks better on your machine.
Then create another new file in your home directory called .fonts.conf, with the following text:
<fontconfig> <match target="font"> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> </match> <match target="font"> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> </match> <match target="font"> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> </match> <match target="font"> <edit mode="assign" name="antialias"> <bool>true</bool> </edit> </match> </fontconfig>
Make sure the line
Configuring Your Desktop
Once you’ve logged back in to your Desktop, you will need to configure the font configuration settings for the desktop. See my page on font hinting in openSUSE 11.3 for the configuration dialogs for Gnome and KDE. For KDE, make sure that the “Use Anti-Aliasing” setting is set to “System Settings”. For Gnome, use the Appearance section of the control panel to configure the anti-aliasing settings to your liking. Please note that you may have to play a bit with the settings, for Gnome, however, usually the defaults work best.
All done – pretty fonts abound.