JpGraph and fonts

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Chlewey
Posts: 4
Joined: 12 Apr 2011, 14:59

JpGraph and fonts

Post by Chlewey »

I have installed MantisBT in a shared hosting environment. It seems to be working fine except for some bugs.

When I want to see graphical reports I get no graphics but instead the message:
"Unable to read/find font"

Reading the bugs, forums, etc. it seems that the issue is related to JpGraph... it seems that my host does not have JpGraph so I downloaded the package and expanded in my environment.

I have:
/home/<myuser>/web/mantis for the Mantis BT installation
/home/<myuser>/php/jpgraph for the JpGraph installation
and fonts are at both
/home/<myuser>/php/jpgraph/src/fonts (DejaVu and some .gdf fonts)
/usr/share/fonts/truetype/ (DejaVu and Bitstream Vera)

So I set config_inc.php to

Code: Select all

# ----- JpGraph configuration -----
        $g_use_jpgraph          = ON;
        $g_jpgraph_path         = '/home/<myuser>/php/jpgraph/src/';
        $g_system_font_path     = '/usr/share/fonts/truetype/';
and I have also tryed

Code: Select all

# ----- JpGraph configuration -----
        $g_use_jpgraph          = ON;
        $g_jpgraph_path         = '/home/<myuser>/php/jpgraph/src/';
        $g_system_font_path     = '/home/<myuser>/php/jpgraph/src/fonts/';
I still get the "Unable to read/find font" message.

I have read:
http://www.mantisbt.org/bugs/view.php?id=10706 11741 10995 and a few other
http://www.mantisbt.org/manual/manual.t ... pgraph.php
which have not been more useful than what I just did.
Chlewey
Posts: 4
Joined: 12 Apr 2011, 14:59

Re: JpGraph and fonts

Post by Chlewey »

Configuring throug [manage] / [manage plugins] I set JpGraph and made symbolic links so that phgraph/src were accessible from mantis/library

Now I get the following error:
Font File "/usr/share/fonts/truetype/Vera.ttf" is not readable or does not exist.

The real path of those files are:
/usr/share/fonts/truetype/ttf-bitstream-vera/

Changing $g_system_font_path didn't seem to work.

I tryed $g_system_font_folder and it did work.
woo37830

Re: JpGraph and fonts

Post by woo37830 »

Is there a resolution on this? I have installed mantisbt-1.2.10 and then downloaded jpgraph-3.5.0b1 and installed it under mantisbt-1.2.10/library and added a link under library named jpgraph to point to jpgraph-3.5.0b1. I then downloaded dejavu-fonts and ttf-bitstream fonts and placed them both under /usr/share/fonts. Since that didn't work, I then created a link named truetype and placed that under fonts pointing to deja-vu folder.

That also didn't work, so I created a link to /usr/X11/share/fonts/TTF named truetype and replaced the earlier one.

I edited the config file for jpgraph to be sure it pointed to the /usr/share/fonts/truetype/ folder.

None of this works. I am NOT on a windooze machine, but a Mac OS X Lion machine.

Please in posts be a bit more specific. It's nice to be so in the know that you just say download dejavu fonts, but some of us could use the tiny bit of extra information about where to put the folder, what name SHOULD it have, what is the path to it in order that it will work with mantisbt, etc.
suchariya
Posts: 2
Joined: 09 Mar 2014, 11:11

Re: JpGraph and fonts

Post by suchariya »

I resolved the issue "unable to read/find font" on shared hosting.

I opened https://packages.debian.org/wheezy/ttf- ... -installer and see all the font which are required to resolve this issue.

I downloaded/copied from windows font and uploaded to directory called "truetype" in mantis folder. so the path become "/mantis/truetype" and uploaded all the font there.

now I open the config_inc.php file and added the following code in that at the end.

Code: Select all

// Setting up Font
$g_system_font_folder = 'truetype/';
And its done. Now I am able to see the following options in mantis.

Summary > Advanced Summary
Summary > Per state
Summary > Per priority
Summary > Per severity
Summary > Per category
Summary > Per resolution
Post Reply