From: david dot perianghendra at gmail dot com Operating system: Linux PHP version: 5.0.3 PHP Bug Type: GD related Bug description: imagettftext doesn't work
Description: ------------ I use PHPv5.0.3,Freetype v1.4, GD2 Library v2.0.28 I use imagettftext in my script with font file reside in the same directory, but it seems that it doens't work though i have tried to set 'GDFONTPATH' environtment variable. The result is always the same. The resulting image doesn't contain the text with specified TTF and no error occured. Reproduce code: --------------- <?php header("Content-type: image/png"); $im = imagecreate(400, 30); $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); $text = 'Bleh...'; $font = 'COUR.ttf'; putenv( 'GDFONTPATH='.realpath('.') ); imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); imagettftext($im, 20, 0, 10, 20, $black, $font, $text); imagejpeg() imagepng($im); imagedestroy($im); ?> Expected result: ---------------- The image should contain image with text written on it with specified TTF. Actual result: -------------- Image without the text with specified TTF. -- Edit bug report at http://bugs.php.net/?id=33404&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33404&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33404&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33404&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33404&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33404&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33404&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33404&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33404&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33404&r=support Expected behavior: http://bugs.php.net/fix.php?id=33404&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33404&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33404&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33404&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33404&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33404&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33404&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33404&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33404&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33404&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33404&r=mysqlcfg