100% Local WASM:Zero Server Uploads — Your font binaries never leave your browser.

Batch WOFF2 Font Subsetter

Process entire font families (up to 20 weights and styles) in one local Web Worker run and download a production ZIP bundle.

Max file: 25 MBBatch: 1 font (Free)

Drop .ttf, .otf, .woff, or .woff2 font files here

Validates OpenType magic bytes locally. Files never leave your device.

Font EULA, SIL OFL & Apache 2.0 Compliance Responsibility

Subsetting, format conversion to WOFF2, and variable-axis instancing are technical transformations executed locally in your browser. You are solely responsible for verifying that your font license permits web embedding, subsetting, or modification under its End User License Agreement (EULA), the SIL Open Font License (OFL 1.1), or the Apache License 2.0. See our Terms & EULA Notice and Privacy Policy.

OpenType name table copyright and license strings extracted by the Inspector are displayed for convenience and do not constitute legal advice.

Benchmark WOFF2 Size & LCP Reductions

Font / Preset Original Size Subsetted WOFF2 Reduction Est. LCP Gain
6-Weight Family (TTF -> WOFF2 ZIP) 1,420 KB 96.4 KB 93.2% ~2.6 s saved
12-Weight Bilingual Family 3,180 KB 284.0 KB 91.1% ~5.8 s saved
4-Weight Variable + Italic 1,150 KB 112.5 KB 90.2% ~2.1 s saved

Production @font-face CSS Example

/* Generated by UltraStack FontSubset Pro */
@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-Regular.latin-basic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+20AC;
}

Why batch WOFF2 font subsetting Matters for Production Web Performance

Modern design systems rarely use a single font file—they ship Regular, Medium, SemiBold, Bold, and Italic weights across multiple scripts. Processing 10–20 files one by one is slow and error-prone.

Unoptimized desktop font files routinely ship thousands of glyphs, legacy kern tables, and unused script blocks that the browser must download, parse, and rasterize before painting text. On mobile networks, a single 450 KB font file can delay First Contentful Paint (FCP) and Largest Contentful Paint (LCP) by 800 ms to 2,500 ms. By running batch WOFF2 font subsetting directly in your browser via WebAssembly, you eliminate dead bytes before they ever reach your CDN edge.

Unlike legacy server-side pipelines that require uploading proprietary or licensed font binaries to third-party servers, UltraStack FontSubset executes HarfBuzz (hb-subset.wasm) and Google wawoff2 inside an isolated Web Worker. Your font binary stays in volatile browser memory, is inspected for OpenType metadata and EULA strings, and is compressed into a standards-compliant WOFF2 payload in milliseconds.

How HarfBuzz WASM & WOFF2 Brotli Compression Work Under the Hood

UltraStack Pro runs a serialized HarfBuzz WASM + wawoff2 pipeline inside a background Web Worker, streaming progress per file, skipping 0-glyph script chunks, and packaging everything with JSZip.

During subsetting, HarfBuzz constructs a glyph closure graph starting from your selected Unicode codepoints (for example, Latin Basic U+0000-00FF, Currency & Numerals including ₹ U+20B9, or non-Latin scripts such as Devanagari, Arabic, and Cyrillic). Rather than naively deleting glyph outlines, hb-subset traces GSUB substitution lookups (ligatures, small caps, contextual alternates, and Indic conjuncts) and GPOS positioning rules (kerning pairs and mark-to-base anchors) so every reachable glyph and layout rule remains intact.

Once the SFNT tables (glyf/loca or CFF, cmap, hmtx, head, hhea, OS/2, GSUB, GPOS) are compacted, wawoff2 applies WOFF2 table transforms and Brotli entropy coding. Because WOFF2 reconstructs predictable locatable offsets and delta-encodes glyph coordinates, it typically achieves 30% to 50% smaller file sizes than WOFF1 and 60% to 92% smaller payloads than raw TTF or OTF files.

Step-by-Step Optimization Workflow

1. Drop up to 20 font files (all weights and italics) into the dropzone. 2. Select your target script presets and toggle unicode-range splitting. 3. Click Export Batch ZIP and monitor real-time progress. 4. Extract fonts/*.woff2, fonts.css, and report.txt directly into your repo.

After generating the subsetted .woff2 output, always verify glyph coverage using the Live Specimen Previewer's Before vs. After toggle. Toggling between the original Blob URL and the newly subsetted WOFF2 Blob URL injects both fonts into document.fonts so you can visually confirm kerning, diacritics, currency symbols, and variable-font axis interpolation before deploying.

Finally, copy the generated @font-face CSS block—including font-display: swap, exact unicode-range descriptors, and the metric-matched fallback @font-face rule using size-adjust, ascent-override, descent-override, and line-gap-override—directly into your global stylesheet.

Eliminating Cumulative Layout Shift (CLS) with Metric-Matched Fallbacks

Subsetting shrinks download time, but even a 15 KB WOFF2 file takes tens of milliseconds over a cold TLS connection. When the browser renders fallback system text (such as Arial or Helvetica) and later swaps in your custom web font, differences in x-height, ascender, descender, and average advance width cause text reflow—triggering Cumulative Layout Shift (CLS) penalties in Core Web Vitals.

To eliminate layout shift, UltraStack FontSubset reads your font's OS/2 (sTypoAscender, sTypoDescender, sTypoLineGap, sxHeight) and hhea vertical metrics alongside unitsPerEm. It computes a calibrated size-adjust percentage and matching ascent-override, descent-override, and line-gap-override percentages on a local system fallback @font-face. The fallback text occupies the exact same vertical and horizontal bounding box as your web font, resulting in near-zero CLS during font swap.

Frequently Asked Questions

How many font files can I batch in a single run? +

Pro Pass supports up to 20 font files (up to 25 MB each) per batch ZIP export.

What is inside report.txt? +

report.txt logs original vs. subsetted byte sizes, percentage savings, matched codepoint counts, and any skipped 0-glyph chunks.

Does batch processing freeze the browser UI? +

No. All HarfBuzz WASM and JSZip compression runs off the main thread in a dedicated Web Worker.

Are font-weight and font-style set automatically in fonts.css? +

Yes. UltraStack reads OS/2 usWeightClass, fsSelection, and fvar axes for each file in the batch.

Does batch export include CLS fallback @font-face rules? +

Yes. Every font in fonts.css includes its calibrated size-adjust, ascent-override, descent-override, and line-gap-override fallback.

More Font Optimization Guides