|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-14 19:13 UTC] sniper@php.net
[2005-01-14 22:07 UTC] sniper@php.net
[2005-03-28 05:02 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 19:00:01 2025 UTC |
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)