Skip to main content

Codepoint Struct

Definition

Assembly:Avalonia.Base
Package:Avalonia
public struct Codepoint

Inheritance: ValueType -> Codepoint

Implements: IEquatable<Codepoint>

Constructors

NameDescription
CodepointCreates a new instance of Avalonia.Media.TextFormatting.Unicode.Codepoint with the specified value.

Codepoint Constructor

Creates a new instance of Avalonia.Media.TextFormatting.Unicode.Codepoint with the specified value.

public Codepoint(uint value)

Parameters

value uint

The codepoint value.

Methods

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
HasScriptExtensionDetermines whether the codepoint's Unicode Script_Extensions property contains script.
IsInRangeInclusiveReturns if cp is between lowerBound and upperBound, inclusive.
ReadAtNo summary available.
ToStringNo summary available.
TryGetPairedBracketNo summary available.

Equals overloads

Equals Method

public bool Equals(Avalonia.Media.TextFormatting.Unicode.Codepoint other)
Parameters

other Avalonia.Media.TextFormatting.Unicode.Codepoint

Returns

bool

Equals Method

public bool Equals(object obj)
Parameters

obj object

Returns

bool

GetHashCode Method

public int GetHashCode()

Returns

int

HasScriptExtension Method

Determines whether the codepoint's Unicode Script_Extensions property contains script.

public bool HasScriptExtension(Avalonia.Media.TextFormatting.Unicode.Script script)

Parameters

script Avalonia.Media.TextFormatting.Unicode.Script

The script to test.

Returns

bool

true when the codepoint participates in script per UAX #24 (Script_Extensions); false otherwise.

Remarks

Backed by the UCD ScriptExtensions.txt data baked into Avalonia.Media.TextFormatting.Unicode.UnicodeData. Codepoints without an explicit Script_Extensions entry fall back to the singleton set of their primary Avalonia.Media.TextFormatting.Unicode.Codepoint.Script property.

IsInRangeInclusive Method

Returns if cp is between lowerBound and upperBound, inclusive.

public bool IsInRangeInclusive(Avalonia.Media.TextFormatting.Unicode.Codepoint cp, uint lowerBound, uint upperBound)

Parameters

cp Avalonia.Media.TextFormatting.Unicode.Codepoint

lowerBound uint

upperBound uint

Returns

bool

ReadAt Method

public Avalonia.Media.TextFormatting.Unicode.Codepoint ReadAt(ReadOnlySpan<char> text, int index, int& count)

Parameters

text ReadOnlySpan<char>

index int

count int&

Returns

Avalonia.Media.TextFormatting.Unicode.Codepoint

ToString Method

public string ToString()

Returns

string

TryGetPairedBracket Method

public bool TryGetPairedBracket(Avalonia.Media.TextFormatting.Unicode.Codepoint& codepoint)

Parameters

codepoint Avalonia.Media.TextFormatting.Unicode.Codepoint&

Returns

bool

Properties

NameDescription
BiDiClassGets the Avalonia.Media.TextFormatting.Unicode.BidiClass.
EastAsianWidthClassGets the Avalonia.Media.TextFormatting.Unicode.Codepoint.EastAsianWidthClass.
GeneralCategoryGets the Avalonia.Media.TextFormatting.Unicode.GeneralCategory.
GraphemeBreakClassGets the Avalonia.Media.TextFormatting.Unicode.Codepoint.GraphemeBreakClass.
HasEmojiPresentationDetermines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint has the Unicode Emoji_Presentation property, i.e. whether it defaults to an emoji presentation when no variation selector follows it.
IsBreakCharDetermines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint is a break char.
IsDefaultIgnorableDetermines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint has the Unicode Default_Ignorable_Code_Point property.
IsEastAsianDetermines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint is an east asian char.
IsEmojiDetermines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint has the Unicode Emoji property.
IsWhiteSpaceDetermines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint is white space.
LineBreakClassGets the Avalonia.Media.TextFormatting.Unicode.LineBreakClass.
PairedBracketTypeGets the Avalonia.Media.TextFormatting.Unicode.BidiPairedBracketType.
ReplacementCodepointThe replacement codepoint that is used for non supported values.
ScriptGets the Avalonia.Media.TextFormatting.Unicode.Script.
ValueGet the codepoint's value.
WordBreakClassGets the Avalonia.Media.TextFormatting.Unicode.WordBreakClass.

