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

search for in the

ps_stroke> <ps_string_geometry
[edit] Last updated: Fri, 25 May 2012

view this page in

ps_stringwidth

(PECL ps >= 1.1.0)

ps_stringwidth文字列の幅を取得する

説明

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

指定されたフォントとサイズで出力した場合に、 文字列の幅が何ポイントになるかを計算します。 正確な幅を計算するため、この関数は Adobe のフォントメトリックファイルを必要とします。カーニングが有効になっている場合、 それも考慮して計算します。

パラメータ

psdoc

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

text

幅を計算するテキスト。

fontid

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

size

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

返り値

文字列の幅をポイント数で返します。

参考



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

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