From: olga at bluebytes dot com
Operating system: Linux
PHP version: 4.3.3
PHP Bug Type: GD related
Bug description: ImageTTFText and ImageTTFBox don't work and return wierd values

Description:
------------
ImageTTFText doesn't output any characters. If there's anything else in
the image, the rest will be fine; if the text string is the only thing,
the image will be blank.
Trying to figure out what's wrong, I took a look at the return values from
ImageTTFText as well as ImageTTFBox. They both produce huge values, i.e.
Array ( [0] => 138323388 [1] => 11 [2] => -1073754136 [3] => 1076636124
[4] => 138611764 [5] => 138323484 [6] => 11 [7] => 0 )

The values DO NOT depend on the font used. Furthermore, they are different
each time I load the page for the SAME font
([url]http://blunoise.com/imagetext.php[/url] shows values for "Hello world" in
arial).

Reproduce code:
---------------
<?php
//header("Content-type: image/jpeg");
error_reporting('E_ALL');
$im = imagecreate(400,30);
$white = imagecolorallocate($im, 255,255,255);
$black = imagecolorallocate($im, 0,0,0);

// Replace path by your own font path
$result = imagettftext($im, 12, 0, 6, 20, $black,
"/home/blunoise/fonts/arial.ttf", "Hello world");
$bbox=imagettfbbox (12, 0, "/home/blunoise/fonts/arial.ttf", "Hello
world");
print_r($bbox);

//imagepng($im);
imagedestroy($im);
?>


Expected result:
----------------
A jpeg saying "Hello world"


--
Edit bug report at [url]http://bugs.php.net/?id=25926&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25926&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25926&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25926&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25926&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25926&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25926&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25926&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25926&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25926&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25926&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25926&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25926&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25926&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25926&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25926&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=25926&r=float[/url]