#31259 [Opn->Fbk]: imagettftext fails with some ttf font

From: Date: Wed, 22 Dec 2004 23:23:09 +0000
Subject: #31259 [Opn->Fbk]: imagettftext fails with some ttf font
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-70935@lists.php.net to get a copy of this message
ID: 31259 Updated by: derick@php.net Reported By: dbad732001 at yahoo dot com -Status: Open +Status: Feedback Bug Type: GD related Operating System: Win XP SP2 and Linux PHP Version: 4.3.10 New Comment: Provide the font that fails please so that we can try to reproduce it. Previous Comments: ------------------------------------------------------------------------ [2004-12-22 22:22:19] dbad732001 at yahoo dot com 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 this bug report at http://bugs.php.net/?id=31259&edit=1

« previous php.bugs (#70935) next »