Bitmap Font Generator: Make a Godot BMFont (.fnt)
Pick an installed font or upload your own .ttf, .otf or .woff, set the size, characters, color and outline, and get a PNG glyph atlas plus a BMFont text .fnt file. Godot 4 imports the .fnt as a font you can use on any Label or Button, and other engines with BMFont support can read it too. Pixel font mode turns anti-aliasing off so every pixel stays sharp.
The quick brown fox jumps over the lazy dog. 0123456789!
Installed fonts come from your computer, so check the preview: a missing font falls back to a default one. Your font file stays in your browser and is never uploaded.
How to use it
- Choose an Installed font, or press Upload .ttf, .otf or .woff to use your own font file. Tick Bold if you need it and check the preview, then press Next.
- Set the Size, the Text color and the Characters (ASCII, Latin-1 or Custom characters), add an Outline if you want one, and keep Pixel font on for pixel art. Press Next.
- Pick the Atlas width and the Padding, and edit the File name if you like.
- Press Make bitmap font.
- Try your own text in Sample text, then press Download PNG atlas and Download .fnt.
What the .fnt file contains
The .fnt file uses the AngelCode BMFont text format. The common line gives the line height, the baseline (base) and the atlas size; the page line names the PNG; and each char line gives one character's Unicode id, its rectangle in the atlas, how far to offset it from the pen position, and how far to advance the pen afterwards (xadvance).
Every glyph is cut to its visible pixels and packed tightly, tallest first, with your padding around each one. The PNG stores the final colors, outline included, so the font draws exactly as it looks in the preview.
Using the bitmap font in Godot 4
Godot supports the BMFont .fnt format. Copy the .fnt and the PNG into the same folder of your project, keeping both file names, and Godot imports the .fnt as a font. Select a Label, open Theme Overrides > Fonts in the Inspector and drag the .fnt onto Font.
A bitmap font has one native size and Godot scales it for other sizes. Set Theme Overrides > Font Sizes > Font Size to the same size, or a whole multiple of it, so every pixel is scaled by the same amount.
For pixel fonts, set Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest so Godot does not blur the pixels. Godot also lets you import a plain image as a font with the Font Data (Image Font) import type, but then you map the characters by hand; the .fnt file already has every character's position.
Tips for crisp pixel fonts
Pixel fonts are designed on a grid of one fixed size. Upload the font and use that exact size with Pixel font on; at other sizes the letters land between pixels and come out uneven.
Keep 1 px of padding or more. It stops a neighboring glyph from bleeding in at the edges when the text is scaled or the texture is filtered. A 1 px outline in a dark color keeps light text readable over busy game backgrounds.
Frequently asked questions
Is the bitmap font generator free?
What is the difference between a bitmap font and a TTF font?
Does Godot 4 support .fnt bitmap fonts?
Can I include accented letters or symbols?
May I use any font?
More free game dev tools
- Game Logo Generator: Design a transparent game title logo for free, or generate one with AI.
- Pixel Art Palette Generator: Build an 8, 16 or 32 color pixel art palette from hue-shifted color ramps.
- Placeholder Sprite Generator: Generate labeled placeholder art, silhouettes, pickups and buttons as PNGs and a sprite sheet.