Vertical Metrics & Line-Box ProofCompare hhea vs OS/2 sTypo metrics in UPM & em (Fixture B)

Font Vertical Metrics Inspector (hhea vs OS/2)

Diagnose clipped ascenders, uneven button centering, and cross-OS line-height bugs by comparing hhea, OS/2 sTypo, and usWin vertical metrics.

Archival Desktop Font Recovery

Drop a .woff or .woff2 webfont to restore a desktop .ttf or .otf

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

Verified Sample · OFL-1.1Sample file: proof-sans.woff (1.3 KB)

Verified Sample Result & Instant Demo

Try Sample File in 1 Click

In proof-sans.woff (1,000 UPM), how do hhea.ascender (880) and OS/2.sTypoAscender (800) compare across vertical metric tables?

Units Per Em
1000upm
hhea Ascender
880units
OS/2 sTypoAscender
800units
Cryptographic SHA-256 & Engine Provenance
Sample Input File
proof-sans.woff · 1324 bytes · OFL-1.1
Browser Codec Engine
opentype.js 2.0.0
Input SHA-256 Digest
62ea0143102e8dcdf8131c55898f30c4d60c4336e8fb70bd7f02d130231c3041
Engine Artifact SHA-256
e139522ac432bb38fb4878d772012f0ad351993c36d7815d65a9890fb3fe68fb
Reference Verification
fontTools 4.64.0
Schema & Preset ID
fonts.wofftottf.font-metrics-inspector.v1 · inspect-vertical-metrics · compare-hhea-os2-metrics

Solving Cross-Browser Line-Height Drift Between hhea and OS/2 Tables

Three Competing Vertical Metric Triplets Inside One Font

Historical divergence between Apple, Microsoft, and Adobe left every OpenType font carrying three separate sets of vertical metrics: hhea (ascender, descender, lineGap), OS/2 typographic metrics (sTypoAscender, sTypoDescender, sTypoLineGap), and Windows clipping bounds (usWinAscent, usWinDescent). When these triplets disagree, UI buttons look vertically off-center between macOS Safari and Windows Chrome.

Bit 7 of OS/2.fsSelection (0x0080, USE_TYPO_METRICS) instructs modern layout engines to prefer sTypoAscender, sTypoDescender, and sTypoLineGap across all operating systems rather than falling back to hhea on macOS and usWin on Windows. Inspecting all three metric sets normalized by unitsPerEm immediately pinpoints baseline shifts.

  • Displays raw design units alongside normalized em-box fractions (value / unitsPerEm).
  • Checks whether OS/2.fsSelection bit 7 (USE_TYPO_METRICS) is enabled.
  • Calculates exact delta between hhea.ascender and OS/2.sTypoAscender.
  • Reveals usWinAscent and usWinDescent GDI clipping thresholds for tall stacked diacritics.
  • Helps frontend engineers align button padding and single-line badge baselines across macOS and Windows.
  • Feeds normalized ascender, descender, and lineGap em ratios directly into CSS fallback override formulas.

Common Questions & Answers

What does OS/2.fsSelection USE_TYPO_METRICS (bit 7) do in browsers?

When bit 7 (0x0080) is set, Chromium, WebKit, and Gecko compute default normal line boxes from sTypoAscender, sTypoDescender, and sTypoLineGap consistently across Windows, macOS, and Linux.

Why is descender negative in hhea and sTypoDescender but positive in usWinDescent?

hhea.descender and OS/2.sTypoDescender use signed coordinates below the baseline (negative for normal descenders), whereas usWinDescent stores an unsigned distance below the baseline.

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.