Bitmap fonts - thenewsky/libgdx-ch-document GitHub Wiki

LibGdx makes use of bitmap files (pngs) to render fonts. Each glyph in the font has a corresponding TextureRegion.

BitmapFont class code

File format specifications for the font file

References point to bmFont being originally created by Andreas Jönsson over at AngelCode

BMFont - the original specification for the file format.

Glyph Designer - Details about output, include a binary format.

Tools for Creating Bitmaps

Hiero - a utility for converting a system font to a bitmap

Glyph Designer - a commercial bitmap font tool with a wide variety of options for shadows, gradients, stroke, etc.

Glyphite.com - a browser-based Bitmap font generator that can create detailed Bitmap fonts in seconds and export them in most major formats.

Issues with Glyphite font output:

*.fnt files should use spaces to separate key/value pair entries, not tabs.
Kerning amount should be in int values, not float.

Other Tools

FreeTypeFontGenerator - generating bitmaps for fonts instead of supplying a pre-rendered bitmap made by utilities like Hiero

Examples : (more)

FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("data/unbom.ttf"));

FreeTypeFontParameter parameter = new FreeTypeFontParameter();
parameter.size = 18;
parameter.characters = "한국어/조선�?";

BitmapFont koreanFont = generator.generateFont(parameter);
generator.dispose();

parameter.characters = FreeTypeFontGenerator.DEFAULT_CHARS;
generator = new FreeTypeFontGenerator(Gdx.files.internal("data/russkij.ttf"));
BitmapFont cyrillicFont = generator.generateFont(parameter);
generator.dispose();

Distance field fonts - useful for scaling/rotating fonts without ugly artifacts

gdx-smart-font - unofficial libgdx addon for automatically generating and caching bitmap fonts based on screen size. (Uses FreeTypeFontGenerator)