Module cluster

Source
Expand description

Script aware cluster segmentation.

This module provides support for breaking text into clusters that are appropriate for shaping with a given script. For most scripts, clusters are equivalent to Unicode grapheme clusters. More complex scripts, however, may produce shaping clusters that contain multiple graphemes.

Structs§

Char
Character output from the cluster parser.
CharCluster
Character cluster; output from the parser and input to the shaper.
CharInfo
Information about a character including unicode properties and boundary analysis.
ClusterInfo
Information about a cluster including content properties and boundary analysis.
Parser
Parser that accepts a sequence of characters and outputs character clusters.
SourceRange
Source range of a cluster in code units.
Token
Character input to the cluster parser.

Enums§

Boundary
Boundary type of a character or cluster.
Emoji
Presentation mode for an emoji cluster.
ShapeClass
Shaping class of a character.
Status
Iterative status of mapping a character cluster to nominal glyph identifiers.
Whitespace
Whitespace content of a cluster.

Constants§

MAX_CLUSTER_SIZE
The maximum number of characters in a single cluster.

Type Aliases§

UserData
Arbitrary user data that can be associated with a character throughout the shaping pipeline.