I am using BitmapFonts, LabelStyles and Labels for my texts.

I want to resize some labels, so i use this.


LabelStyle style = new LabelStyle(fontType, Color.WHITE);

titleLabel = new Label("Points", style);
titleLabel.x = 260; 
titleLabel.y = 310;

but when i want to resize another label, all the labels containing that font resize (I create a new LabelStyle). So i resize the label instead of the font, but that doesnt solve the problem, because it doesnt resize the label, any idea?


I would preffer adding this as a comment, but i have no commetn priviledge yet.

Have you tried creating a new bitmapfont instead of a new label?

  • \$\begingroup\$ Yes, but is it correct doing that if its the same font? :/ \$\endgroup\$ – Rudy_TM Mar 12 '12 at 21:03
  • \$\begingroup\$ I assume it's not that big of a deal. Can't check libgdx code at work. But isn't a spritebatch passed as parameter for the draw method? That at least lets you know it wont impact too much on performance i guess \$\endgroup\$ – Xavier Guzman Mar 13 '12 at 15:36
  • \$\begingroup\$ I have tried that and the load time increases a lot XD (4 seconds with 4 bitmapfonts built in the constructor) u.u \$\endgroup\$ – Rudy_TM Mar 13 '12 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.