Closed zxlive1978 closed 4 years ago
Hi, All! How can I fit text into a rectangle?
By asking StackOverflow
There is no easy way. You can iteratively approximate the correct fontsize by using text.length() and comparing to the rects width
text.length()
Hi, All! How can I fit text into a rectangle?