Font hinting is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid. At small screen sizes, with or without antialiasing, hinting is critical for producing a clear, legible text for human readers. It is also known as instructing. – wikipedia
Font hinting is a patented technology. Accordingly, its legal use in countries that allow software patents is not clear. IANAL, however, proceed with caution.
This howto is for openSUSE 11.3. Click the link for a howto for font hinting on openSUSE 11.4
Why Use Font Hinting
Quite simply, because it’ll make the text on your screen much easier to read and much more pleasing on the eye. There is nothing worse on a beautiful composited linux desktop than horribly fuzzy or jagged fonts.
How Do I “Hint My Fonts”
Enabling hinting is surprisingly simple. The freetype2 package that ships with opensuse does not contain patented hinting technology. However, you can get a freetype2 package with hinting enabled. To replace your existing freetype2 package with some hinting goodness, simply click on this link. This will open up the package installation application, and auto install the new package
Enabling Font Hinting in KDE
Open the “Configure Desktop” application from the KDE Menu, and go to Appearance -> Fonts:
Make sure “Use anti-aliasing” is “Enabled”. Then click on “Configure…”. Tick the box “Use sub-pixel rendering” and set the “Hinting style” to “Full”. Done. Please note that some fonts may look better with a Slight or Medium hinting style. Just play around with it:
Enabling Font Hinting in GTK apps
Enabling font hinting in GTK is slightly more tricky. You need to download this cairo package. Once downloaded, open dolphin (file manager) and click on the file. You should be asked for your root password, and the package will be installed. Once installed, you need to add a couple of files to your setup. Open a text editor as root. The easiest way to do this is to press alt+f2 and type kdesu kwrite. Then cut and paste the following text into a new text file:
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- Enable freetype's new subpixel filter. Currently, only a cairo version containing the patches from freedesktop #10301 respects this setting. --> <match target="font"> <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> </match> </fontconfig>
Then save the file as /etc/fonts/conf.avail/10-lcd-filter.conf. Then create a file in your home directory called .Xresources. Copy and paste the following into it:
Log out of KDE, and log back in you should have smooth beautiful fonts