Font
class Font (View source)
Class with Font related methods.
Methods
array
getCharLists()
Get list with characters and the corresponding width modifiers.
int
getStringWidth(string $text, string $font, int $fontSize, array|null $charLists = null)
Get width of string/text
Details
array
getCharLists()
Get list with characters and the corresponding width modifiers.
int
getStringWidth(string $text, string $font, int $fontSize, array|null $charLists = null)
Get width of string/text
The text element width is calculated depending on font name and font size.