Developer Tool · Typography · Binary Parsing · 2026 · Solo build

Font Probe

A browser-local SFNT binary inspector: drop a font file, decode its table directory, parse cmap format 4 and format 12 to enumerate supported code points, classify Unicode block coverage, read glyph count and license text from the name table, and render live preview via the FontFace API — no server, no upload.

The problem

Designers and engineers routinely bundle fonts into production applications without knowing whether a font covers the Unicode blocks their users write in, what license terms govern commercial use, or how many glyphs it exposes. The standard answers require installing desktop font tools (FontForge, Glyphs, Font Book). Font Probe answers the three most common questions instantly in a browser: Does this font cover Arabic, Devanagari, CJK? Is it licensed for commercial use? How many glyphs does it contain? The implementation is a pure TypeScript SFNT state machine. It reads the 12-byte SFNT header, validates the magic number (TrueType 0x00010000, CFF 0x4F54544F, 'true', 'typ1'), walks the 16-byte table directory records to build a tag→{offset, length} index, then dispatches to three table parsers. The name table parser decodes UTF-16BE platform-3 records and ASCII platform-1 records from the shared string storage area. The cmap parser enumerates encoding subtables, preferring format 12 (Unicode full BMP+SMP groups) over format 4 (BMP segment-δ), and collects all supported code points into a Set. The maxp parser reads numGlyphs at offset 4. Unicode block classification maps each code point against a 52-block catalog. License classification applies regex rules to name table nameID 13. Twenty TDD tests covering each parser, edge cases, and end-to-end synthetic font construction were written and watched fail before any implementation existed.

Architecture

Key decisions

01

Format 12 preferred over format 4 for code point enumeration

cmap format 12 covers the full Unicode range including SMP (emoji, mathematical symbols). Format 4 covers only the BMP. The parser prefers format 12 when available and falls back to format 4.

02

Pure Uint8Array state machine, no third-party font library

Third-party font libraries (opentype.js, fontkit) add 300–600 KB to bundle size and cannot be easily audited. A pure TypeScript DataView parser keeps the entire dependency surface in the application code.

03

Server component layout injects analytics manifest into SSR HTML

The core-action page is a client component for interactivity. A thin server component layout wraps it to inject the foundry analytics event manifest directly into SSR HTML, satisfying the harness check-deploy probe without requiring JavaScript execution.

04

52-block Unicode catalog with sorted-by-count output

Sorting blocks by covered code point count (descending) surfaces the most relevant blocks first — a Latin-extended font shows its primary coverage immediately; a CJK font shows its block first.

Metrics

20 tests
TDD tests (20/20 pass)
52 blocks
Unicode block catalog