#31259 [Fbk->Opn]: imagettftext fails with some ttf font
| From: | dbad732001 at yahoo dot com | Date: | Thu, 23 Dec 2004 07:32:51 +0000 |
| Subject: | #31259 [Fbk->Opn]: imagettftext fails with some ttf font | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70956@lists.php.net to get a copy of this message | ||
ID: 31259
User updated by: dbad732001 at yahoo dot com
Reported By: dbad732001 at yahoo dot com
-Status: Feedback
+Status: Open
Bug Type: GD related
Operating System: Win XP SP2 and Linux
PHP Version: 4.3.10
New Comment:
You can download the font at this address
http://www.revelshblindbeholders.net/font/rbb.ttf
Thank you
Diego
Previous Comments:
------------------------------------------------------------------------
[2004-12-23 00:23:08] derick@php.net
Provide the font that fails please so that we can try to reproduce it.
------------------------------------------------------------------------
[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