pub struct Glyph(/* private fields */);Expand description
What a cell renders to: one extended grapheme cluster, never a control character.
A grapheme cluster is the unit UAX #29 draws a
boundary around — what a reader sees as one character, which may be built from several code
points: é written as e followed by a combining acute, a flag, or an emoji with a modifier.
A control character is one in Unicode’s Cc category — what char::is_control answers —
and the refusal holds even inside an otherwise-accepted cluster: "\r\n" is one cluster by
UAX #29 and is refused anyway.
Width is not part of this invariant: a grapheme wider than one column is accepted and shifts the rest of its row by a column, and a cluster made only of format characters is accepted and occupies no column. Equality is by text, not by appearance: two glyphs that render alike but are encoded differently compare unequal, because nothing here is normalized.