Class TextRenderer
Encapulated 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>, RendererOptions)
Renders the text.
Declaration
public void RenderText(ReadOnlySpan<char> text, RendererOptions options)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<Char> | text | The text. |
RendererOptions | options | The style. |
RenderText(String, RendererOptions)
Renders the text.
Declaration
public void RenderText(string text, RendererOptions options)
Parameters
Type | Name | Description |
---|---|---|
String | text | The text. |
RendererOptions | options | The style. |
RenderTextTo(IGlyphRenderer, ReadOnlySpan<Char>, RendererOptions)
Renders the text to the renderer
.
Declaration
public static void RenderTextTo(IGlyphRenderer renderer, ReadOnlySpan<char> text, RendererOptions options)
Parameters
Type | Name | Description |
---|---|---|
IGlyphRenderer | renderer | The target renderer. |
ReadOnlySpan<Char> | text | The text. |
RendererOptions | options | The style. |
RenderTextTo(IGlyphRenderer, String, RendererOptions)
Renders the text to the renderer
.
Declaration
public static void RenderTextTo(IGlyphRenderer renderer, string text, RendererOptions options)
Parameters
Type | Name | Description |
---|---|---|
IGlyphRenderer | renderer | The target renderer. |
String | text | The text. |
RendererOptions | options | The style. |