我试图在PHP gd中使用一些西伯利亚字母名称,但每次都会出现混淆字母的错误。以下是我的代码:-
function properText($text){
$text = mb_convert_encoding($text, "HTML-ENTITIES", "UTF-8");
$text = preg_replace('~^(&([a-zA-Z0-9]);)~',htmlentities('${1}'),$text);
return($text);
}
$im = imagecreatefrompng('testcreating.png');
$returnedtext = properText('Jelena Jovanić');
imagettftext($im, 11, 0, 90, 195, 0x000000, 'transcript.ttf', $returnedtext);
imagealphablending($im, true);
imagesavealpha($im, true);
imageJpeg($im, "testcreating.jpg", 85);
imagedestroy($im);
return HTML::image('testcreating.jpg');
但它不能识别字母ć
,它给出了模糊码。
我该如何解决。
感谢
您使用的字体"transcript.ttf"必须支持您想要使用的字母表。
我不能保证任何论文,但我发现了一个网站,声称这些字体将支持西伯利亚字母表:http://www.fontsquirrel.com/fonts/list/language/serbian