downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

imagepsslantfont> <imagepsfreefont
[edit] Last updated: Fri, 07 Jun 2013

view this page in

imagepsloadfont

(PHP 4, PHP 5)

imagepsloadfontファイルから PostScript Type 1 フォントをロードする

説明

resource imagepsloadfont ( string $filename )

指定した filename から PostScript Type 1 フォントを読み込みます。

パラメータ

filename

Postscript フォントファイルへのパス。

返り値

全て正常に処理された場合、有効なフォント ID が返され、後で使用することができます。 それ以外の場合、この関数は FALSE を返します。

例1 imagepsloadfont() の例

<?php
// 新しい画像インスタンスを作成します
$im imagecreatetruecolor(35045);

// 色を割り当て、背景を塗りつぶします
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
imagefilledrectangle($im0034944$white);

// フォントを読み込み、画像に書き込んでフォントをメモリから開放します
$font imagepsloadfont("bchbi.pfb");
imagepstext($im"Testing... It worked!"$font32$white$black3232);
imagepsfreefont($font);

// 画像を出力します
header('Content-type: image/png');

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

注意

注意: この関数は、PHP が --with-t1lib を指定してコンパイルされている場合のみ使用可能です。

参考



add a note add a note User Contributed Notes imagepsloadfont - [1 notes]
up
-1
seymour at itsyourdomain dot com
9 years ago
I had to use a full path to the font file or else I received errors from t1lib. Using just a filename, I received error 14. Using ./filename I received error 2.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites