Skip to content
ChartForgeX
Class

TextLayoutEngine

ChartForgeX.Typography

Namespace
ChartForgeX.Typography
Assembly
ChartForgeX
Modifiers
static

Measures and wraps text with the dependency-free raster font engine used by ChartForgeX.

Inheritance

  • object
  • TextLayoutEngine

Methods

Layout 2 overloads
public static TextLayout Layout(TextContent content, double maximumWidth, TextStyle style, TextWrapMode wrapMode = Word, int? maximumLines = null, TextTrimming trimming = Ellipsis) #

Fits immutable styled content with the shared word/grapheme flow policy. No markup or browser measurement is evaluated.

Parameters

content ChartForgeX.Typography.TextContent required
maximumWidth double required
style ChartForgeX.Typography.TextStyle required
wrapMode ChartForgeX.Typography.TextWrapMode = Word optional
maximumLines int? = null optional
trimming ChartForgeX.Typography.TextTrimming = Ellipsis optional

Returns

TextLayout
public static TextLayout Layout(string text, double maximumWidth, TextStyle style, TextWrapMode wrapMode = Word, int? maximumLines = null, TextTrimming trimming = Ellipsis) #

Wraps and measures text inside a fixed-width region.

Parameters

text string required
maximumWidth double required
style ChartForgeX.Typography.TextStyle required
wrapMode ChartForgeX.Typography.TextWrapMode = Word optional
maximumLines int? = null optional
trimming ChartForgeX.Typography.TextTrimming = Ellipsis optional

Returns

TextLayout
Measure 2 overloads
public static TextMetrics Measure(TextContent content, TextStyle style) #

Measures safe inline content through the same native face/shaping owner used by scene preparation.

Parameters

content ChartForgeX.Typography.TextContent required
style ChartForgeX.Typography.TextStyle required
public static TextMetrics Measure(string text, TextStyle style) #

Measures text without wrapping.

Parameters

text string required
style ChartForgeX.Typography.TextStyle required