Glyph positioning 2026-11-05
Glyph positioning assigns locations to the glyphs selected during text shaping. It specifies how each glyph is placed and how the logical pen position progresses through the text. A text baseline supplies a common reference for placing the shapes. An OpenType GPOS table can adjust horizontal and vertical placement, glyph advances and attachment between selected glyphs.[ref]
A simple coordinate model separates the two effects. Let be the pen position, a placement offset and the glyph advance. Draw glyph with its origin at
then update the logical position by
Changing moves the current shape; changing moves the starting position of subsequent shapes.
For example, a combining character can select an accent glyph that must be positioned above an earlier base glyph. The accent's placement and its glyph advance answer different questions. Kerning similarly changes spacing according to context, while glyph substitution changes which forms are selected. These choices precede the rasterization of the placed outlines into pixels.