My biggest gripe on any GNU operating system is the poor font rendering. Because of patents held by biggies like Microsoft and Apple, many interesting font rendering technologies cannot be applied on Linux without the chance of getting sued.
Perhaps the best patch available for font rendering is the LCD cleartype patch from Freetype maintainer David Turner. Though this patch is no longer available from Turner, you can download it from several places on the internet. I have shared one of them here. Let us see how we can apply this patch on Mandriva 2007. Ubuntu users, please refer to my another interesting howto here.
We need the following 3 files:
- freetype packages from http://freetype.sourceforge.net. Get version 2.2.1
- cairo packages from http://cairographics.org. Get version 1.2.4
- xft packages from http://www.fontconfig.org. Get version 2.1.11
Extract all the packages to a folder:
$ tar -xzvf filename.tar.gz
Now we need to apply the patches for individual packages.
For freetype, there is no patch, but we can edit the file manually. Go to your freetype source folder, and open the file aflatin.c:
$ vim ./src/autofit/aflatin.c
Search for the term FT_RENDER_MODE_MONO. You will find two instances. Remove the OR statement that follows this in both cases. It will read like the following once you edit it:
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
You are done patching freetype.
Now go to the xft folder and run:
patch -p1 < path/to/your/libXft-2.1.10-etcpatchfile
Go to the cairo folder and run:
patch -p1 < /path/to/your/cairo_patch
You are done with all the patching. Now, go to individual folders for these packages and run:
$ ./configure --prefix=/usr
Now login as root and:
$ su # make install # exit
This will overwrite the default libraries that shipped with your system. Repeat the same for all the other packages.
Go to font preferenes and select sub-pixel font rendering.
Just restart X (Ctrl+Alt+Backspace) and enjoy your new beautiful Mandriva!
Acknowledgements: This guide is based on a thread in Ubuntu forums.