Hi I had similar problems when just specifying the font file in the same directory eg ./arial.ttf but got it to work okay when i used the full path eg :
$fontfile = "/apache/htdocs/arial.ttf"; ImageTTFText($im, 20, 0, 3, 3, $text_colour, $fontfile, "My text"); Regards Girish -- www.girishnath.co.uk ----- Original Message ----- From: "Neil Freeman" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 2:59 PM Subject: [PHP] Unable to get ImageTTFText output Hi there, I am trying to use the ImageTTFText function to output some text onto an existing image. Problem being though that the text does not get outputted. I have placed the ttf file 'arial.ttf' within the same directory as my script. Here is a snippet of my code: Header("Content-Type: image/png"); $im = ImageCreateFromPNG("original_image.png"); $text_colour = ImageColorAllocate($im, 255, 255, 255); ImageTTFText($im, 20, 0, 3, 3, $text_colour, "/arial.ttf", "My text"); ImagePNG($im); All this outputs is my original PNG image (with no text). I have used the following line instead of ImageTTFText and all works well. ImageString($im, 4, 3, 3, "My text", $text_colour); Using phpinfo() I have checked the GD section and the following is outputted: GD Support - enabled GD Version - 2.0 or higher FreeType Support - enabled FreeType Linkage - with freetype JPG Support - enabled PNG Support - enabled WBMP Support - enabled Does anyone have any suggestions as to why this does not work? Has anyone else used the ImageTTFText function successfully? Neil -------------------------------- Email: [EMAIL PROTECTED] [EMAIL PROTECTED] -------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php