Em (typography) 2026-11-05
An em is a nominal typographic length set by the current font size. At a font size of typographic points, one em is typographic points long.[ref] A scalable computer font describes its geometry relative to this scale. In OpenType,
unitsPerEm specifies how many font units make one em.[ref]Font Header Table by Microsoft. head table, unitsPerEm
Suppose one em contains 2048 font units. A design length of 1024 font units is half an em. At a font size of 12 typographic points, that length is 6 typographic points; at 18 typographic points, it is 9 typographic points. The stored coordinate has not changed; the scale has.
The word em does not require the glyph for “M” to be exactly one em wide. Nor is an em the measured ink height of every glyph: a shape can occupy only part of the nominal square or extend beyond it.[ref]
CSS Fonts Module Level 4 by W3C. Section2.5, note about arbitrary glyph ink bounds relative to the EM box
Glyph advances, left side bearings and right side bearings must consequently be read from the computer font's metrics rather than inferred from the em alone. Glyph advance 2026-11-05
A glyph advance is the displacement of the logical pen position after a glyph is processed. In horizontal layout its main component is often called the advance width. The OpenType horizontal-metrics table records an
advanceWidth in font units, together with a left side bearing.[ref]Horizontal Metrics Table by Microsoft. Horizontal metrics, hMetrics records and advanceWidth
The advance need not equal the width of the visible glyph's bounding box. A spacing text character can select a glyph with a positive advance and no visible outline. Conversely, a drawn shape can extend beyond its nominal advance, or a positioned accent can have a zero advance. The geometry of the ink and the progression of the logical pen therefore require separate data. In a simple horizontal metric, the advance is the left side bearing plus the ink width plus the right side bearing; overhangs can make a bearing negative.
For a hypothetical pair with advances 600 and 600 font units, a pair adjustment of minus 80 gives a total advance of 1120 font units. The second origin moves 80 font units left of its unadjusted position. No glyph outline needs to change for this kerning operation. The final layout can therefore have different advances from the default values stored for isolated glyphs.
Glyph bearing 2026-11-05
A glyph bearing is a signed offset locating a glyph's ink relative to the reference used for layout. In a simple horizontal metric, the left side bearing measures the offset from the pen position to the left ink edge, and the right side bearing measures the remaining distance from the right ink edge to the advance endpoint.[ref]
Glyph Metrics in the FreeType documentation. §3: bearings and advances
Put the origin at , the glyph advance at , and the ink edges at . ThenFor , and , the bearings are and 3, while the ink width is 11. The negative left bearing records an overhang across the origin. The next nominal pen position remains at .
Ink bounds, side bearings and glyph advance
. Original horizontal schematic with an invented outline: left ink edge -2, right ink edge 9, advance 12. The plotted shape is not copied from a font. Horizontal measurements are in consistent arbitrary units. Details.These are measurements of a default horizontal arrangement. Subsequent glyph positioning and kerning can change the rendered relationship between neighbouring glyphs. The reference point and axes must also be checked when applying bearing conventions to vertical layout.
Left side bearing 2026-11-05
In a simple unpositioned horizontal layout, the left side bearing is the signed distance from a glyph's pen position to the left edge of its ink bounding box. Put the logical origin at and call the left ink edge . Then . A positive value leaves space before the ink; a negative value means that the ink overhangs the origin.[ref]
Glyph Metrics in the FreeType documentation. Section 3: bearings and advances
For example, a glyph whose ink occupies and whose glyph advance is 600 font units has left side bearing 40, ink width 500 and right side bearing 60. These are default metrics; subsequent glyph positioning can change the rendered arrangement.
OpenType's horizontal-metrics table supplies the left side bearing and glyph advance. One must not assume that every outline's stored
xMin is already the left side bearing: the outline's own coordinate origin and the metrics' logical origin need not coincide in every supported format.[ref]Horizontal Metrics Table by Microsoft. Opening discussion of hmtx, glyf, head flags and the derivation of side bearings
Pen position 2026-11-05
In glyph positioning, the pen position is the logical point from which the next glyph is placed. The word pen describes a layout convention: the renderer can draw an outline or a collection of pixels rather than trace a physical pen stroke. Simple horizontal layout places this reference point on the text baseline.[ref]
Glyph Metrics in the FreeType documentation. Section 1: the baseline and logical origin; section 3: advances
Let be the current pen position, a placement offset and the resolved glyph advance. The current glyph's drawing origin and the next logical point are, respectively,For example, in one horizontal coordinate system, , and draw at but leave the next logical point at . Moving the current shape and changing the progression of the run are separate operations.
A glyph's bounding box is therefore not a substitute for its pen position. A left side bearing can leave space between the logical origin and the ink, and a right side bearing records how the ink ends relative to the default advance. Kerning or attachment of a combining character can modify the placement or progression without changing the stored outline.
Right side bearing 2026-11-05
The right side bearing measures the signed gap from the right edge of a glyph's ink bounding box to the point specified by its default horizontal glyph advance. If the origin is , the advance is , and the ink edges are , thenThus the advance splits into a left side bearing, an ink width and a right side bearing. OpenType uses this relation to derive the right side bearing from the horizontal metrics and outline bounds.[ref]
Horizontal Metrics Table by Microsoft. Deriving rsb from aw, lsb, xMin and xMax
For the hypothetical ink interval and advance 600 font units, the right side bearing is 60 font units. If a different glyph extends to with the same advance 600, its right side bearing is font units: ink crosses the next nominal origin. A negative bearing is therefore meaningful rather than an invalid width.
These are metrics of an individual default glyph. Kerning and other glyph positioning rules can change the actual gap between adjacent shapes, so the right side bearing alone does not determine the visual spacing of a whole run.

