Saturday, July 21, 2012

Installing msttcorefonts on Centos 6.3

Documents received may require MS Fonts to display format correctly, and these MS Ffonts are not available by default in Centos 6.2.

Install tools to create fonts and directories (fake ones for compatibility).
yum install ttmkfdir rpmdevtools

note: ensure all RPM building tools have been installed (see my previous post).

Install ATRPMS repository and MS Fonts.
wget  http://dl.atrpms.net/el6-x86_64/atrpms/stable/atrpms-repo-6-5.el6.x86_64.rpm
wget http://pkgs.org/centos-6-rhel-6/atrpms-x86_64/atrpms-repo-6-6.el6.x86_64.rpm/download/

(for i686 machines, replace x86_64 with i386 as in line below)
wget  http://dl.atrpms.net/el6.3-i386/atrpms/stable/atrpms-repo-6-5.el6.i686.rpm



(I am using, x86_64 for remainder of notes)
rpm -ivh atrpms-repo-6-5.el6.x86_64.rpm
yum install chkfontpath
wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
rpmbuild -bb msttcorefonts-2.0-1.spec
(download MS Fonts and compile into packages)
rpm -ivh rpmbuild/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
(open Libreoffice or Character Map, see if the Arial, Georgia and Times New Roman are available)

If fonts are not appearing, run following then relog-in (Do not run these if above steps work)
mkfontscale
mkfontdir

References: http://corefonts.sourceforge.net/

6 comments:

sobeit said...

Hi'
Thanks for this. Did note a couple of errors:
1. cabextract needs to be installed to extract fonts.
2. The path is incorrect at the end where the newly built rpm is - needs /root/ at the beginning.

Anthony Vanover said...

I've done this exactly as said yet the fonts still don't appear. Similarly, if I run "xlsfonts | grep^-microsoft" I also get nothing. Can't figure out what I'm doing wrong. Have already tried reloading the xfs server with "sudo /sbin/service xfs reload".

Orb Najes said...

try this instead ...

rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.2-1.noarch.rpm

this installer downloads the fonts a sourceforge mirror and installs them to X core fonts and Xft core fonts.

Tboxmy said...

Sobeit and Orb,

Thank you for pointing these out. Sometimes writing it out may miss out on some of the steps taken.

Realtebo said...

Wget of x64 tell me 404 !

Tboxmy said...

Realtebo,

Updated the link. But do note that these links tend to change over time.

Will need to search for them online if link breaks again.

Blog Archive