Tuesday, October 9, 2007

Improve True Type Font Rendering on Feisty

As a student, I get assigned written reports with a fair amount of regularity. It's not uncommon, when going over the instructions, to read that the assignment must be X pages long, be double spaced, have 1-inch margins, and yes, use Times New Roman. Turns out that teachers are now wise to the formatting tricks we've been using to slip in under page counts, so formatting has been more-or-less standardized.

Long story short, even if I'm on Linux, I have to be using Microsofts' True Type fonts anyways. Given that, I suppose I may as well make them look pretty.

The first order of business is to install the fonts. From a terminal type:
sudo aptitude install msttcorefonts
Now, open up your apt sources list:
kdesu kwrite /etc/apt/sources.list
Ok, scroll to the end, add the following to the file and save:
deb http://www.telemail.fi/mlind/ubuntu feisty fonts
Now type:
wget http://www.telemail.fi/mlind/ubuntu/937215FF.gpg -O- | sudo apt-key add -
Install the new rendering packages:
sudo aptitude update && sudo aptitude install libfreetype6 libcairo2 libxft2
sudo dpkg-reconfigure fontconfig-config
(When prompted choose Native, Always, No bitmapped fonts, in that order)
Finally, download the package from here:
http://www.osresources.com/files/centos-windows-fonts/fontconfig.tbz
and install it with:
sudo tar xvjpf fontconfig.tbz -C /etc/fonts/

Personally, I've enabled KDE's anti-aliasing settings (found under System Settings --> Appearances --> Fonts). They're using full subpixel hinting, but are excluding the range from 0.0 to 8.0. So far, that seems to make TrueType fonts look more or less as they do on Windows.

No comments: