This patch makes Freetype's (http://www.freetype.org) Truetype interpreter render fonts similarly to MS Cleartype. It is not perfect, and needs some work on certain fonts, however, in my opinion it renders much, much better than the bi-level Freetype hinting does when doing subpixel rendering. Anything previous to this that I've worked on is simply a hack. This is the real thing finally.
This patch is different than all previous so-called "cleartype fixes" for Linux. The reason is that the MS truetype interpreter does subpixel filtering, but also subpixel hinting, which has never been done before in Freetype. ("Subpixel hinting" means that the outlines of the letters are rounded to subpixel boundaries instead of pixel boundaries. "Subpixel filtering" means that the part of the renderer that chooses which pixels to light up does so with the idea of subpixel boundaries instead of pixel boundaries.) The Freetype library has hitherto only done subpixel filtering, and WHOLE pixel hinting. This looks great when using non-antialised fonts (circa Win98), but looks bad on legacy fonts when doing antialiasing and subpixel filtering, because the legacy fonts were designed with the idea of bi-level (monochrome) hinting in mind, not subpixel (antialiased) hinting. The MS TT interpreter in Windows XP and later works around this by ignoring certain Truetype instructions contained in the font. This patch attempts to duplicate that functionality. Modern free fonts like Liberation and DejaVu also look good with this too, because they were designed with subpixel hinting in mind.
Another benefit to this is that this is modifying the default (native) hinter of Freetype, which all programs should use by default. This means that oo.org, WINE, Xft, Qt and just about everything else will be using this by default. In other words, almost all programs will render fonts the same good way. It may require a ~/.fonts.conf or /etc/fonts/local.conf directive saying to not use autohint (which is a perfectly valid hinting implementation, but different).
Please feel free to make suggestions and criticisms of the approach and implementation. My goal is to make this patch quality and accurate, and get it into the freetype tree if possible. There are plenty of improvements that can still be made, in features and implementation. This is an all-in-one patch that should cleanly patch freetype-2.3.12, enable LCD filtering, subpixel rendering, and the new subpixel hinting:
(Updated 2010-04-24) http://www.infinality.net/files/subpixel-hinting-20100424-1.patch
There are a few more tweaks I need to make the patch acceptable for inclusion into Freetype. In the meantime here are the Fedora 13 RPMS. They safely install alongside the system freetype, and use LD_PRELOAD to override system libraries. You may get LD_PRELOAD warnings / errors when running from command-line. These will go away eventually once this patch is in freetype:
(Updated 2010-06-17) http://www.infinality.net/fedora/linux/13/x86_64/freetype-subpixel-2.3.12-3.fc13.rpm Also…. It's strongly recommended to use this /etc/fonts/local.conf, and to remove/disable your ~/.fonts.conf, not to mention using the cairo and libXft packages available at that link.
Here is a DejaVu Sans sample, rendered with Freetype, using this patch:

Here is a Tahoma sample, rendered with Freetype, using this patch:

Here is an Arial sample, rendered with Freetype, using this patch:

Here is a Liberation Sans sample, rendered with Freetype, using this patch:
