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

search for in the

HaruImage> <HaruFont::getXHeight
Last updated: Fri, 13 Nov 2009

view this page in

HaruFont::measureText

(PECL haru >= 0.0.1)

HaruFont::measureText指定した幅に収めることのできる文字数を計算する

説明

int HaruFont::measureText ( string $text , float $width , float $font_size , float $char_space , float $word_space [, bool $word_wrap = false ] )

指定した幅に収めることのできる文字数を計算します。

パラメータ

text

幅にあわせたいテキスト。

width

テキストを代入するエリアの幅。

font_size

フォントの大きさ。

char_space

文字の間隔。

word_space

単語の間隔。

word_wrap

このパラメータを TRUE にすると、この関数はワードラップを "エミュレート" し、現在の単語の途中で範囲の最後に達してしまう場合は その単語を含めません。デフォルトは FALSE です。

返り値

指定した幅に収めることのできる文字数を返します。

エラー / 例外

エラー時に HaruException をスローします。



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

HaruImage> <HaruFont::getXHeight
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites