Hi Girish. Thanks for the suggestion.

I have an Apache alias pointing to my site, along the lines of:
Alias /input "P:/Projects/data_input"

and have placed the ttf files within this directory (where the php script is
located as well). I've tried placing the ttf files in a sub-directory as well
- with no luck.

Any other ideas???

Neil


Girish Nath wrote:

> 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
>
> ***************************************************************
>  This message was virus checked with: SAVI 3.53 Jan 2002
>  last updated 30th January 2002
> ***************************************************************

--
--------------------------------
 Email:  [EMAIL PROTECTED]
         [EMAIL PROTECTED]
--------------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to