The bulk of the information in this thread can now be viewed at Dugan's webpage http://duganchen.ca/writings/slackware/fonts
My Patches/info for 13.37 can be found at post #212 and beyond
A while back during 12.0 I made this post about getting "cleartype" like results with slackware fonts, you can view the original post here
http://www.linuxquestions.org/questi...kware.-539868/
I got some emails asking for updated packages for 12.1 so I decided to post them and give a quick detail of what I have done...
First let me just say I think that slackwares default font rendering is great but I have always thought that font rendering is the one thing that windows did better than linux but that really is no longer the case because most of the fonts technologies that make the fonts look good in windows are now available for linux. The problem though is that those technologies are patented and cannot be made available "out of the box". Keep in mind also that you should only do or use the patches/packages if you live in a country where the patent doesn't apply or you have a license to do so. Ok on to the good stuff.
(All patches and packages will be found at bottom of page)
1) You need to recompile freetype to include sub-pixel rendering and bytecode interpreter enabled, by default they are not enabled.
2) You need to recompile cairo with the sub-pixel rendering patch applied to the source. The patch was made by David Turner a few years ago and the patch was never updated. Luckily the guys over at arch linux have maintained the patch and have updated to work with cairo-1.4.14.
3) You need to recompile libXft with the sub-pixel rendering patch.
4) after all 3 packages are updated you need to set fonts DPI to something sane, 96x96 is what windows uses and is what I recommend, there are many ways to do this but I am only going to explain 2. the first way is to start xorg with the command
"startx -dpi 96" you can also edit /usr/bin/startx/ and change to this
sysserverrc=/usr/lib/X11/xinit/xserverrc
defaultclient=xterm
defaultserver=/usr/bin/X
defaultclientargs=""
defaultserverargs="
-dpi 96"
clientargs=""
serverargs=""
save and close, restart X
or if you are using the nvidia drivers you can edit your xorg.conf file and under the "device" section you can add this
Option "DPI" "96 x 96"
There are other ways to change your dpi these are just the easiest IMO.
to test that the dpi is set correctly type this command
xdpyinfo | grep resolution
if it says 96x96 you good.
UPDATE ++ I just wanted to add that 96x96 is not necessarily the correct DPI it is just was the most common back in the CRT days, but now with LCD's and such depending on what your dot pitch is your native DPI could be as low as 75 or all the way up to 105+. For those of you that have a nvidia card and are using the latest drivers, the drivers should automatically poll the data from your monitors EDID and set the DPI correctly for you with out doing anything, that is what I did and right now nvidia is setting my dpi at "90x88" which is correct given what my monitors dot pitch is. A much more detailed explanation on this can be found at this post
http://www.linuxquestions.org/questi...034/page4.html
5) you need to make a .fonts.conf file and put that in your home directory. I am going to post my .fonts.conf below for download, but you can make a lot of interesting changes to your fonts using different commands, but if you want to learn how you are going to have to read up on fontconfig. But I am assuming that most people who interested in getting my type of results will just use my .fonts.conf file.
6) you need to install some good quality fonts. Preferably the windows core fonts. If you dual boot with windows you can simply copy for fonts from windows to your linux system.
7) To get the desired results like my screenshots below you need to change the fonts in firefox here are my settings
http://webpages.charter.net/daedra/12.1/firefox.png
That really is all that I did, you can play around with your .fonts.conf file and change the appearance of the fonts.
SCREENSHOTS
http://webpages.charter.net/daedra/12.1/snapshot4.png
http://webpages.charter.net/daedra/12.1/snapshot4.png
http://webpages.charter.net/daedra/12.1/snapshot4.png
PATCHES
Cairo -
http://webpages.charter.net/daedra/1...filter-1.patch
ignore the version number, it works
libXft -
http://webpages.charter.net/daedra/l...type-like.diff
(I have read around that this might not be needed for desired results, but I used it anyway)
Freetype - There are not patches, you just have to follow step one, Pat's build script can take care of that for you with a simple edit of the build script. However there is one thing that need to be done if you are going to compile your self you need to edit two lines in the src/autofit/aflatin.c file. Find the lines that say this
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
and then change them to look like this
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
save and your ready to compile (assuming your using Pat's modified build script)
Finally, if you want to save your self all this compiling and time please use my modified packages, cairo and freetype were compiled using Pat's build script and have been tested so you can use them with confidence. libXft was compiled using src2pkg but I used Pat's configure options from his X build script and it has also been tested.
http://webpages.charter.net/daedra/1....14-i486-2.tgz
http://webpages.charter.net/daedra/1...3.5-i486-2.tgz
http://webpages.charter.net/daedra/1....12-i486-3.tgz
this is my .fonts.conf file, just copy this text into your favorite text editor and save it as .fonts.conf in your home directory
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<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>
<edit name="autohint">
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>
We'll I guess thats all there really is, I hope at least a few people find this information useful, please feel free to leave any comments or if I missed anything let me know.