PHP - Manual: HaruFont::getTextWidth
2024-11-12
(PECL haru >= 0.0.1)
HaruFont::getTextWidth — Get the total width of the text, number of characters, number of words and number of spaces
$text
) : arrayGet 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 异常。
官方地址:https://www.php.net/manual/en/harufont.gettextwidth.php