Height of a text
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Height of a text
Hi all i look for a way to get the height of a multiline text. Is it possible with something like xxx:getWidth(). Anyone has an idea ?
Re: Height of a text
weird but i would guessbert wrote:Hi all i look for a way to get the height of a multiline text. Is it possible with something like xxx:getWidth(). Anyone has an idea ?
Code: Select all
your_font:getHeight() * select(2, your_font:getWrap("text you're printing", your_printf_width))
Re: Height of a text
I typically store mutliline text as a table with strings, one for each line. That makes it simpler, just
font:getHeight() * #texts
font:getHeight() * #texts
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests