#26901 [Opn]: Imagettftext(). Some chars prints as square even though they exist in .ttf file

From: Date: Wed, 14 Jan 2004 16:08:45 +0000
Subject: #26901 [Opn]: Imagettftext(). Some chars prints as square even though they exist in .ttf file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53315@lists.php.net to get a copy of this message
ID: 26901 User updated by: jpg at pmers dot net Reported By: jpg at pmers dot net Status: Open Bug Type: GD related Operating System: Linux PHP Version: 4.3.4 New Comment: example output: http://ccres.net/char_test.php Previous Comments: ------------------------------------------------------------------------ [2004-01-14 09:54:19] jpg at pmers dot net <?php $im = imagecreate(450,200); if ($im=="") { die("Error creating image"); } $bg_color = imagecolorallocate ($im, 255, 255, 255); $black = imagecolorallocate($im,0,0,0); $ttf_tahoma = "[your_path]/ttf/tahoma.ttf"; // edit this imagettftext($im, 11, 0, 10, 20, $black, $ttf_tahoma, "Example of chars are: š and ž (Czech language)"); ImagePNG($im); ImageDestroy($im); ?> ------------------------------------------------------------------------ [2004-01-14 09:17:53] iliaa@php.net Please supply the shortest possible script that can be used to replicate the problem and the font file in question. ------------------------------------------------------------------------ [2004-01-14 04:08:36] jpg at pmers dot net Description: ------------ A bug in the imagettftext function. Some characters is shown as a square as if the char is missing from the fontfile although they are included... Example of chars are: š and ž (Czech language) I have tried to utf8_encode() the string first but the result is still the same. I have also uploaded the Czech version of tahoma.ttf to the server, the problem still persists ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26901&edit=1

« previous php.bugs (#53315) next »