A text baseline is the reference line used to align glyphs in a run of text. It supplies a placement reference rather than the edge of every visible shape. In a horizontal coordinate system with the baseline at , a descender can extend below the line, while an ascender extends above the main body of a lowercase letter. Aligning ink bounding boxes at their bottom edges would therefore fail to align the writing.[ref]
Glyph Metrics in the FreeType documentation. Section 1: baseline, pens and layouts
The reference depends on the writing system and layout. OpenType distinguishes an alphabetic baseline (
romn), a hanging baseline (hang) and a mathematical baseline (math), among others. The last is the reference about which mathematical forms are centred; it need not coincide with the alphabetic baseline. Vertical layout also requires an appropriate baseline convention.[ref]Baseline Tags by Microsoft. Registered baseline tags and their meanings in horizontal and vertical axes
For a simple horizontal run, start the logical pen position at on the chosen text baseline. A glyph advance moves the next pen position to . A vertical placement adjustment can move an accent glyph while leaving that baseline and the subsequent logical positions intact. This distinction lets glyph positioning align the run while placing individual forms precisely.
Articles by others on the same topic
There are currently no matching articles.