如何使用truetype及中文? ttf字库索引采用的是utf-8编码,所以你的中文字串要做gb2312到utf-8的编码转换$str = iconv("GB2312","UTF-8",$str);注意编译php时还要加入相应的开关 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我也遇到同样的问题了。中文显示不出来啊。arial.ttf。在那里啊我找不到字体文件,在linux上的我是rpm包安装的 为何不能显示中文呢???我用的gd库是1.6.2 or higher 我的源码是::<? header("Content-type: image/png");$im = imagecreate (400, 400); $white = imagecolorallocate($im, 210,210,210);$black = imagecolorallocate($im, 0,0,0);imagefilledrectangle($im,0,0,400,400,$white);//include("gb2utf8.php"); //$str=gb2utf8("中国人32434"); //$str=chr(0xE5).chr(0xB0).chr(0x8F).chr(0xE6).chr(0x97).chr(0xB6);$str="asdfasdfsadfsdaf";$str = iconv("GB2312","UTF-8",$str);imagettftext ($im, 90, 10, 110, 300, $white, "/var/www/html/qxqk/huitu/arial.ttf",$str); imagepng ($im); imagedestroy ($im); ?> to zjxgold(稻草人) arial.ttf不是中文字库 中文字库在哪有啊在linux里的哪个目录啊 zjxgold(稻草人)你是怎么解决的,我现在问题似乎还没到显示中文那一步,我现在用imagettftext()这个函数时连英文也显示不出来,不知是怎么回事? xuzuning(唠叨)我用的PHP版本是4.3.2,GD用的是内置的,版本为bundled (2.0.12 compatible),freetype2的版本为2.1.5,不知为何调用imagettftext()函数时连英文也显示不了 字体文件是从windows拷贝过来的,在linux应该也可以用的吧 php 链接的替换。 php 获取下一个字母 给定一个日期时间date1,如何计算前一周的日期时间date2? 排列组合,内存不够用了,大家帮忙想办法 php 5.1.4 安装pear后为什么没有DB.php 为什么Linux下只有一个目录支持php(在线急等) php中使用nusoap调用.net写的Web Service,为什么无法传参数? 怎样用php禁用F5刷新页面?实在没什么分了,帮帮我吧! 数据库取值问题,急!!! win2000 server下安装MySQL出错 在php4.3.2中(linux下)使用mail()函数出错?? 数据库查询
arial.ttf。在那里啊
我找不到字体文件,在linux上的
我是rpm包安装的
我用的gd库是1.6.2 or higher
<?
header("Content-type: image/png");
$im = imagecreate (400, 400);
$white = imagecolorallocate($im, 210,210,210);
$black = imagecolorallocate($im, 0,0,0);
imagefilledrectangle($im,0,0,400,400,$white);//include("gb2utf8.php");
//$str=gb2utf8("中国人32434");
//$str=chr(0xE5).chr(0xB0).chr(0x8F).chr(0xE6).chr(0x97).chr(0xB6);
$str="asdfasdfsadfsdaf";
$str = iconv("GB2312","UTF-8",$str);
imagettftext ($im, 90, 10, 110, 300, $white, "/var/www/html/qxqk/huitu/arial.ttf",$str);
imagepng ($im);
imagedestroy ($im);
?>
arial.ttf不是中文字库
在linux里的哪个目录啊
你是怎么解决的,我现在问题似乎还没到显示中文那一步,
我现在用imagettftext()这个函数时连英文也显示不出来,
不知是怎么回事?
我用的PHP版本是4.3.2,GD用的是内置的,版本为bundled (2.0.12 compatible),
freetype2的版本为2.1.5,不知为何调用imagettftext()函数时连英文也显示不了