|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-14 04:08 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
<?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); ?>