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 mnogosearch 函数 get total number of documents in databasephp harufont get the total width of the text number of characters number of words and number of spacesphp harufont calculate the number of characters which can be included within the specified widthphp harupage get the width of the text using current fontsize character spacing and word spacingphp 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 from a field when using the regex fragmenterphp solrquery sets the maximum number of characters of the field to returnphp solrquery specifies the number of characters into a document to look for suitable snippetsphp solrquery specify the maximum number of characters to analyzephp spoofchecker checks if a given text contains any suspicious charactersphp swfmovie sets the total number of frames in the animationphp swfsprite 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 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 fieldphp ui draw text layout set width
关注编程学问公众号