Storm Asdg Storm Asdg - 1 year ago 349
Java Question

How set Libgdx bitmap font size?

I'm rendering on screen the game fps using bitmap font but there are no methods for the size. This is a problem for me because my camera viewport size is very small so the text when rendered is huge and pixelated.

font.draw(batch, Float.toString(, x, y);

Answer Source

Did you try setScale() method that what i use to resize my font

myFont.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);

if you have trouble, leave a comment

Good Luck !!

Edit :

With the latest libgdx version, try to scale font like this :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download