Monday, October 10, 2011

Problems with graphics in Mantis bugtracker in Linux

I installed Mantis BT, but graphic summaries do not show up. I went to Summary -> Per state and all i saw was:

Synthesis graphs by status
Unable to read/find font

It was shown for all graphic screens in summary menu.

With little tuning I get success in Debian:

1. Ensure you have got some Windows fonts on your system (Arial, Verdana, Tahoma, Times New Roman). Use the following command:

fc-list

Look for the mentioned fonts.
2. If you have not them, try installing in one of the following ways:
2a. With the following install commands:

sudo apt-get install libfreetype6
sudo apt-get install ttf-mscorefonts-installer msttcorefonts

This does not helped me, but you could have more luck (especially with Ubuntu).
After the commands check weather you have got new fonts locally. Reindex all files with:

updatedb

and search for them with

locate erdana
locate ahoma

If you get an response, probably fonts are placed on your system.
I get result:

/usr/share/fonts/truetype/ms-fonts-standalone/verdana.ttf

so they are placed in "/usr/share/fonts/truetype/ms-fonts-standalone/"
2b. Download the latest version from http://avi.alkalay.net/software/webcore-fonts/ and place it in some of the fonts' folders. They could be checked in /etc/fonts/fonts.conf
I placed them in "/usr/share/fonts/truetype/ms-fonts-standalone".

3. Reload fonts with command:

fc-cache -fv

4. Check whether the fonts exist again with:

fc-list

5. Edit [mantis-root]/config_inc.php and add font folder. In my case i did this

$g_system_font_folder = '/usr/share/fonts/truetype/ms-fonts-standalone/';

You have to correct it with your folder! I think tailing '/' is mandatory.

6. Enjoy the nice graphics in Mantis BT.

Please post comments, if you get other throubles

1 comment:

  1. Thank you!

    This is the only solution that works for fixing the "Unable to read/find font" error in Mantis graphs.

    ReplyDelete