Uploading and analyzing
Introduction
The text within a button is not always centered vertically. That is the font’s fault, not yours. You can trim the line box in CSS with text-box: trim-both cap alphabetic. That property became a cross-browser option on August 18, 2026, when Firefox adopted it. The default is still the untrimmed box, and component kits were written for that default.
Trim cuts descenders. An input, a textarea, or any box that clips overflow will cut g, p, and y once the line stops at the cap and the baseline. Turn trim off on those controls and you are back to the font’s real metrics, which may still sit high or low.
For the web, fix those metrics in CSS and leave the file alone. The same box is written as ascent-override, descent-override, and line-gap-override. Rewriting the font file is the other path, mostly for typographers who need that box everywhere the font is used, not only in one stylesheet.
How it works
Both paths use one box. The leftover above the caps equals the leftover below the baseline, so a one-word label sits in the middle of equal padding. Spare height the file already has is used first, whether that is empty room in the line or extra leading. The line only grows when real descenders would not fit after that.
GUI solution
Drop a font file to see the measurement, then download the rewritten font. That file is for typographers, and for any place that cannot take a stylesheet. You can also try three selected fonts at the bottom, and see how the tool changed them: I’ve selected fonts I admire and would like to use in my work, but their metrics are a bit off by default: Unica77 LL by Lineto, GT America by Grilli Type, and BST Ritma by British Standard Type.
Uploading and analyzing
Uploading and analyzing
Uploading and analyzing
CLI solution
Install with npm. Then point the command at a single file, a set of files, or a folder. A folder means every .otf, .ttf, .woff, and .woff2 inside it.
npm i -g normalize-metrics
Or add it to a repo as a dev dependency:
npm i -D normalize-metrics
CSS method
For the web, leave the font files alone. --css saves style.css with ascent-override, descent-override, and line-gap-override.
normalize-metrics Inter-Regular.woff2 Inter-Regular.otf --css
Or once, without installing:
npx normalize-metrics ./fonts --css
style.css
File rewrite method
For typographers, and for anywhere a stylesheet cannot go. It writes a normalized copy next to the original. The letters stay the same.
normalize-metrics Inter-Regular.woff2 Inter-Regular.otf
--check reports fonts that are still off and exits without writing.