Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::WidthPolicy Struct Reference

Owning deterministic width policy; no font or terminal matching promise. More...

#include <text.hpp>

Public Member Functions

bool operator== (const WidthPolicy &other) const noexcept=default
 Compare the full cache-key policy.

Public Attributes

AmbiguousWidth ambiguous {AmbiguousWidth::NARROW}
 Width of printable Ambiguous scalars.
EmojiWidth emoji {EmojiWidth::TWO}
 Width of recognized emoji clusters.
std::uint64_t revision {}
 Caller-owned terminal capability revision, included in equality.

Detailed Description

Owning deterministic width policy; no font or terminal matching promise.

Include the complete value in measurement/layout/cell-buffer cache keys. A policy change requires rebuilding text and invalidating affected geometry and paint. Independent values have no thread affinity.

Member Function Documentation

◆ operator==()

bool portals::WidthPolicy::operator== ( const WidthPolicy & other) const
defaultnoexcept

Compare the full cache-key policy.

Parameters
otherValue whose corresponding fields are compared.
Returns
True when every compared field is equal; false otherwise.

The documentation for this struct was generated from the following file: