Table of Contents

Struct GraphemeCluster

Namespace
SixLabors.Fonts.Unicode
Assembly
SixLabors.Fonts.dll

Represents a Unicode grapheme cluster and metadata derived while enumerating it.

public readonly ref struct GraphemeCluster
Inherited Members

Constructors

GraphemeCluster(ReadOnlySpan<char>, int, int, int, GraphemeClusterFlags, CodePoint)

Initializes a new instance of the GraphemeCluster struct.

public GraphemeCluster(ReadOnlySpan<char> span, int utf16Offset, int codePointCount, int terminalCellWidth, GraphemeClusterFlags flags, CodePoint firstCodePoint)

Parameters

span ReadOnlySpan<char>

The UTF-16 span containing the grapheme cluster.

utf16Offset int

The UTF-16 offset of the cluster in the original source.

codePointCount int

The number of Unicode scalar values in the cluster.

terminalCellWidth int

The policy-resolved terminal cell width of the cluster.

flags GraphemeClusterFlags

The cluster flags derived while scanning the cluster.

firstCodePoint CodePoint

The first code point in the cluster.

Properties

CodePointCount

Gets the number of Unicode scalar values in the cluster.

public int CodePointCount { get; }

Property Value

int

FirstCodePoint

Gets the first code point in the cluster.

public CodePoint FirstCodePoint { get; }

Property Value

CodePoint

Flags

Gets the cluster flags derived while scanning the cluster.

public GraphemeClusterFlags Flags { get; }

Property Value

GraphemeClusterFlags

Span

Gets the UTF-16 span containing the grapheme cluster.

public ReadOnlySpan<char> Span { get; }

Property Value

ReadOnlySpan<char>

TerminalCellWidth

Gets the policy-resolved terminal cell width of the cluster.

public int TerminalCellWidth { get; }

Property Value

int

Utf16Length

Gets the UTF-16 length of the cluster.

public int Utf16Length { get; }

Property Value

int

Utf16Offset

Gets the UTF-16 offset of the cluster in the original source.

public int Utf16Offset { get; }

Property Value

int