Thanks for your reply.
With this function is it possible to specify the size of the text with width and height and not only with an integer ?


Because the size of the rectangle on which I want to draw the text is various (I receive the size of the rectangle by parameter).

And other thing, I try to load a font to retrieve the width and height with imagefontwidth and imagefontheight.
My code is like that :


<?php
$arial = imageloadfont('arial.ttf');
echo '<br>WF : '.imagefontwidth($arial);
echo '<br>HF : '.imagefontheight($arial);
?>

And the file arial.ttf is in the same directory as this script

But when I load the page, I have this error message :
Warning: ImageFontLoad: error reading font in....

Thanks for your help

Chris Neale wrote:

I use the function imageTTFtext allows you to specify a string with a font
and a font point size.

Hope that helps.

Chris

-----Original Message-----
From: Cranky [mailto:[EMAIL PROTECTED]
Sent: 27 October 2003 10:16
To: [EMAIL PROTECTED]
Subject: [PHP] Change text size with GD


Hello, I would like to draw text in a rectangle on an image. The text must take all the place in the rectangle.

The trouble is that with imagestring(), there are only 5 fonts (1, 2, 3, 4, 5) and the bigger (5) is still too smaller for my rectangle.

Is there another way to change the size of the text ?

Thanks a lot


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



Reply via email to