User Rating 0.0
Total Usage 0 times
Font Source
Render Settings
Colors
Character Set
Post-Processing
Preview
100%
Load a font and click Generate to see the bitmap preview
Glyph Inspector
Hover over the preview to inspect individual glyphs
Is this tool helpful?

Your feedback helps us improve.

About

Game engines, embedded systems, and LED displays require bitmap fonts - rasterized glyph atlases where each character occupies a fixed cell in a sprite sheet. Converting from vector formats (TTF, OTF, WOFF/WOFF2) manually is tedious and error-prone. A misaligned cell grid or incorrect padding value will cause rendering artifacts across every text string in your application. This tool rasterizes any vector font into a single PNG sprite sheet with an accompanying JSON descriptor that maps each Unicode code point to its pixel coordinates (x, y, w, h). It uses the browser Canvas API for rendering, which means anti-aliasing cannot be fully disabled. For strictly 1-bit output, enable the threshold filter - it quantizes each pixel to pure foreground or background based on a configurable alpha cutoff. Note: CORS restrictions on remote servers may block URL-based loading for non-public font hosts.

font to bitmap bitmap font generator sprite sheet font ttf to png woff to bitmap game font pixel font glyph atlas

Formulas

Each glyph is rendered into a cell of fixed dimensions. The cell size is determined by the maximum advance width and the font metric line height across the entire character set.

cellW = max(advanceWidthi) + 2 padding
cellH = fontSize lineHeightRatio + 2 padding

The total sprite sheet dimensions depend on the number of glyphs N and the column count cols.

sheetW = cols × cellW
sheetH = Ncols × cellH

For the optional 1-bit threshold filter, each pixel alpha channel is compared against a cutoff value T (range 0 - 255):

{
pixel foreground if α Tpixel background if α < T

The JSON glyph descriptor maps each character to its sprite sheet coordinates:

x = (index mod cols) × cellW
y = indexcols × cellH

Where advanceWidth is the horizontal distance the cursor moves after drawing the glyph (measured via measureText), padding is user-configurable spacing around each glyph, fontSize is the point size in pixels, lineHeightRatio defaults to 1.2, N is total glyph count, and cols is columns per row in the atlas.

Reference Data

Character SetUnicode RangeGlyph CountUse Case
Basic ASCIIU+0020 - U+007E95English text, code displays
Latin Extended-AU+0100 - U+017F128European languages (Czech, Polish, Hungarian)
Latin Extended-BU+0180 - U+024F208African languages, Romanian, Croatian
CyrillicU+0400 - U+04FF256Russian, Ukrainian, Bulgarian
GreekU+0370 - U+03FF135Greek text, mathematical notation
CJK Unified (Basic)U+4E00 - U+9FFF20,992Chinese, Japanese Kanji, Korean Hanja
HiraganaU+3040 - U+309F93Japanese phonetic script
KatakanaU+30A0 - U+30FF96Japanese loanwords, emphasis
ArabicU+0600 - U+06FF256Arabic, Persian, Urdu
DevanagariU+0900 - U+097F128Hindi, Sanskrit, Marathi
Box DrawingU+2500 - U+257F128Terminal UIs, ASCII art
Block ElementsU+2580 - U+259F32Progress bars, retro graphics
Math OperatorsU+2200 - U+22FF256Scientific notation, formulas
Currency SymbolsU+20A0 - U+20CF48Financial displays
ArrowsU+2190 - U+21FF112UI indicators, game HUD
Emoji (Misc Symbols)U+2600 - U+26FF256Status icons, decorative text
Numbers OnlyU+0030 - U+003910Score counters, timers
ASCII Printable + Latin-1U+0020 - U+00FF224Western European coverage

Frequently Asked Questions

Modern browsers force sub-pixel anti-aliasing on Canvas text rendering. The imageSmoothingEnabled property only affects image scaling, not text rasterization. To get hard 1-bit edges, enable the Threshold Filter in settings. It converts each pixel to pure foreground or pure background based on the alpha cutoff value T (default 128). For truly pixel-perfect results at small sizes, use a font already designed as a bitmap/pixel font (e.g., Press Start 2P at its native size of 8px).
The JSON file contains an object with a "glyphs" array. Each entry has "char", "code" (Unicode code point), "x", "y", "w", "h" (pixel coordinates in the sprite sheet), and "advance" (horizontal spacing). In your engine, look up each character of a string in this map, then draw the corresponding rectangle from the sprite sheet texture. The "cellWidth" and "cellHeight" root properties give you the uniform grid size for monospaced rendering.
The browser substitutes a fallback font glyph (typically a rectangle or .notdef). This tool detects missing glyphs by comparing the rendered width against a known .notdef reference. Characters flagged as missing are marked in the JSON output with "missing": true and rendered with a distinct marker in the preview grid. Filter them out in your engine if needed.
Yes. Paste the Google Fonts CSS URL (e.g., https://fonts.googleapis.com/css2?family=Roboto). The tool fetches the stylesheet, parses @font-face rules via regex to extract the actual font file URL (usually a .woff2 on fonts.gstatic.com), then loads it via the FontFace API. Google Fonts servers have permissive CORS headers, so this works without proxy. Other providers may block cross-origin requests.
Basic ASCII (95 glyphs) renders instantly. Latin Extended + Cyrillic (~500 glyphs) completes in under 1 second. CJK Unified (20,000+ glyphs) may take 3-10 seconds depending on device. The tool renders in chunks using requestAnimationFrame to avoid freezing the UI, and shows a progress bar. Canvas maximum dimension limits vary by browser: Chrome allows up to 32,767 pixels per axis. A 20,000-glyph set at 32px with 16 columns produces a sheet approximately 512×40,000px which may exceed this limit. Increase column count to keep dimensions within bounds.
Variable fonts (with .ttf or .woff2 extension) are loaded but rendered at the single weight/style configured in the settings panel. The tool sets CSS font-weight and font-style on the canvas context. To export multiple weights, load the same variable font file multiple times with different weight settings and export each as a separate sprite sheet.
The cell width is set to the widest glyph's advance width plus double the padding. Narrower glyphs are centered within the cell. The JSON descriptor includes per-glyph "advance" values so your engine can implement proportional spacing even though the sprite sheet uses uniform cells. For strict monospaced output, enable "Force Monospace" which clips or scales glyphs to fit the cell exactly.