Class TextRenderer
Encapsulated logic for laying out and then rendering text to a IGlyphRenderer surface.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public class TextRenderer
Constructors
| Improve this Doc View SourceTextRenderer(IGlyphRenderer)
Initializes a new instance of the TextRenderer class.
Declaration
public TextRenderer(IGlyphRenderer renderer)
Parameters
| Type | Name | Description |
|---|---|---|
| IGlyphRenderer | renderer | The renderer. |
Methods
| Improve this Doc View SourceRenderText(ReadOnlySpan<Char>, TextOptions)
Renders the text.
Declaration
public void RenderText(ReadOnlySpan<char> text, TextOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<Char> | text | The text. |
| TextOptions | options | The style. |
RenderText(String, TextOptions)
Renders the text.
Declaration
public void RenderText(string text, TextOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| String | text | The text. |
| TextOptions | options | The style. |
RenderTextTo(IGlyphRenderer, ReadOnlySpan<Char>, TextOptions)
Renders the text to the renderer.
Declaration
public static void RenderTextTo(IGlyphRenderer renderer, ReadOnlySpan<char> text, TextOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| IGlyphRenderer | renderer | The target renderer. |
| ReadOnlySpan<Char> | text | The text. |
| TextOptions | options | The style. |
RenderTextTo(IGlyphRenderer, String, TextOptions)
Renders the text to the renderer.
Declaration
public static void RenderTextTo(IGlyphRenderer renderer, string text, TextOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| IGlyphRenderer | renderer | The target renderer. |
| String | text | The text. |
| TextOptions | options | The style. |