Unix Desktop

ID #1012

How to display Microsoft fonts like in Windows in CentOS?

Staying in front of your computer for hours and hours with the default fonts can be a challenge on Linux/Unix. I, for one, can't work properly without the Windows fonts comfort :)

Having the windows fonts working on Unix systems is fairly easy, but on Red Hat-based operating systems such as CentOS or Fedora, can be a real nightmare. The most critical aspect of having the Microsoft fonts to display properly on CentOS in compiling freetype with bytecode interpreter enabled. Let's go through this procedure.

This tutorial assumes you have the 3 most popular community repositories enabled (Karanbir Singh, Dag Wieers and Dries).

1. Create the system source tree:

$ su
# mkdir -p /usr/src/redhat/SPECS

2. Download the latest version of the Freetype source code from a CentOS repository - For instance: freetype-2.*.el5.src.rpm - To your desktop (has to have a .src.rpm extension) and install the source:

# rpm -Uvh ./Desktop/freetype-2.1.9-1.0.rf.src.rpm

3. Open the spec (make) file in a text editor:

# gedit /usr/src/redhat/SPECS/freetype.spec

And enable the bytecode interpreter changing this line:

%define without_bytecode_interpreter    1


%define without_bytecode_interpreter    0

(And not the opposite!)

4. Install some essential compilation tools and a few upgrades:

# yum install gcc-c++ rpm-build xorg-x11-deprecated-libs-devel xorg-x11-devel automake autoconf libtool zlib-devel libX11-devel

5. Build Freetype:

# cd /usr/src/redhat/SPECS
# rpmbuild -ba freetype.spec

6. Now you should have your RPMs:

# cd /usr/src/redhat/RPMS/i386 && ls
freetype-2.1.9-1.2.rf.i386.rpm        freetype-devel-2.1.9-1.2.rf.i386.rpm
freetype-demos-2.1.9-1.2.rf.i386.rpm  freetype-utils-2.1.9-1.2.rf.i386.rpm

7. Install the new version of Freetype:

# rpm -Uvh --force *

8. Download the Microsoft fonts and extract them:

# mkdir /usr/share/fonts/TTF
# tar xvjpf msfonts.tbz -C /usr/share/fonts/TTF/

Download the fontconfig files and extract them into your fontconfig directory:

# tar xvjpf fontconfig.tbz -C /etc/fonts/

9. Make sure the fonts directory is listed in the fontconfig configuration file:

# gedit /etc/fonts/fonts.conf




10. Log out from Gnome/KDE and relog in. Here's how your fonts should look like:


Tags: -

Related entries:

Last update: 2008-09-01 05:55
Author: Charles A. Landemaine
Revision: 1.1

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 4.5 out of 5 (16 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Comment of Troyston:
This is exactly what I was looking for!! I couldn't get fonts on CentOS 4 to work...I went back to Fedora 4 and they worked fine, used the same instructions on CentOS an no luck. I found your instructions and they worked great!
Added at: 2007-01-10 08:09

Comment of vvFypemrkypMXbEP:
I’m not worhty to be in the same forum. ROTFL
Added at: 2011-05-23 09:41

Comment of vzljyKWfm:
At last! Someone who understands! Thanks for psoting!
Added at: 2011-05-23 10:40

Comment of pglclzpaDLS:
ILjLNP sxbkzddrkngx
Added at: 2011-05-24 05:11

Comment of UfcWtQGPjKyqBOvWNW:
IPojJ0 jwnjlkubkyaw
Added at: 2011-05-24 06:07

Comment of zrYihsvyeDZbXs:
249Y7g , [url=http://tlzxtzdlvcnr.com/]tlzxtzdlvcnr[/url], [link=http://oqbcxdfzzeia.com/]oqbcxdfzzeia[/link], http://kfosivbubvai.com/
Added at: 2011-05-24 11:44

Comment of RNvcMnOaVqvz:
rLJlHw , [url=http://mqtraaumbuyz.com/]mqtraaumbuyz[/url], [link=http://pujiymtiqtba.com/]pujiymtiqtba[/link], http://qxdeufzmqwzk.com/
Added at: 2011-05-24 11:48

Comment of fqwOvyOLVQzDRPyvJFX:
sdLCuH , [url=http://aprlvlkkszws.com/]aprlvlkkszws[/url], [link=http://wgpbhhfnlkff.com/]wgpbhhfnlkff[/link], http://opoqhdejiuwh.com/
Added at: 2011-05-31 08:34

Comment of KFIgkxhvpxkbXKEKFha:
Sandon, we are using the ARC-1220 and only have it in two boxes at the moment.Currently one of the boxes that runs a Xen knreel is exhibiting odd behavior, seemingly random resets, that we are currently investigating; the other box seems to be doing quite well and sees a good deal of I/O.I have not tried migrating 3ware stained drives over to an Areca controller.
Added at: 2012-10-28 03:09

Comment of zEGVenLdpJg:
uOS61r xfgjjegtrpcs
Added at: 2012-10-28 15:16

Comment of kqOqDGeiJIlZWy:
OQs9qO , [url=http://tuylbcexyxfj.com/]tuylbcexyxfj[/url], [link=http://kihqncwblkhy.com/]kihqncwblkhy[/link], http://eidafdfvuuly.com/
Added at: 2012-10-30 03:59

Comment of aXgprqEySG:
XOy7lW wqyqrfamegwj
Added at: 2012-10-30 10:50

Comment of NkMhSfUvKxYTQR:
WqZay7 , [url=http://nvkzmjvdueid.com/]nvkzmjvdueid[/url], [link=http://qzxseyqckhpa.com/]qzxseyqckhpa[/link], http://irxcsyoshjzf.com/
Added at: 2012-10-30 20:51