GlyphRun Struct

Definition

A run of glyphs that share a font program, a text rendering mode and the colours and line parameters they are painted with, as a display list hands it to DrawGlyphs(in GlyphRun). Valid only during that call.

public ref readonly struct GlyphRun

Remarks

ISO 32000-2 §9.4.3 (text-showing operators), §9.3.6 (text rendering mode), §9.2.4 (glyph space and the font matrix). Every glyph carries its glyph id and text matrix, so a backend that draws glyphs natively from Program can position each one; a backend that draws outlines (the software rasterizer, or any backend when outlines are forced) fills GetOutline(Int32) through GetGlyphTransform(Int32) and the current transform.

Painting (§9.3.6, Table 104): when Fills, each glyph's outline is filled with FillColor by the non-zero winding rule (§9.2.4: glyph outlines are filled that way); when Strokes, its outline (mapped to user space) is stroked with StrokeStyle and StrokeColor; a glyph that is both is filled, then stroked, before the next glyph. Neither is set for mode 3 (Invisible), which the list records only so that hit-testing sees the text, nor for a colour that is a pattern (not painted yet). Modes 4 to 7 paint like 0 to 3; adding their glyphs to the clip comes in a later ticket.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (9)

Methods (2)