How can I scale a Bitmapfont object in LibGDX? It seems the method setScale is no longer available.
It is not recommended to scale Bitmap font, because it looks pixlated when enlarged(which I believe is ugly)
It is recommended to use freetype generator for resizing your fonts
If you still want use bitmapFont Tenfour04 is correct
Use bitmapFont.getData().setScale(float x, float y)
.
As Fish mentioned, it is recommended to use freetype generator as following:
FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/timesBold.ttf"));
FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
Then change the font size in parameter and initialize BitmapFont:
fontParameter.size = 18;
BitmapFont font = fontGenerator.generateFont(fontParameter);
It is also needed to include libgdx-freetype.so in armeabi folder of your project.