BiDiClass Property

Gets the Avalonia.Media.TextFormatting.Unicode.BidiClass.

public Avalonia.Media.TextFormatting.Unicode.BidiClass BiDiClass { get; set; }

EastAsianWidthClass Property

Gets the Avalonia.Media.TextFormatting.Unicode.Codepoint.EastAsianWidthClass.

public Avalonia.Media.TextFormatting.Unicode.EastAsianWidthClass EastAsianWidthClass { get; set; }

GeneralCategory Property

Gets the Avalonia.Media.TextFormatting.Unicode.GeneralCategory.

public Avalonia.Media.TextFormatting.Unicode.GeneralCategory GeneralCategory { get; set; }

GraphemeBreakClass Property

Gets the Avalonia.Media.TextFormatting.Unicode.Codepoint.GraphemeBreakClass.

public Avalonia.Media.TextFormatting.Unicode.GraphemeBreakClass GraphemeBreakClass { get; set; }

HasEmojiPresentation Property

Determines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint has the Unicode Emoji_Presentation property, i.e. whether it defaults to an emoji presentation when no variation selector follows it.

public bool HasEmojiPresentation { get; set; }

IsBreakChar Property

Determines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint is a break char.

public bool IsBreakChar { get; set; }

Returns

true if [is break character]; otherwise, false.

IsDefaultIgnorable Property

Determines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint has the Unicode Default_Ignorable_Code_Point property.

public bool IsDefaultIgnorable { get; set; }

Remarks

Default ignorable codepoints (variation selectors, joiners, the byte order mark, ...) are meant to have no visible rendering of their own, so a font is not expected to provide a glyph for them.

IsEastAsian Property

Determines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint is an east asian char.

public bool IsEastAsian { get; set; }

Returns

true if [is an east asian character]; otherwise, false.

IsEmoji Property

Determines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint has the Unicode Emoji property.

public bool IsEmoji { get; set; }

Remarks

The property marks a codepoint that can be presented as emoji; it says nothing about which presentation is the default. Use Avalonia.Media.TextFormatting.Unicode.Codepoint.HasEmojiPresentation for that.

IsWhiteSpace Property

Determines whether this Avalonia.Media.TextFormatting.Unicode.Codepoint is white space.

public bool IsWhiteSpace { get; set; }

Returns

true if [is whitespace]; otherwise, false.

LineBreakClass Property

Gets the Avalonia.Media.TextFormatting.Unicode.LineBreakClass.

public Avalonia.Media.TextFormatting.Unicode.LineBreakClass LineBreakClass { get; set; }

PairedBracketType Property

Gets the Avalonia.Media.TextFormatting.Unicode.BidiPairedBracketType.

public Avalonia.Media.TextFormatting.Unicode.BidiPairedBracketType PairedBracketType { get; set; }

ReplacementCodepoint Property

The replacement codepoint that is used for non supported values.

public Avalonia.Media.TextFormatting.Unicode.Codepoint ReplacementCodepoint { get; set; }

Script Property

Gets the Avalonia.Media.TextFormatting.Unicode.Script.

public Avalonia.Media.TextFormatting.Unicode.Script Script { get; set; }

Value Property

Get the codepoint's value.

public uint Value { get; set; }

WordBreakClass Property

Gets the Avalonia.Media.TextFormatting.Unicode.WordBreakClass.

public Avalonia.Media.TextFormatting.Unicode.WordBreakClass WordBreakClass { get; set; }