# Render BitmapFont with size < 1 in Libgdx

My ingame camera has units that 25 times less than screen units so when I render BitmapFont generated for camera which used in non-game screens (settings, level choose etc.) it's even doesn't fit in camera.

I came up with some solutions:

1. Generate font with right size, but No cap character found in font exception caught.
2. Scale font with font.getData().setScale(float scaleXY) but got this:
3. Increase camera units but I'll need to rewrite a lot of code depending on camera combined matrix.

Is there any easier way to do this?

You could create a second 'overlay' camera that is sized differently than the main camera and draw text using that camera.

batch.setProjectionMatrix(sceneCamera.combined);
batch.begin();
drawSceneThings(batch);
batch.end();

batch.setProjectionMatrix(uiCamera.combined);
batch.begin();
drawUIThings(batch);
batch.end();


Otherwise, using distance field fonts might give you better results than bitmap fonts since they scale much better, although this will require some work to get the shaders set up and rendering properly.