[可能没有默认的字体]Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename...

Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename...

[可能没有默认的字体]

 

例:

//putenv('GDFONTPATH=C:\WINDOWS\Fonts');
$font = "Arial";
$size = 12;
$im   = ImageCreateFromPNG("top_logo.png");
$tsize= imagettfbbox($size, 0, $font, $_GET['message']);

 

改成:

//putenv('GDFONTPATH=C:\WINDOWS\Fonts');
$font = "c:/windows/fonts/arial.ttf";
$size = 12;
$im   = ImageCreateFromPNG("top_logo.png");
$tsize= imagettfbbox($size, 0, $font, $_GET['message']);

 

 

 

posted @ 2013-10-05 13:58  穆晟铭  阅读(708)  评论(0编辑  收藏  举报