Re: [PHP] imagettftext Angle Problem
[email protected] (tedd)
| Newsgroups | php.general |
|---|---|
| Message-ID | <p06240807c889c672e032@[192.168.1.104]> |
> 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/