GD / Freetype...

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
andy206uk
-


Joined: 02 Jan 2004
Posts: 2

PostPosted: Thu Jan 15, 2004 1:34 pm    Post subject: GD / Freetype... Reply with quote

Hey guys,

I've installed Abyss webserver on my PC (running windows 98se) at home along with PHP and GD support. I've tested it and everything works fine *except* for true type font support.

Whenever I use ImageTTFText() I get an error saying that the font file cannot be found or opened. The font is in the same directory as the script so I'm assuming that using a relative path is ok, however I've also tried absolute paths as well with no luck.

I've put the code I'm using at the bottom of the email, but I doubt its the problem, becuase I've run the same script on a zeus powered webserver and it works fine.

Has anyone else come across this problem or know of a solution? I thought it might be permissions, but I don't think its possible to set permissions on windows 98

Any help would be appreciated.

Thanks

Andy

Code:


$sitename = "WOO FOOTER!";
$fontface = "FREESCPT.TTF";
$fontsize = "30";
$copyrightmessage = "COPYRIGHT 2004 $sitename";

$third=ImageCreateFromJPEG("../../images/$cookie_girlid/$galleryname/uploads/$file_name") or die("couldn't open image");
$textcolor = ImageColorAllocate ($third, 204, 204, 255);
$shadowcolor = ImageColorAllocate ($third, 153, 0, 102);
$copyrightcolor = ImageColorAllocate ($third, 255, 255, 255);

$imagesize = getimagesize("../../images/$cookie_girlid/$galleryname/uploads/$file_name");
$width = $imagesize[0];
$height = $imagesize[1];
$textxpos = "10";
$textypos = ($height - "30");
$shadowxpos = ($textxpos + 2);
$shadowypos = ($textypos + 2);

//***** MAKE SHADOW
ImageTTFText $third, "$fontsize", "0", "$shadowxpos", "$shadowypos", "$shadowcolor", "$fontface", "$sitename");

//***** MAKE TEXT
ImageTTFText($third, "$fontsize", "0", "$textxpos", "$textypos", "$textcolor", "$fontface", "$sitename");

//***** PUT COPYWRITE FOOTER ON
imagestring($third, 2, 10, ($height - 15), "$copyrightmessage", $copyrightcolor);
ImageJPEG($third,"../../images/$cookie_girlid/$galleryname/large/$file_name","95") or die("couldn't save image");

Back to top View user's profile Send private message
jtc970
-


Joined: 24 Mar 2003
Posts: 172

PostPosted: Mon Jan 26, 2004 8:54 pm    Post subject: Reply with quote

try removing the quotes around the strings
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group