Combining character 2026-11-05
A combining character is an encoded text character intended to combine with another character in its written presentation. A familiar case is U+0301 COMBINING ACUTE ACCENT: the sequence e followed by that code point represents an accented letter without requiring a separate precomposed code point for the whole letter.[ref]
The same acute-accent code point can mark a distinct letter, stress or tone in different languages. Those functions do not require a different encoding of the accent in every language. Text shaping determines how the selected glyph is attached to the base shape, and glyph positioning can place additional marks relative to earlier marks.
A combining sequence and a grapheme cluster are related but distinct notions. The default segmentation rules determine which code points an editor treats as one unit. Unicode normalization addresses equivalence between encodings, such as a precomposed accented letter and a base-plus-accent sequence; it does not perform the geometric placement of their glyphs.
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.
Grapheme cluster 2026-11-05
A grapheme cluster is a sequence of Unicode code points treated as a unit by a text-segmentation rule. Default extended grapheme clusters approximate user-perceived characters, supporting operations such as moving a text cursor or deleting a visible unit. They are not a universal linguistic definition of a text character; boundaries can require language-specific tailoring.[ref]
For example, e followed by the combining character U+0301 COMBINING ACUTE ACCENT contains two code points, but forms one default extended grapheme cluster. Its UTF-8 representation has three bytes: 65 CC 81 in hexadecimal notation. The precomposed U+00E9 also forms one grapheme cluster, with two UTF-8 bytes, C3 A9. The two representations correspond under the canonical rules of Unicode normalization.[ref]
A glyph count answers another question: text shaping can represent the two text characters f and i by one typographic ligature even though their default grapheme cluster boundary remains. Byte offsets, code point offsets, grapheme cluster boundaries and glyph indices therefore serve different purposes.
Figure 1. . Original encoding comparison for the accented letter é. Blue groups each contain one default extended grapheme cluster; Unicode normalization relates the precomposed and decomposed representations. The letter column shows the abstract letter represented, rather than a measurement of a particular text shaping engine. Details.
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]
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.