Get width of string using a font and fontsize
Say I have a TMP_Text, and I have some string, such as "hello test 123 123", I want to get the width (and preferably also the height) of that string using the font and fontsize of the existing TMP_Text. How can this be done?
I have tried using TMP_Text.fontSize, but it's not very accurate.
Comment
Your answer
Follow this Question
Related Questions
How do I make a TextMesh Pro Font Asset from a texture atlas? 0 Answers
TextMeshPro Set Alpha Color 0 Answers
Resizing font by scale according to screen size, (More complicated than you might think) 1 Answer
Font Support 0 Answers
What the font size actually mean in textmeshpro?..How to match font size with points? 0 Answers