Custom Unicode-Range SubsetterSubset U+0041,U+0100 via harfbuzz-subset.wasm (Fixture A)

Custom Unicode-Range Font Subsetter (HarfBuzz WASM)

Subset TTF and OTF fonts by exact hex code points or U+XXXX-YYYY intervals using harfbuzz-subset.wasm with full composite and GSUB closure.

WOFF2 Brotli · HarfBuzz Subsetter

Drop a .ttf or .otf font to compress to WOFF2 & subset

Accepts .ttf, .otf, .woff · Up to 15 MB · Your font stays on this device

Character Subset Presets
Fallback Metric Base
Verified Sample · OFL-1.1Sample file: proof-sans.ttf (2.0 KB)

Verified Sample Result & Instant Demo

Try Sample File in 1 Click

Subsetting proof-sans.ttf (2,016 bytes) to U+0041,U+0100 and compressing to WOFF2 shrinks the font to 536 bytes while retaining the unmapped macron component outline.

Subset WOFF2 Size
536bytes
Total Byte Savings
73.41%
Closed Glyph Count
4glyphs
Cryptographic SHA-256 & Engine Provenance
Sample Input File
proof-sans.ttf · 2016 bytes · OFL-1.1
Browser Codec Engine
harfbuzz-subset.wasm 1.6.4
Input SHA-256 Digest
f56ba3abc29aa1aec38792693fc882c67d02bac69103358fa0bf12d3b27bc4a3
Engine Artifact SHA-256
62415fe6bad92ef16f3e5d2dbed6c66a4adec7f5a59c6d27084811c92cce1ba5
Reference Verification
fontTools 4.64.0
Schema & Preset ID
fonts.ttftowoff2.unicode-range-subsetter.v1 · subset-unicode-range · harfbuzz-custom-range-subset

Shaping-Aware Font Subsetting and Dependency Closure with HarfBuzz

Why Naive Glyph Stripping Breaks Ligatures and Composite Accents

Multi-script corporate and open-source typefaces routinely span 2,000 to 15,000 glyphs covering Cyrillic, Greek, Vietnamese, and technical math symbols, inflating unsubsetted TTF files past 400 KB. Partitioning a font by CSS unicode-range intervals lets browsers download only the slices required by characters actually rendered on the current page.

Safe subsetting requires graph closure across OpenType tables. When you request U+0041 and U+0100 through harfbuzz-subset.wasm, HarfBuzz traces cmap mappings, follows TrueType composite component pointers (retaining the unmapped macron contour needed by Ā), prunes GSUB/GPOS lookups to kept glyph indices, re-indexes glyph IDs compactly, and preserves Name IDs 0, 13, and 14 for license compliance.

  • Accepts single hex scalars (U+0100), closed intervals (U+0020-007E), and ? wildcard masks.
  • Runs standalone zero-import harfbuzz-subset.wasm inside a memory-safe Worker.
  • Reports retained cmap count, unmapped component glyphs, and missing code points.
  • Generates synchronized CSS unicode-range descriptors ready to paste into @font-face.

Common Questions & Answers

Does CSS unicode-range prevent unused font slices from downloading?

Yes. Modern browsers inspect text nodes against @font-face unicode-range descriptors and only fetch a WOFF2 file if at least one character on the page intersects that range.

Are SIL Open Font License strings kept when subsetting?

Yes. Our HarfBuzz wrapper explicitly retains Name IDs 0 (Copyright), 13 (License), and 14 (License URL) in HB_SUBSET_SETS_NAME_ID.

100% Private In-Browser Processing

Verified local execution

  • Zero Cloud Uploads

    Your files stay on this device and are never sent to any remote server.

  • Instant Local Speed

    Runs directly on your device up to 15 MB with no upload queue.

  • No Account Needed

    Open a file, inspect your preview, and download immediately without signing up.

View Security Architecture
Execution Sandbox
Dedicated Web Worker
Post-Init Network
Locked (0 Egress)
Max File Budget
15 MB
Cross-Origin Isolation
Single-Thread WASM

After local WebAssembly initialization, Worker network APIs (fetch, XMLHttpRequest, WebSocket) are locked to prevent outbound data egress.