Font to Bitmap Converter
Convert vector fonts (TTF, OTF, WOFF) to bitmap sprite sheets. Upload files, paste URLs, or search Google Fonts. Export PNG + JSON glyph map.
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.
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.
The total sprite sheet dimensions depend on the number of glyphs N and the column count cols.
For the optional 1-bit threshold filter, each pixel alpha channel is compared against a cutoff value T (range 0 - 255):
The JSON glyph descriptor maps each character to its sprite sheet coordinates:
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 Set | Unicode Range | Glyph Count | Use Case |
|---|---|---|---|
| Basic ASCII | U+0020 - U+007E | 95 | English text, code displays |
| Latin Extended-A | U+0100 - U+017F | 128 | European languages (Czech, Polish, Hungarian) |
| Latin Extended-B | U+0180 - U+024F | 208 | African languages, Romanian, Croatian |
| Cyrillic | U+0400 - U+04FF | 256 | Russian, Ukrainian, Bulgarian |
| Greek | U+0370 - U+03FF | 135 | Greek text, mathematical notation |
| CJK Unified (Basic) | U+4E00 - U+9FFF | 20,992 | Chinese, Japanese Kanji, Korean Hanja |
| Hiragana | U+3040 - U+309F | 93 | Japanese phonetic script |
| Katakana | U+30A0 - U+30FF | 96 | Japanese loanwords, emphasis |
| Arabic | U+0600 - U+06FF | 256 | Arabic, Persian, Urdu |
| Devanagari | U+0900 - U+097F | 128 | Hindi, Sanskrit, Marathi |
| Box Drawing | U+2500 - U+257F | 128 | Terminal UIs, ASCII art |
| Block Elements | U+2580 - U+259F | 32 | Progress bars, retro graphics |
| Math Operators | U+2200 - U+22FF | 256 | Scientific notation, formulas |
| Currency Symbols | U+20A0 - U+20CF | 48 | Financial displays |
| Arrows | U+2190 - U+21FF | 112 | UI indicators, game HUD |
| Emoji (Misc Symbols) | U+2600 - U+26FF | 256 | Status icons, decorative text |
| Numbers Only | U+0030 - U+0039 | 10 | Score counters, timers |
| ASCII Printable + Latin-1 | U+0020 - U+00FF | 224 | Western European coverage |