- 论坛徽章:
- 0
|
怎样支持中文字体呀?
header("Content-type: image/png");
$im = imagecreate(500,100);
$black = imagecolorallocate($im, 0,0,0);
$white = imagecolorallocate($im, 255,255,255);
// Replace path by your own font path
//imagettftext($im, 20, 0, 10, 20, $black, "/path/arial.ttf","Testing");
imagettftext($im, 50, 0, 50, 60, $white, "/WINNT/Fonts/黑体.ttf","你好");
imagejpeg($im);
imagedestroy($im);
这样不行呀imagettftext($im, 50, 0, 50, 60, $white, "/WINNT/Fonts/黑体.ttf","你好");
报错
imagettftext($im, 20, 0, 10, 20, $black, "/WINNT/Fonts/arial.ttf","Testing");
这样就不报错,怎样让他实现中文字体呀?
[ 本帖最后由 jimli 于 2005-10-31 14:39 编辑 ] |
|