#31259 [NEW]: imagettftext fails with some ttf font

From: Date: Wed, 22 Dec 2004 21:22:20 +0000
Subject: #31259 [NEW]: imagettftext fails with some ttf font
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-70933@lists.php.net to get a copy of this message
From: dbad732001 at yahoo dot com Operating system: Win XP SP2 and Linux PHP version: 4.3.10 PHP Bug Type: GD related Bug description: imagettftext fails with some ttf font Description: ------------ Using the function imagettftext of the GD library fails with some ttf fonts; instead of the letters appears only little boxes, similar to the ones showed in the windows charachter map application when a gliph is not present in a font. The behavior was OK on the 4.3.9 version The code works if, for example, i use another ttf file (arial.ttf) Reproduce code: --------------- <?php header("Content-type: image/gif"); $im = imagecreate(600, 200); $white = imagecolorallocate($im, 221, 221, 221); $black = imagecolorallocate($im, 51, 0, 153); imagettftext($im, 30, 0, 100, 100, $black, "font/rbb.ttf" ,"This is a test"); imagegif($im); imagedestroy($im); ?> The font rbb.ttf can be downloaded at http://www.revelshblindbeholders.net/font/rbb.ttf Expected result: ---------------- The result should be a gray box with the text "This is a test" written with the chosen font Actual result: -------------- The gray box appear, but instead of the text i see only little boxes, alike the ones showed in the Win char map when a char is not implemented within the font. The code works if, for example i use another ttf file (arial.ttf) -- Edit bug report at http://bugs.php.net/?id=31259&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31259&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31259&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31259&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31259&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31259&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31259&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31259&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31259&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31259&r=support Expected behavior: http://bugs.php.net/fix.php?id=31259&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31259&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31259&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31259&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31259&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31259&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31259&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31259&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31259&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31259&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31259&r=mysqlcfg

« previous php.bugs (#70933) next »