ID: 33404 Updated by: [EMAIL PROTECTED] Reported By: david dot perianghendra at gmail dot com -Status: Open +Status: Feedback Bug Type: GD related Operating System: Linux PHP Version: 5.0.3 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip AFAIK, this was fixed long time ago. Previous Comments: ------------------------------------------------------------------------ [2005-06-20 09:18:27] david dot perianghendra at gmail dot com 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 this bug report at http://bugs.php.net/?id=33404&edit=1