imagepsloadfont

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

imagepsloadfont -- 從檔案中加載一個 PostScript Type 1 字型

說明

resource imagepsloadfont ( string filename )

若果一切標準,將返回一個合法的字型索引以備使用。否則返回 FALSE 並顯示一條訊息說明哪裡錯了,但不能直接讀取此訊息,因為輸出格式是圖像。

例子 1. imagepsloadfont() 例子

<?php
header
("Content-type: image/jpeg");
$im imagecreatetruecolor(35045);
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
$font imagepsloadfont("bchbi.pfb"); // or locate your .pfb files on your machine
imagepstext($im"Testing... It worked!"$font32$white$black3232);
imagepsfreefont($font);
imagejpeg($im""100); //for best quality...your mileage may vary
imagedestroy($im);
?>

注: 本函數僅在 PHP 編譯時指定了 --enable-t1lib 時可用。

參見 imagepsfreefont()