Skip to main content

CodepointRangeEnumerator Struct

Definition

Assembly:Avalonia.Base
Package:Avalonia

Enumerates contiguous ranges of Unicode code points present in a character map (cmap) table.

public struct CodepointRangeEnumerator

Inheritance: ValueType -> CodepointRangeEnumerator

Remarks

This enumerator is typically used to iterate over all code point ranges defined by a cmap table in an OpenType or TrueType font. It supports Format 4, Format 12, and Format 13 cmap subtables. The enumerator is a ref struct and must be used within the stack context; it cannot be stored on the heap or used across await or yield boundaries.

Methods

NameDescription
MoveNextAdvances the enumerator to the next character mapping range in the collection.

MoveNext Method

Advances the enumerator to the next character mapping range in the collection.

public bool MoveNext()

Returns

bool

true if the enumerator was successfully advanced to the next range; otherwise, false.

Remarks

After calling MoveNext, check the Current property to access the current character mapping range. If the end of the collection is reached, MoveNext returns false and Current is set to its default value.

Properties

NameDescription
CurrentGets the current code point range in the enumeration sequence.

Current Property

Gets the current code point range in the enumeration sequence.

public Avalonia.Media.Fonts.Tables.Cmap.CodepointRange Current { get; set; }