If you've tried to draw text in Phaser or PixiJS and hit blurry glyphs, layout hiccups, or a fight with web-font loading, a bitmap font is the fix. It bakes your typeface into an image once, so the engine just blits pre-rendered glyphs — fast, crisp, and identical on every device. This guide explains what a bitmap font is, when to use one, and how to make and load one for free in your browser.

What is a bitmap font?

A bitmap font is two files:

At runtime the engine reads the .fnt, finds each letter in the PNG, and stamps it to the screen. Nothing is rasterised on the fly, which is why bitmap text is the fastest way to draw lots of changing text — score counters, timers, damage numbers.

Bitmap font vs. TTF / web font — which to use?

Use a bitmap font when:

Stick with a TTF / web font when: you need arbitrary Unicode, user-supplied text in many languages, or selectable/accessible DOM text. Bitmap fonts only contain the characters you bake in.

Step 1 — Generate the bitmap font

Open the free EazyStudio Bitmap Font Generator and:

Export the .fnt and its PNG page. Keep both files together with matching names (e.g. myfont.fnt + myfont.png).

Step 2 — Load it in Phaser 3

Phaser reads the AngelCode .fnt directly:

function preload() { this.load.bitmapFont('myfont', 'assets/myfont.png', 'assets/myfont.fnt'); } function create() { this.add.bitmapText(100, 100, 'myfont', 'SCORE: 0', 48); }

Update it as often as you like — scoreText.setText('SCORE: ' + score) — with none of the cost of dynamic Text.

Step 3 — Load it in PixiJS

Point the loader at the .fnt; it pulls in the PNG page automatically:

await Assets.load('assets/myfont.fnt'); const score = new PIXI.BitmapText('SCORE: 0', { fontName: 'MyFont', // the "face" name inside the .fnt fontSize: 48 }); app.stage.addChild(score);

Note: fontName must match the face="…" value inside the .fnt, not the filename. Open the .fnt in a text editor if you're unsure — it's the first line.

Using it in Unity

Unity's TextMeshPro uses its own SDF font assets rather than .fnt, so for TMP you'd generate a Font Asset from the TTF instead. But the AngelCode .fnt + PNG still works with classic bitmap-font packages (e.g. community BMFont importers) when you want a pixel-perfect, pre-styled look that TMP's SDF smoothing would soften.

Why generate in the browser?

Make a bitmap font now

Free, in your browser — exports .fnt + PNG for Phaser, PixiJS and more.

Open the Bitmap Font Generator

Related game-dev tools