PHP Classes
elePHPant
Icontem

Font problem

Recommend this page to a friend!

      IMGOut  >  All threads  >  Font problem  >  (Un) Subscribe thread alerts  
Subject:Font problem
Summary:Cant find/open font
Messages:4
Author:Yusuke
Date:2005-06-12 14:23:26
Update:2005-06-13 17:13:38
 

  1. Font problem   Reply   Report abuse  
Yusuke - 2005-06-12 14:23:26
I can't get this one to work, it keeps telling me :

Warning: imagettfbbox(): Could not find/open font in /home/xxxxx/www/scripts/imgout/imgout.inc.php on line 181
Warning: imagettftext(): Could not find/open font in /home/xxxxx/www/scripts/imgout/imgout.inc.php on line 204

I placed my arial.ttf file in the same dir as the pages of the scriptas "default.ttf", as said in the readme, I even CHMOD it to 777 just in case, nothing.

Any hints?

  2. Re: Font problem   Reply   Report abuse  
Dmitry A. Kirilin - 2005-06-13 12:41:14 - In reply to message 1 from Yusuke
First, check filename case, you may name your file "default.TTF", not "default.ttf".
Check the path: font must be located in script directory, not in include directory.
Then, try to specify font path name through "ttf" variable.
Check for php/libgd TTF support in your build.
Make sure font file is not corrupted.

  3. Re: Font problem   Reply   Report abuse  
Yusuke - 2005-06-13 13:58:39 - In reply to message 2 from Dmitry A. Kirilin
I made all possible verif : font is named *.ttf, not *.TTF, I tried changing the name in the code, in the form, etc..., the font file comes from my windows/font folder (so it should be working), and the file is in the same folder as the others files of the script... So I don't see why it's not working for me, but I'll keep searching, I'll eventually find something, thanks for your anwser :-)

  4. Re: Font problem   Reply   Report abuse  
Dmitry A. Kirilin - 2005-06-13 17:13:38 - In reply to message 3 from Yusuke
I did the same (I have Linux, PHP.5.0.4, libgd2 2.0.4), it works.
On my side, rocket is launched, continue diagnostics on your side... ;)