BitmapText.getLineWidth() always return 0


I wanted to use getLineWidth of BitmapText to center my text.

But it is always returning 0

When I looked the code I saw that only a method local variable is updated in the assemble method inside, and not the member.

public float getLineWidth() {

if (needRefresh) {

assemble(); }

return lineWidth;


and assemble method is :

private void assemble() {

float lineWidth = 0; // first generate quadlist


if (block.getTextBox() == null) {

lineWidth = font.updateText(block, quadList, rightToLeft);

} else {

lineWidth = font.updateTextRect(block, quadList, wordWrap);


// set size to zero of any quads at the end that

// were not updated


for (int i = 0; i < textPages.length; i++) {



needRefresh = false;


Not sure if it is good forum to post such thing.



This issue has been fixed in the nightly/SVN builds

thx a lot. I will update first next time.