Cap height 2026-11-05
The cap height is the reference height of ordinary unaccented capital letters above a text baseline. It describes uppercase letter design, while the x-height concerns the main lowercase body. A font ascent can reserve more space for accents or other tall forms than the cap height alone requires.
OpenType records a nominal cap height in the
sCapHeight field of its OS/2 metrics table, in font units. The metric is an approximation for the uppercase design, so taking the largest ink bounding box among every uppercase glyph need not give the intended value.[ref]OS/2 and Windows Metrics Table by Microsoft. sCapHeight: approximate height of unaccented uppercase letters
For a hypothetical computer font with cap metric 700 and 1000 font units per em, the reference height at 18 pixels per em is 12.6 pixels before grid fitting. An ascent metric of 800 font units would instead reserve 14.4 pixels above the text baseline. These describe different geometric features of the same design.
Aligning a capital heading against an icon can therefore require choosing which reference matters: the text baseline, the nominal cap height, or a measured ink bounding box. Keeping those quantities separate makes the alignment rule reproducible.
Font-size adjustment 2026-11-05
A font-size adjustment rescales a font to preserve a selected visual metric when the design changes. Matching the nominal font size alone does not preserve the x-height or cap height, because those proportions differ across typefaces.
The x-height calculation gives a direct rule. If a requested scale and desired lowercase ratio should be matched by a fallback design with ratio , useFor example, matching at 20 pixels per em with a fallback ratio requires 22 pixels per em. Both designs then have ideal lowercase body height 11 pixels. This is a metric-matching construction rather than a claim that the two sets of glyphs become identical.
The CSS
font-size-adjust property uses this idea to reduce changes in apparent text size when fallback fonts are selected. Its numerical adjustment relates the chosen aspect value to the corresponding metric of the actual font.[ref]Changing scale also changes glyph advances, left side bearings and other distances. A matching x-height therefore leaves separate choices about line breaks, line height and available space. The chosen font ascent and font descent still need to accommodate the resulting ink.
X-height 2026-11-05
The x-height is the height of the main lowercase body of a typeface, conventionally associated with the letter “x”. It excludes the extra extent of ascenders and descenders; the cap height describes a different reference. Small optical overshoots mean that not every lowercase outline without an ascender has exactly the same ink height.[ref]
A Glossary of Typographic Terms by Adobe. Entry x-height: lowercase body, exclusions, variation and small overshoots
Write for the x-height as a fraction of an em. At nominal scale pixels per em, its ideal scaled height is pixels, before grid fitting. Equal font sizes do not force equal , so changing the typeface can alter the apparent lowercase size.
To preserve a target height while switching to a design with ratio , choose . If the original ratio was at scale , this becomesFor a hypothetical switch from at 16 pixels per em to , the matching scale is 20 pixels per em. Both lowercase bodies then have ideal height 8 pixels. This is the geometry behind metric-based font-size adjustment when a fallback font replaces another.[ref]