3

I have installed Mantis Bug Tracker on a CentOS 6.3 server and enabled the JP Graph plug in. However, to get this plug in to display the required TTF fonts I have to install something called "msttcorefonts".

As I understand it, I need the Arial font from Microsoft but I am by no means an expert when it comes to Linux or command line and I am finding it really difficult. Also, this server is pretty important and it would be nice that after typing in these random commands it stays up.

I understand that I had to get some prerequesit tools first.

So I have got the RPM build tools and successfully installed them. Now am able to rpmbuild --version which gives RPM version 4.8.0.

However when I try to "create the package" as detailed here I get this new error. SIGH:

alex@frankae1 [~]# rpmbuild -bb msttcorefonts-2.0-1.spec
warning: line 19: buildprereq is deprecated: BuildPrereq: /usr/bin/ttmkfdir
warning: line 20: buildprereq is deprecated: BuildPrereq: wget
warning: line 21: buildprereq is deprecated: BuildPrereq: cabextract
error: Failed build dependencies:
        /usr/bin/ttmkfdir is needed by msttcorefonts-2.0-1.noarch

I have spent all day getting to this point and can't find any more information from this point on... can anyone at least send me in the right direction?

Any help is appreciated.

4 Answers 4

3

Looking at the spec file at http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec (and the patch in the page you cite), I see:

BuildPrereq: %{ttmkfdir}
BuildPrereq: wget
BuildPrereq: cabextract

So, you will need to have packages related to those in place before the build can succeed.

Your error:

error: Failed build dependencies:
        /usr/bin/ttmkfdir is needed by msttcorefonts-2.0-1.noarch

is related to the first BuildPrereq.

Doing yum search ttmkfdir I see that it's in the (somewhat obvious) ttmkfdir package. You can do yum search on the other prereqs, but, basically, run something like:

yum install ttmkfdir cabextract wget

to install the prereqs, and then try the rpmbuild again.

2

Out of the curiosity: Are you sure you need Arial? Red Hat created their own MS font replacements a good while ago, called Liberation fonts. Those are available in CentOS repositories as well and should look pretty.

EDIT: OK, you told in a comment that the font is hard-coded. I guess you still could do

yum install liberation-sans-fonts

And then cheat your program with

cd /usr/share/fonts/liberation
cp LiberationSans-BoldItalic.ttf Arial-BoldItalic.ttf
(and so on for each LiberationSans font there)

Finally, rebuild the font cache with

fc-cache

Give a try.

Alternatively you can install wine with yum install wine, since it installs those MS core fonts for a system-wide use.

3
  • Yes, the font that the plug in uses seems to be hard-coded. :(
    – beingalex
    Aug 14, 2012 at 13:03
  • OK, replied to you again. :) Aug 14, 2012 at 13:09
  • Thanks for your help, I forgot to install a package. Hopefully one day i'll know what one of those is.
    – beingalex
    Aug 14, 2012 at 13:21
2

You need to install ttmkfdir. You can get it here: http://pkgs.org/centos-6-rhel-6/centos-rhel-i386/ttmkfdir-3.0.9-32.1.el6.i686.rpm.html

but i would suggest that you use yum for it:

yum install ttmkfdir
1

First install dependencies

# yum install curl cabextract xorg-x11-font-utils fontconfig

Install fonts

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

Microsoft truetype fonts are installed in this folder:

/usr/share/fonts/msttcore/

More info: http://mscorefonts2.sourceforge.net/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .