Cap height is the vertical distance from the baseline to the top of a typeface’s flat-topped capital letters, such as H, E or I. In typography it is one of the core vertical metrics of a font, alongside x-height, ascender height and descender depth, and it determines how large and how heavy uppercase text appears at a given point size.
Because two fonts set at the same size can have noticeably different cap heights, the metric matters whenever designers mix typefaces, align text with icons or buttons, or need headings and labels to look optically consistent. In digital design it is also stored as a numeric value inside the font file, which software uses for layout and trimming.
How cap height is measured
Cap height is measured on flat capitals because their tops sit exactly on a horizontal line. Round letters such as O and C and pointed letters such as A deliberately overshoot the cap line by roughly 1 to 3 percent so that they look the same size as the flat letters; measuring them would give a slightly inflated value.
In a digital font, glyphs are drawn on a grid called the em square, commonly 1,000 units per em for PostScript-flavored OpenType fonts and 2,048 units for many TrueType fonts. Cap height is expressed in these units and recorded in the sCapHeight field of the OpenType OS/2 table. Dividing it by the units per em gives a ratio that is independent of point size.
The table below lists the vertical metrics that surround cap height and how each relates to it.
| Metric | What it measures | Typical ratio to the em |
|---|---|---|
| Cap height | Baseline to top of flat capitals | About 0.65 to 0.75 |
| X-height | Baseline to top of flat lowercase letters | About 0.45 to 0.55 |
| Ascender height | Baseline to top of letters such as b, d, h | Often slightly above cap height |
| Descender depth | Baseline to bottom of letters such as p, g | About 0.20 to 0.25 below baseline |
| Overshoot | Extra extension of round and pointed letters | About 1 to 3 percent of cap height |
Why cap height varies between typefaces
Point size describes the height of the em square, not the height of any visible letter, so each type designer decides how much of that space the capitals occupy. A typeface with tall capitals looks larger and more assertive at 16 px than one whose capitals use a smaller share of the em.
Cap height also interacts with the ratio between capitals and lowercase. Many modern sans-serif families for screens combine a large x-height with capitals that are only moderately taller, which keeps mixed-case text even. Classical old-style serif faces often have ascenders that rise above the capitals, giving lowercase words a more lively silhouette.
| Typeface style | Relative cap height | Visual consequence |
|---|---|---|
| Neo-grotesque sans-serif | High | Strong, compact uppercase labels |
| Humanist sans-serif | Moderate | Friendly, open texture in body text |
| Old-style serif | Moderate to low | Ascenders often exceed the capitals |
| Geometric sans-serif | Moderate | Capitals look wide and circular |
| Display and condensed faces | Very high | Headlines fill vertical space efficiently |
| Script typeface | Variable and irregular | Capitals are decorative, rarely measured |
Cap height compared with x-height
Cap height and x-height answer different legibility questions. X-height governs how large running lowercase text appears and is the stronger predictor of reading comfort at small sizes, while cap height governs the impact of headings, acronyms, navigation labels and all-caps text.
| Aspect | Cap height | X-height |
|---|---|---|
| Main influence | Uppercase and numeral size | Lowercase size and reading comfort |
| Most relevant for | Labels, buttons, headings, logos | Body text, long-form reading |
| Used in font matching | Aligning text with icons and boxes | Matching apparent size of mixed fonts |
| CSS relative unit | cap | ex |
| Common design check | Optical centering in components | Legibility at 12 to 16 px |
Numerals are usually designed to match cap height when they are lining figures, while old-style figures follow the x-height and drop below the baseline. Choosing the figure style therefore changes how numbers sit next to capitals in tables and interface labels.
Using cap height in layout and interface design
Designers use cap height mainly to achieve optical alignment and consistent sizing. A text box measured from the top of the line box includes the font’s internal leading above the capitals, so a label that is mathematically centered in a button often looks too low. Aligning by cap height removes that offset.
Modern CSS offers direct support. The `cap` unit equals the cap height of the current font, the property font-size-adjust accepts cap-height to normalize fallback fonts, and the `text-box-trim` and `text-box-edge: cap alphabetic` properties trim the space above the capitals and below the baseline so that text aligns exactly to its container.
| Task | How cap height helps | Typical technique |
|---|---|---|
| Centering a button label | Centers the visible capitals, not the line box | Trim to cap and alphabetic edges |
| Aligning icons with text | Matches icon height to capitals | Size icon to about one cap |
| Pairing two typefaces | Prevents one font looking larger | Adjust sizes until cap heights match |
| Font fallback | Reduces layout shift when web fonts load | Use font-size-adjust with cap-height |
| Baseline grid layout | Sets consistent spacing above headings | Measure margins from the cap line |
Common mistakes and misconceptions
The most frequent error is assuming point size equals letter height. A 12 pt font does not have 12 pt capitals; in most text faces its capitals measure roughly 8 to 9 pt. Other recurring problems include:
- Measuring round letters such as O, which includes overshoot and overstates the value.
- Trusting inaccurate font metadata, since some older or free fonts store a wrong sCapHeight value.
- Pairing fonts by point size alone, which can make a secondary typeface look one size too large.
- Setting long passages in all caps, where a high cap height increases visual weight and slows reading.
Stripped to the essentials
Cap height is how tall the capital letters are in a font. It is measured from the line the letters sit on to the flat top of a letter like H.
Two fonts set to the same size can still have capitals of different heights. Two people with the same shoe size can also differ in height. Designers check cap height so that text looks the same size and sits neatly. This matters inside buttons, next to icons and beside other fonts.
Where it is applied
A product team building a design system noticed that labels in its 40 px tall buttons looked slightly low, even though the code centered them perfectly. The interface font had a cap height of 0.70 em, while extra internal space above the capitals pushed the visible letters downward by about 2 px.
The team applied trimming to the cap and alphabetic edges, so the label box matched the visible capitals exactly, and sized the 16 px icons to one cap height of the 14 px label text, roughly 10 px of drawn glyph inside the icon frame. They also set font-size-adjust with the cap-height metric for the fallback system font.
The result was optically centered labels across all button sizes and less visible jumping when the web font finished loading, achieved without manual pixel nudging in individual components.