Claude Game Studio

Pixel font generator

This pixel font generator turns your text into a PNG and exports an 8 × 8 bitmap font atlas with JSON coordinates for drawing text in a game.

Text: 432 × 72 px · atlas: 576 × 216 px

95 printable ASCII glyphs. Your text PNG can have multiple lines.

All 95 glyphs, from space to ~. The font atlas always keeps a transparent background.

Export a label or a whole game font

Use Text PNG for a title, button or fixed HUD label. Line breaks become separate rows in the image. Choose 1× for the original 8-pixel glyphs; 4× makes each source pixel a 4 × 4 square, so the glyph is 32 pixels tall. Letter gap is measured in source pixels and scales with the letters.

Use the font atlas when the text changes during play: a score, timer or dialogue line. The atlas contains all 95 printable ASCII characters, including capitals, lowercase letters, digits and punctuation. It has 16 columns and 6 rows. At 4× with a 1-pixel letter gap, each cell is 36 × 36 pixels and the complete atlas is 576 × 216 pixels.

Draw a score from the atlas

Save font.png, font.json and the bitmap font loader in the same folder. Each glyph's xadvance tells the next letter where to start. The loader resets that position on a line break, then moves down by lineHeight. It uses drawImage crops and keeps image smoothing off, so the bitmap stays sharp.

import { loadPixelFont, drawPixelText } from "./bitmap-font-loader.mjs"; const font = await loadPixelFont("./font.json"); drawPixelText(ctx, font, "SCORE 012345", 20, 20);

The sample score uses the same letter shapes as the atlas preview above. Space is a blank glyph with its own advance; it should move the pen without drawing a mark. An unsupported character turns into a question mark in the loader. The editor points out unsupported characters before text export so you can choose ASCII wording.

Font credit and other pixel font makers

The typeface is font8x8 by Daniel Hepper, based on public-domain IBM VGA glyphs. The source header marks the glyphs Public Domain. Read the included original notice. The exported JSON keeps that credit with the atlas so it travels with your game files.

AngelCode BMFont converts TrueType fonts into bitmap textures with character descriptions. That suits a project with an existing licensed typeface. SpriteLab's pixel text tool offers several bitmap styles with outline and shadow. Here, the matching atlas and small Canvas loader are the next step after making a label.

Questions

What is a pixel font generator?

A pixel font generator draws letters on a fixed pixel grid. This one renders an 8 × 8 bitmap typeface at whole-number scales and exports either your text as a PNG or a complete printable-ASCII font atlas with JSON coordinates.

How do I make pixel text with a transparent background?

Type your text, choose a text color and leave Transparent text background checked. Download Text PNG. For a solid rectangle, uncheck it and set the background color. The separate font atlas always keeps its background transparent.

Can I use this pixel font in a game?

Yes. The bundled font8x8 glyph source is marked Public Domain by Daniel Hepper, based on public-domain IBM VGA glyphs. Its credit appears here, in the downloadable notice and in every exported font JSON. You can use the exported glyph images in a commercial game.

How do I load the bitmap font PNG and JSON?

Download Font atlas PNG and Font JSON together and keep their names font.png and font.json. The JSON maps 95 printable ASCII characters to x, y, width, height and xadvance. The loader below draws those crops to a Canvas with image smoothing disabled.

Put your assets into a playable game. Try the ten game templates or get the kit.