displaying php chart text on my host using an uploaded font

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi im trying to get a chart to display using php. I get an error at the
moment when i use the function (or any requiring an uploaded font to be

imagettftext($image, 6, 0, 0, $initial_point, $colorRed, 'Verdana',

The error stems from the loading of the verdana ('Verdana') font file
which IS uploaded and works locally but for some reason the script cant
find the file on your site so its returning an error. Does anyonw know
what what might be the cause of this? For example I am using a mac to
work locally and then uploading to the php server which is linuz might
i need to use diferent fonts or something on the server?

Please help!

Re: displaying php chart text on my host using an uploaded font

monomaniac21 wrote:
Quoted text here. Click to load it

This function requires both the GD library and the FreeType library, are you
sure the second is present?

It could be a case of not being able to find the font file. What happens if
imagettftext($image, 6, 0, 0, $initial_point, $colorRed,
'/path/to/Verdana.ttf', $initial_value);

Unfortunately, I have no experience with different operating systems, others
may be able to elighten you on that subject.

Rik Wasmus

Site Timeline