Glyph advance (source code)

= Glyph advance

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>.<Horizontal Metrics Table by Microsoft>[Horizontal metrics, hMetrics records and advanceWidth]{ref}

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>.