printf y size?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
chimmihc
Prole
Posts: 13
Joined: Mon Oct 19, 2015 6:32 am

printf y size?

Post by chimmihc »

Is there a reasonable way to get how much love.graphics.printf will wrap?
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: printf y size?

Post by pgimeno »

I think you want [wiki]Font:getWrap[/wiki].

Edit: In particular, [wiki]Font:getHeight[/wiki]() * #lines where lines is the second value returned by Font:getWrap().
chimmihc
Prole
Posts: 13
Joined: Mon Oct 19, 2015 6:32 am

Re: printf y size?

Post by chimmihc »

pgimeno wrote:I think you want [wiki]Font:getWrap[/wiki].

Edit: In particular, [wiki]Font:getHeight[/wiki]() * #lines where lines is the second value returned by Font:getWrap().
That works perfectly! Thanks.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests