How to get the size of rendered text?
Re: How to get the size of rendered text?
- If you use love.graphics.print
You can use Font:getHeight to get the height of a single line, and Font:getWidth together with the text you're printing to get its width (wrapping isn't taken into account).
- If you use Text objects (recommended)
Use Text:getWidth and Text:getHeight.
Who is online
Users browsing this forum: Google [Bot] and 2 guests