HaruPage::getTextWidth

(PECL haru >= 0.0.1)

HaruPage::getTextWidthGet the width of the text using current fontsize, character spacing and word spacing

说锟斤拷

HaruPage::getTextWidth ( string $text ) : float

Get the width of the text using current fontsize, character spacing and word spacing

锟斤拷锟斤拷

text

The text to measure.

锟斤拷锟斤拷值

Returns the width of the text using current fontsize, character spacing and word spacing.

锟斤拷锟斤拷锟届常

锟斤拷锟斤拷锟斤拷锟斤拷时锟阶筹拷 HaruException 锟届常锟斤拷

锟轿硷拷

  • HaruPage::measureText() - Calculate the byte length of characters which can be included on one line of the specified width