Measures display width for wrap computation.
The render pipeline passes an oracle value into Minga.Core.WrapMap so wrap decisions can stay BEAM-owned while the measurement strategy varies by frontend. The safe production oracle is monospace. Measured oracles are opt-in and only make sense when the caller owns the cache.
Summary
Functions
Returns the display width of a text string.
Returns a compact fingerprint that changes when wrapped text measurement changes.
Returns the display width of a single grapheme.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec display_width(t(), String.t()) :: non_neg_integer()
Returns the display width of a text string.
Returns a compact fingerprint that changes when wrapped text measurement changes.
@spec grapheme_width(t(), String.t()) :: non_neg_integer()
Returns the display width of a single grapheme.