Extract every vertical metric from a font's OS/2, hhea, and head tables. Get a recommended line-height and CSS snippet for perfectly aligned typography.
Upload your font
We read units-per-em, ascender, descender, x-height, cap-height, line-gap, and the underline metrics
Get a JSON dump plus a copy-paste CSS line-height recommendation
0 bytes uploaded. Font Metrics Analyser runs entirely in your browser using opentype.js and the File API. Your fonts never leave your device.
This tool requires the Free plan or higher.
OpenType has hhea (horizontal header), OS/2 typo (designer-specified), and OS/2 win (Windows clipping). Modern browsers prefer OS/2 typo when the USE_TYPO_METRICS flag is set in fsSelection.
(typoAscender + |typoDescender| + typoLineGap) / unitsPerEm. We also compare against winAscent + winDescent, since some fonts use that instead. Pick the larger to avoid clipping.
TrueType fonts use 2048 (sometimes 1024). PostScript/CFF fonts traditionally use 1000. Variable fonts and Google Fonts have standardised on 1000 for consistency.
Generate a full type scale (h1–h6, body, small) using a chosen modular ratio. Output is fluid clamp() CSS that scales smoothly between two viewport widths.
Open toolDump the full name, OS/2, head, post, and hhea tables from any font. See family, subfamily, designer, manufacturer, version, license, vendor ID, and more.
Open toolPick a min and max font size plus a viewport range and get a clamp() expression that interpolates smoothly. Single field — copy and paste.
Open tool