Table of Contents

Class TextShaper

Namespace
Avalonia.Media.TextFormatting
Assembly
Avalonia.Base.dll

A class that is responsible for text shaping.

public class TextShaper
Inheritance
TextShaper
Inherited Members

Constructors

TextShaper(ITextShaperImpl)

public TextShaper(ITextShaperImpl platformImpl)

Parameters

platformImpl ITextShaperImpl

Properties

Current

Gets the current text shaper.

public static TextShaper Current { get; }

Property Value

TextShaper

Methods

ShapeText(ReadOnlyMemory<char>, TextShaperOptions)

Shapes the specified region within the text and returns a shaped buffer.

public ShapedBuffer ShapeText(ReadOnlyMemory<char> text, TextShaperOptions options = default)

Parameters

text ReadOnlyMemory<char>

The text buffer.

options TextShaperOptions

Text shaper options to customize the shaping process.

Returns

ShapedBuffer

A shaped glyph run.

ShapeText(string, TextShaperOptions)

public ShapedBuffer ShapeText(string text, TextShaperOptions options = default)

Parameters

text string
options TextShaperOptions

Returns

ShapedBuffer