Hi,
If you want the size of a text for a known font, you can use str_width.