Fill a textbox with text

Hi, is there some way to know how many characters would fill a textbox? We’ve tried calculating it from font size and line height but it varies a lot based on the font itself.

Alternatively, is there some property that lets us know if a textbox is overflowing? I couldn’t see it in the docs.

Thanks a lot for any input!
Martin