Files
designcraft/crates/compose
aionggandSean Hammond 771bbafb82 Fonts: cap height and x-height from glyph outlines when a font doesn't declare them
When OS/2 has no usable sCapHeight / sxHeight, the face measures them from the
unhinted outlines of flat-topped letters (H I E T for cap height, x z v for
x-height) at the face's variation location, and falls back to a share of the
ascent only when none of those letters has a plausible outline. Measuring
outlines instead of the glyf bounding box also covers CFF and variable fonts.

Based on seanth's measurement in #292.

Co-authored-by: Sean Hammond <sean.hammond@und.edu>
2026-10-10 10:54:35 +00:00
..