imagepsextendfont

(PHP 3 >= 3.0.9, PHP 4, PHP 5)

imagepsextendfont -- 扩充或精简字体

说明

bool imagepsextendfont ( int font_index, float extend )

扩充或精简某字体(font_index)。如果 extend 参数的值小于一则是精简该字体。

注: 本函数仅在 PHP 编译时指定了 --enable-t1lib 时可用。


add a note add a note User Contributed Notes
Pascal@TeamX
21-May-2003 06:28
Just for the less experienced PHP-Hackers, like me ;-)

header("Content-type: image/png");
$text = "hello world";
$val = 1.2;
$font = imagepsloadfont(" path to font ");
$im = imagecreate(200, 200);
$color_bg = imagecolorallocate($im, 255, 255, 255);
$color_font = imagecolorallocate($im, 0, 0, 0);
imagefill($im, 0, 0, $color_font);

imagepsextendfont($font, $val);

$bound = imagepstext($im, $text, $font, 25, $color_bg, $color_font, 10, 100, 0, 0, 0, 4);
imagepng($im);
imagedestroy($im);