imagepsloadfont

(PHP 4, PHP 5)

imagepsloadfont锟斤拷锟侥硷拷锟叫硷拷锟斤拷一锟斤拷 PostScript Type 1 锟斤拷锟斤拷

说锟斤拷

imagepsloadfont ( string $filename ) : resource

锟斤拷锟侥硷拷 filename 锟叫硷拷锟斤拷一锟斤拷 PostScript Type 1 锟斤拷锟藉。

锟斤拷锟斤拷

filename

Postscript 锟斤拷锟斤拷锟侥硷拷锟斤拷路锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟揭伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟揭伙拷锟斤拷戏锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷员锟绞癸拷谩锟斤拷锟斤拷蚍祷锟� FALSE 锟斤拷锟斤拷示一锟斤拷锟斤拷息说锟斤拷锟斤拷锟斤拷锟斤拷耍锟斤拷锟斤拷锟斤拷锟街憋拷佣锟饺★拷锟斤拷锟较拷锟斤拷锟轿拷锟斤拷锟斤拷式锟斤拷图锟斤拷

锟斤拷锟斤拷

Example #1 imagepsloadfont() 锟斤拷锟斤拷

<?php
// Create a new image instance
$im imagecreatetruecolor(35045);

// Allocate colors and fill the background
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
imagefilledrectangle($im0034944$white);

// Load a font, write to the image and free the font from memory
$font imagepsloadfont("bchbi.pfb");
imagepstext($im"Testing... It worked!"$font32$white$black3232);
imagepsfreefont($font);

// Output the image
header('Content-type: image/png');

imagepng($im);
imagedestroy($im);
?>

注锟斤拷

Note: 锟剿猴拷锟斤拷锟斤拷锟斤拷 PHP 锟斤拷锟斤拷时指锟斤拷锟斤拷 --with-t1lib[=DIR] 时锟斤拷锟矫★拷

锟轿硷拷

  • imagepsfreefont() - 锟酵凤拷一锟斤拷 PostScript Type 1 锟斤拷锟斤拷锟斤拷占锟矫碉拷锟节达拷