PeachDrawing.Text

PeachDrawing.Text.Shaping

PlacedGlyph Struct

One glyph a shaper produced, with where it came from in the text and how far it is nudged from where its advance would put it.

public readonly record struct PlacedGlyph : System.IEquatable<PeachDrawing.Text.Shaping.PlacedGlyph>

Implements System.IEquatable<PlacedGlyph>

Remarks

The deltas and offsets are the positioning (GPOS) adjustments in design units, the same space as GetAdvance(ushort), and are all zero for a glyph that positioning does not touch. A glyph’s pen advance is GetAdvance(GlyphIndex) + XAdvanceDelta.

A ligature is one glyph whose cluster covers the whole matched span of the text. A glyph that a multiple substitution adds after the first output of its source has a cluster of zero length, anchored at the end of that source.

Two glyphs are equal when all their values are, except that the component list of a ligature is compared by reference, so two ligature glyphs from separate shaping calls are never equal.

Constructors  
PlacedGlyph(int, int, int, double, double, double, double, int[], Nullable<int>, bool) One glyph a shaper produced, with where it came from in the text and how far it is nudged from where its advance would put it.
Properties  
AttachedToIndex For a mark that positioning attached to another glyph, the index of that glyph in the run; otherwise null. It is not kept on a run shaped for display in reverse order, where every glyph’s offset already accounts for the reversal.
ClusterLength How many UTF-16 code units of the text this glyph stands for.
ClusterStart The UTF-16 offset, into the shaped text, where the characters this glyph stands for begin.
GlyphIndex The glyph’s number in the font.
IsHiddenIgnorable Whether the glyph stands for a character that is invisible by definition and that the font draws nothing for: any variation selector, and another default-ignorable character (a joiner, a bidi control) the font has no glyph of its own for. Such a glyph takes part in substitution and positioning, so a lookup that matches on it still sees it, and is removed from the run at the end. A font that does map such a character keeps its glyph, which is drawn.
LigatureComponentClusterStarts For a ligature, the cluster start of each of its components in order, which is what tells a later mark which component it belongs to; otherwise null.
XAdvanceDelta The change to the horizontal advance.
XOffset How far the glyph is drawn to the right of the pen position, without moving the pen.
YAdvanceDelta The change to the vertical advance.
YOffset How far the glyph is drawn above the pen position, without moving the pen.