= Font metric
A \b[font metric] is a numerical measurement used to position text from a <computer font>. Measurements include <glyph advances>, <glyph bearings>, <bounding boxes> and face-level quantities such as <font ascent>, <font descent> and <font line gap>. These describe both logical movement and the geometry of the visible shapes.<Glyph Metrics in the FreeType documentation>[§§1–3: baseline, face metrics, bearings and advances]{ref}
For a horizontal example, put the <pen position> at $x=0$, let a <glyph> have advance 12, and let its ink extend from $x=-2$ to $x=9$. Its ink width is $9-(-2)=11$, while the next <pen position> is $x=12$. The negative left <glyph bearing> describes an overhang; it does not imply a negative <glyph advance>.
A separate example illustrates vertical conventions. With <font ascent> $a=12$, signed descent $d=-3$ and <font line gap> $g=2$, the metric-based baseline separation is
$$
\boxed{a-d+g=17.}
$$
Some font formats store the descent magnitude with the opposite sign, so the convention must be checked before using the formula.<Glyph Metrics in the FreeType documentation>[§2: ascent, signed descent and linespace formula]{ref} These measurements inform layout before <rasterization> determines the actual <pixels>.
Back to article page