One character cell.
char holds a whole grapheme cluster, not a codepoint, so combining marks stay
attached to the character they modify. width is the display width from
ETee.CharacterWidth.
A double-width grapheme occupies two cells: the grapheme itself with width: 2,
followed by spacer/0, which carries no text and has width: 0. Consumers
rendering a row skip spacers rather than emitting them.
Summary
Functions
An empty cell carrying the default style.
An empty cell carrying a specific style, as erasing with a background colour produces.
True when the cell holds no visible text.
A cell holding a grapheme, with its display width measured.
The zero-width placeholder that follows a double-width grapheme.
The zero-width placeholder carrying a specific style.
True when the cell is the placeholder half of a double-width grapheme.
Types
@type t() :: %ETee.Cell{char: String.t(), style: ETee.Style.t(), width: 0..2}
Functions
@spec blank() :: t()
An empty cell carrying the default style.
@spec blank(ETee.Style.t()) :: t()
An empty cell carrying a specific style, as erasing with a background colour produces.
True when the cell holds no visible text.
@spec new(String.t(), ETee.Style.t()) :: t()
A cell holding a grapheme, with its display width measured.
@spec spacer() :: t()
The zero-width placeholder that follows a double-width grapheme.
@spec spacer(ETee.Style.t()) :: t()
The zero-width placeholder carrying a specific style.
True when the cell is the placeholder half of a double-width grapheme.