Docsv3.31.0
Back to API Reference
Enum

TextUnits

A set of TextUnit granularities.

public static readonly TextUnits None = 0

No granularity.

public static readonly TextUnits Cluster = 1 << (int)TextUnit.Cluster

One grapheme cluster — a user-perceived character.

public static readonly TextUnits Word = 1 << (int)TextUnit.Word

One word as UAX #29 and the configured dictionaries segment it, carrying the spaces and punctuation that trail it.

public static readonly TextUnits Line = 1 << (int)TextUnit.Line

One line of the current wrap, so the step follows the box the text is laid out in.

public static readonly TextUnits Paragraph = 1 << (int)TextUnit.Paragraph

One paragraph — the text between hard breaks, whatever the wrap does to it.

public static readonly TextUnits All = Cluster | Word | Line | Paragraph

Every granularity.

public static readonly TextUnits Grouping = Word | Line | Paragraph

The granularities holding more than one cluster — those a per-glyph effect cannot express.