# TextLayoutEngine

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

 Class  

`ChartForgeX.Typography`

**Namespace**

`ChartForgeX.Typography`

**Assembly**

`ChartForgeX`

**Source**

[TextLayoutEngine.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Typography/TextLayoutEngine.cs#L14)

**Modifiers**

static

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

## Inheritance

- object
- TextLayoutEngine

 Filter members   

    Show inherited   

 

## Methods

 Layout 2 overloads 

 `public static TextLayout Layout(TextContent content, double maximumWidth, TextStyle style, TextWrapMode wrapMode = Word, int? maximumLines = null, TextTrimming trimming = Ellipsis)` [#](#method-layout-chartforgex-typography-textcontent-double-chartforgex-typography-textstyle-chartforgex-typography-textwrapmode-nullable-system-int32-chartforgex-typography-texttrimming) 

[TextLayoutEngine.Content.cs:23](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Typography/TextLayoutEngine.Content.cs#L23)

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)` [#](#method-layout-string-double-chartforgex-typography-textstyle-chartforgex-typography-textwrapmode-nullable-system-int32-chartforgex-typography-texttrimming) 

[TextLayoutEngine.cs:30](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Typography/TextLayoutEngine.cs#L30)

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)` [#](#method-measure-chartforgex-typography-textcontent-chartforgex-typography-textstyle) 

[TextLayoutEngine.Content.cs:9](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Typography/TextLayoutEngine.Content.cs#L9)

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**

Returns

 `TextMetrics` 

 `public static TextMetrics Measure(string text, TextStyle style)` [#](#method-measure-string-chartforgex-typography-textstyle) 

[TextLayoutEngine.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Typography/TextLayoutEngine.cs#L14)

Measures text without wrapping.

Parameters

**text string required**

**style ChartForgeX.Typography.TextStyle required**

Returns

 `TextMetrics` 

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

<!-- PowerForge markdown artifact sha256:5891CB7B953CA8DEE36A5BDEBEB573709C3ADC20B024B2DF1D2A0A6BC3D913D7 -->
