Course contentsShow
← Web Development
Lesson 1302 of 2,98223. Web Font OptimizationFree lesson

Measuring Font Metrics: Ascent, Descent, and Line Gap

Learning the key font metrics that determine vertical spacing and how they differ between typefaces.

Measuring Font Metrics: Ascent, Descent, and Line Gap

You'll learn the three key measurements that determine how much vertical space a font occupies and why they vary between typefaces.

Every font file contains invisible measurements that control how text sits vertically on the page. These aren't about the letters themselves—they're about the "box" each line of text lives in.

The Three Core Metrics

Ascent is the distance from the baseline (where letters sit) to the top of the tallest characters. Think of it as the height reserved for capital letters and tall lowercase letters like 'h' or 'b'.

Descent is the distance below the baseline, reserved for letters that hang down like 'g', 'y', or 'p'. It's the "underground" portion of the line box.

Line gap (also called leading) is extra vertical spacing that some fonts add between lines. It's like cushioning between stacked blocks.

Why This Matters for Font Matching

When you switch from a fallback font to your web font, these metrics often differ dramatically. Arial might have an ascent of 1854 units while your custom font has 2100 units (in font design units). This difference causes layout shift—text suddenly takes up more or less vertical space when the real font loads.

Different typefaces with the same font-size can appear vastly different heights because these metrics aren't standardized. A "16px" font might actually occupy 18px, 20px, or 22px of vertical space depending on its internal metrics.

Understanding these measurements lets you use CSS properties (coming in future lessons) to override them and create better fallback font matches, reducing visual jumps during font loading.

Key Takeaway: Ascent, descent, and line gap are the hidden vertical measurements inside every font that determine line height and spacing—and they're the primary reason fallback fonts don't match your web fonts perfectly.