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

search for in the

ps_stringwidth> <ps_show
Last updated: Fri, 13 Nov 2009

view this page in

ps_string_geometry

(PECL ps >= 1.2.0)

ps_string_geometry文字列のジオメトリを取得する

説明

array ps_string_geometry ( resource $psdoc , string $text [, int $fontid = 0 [, float $size = 0.0 ]] )

この関数は ps_stringwidth() と似ていますが、 返り値は、テキストの幅、ascender および descender を含む配列形式になります。

パラメータ

psdoc

ps_new() が返す、postscript ファイルのリソース ID。

text

ジオメトリを計算するテキスト。

fontid

使用するフォントの ID。フォントが指定されていない場合は、 現在のフォントが使用されます。

size

フォントのサイズ。指定されていない場合は現在のサイズが使用されます。

返り値

文字の寸法を格納した配列です。'width' には ps_stringwidth() で返される文字列の幅が入ります。 下に突き出している部分の長さの最大値が 'descender' に、 また上に突き出している部分の長さの最大値が 'ascender' に入ります。

参考



add a note add a note User Contributed Notes
ps_string_geometry
There are no user contributed notes for this page.

ps_stringwidth> <ps_show
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites