Skip to main content

GlyphRun Class

Represents a sequence of glyphs from a single face of a single font at a single size, and with a single rendering style.

Definition

Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public sealed class GlyphRun : IDisposable
View Source
InheritanceObject → GlyphRun
ImplementsIDisposable

Constructors

GlyphRun(IGlyphTypeface, Double, ReadOnlyMemory(Char), IReadOnlyList(GlyphInfo), Nullable(Point), Int32)Initializes a new instance of the GlyphRun class by specifying properties of the class.
GlyphRun(IGlyphTypeface, Double, ReadOnlyMemory(Char), IReadOnlyList(UInt16), Nullable(Point), Int32)Initializes a new instance of the GlyphRun class by specifying properties of the class.

Properties

BaselineOriginGets or sets the baseline origin of theGlyphRun.
BiDiLevelGets or sets the bidirectional nesting level of the GlyphRun.
BoundsGets the conservative bounding box of the GlyphRun.
CharactersGets or sets the list of UTF16 code points that represent the Unicode content of the GlyphRun.
FontRenderingEmSizeGets or sets the em size used for rendering the GlyphRun.
GlyphInfosGets or sets the list of glyphs to use to render this run.
GlyphTypefaceGets the IGlyphTypeface for the GlyphRun.
InkBounds 
IsLeftToRightReturns true if the text direction is left-to-right. Otherwise, returns false.
Metrics 

Methods

BuildGeometry()Obtains geometry for the glyph run.
Dispose()Releases all resources used by the GlyphRun
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
FindGlyphIndex(Int32)Finds a glyph index for given character index.
FindNearestCharacterHit(Int32, Double)Finds the nearest CharacterHit at given index.
GetCharacterHitFromDistance(Double, Boolean)Retrieves the CharacterHit value that represents the character hit of the caret of the GlyphRun.
GetDistanceFromCharacterHit(CharacterHit)Retrieves the offset from the leading edge of the GlyphRun to the leading or trailing edge of a caret stop containing the specified character hit.
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetIntersections(Single, Single)Gets the intersections of specified upper and lower limit.
GetNextCaretCharacterHit(CharacterHit)Retrieves the next valid caret character hit in the logical direction in the GlyphRun.
GetPreviousCaretCharacterHit(CharacterHit)Retrieves the previous valid caret character hit in the logical direction in the GlyphRun.
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a string that represents the current object.
(Inherited from Object)
TryCreateImmutableGlyphRunReference() 

See Also

Reference

Avalonia.Media Namespace