Class TextRun
Represents a run of text spanning a series of graphemes within a string.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public class TextRun
Properties
| Edit this page View SourceEnd
Gets or sets the exclusive end index of the last grapheme in this TextRun.
Declaration
public int End { get; set; }
Property Value
Type | Description |
---|---|
int |
Font
Gets or sets the font for this run.
Declaration
public Font? Font { get; set; }
Property Value
Type | Description |
---|---|
Font |
Start
Gets or sets the inclusive start index of the first grapheme in this TextRun.
Declaration
public int Start { get; set; }
Property Value
Type | Description |
---|---|
int |
TextAttributes
Gets or sets the text attributes applied to this run.
Declaration
public TextAttributes TextAttributes { get; set; }
Property Value
Type | Description |
---|---|
TextAttributes |
TextDecorations
Gets or sets the text decorations applied to this run.
Declaration
public TextDecorations TextDecorations { get; set; }
Property Value
Type | Description |
---|---|
TextDecorations |
Methods
| Edit this page View SourceSlice(ReadOnlySpan<char>)
Returns the slice of the given text representing this TextRun.
Declaration
public ReadOnlySpan<char> Slice(ReadOnlySpan<char> text)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | text | The text to slice. |
Returns
Type | Description |
---|---|
ReadOnlySpan<char> | The ReadOnlySpan<T>. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |