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 TextRunProperties
| Improve this Doc 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 | 
|---|---|
| Int32 | 
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 | 
|---|---|
| Int32 | 
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
| Improve this Doc 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()
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| String |