Re: imagettftext Angle Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 On Thu, 2010-08-12 at 10:40 -0400, Floyd Resler wrote:

I'm trying to draw text at a 90 degree angle, reading from bottom to top. For some reason, all of the letters are aligning to the top (i.e. the left side) of the text. It looks really odd! Has anyone else experienced this before?

 Thanks!
 Floyd

Floyd:

Yes, that is odd -- try this:

Header ("Content-type: image/gif");
$im = imagecreate (400, 400);
$background = imagecolorallocate ($im, 238, 238, 238);
$text_color = imagecolorallocate ($im, 00, 51, 102);
imagettftext ($im, 10, 90, 200, 200, $text_color, "arial.ttf", "Hello World...");
imagegif ($im);
imagedestroy ($im);

You must use arial.ttf for the above -- in fact, that might be your problem, the font you are using may be that way.

Here's an example of this working:

http://webbytedd.com/b/timed-php/

Cheers,

tedd
--
-------
http://sperling.com/

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux