Table of Contents

Class TextBuilder

Namespace
SixLabors.ImageSharp.Drawing.Text
Assembly
SixLabors.ImageSharp.Drawing.dll

Builds vector shapes from text using the provided layout and rendering options.

public static class TextBuilder
Inheritance
TextBuilder
Inherited Members

Methods

GenerateGlyphs(string, TextOptions)

Generates per-glyph path data and metadata for the rendered text. Each entry contains the combined outline paths for a glyph and associated metadata that enables intelligent fill or stroke decisions at the glyph level.

public static IReadOnlyList<GlyphPathCollection> GenerateGlyphs(string text, TextOptions textOptions)

Parameters

text string

The text to shape and render.

textOptions TextOptions

The text rendering and layout options.

Returns

IReadOnlyList<GlyphPathCollection>

A read-only list of GlyphPathCollection entries, one for each rendered glyph.

GenerateGlyphs(string, IPath, TextOptions)

Generates per-glyph path data and metadata for the rendered text, laid out along the supplied path baseline. Each entry contains the combined outline paths for a glyph and associated metadata.

public static IReadOnlyList<GlyphPathCollection> GenerateGlyphs(string text, IPath path, TextOptions textOptions)

Parameters

text string

The text to shape and render.

path IPath

The path that defines the text baseline.

textOptions TextOptions

The text rendering and layout options.

Returns

IReadOnlyList<GlyphPathCollection>

A read-only list of GlyphPathCollection entries, one for each rendered glyph.

GeneratePaths(string, TextOptions)

Generates the combined outline paths for all rendered glyphs in text. The result merges per-glyph outlines into a single IPathCollection suitable for filling or stroking as one unit.

public static IPathCollection GeneratePaths(string text, TextOptions textOptions)

Parameters

text string

The text to shape and render.

textOptions TextOptions

The text rendering and layout options.

Returns

IPathCollection

The combined IPathCollection for the rendered glyphs.

GeneratePaths(string, IPath, TextOptions)

Generates the combined outline paths for all rendered glyphs in text, laid out along the supplied path baseline. The result merges per-glyph outlines into a single IPathCollection.

public static IPathCollection GeneratePaths(string text, IPath path, TextOptions textOptions)

Parameters

text string

The text to shape and render.

path IPath

The path that defines the text baseline.

textOptions TextOptions

The text rendering and layout options.

Returns

IPathCollection

The combined IPathCollection for the rendered glyphs.