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.

Step 1 of 3: Font

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

  1. 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.
  2. 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.
  3. Pick the Atlas width and the Padding, and edit the File name if you like.
  4. Press Make bitmap font.
  5. 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?
Yes. It runs in your browser with no account, and a font file you upload is never sent to a server.
What is the difference between a bitmap font and a TTF font?
A TTF or OTF font stores outlines that are drawn at any size. A bitmap font stores ready-made pictures of each character at one size, so it looks exactly the same everywhere, which suits pixel art games.
Does Godot 4 support .fnt bitmap fonts?
Yes. Godot imports BMFont .fnt files as fonts. Keep the PNG atlas in the same folder as the .fnt, with the file name the .fnt expects.
Can I include accented letters or symbols?
Yes. Latin-1 adds the accented letters and symbols used in Western European languages, and Custom characters takes any characters you type, such as only the digits and letters your score display needs.
May I use any font?
Only fonts whose license allows it. Many fonts allow use in games, but some do not allow embedding or converting. Check the license that came with the font before you ship.

See all tools