javaandroidlibgdxbitmap-fonts

Where do I get the BitmapFont and where do I put it?


So I am updating my old android game and I am having some problems with the font. I had to scale up my bitmap font and now it is blurry. Because of that I want to know where can I get a bitmap font with higher resolution and in which folder do I have to put it? Can someone help me with that?

yourBitmapFontName = new BitmapFont();

batch.begin();
yourBitmapFontName.getRegion().getTexture().setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
yourBitmapFontName.getData().setScale(7f);
yourBitmapFontName.setColor(com.badlogic.gdx.graphics.Color.WHITE);
yourBitmapFontName.draw(batch, Score, Gdx.graphics.getWidth()/2-6,130);
batch.end();

Solution

  • Make a dir "fonts" inside assets of android project and store your font(s) there. Basically all the assets (atlases, music, sound samples...) must go to the android project assets dir.

    And for font editor I warmly suggest ShoeBox:

    https://www.youtube.com/watch?v=dxPf1M7YORU

    Watch the video and you'll see why it's better than others, what you can achieve with it what is impossible with other font editors and how to use it of course.