FontMetrics icon indicating copy to clipboard operation
FontMetrics copied to clipboard

A lightweight JavaScript library for computing accurate font metrics such as x-height, cap height, ascent, descent and tittle for any loaded web font.

Results 4 FontMetrics issues
Sort by recently updated
recently updated
newest added

By default `S` is chosen for measuring cap height, but in fact `S` height includes overshoot: ![image](https://user-images.githubusercontent.com/300067/41561942-310762b2-7319-11e8-9e5f-04ace9e5ebeb.png) `H` or `I` would be more reliable default.

Take 48px Roboto font. `fontMetrics` gives `74` pixels line-height (or `top - bottom`) value: ```js let fontMetrics = require('fontmetrics') let m = fontMetrics({ origin: 'top', fontFamily: 'Roboto', fontSize: 48 })...

Would be nice to have canvas2d baselines values: `hanging`, `middle`, `alphabetical`, from https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline. For `median`/`middle`, see https://en.wikipedia.org/wiki/Baseline_(typography).

https://en.wikipedia.org/wiki/Overshoot_(typography) Would be nice to have its value too