Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old May 13th, 2006, 01:05 PM
monomaniac21
Guest
 
Posts: n/a
Default displaying php chart text on my host using an uploaded font

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
used):

imagettftext($image, 6, 0, 0, $initial_point, $colorRed, 'Verdana',
$initial_value);

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!

  #2  
Old May 13th, 2006, 01:45 PM
Rik
Guest
 
Posts: n/a
Default Re: displaying php chart text on my host using an uploaded font

monomaniac21 wrote:[color=blue]
> 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 used):
>
> imagettftext($image, 6, 0, 0, $initial_point, $colorRed, 'Verdana',
> $initial_value);
>
> 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?[/color]

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
you:
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.

Grtz,
--
Rik Wasmus


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.