is possible to get the 'Height' of a font drawed with the drawWrapped methods (with a wrapWidth) ?

getMultiLineBounds only works when \n is used, but when drawing with drawWrapped it doesn't give the right Height.


String text = "hello this is very lonnnnng text without new line";
float wrapWidth = 100;

Display code :

 font.drawWrapped(batch, text, x, y, wrapWidth, alignment);

My 'get the displayed height code' :


Output :

 hello this is very
 lonnnnng text without
 new line

Problem :

How to have the total height of the displayed text by the methods : DrawWrapped

Can you help me please ? thanks you


1 Answer 1


try getWrappedBounds instead of getMultiLineBounds

  • 1
    \$\begingroup\$ My BitmapFont class does not contain this method - any ideas? \$\endgroup\$
    – magritte
    Nov 6, 2016 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .