HaruFont::getTextWidth

(PECL haru >= 0.0.1)

HaruFont::getTextWidthGet the total width of the text, number of characters, number of words and number of spaces

说明

HaruFont::getTextWidth ( string $text ) : array

Get the total width of the text, number of characters, number of words and number of spaces.

参数

text

The text to measure.

返回值

Returns the total width of the text, number of characters, number of words and number of spaces in the given text.

错误/异常

发生错误时抛出 HaruException 异常。

相关文章
php maxdb 函数 returns the total number of rows changed deleted or inserted by the last executed statementphp pdf 函数 return width of textphp pspell 函数 ignore words less than n characters longphp harufont get the total width of the text number of characters number of words and number of spacesphp harufont get the width of the character in the fontphp harufont calculate the number of characters which can be included within the specified widthphp harupage calculate the byte length of characters which can be included on one line of the specified widthphp mysqli stmt returns the total number of rows changed deleted or inserted by the last executed statementphp solrquery returns the number of characters of fragments to consider for highlightingphp solrquery returns the maximum number of characters of the field to returnphp solrquery returns the maximum number of characters into a document to look for suitable snippetsphp solrquery returns the maximum number of characters from a field when using the regex fragmenterphp solrquery sets the maximum number of characters of the field to returnphp spoofchecker checks if a given text contains any suspicious charactersphp swfmovie sets the total number of frames in the animationphp swftext calculates the width of the given string in this text objects current font and sizephp swftextfield sets the text field width and heightphp swftextfield sets the left margin width of the text fieldphp swftextfield sets the margins width of the text fieldphp swftextfield sets the right margin width of the text field
关注编程学问公众号