Installing Microsoft's TrueType fonts on Linux servers

Although the idea of putting something from Microsoft on a Linux box might sound awful at first, you may find a reason to use Microsoft TrueType fonts on a Linux server. If you're using GD to render an image, these fonts may come in handy.

If you have an RPM-based linux distribution, you can use a spec file that is available on SourceForge. You can follow the instructions on the project's page, or you can follow these abbreviated instructions here:

Install some prerequisites:

// RHEL 4
up2date -i rpm-build wget ttmkfdir
// RHEL 5
yum install rpm-build wget ttmkfdir

Install cabextract.

Build the RPM:

wget -O /usr/src/redhat/SPECS/msttcorefonts-2.0-1.spec http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
rpmbuild -bb msttcorefonts-2.0-1.spec
rpm -Uvh /usr/src/redhat/SPECS/msttcorefonts-2.0-1.spec

Test it to be sure that they're installed:

xlsfonts | grep ^-microsoft
rpm -ql msttcorefonts
Printed from: http://rackerhacker.com/2008/10/23/installing-microsofts-truetype-fonts-on-linux-servers/ .
© Major Hayden 2012.

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this