# TextStyleFluent

The fluent methods of TextStyle, generated from its public properties: A property-named method sets a property and a singular-named method adds…

 Class  

`ChartForgeX.Typography`

**Namespace**

`ChartForgeX.Typography`

**Assembly**

`ChartForgeX`

**Modifiers**

static

The fluent methods of [TextStyle](/api/chartforgex-typography-textstyle/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- TextStyleFluent

 Filter members   

    Show inherited   

 

## Methods

 `public static TextStyle Alignment(TextStyle textStyle, TextAlignment value)` [#](#method-alignment-chartforgex-typography-textstyle-chartforgex-typography-textalignment) 

Sets [TextStyle.Alignment](/api/chartforgex-typography-textstyle/): Gets or sets horizontal alignment inside the layout region.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.TextAlignment required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::ChartForgeX.Typography.TextStyle { Alignment = value };    textStyle.Alignment(value);
```

 `public static TextStyle Baseline(TextStyle textStyle, TextBaseline value)` [#](#method-baseline-chartforgex-typography-textstyle-chartforgex-typography-textbaseline) 

Sets [TextStyle.Baseline](/api/chartforgex-typography-textstyle/): Gets or sets vertical baseline placement.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.TextBaseline required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::ChartForgeX.Typography.TextStyle { Baseline = value };    textStyle.Baseline(value);
```

 `public static TextStyle Color(TextStyle textStyle, ChartColor value)` [#](#method-color-chartforgex-typography-textstyle-chartforgex-primitives-chartcolor) 

Sets [TextStyle.Color](/api/chartforgex-typography-textstyle/): Gets or sets the text color.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Primitives.ChartColor required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::ChartForgeX.Typography.TextStyle { Color = value };    textStyle.Color(value);
```

 Font 2 overloads 

 `public static TextStyle Font(TextStyle textStyle, FontSpec value)` [#](#method-font-chartforgex-typography-textstyle-chartforgex-typography-fontspec) 

Sets [TextStyle.Font](/api/chartforgex-typography-textstyle/): Gets or sets the font selection.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.FontSpec required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                     // C# fluent
new global::ChartForgeX.Typography.TextStyle { Font = value };    textStyle.Font(value);
```

 `public static TextStyle Font(TextStyle textStyle, Action<FontSpec> configure)` [#](#method-font-chartforgex-typography-textstyle-action-chartforgex-typography-fontspec) 

Configures a copy of [TextStyle.Font](/api/chartforgex-typography-textstyle/) (a new one when not set) and assigns a copy of it once the callback returns, leaving the property unchanged when the callback throws: Gets or sets the font selection.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**configure System.Action<ChartForgeX.Typography.FontSpec> required**

Configures the copy.

Returns

 `TextStyle` The same instance. 

 `public static TextStyle FontSize(TextStyle textStyle, double value)` [#](#method-fontsize-chartforgex-typography-textstyle-double) 

Sets [TextStyle.FontSize](/api/chartforgex-typography-textstyle/): Gets or sets the font size in logical pixels.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value double required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::ChartForgeX.Typography.TextStyle { FontSize = value };    textStyle.FontSize(value);
```

 `public static TextStyle Hinting(TextStyle textStyle, TextHinting value)` [#](#method-hinting-chartforgex-typography-textstyle-chartforgex-typography-texthinting) 

Sets [TextStyle.Hinting](/api/chartforgex-typography-textstyle/): Gets or sets how raster output fits this text to the pixel grid. [TextHinting.Auto](/api/chartforgex-typography-texthinting/) (the default) snaps the baseline, x-height, and cap height of text at 12 output pixels and below to whole pixels without changing its width; [TextHinting.None](/api/chartforgex-typography-texthinting/) draws the outlines exactly. [TextHinting.Full](/api/chartforgex-typography-texthinting/) also fits and darkens narrow straight stems, retaining the same layout. SVG and HTML output leave hinting to the browser.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.TextHinting required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::ChartForgeX.Typography.TextStyle { Hinting = value };    textStyle.Hinting(value);
```

 `public static TextStyle LetterSpacing(TextStyle textStyle, double value)` [#](#method-letterspacing-chartforgex-typography-textstyle-double) 

Sets [TextStyle.LetterSpacing](/api/chartforgex-typography-textstyle/): Gets or sets additional logical pixels between eligible shaped groups. Zero preserves ordinary spacing.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value double required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                              // C# fluent
new global::ChartForgeX.Typography.TextStyle { LetterSpacing = value };    textStyle.LetterSpacing(value);
```

 `public static TextStyle LineHeight(TextStyle textStyle, double value)` [#](#method-lineheight-chartforgex-typography-textstyle-double) 

Sets [TextStyle.LineHeight](/api/chartforgex-typography-textstyle/): Gets or sets line height as a multiplier of the measured font height.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value double required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::ChartForgeX.Typography.TextStyle { LineHeight = value };    textStyle.LineHeight(value);
```

 `public static TextStyle OpenTypeLanguageTag(TextStyle textStyle, string? value)` [#](#method-opentypelanguagetag-chartforgex-typography-textstyle-string) 

Sets [TextStyle.OpenTypeLanguageTag](/api/chartforgex-typography-textstyle/): Gets or sets the OpenType language-system tag (for example, SRB or TRK). Null selects the font's default language system. Tags are case-sensitive and padded to four characters; an absent language in a font falls back to its default. This is not a culture name.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value string? required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                                    // C# fluent
new global::ChartForgeX.Typography.TextStyle { OpenTypeLanguageTag = value };    textStyle.OpenTypeLanguageTag(value);
```

 `public static TextStyle Strikethrough(TextStyle textStyle, bool value = true)` [#](#method-strikethrough-chartforgex-typography-textstyle-boolean) 

Sets [TextStyle.Strikethrough](/api/chartforgex-typography-textstyle/): Gets or sets a compatibility value that maps to a single solid strikethrough.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                              // C# fluent
new global::ChartForgeX.Typography.TextStyle { Strikethrough = value };    textStyle.Strikethrough(value);
```

 `public static TextStyle StrikethroughStyle(TextStyle textStyle, TextDecorationStyle value)` [#](#method-strikethroughstyle-chartforgex-typography-textstyle-chartforgex-typography-textdecorationstyle) 

Sets [TextStyle.StrikethroughStyle](/api/chartforgex-typography-textstyle/): Gets or sets the strikethrough pattern.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.TextDecorationStyle required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.Typography.TextStyle { StrikethroughStyle = value };    textStyle.StrikethroughStyle(value);
```

 `public static TextStyle TextCase(TextStyle textStyle, TextCaseTransform value)` [#](#method-textcase-chartforgex-typography-textstyle-chartforgex-typography-textcasetransform) 

Sets [TextStyle.TextCase](/api/chartforgex-typography-textstyle/): Gets or sets the display-time text-case transform.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.TextCaseTransform required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::ChartForgeX.Typography.TextStyle { TextCase = value };    textStyle.TextCase(value);
```

 `public static TextStyle Underline(TextStyle textStyle, bool value = true)` [#](#method-underline-chartforgex-typography-textstyle-boolean) 

Sets [TextStyle.Underline](/api/chartforgex-typography-textstyle/): Gets or sets a compatibility value that maps to a single solid underline.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::ChartForgeX.Typography.TextStyle { Underline = value };    textStyle.Underline(value);
```

 `public static TextStyle UnderlineStyle(TextStyle textStyle, TextDecorationStyle value)` [#](#method-underlinestyle-chartforgex-typography-textstyle-chartforgex-typography-textdecorationstyle) 

Sets [TextStyle.UnderlineStyle](/api/chartforgex-typography-textstyle/): Gets or sets the underline pattern.

Parameters

**textStyle ChartForgeX.Typography.TextStyle required**

The instance.

**value ChartForgeX.Typography.TextDecorationStyle required**

The value.

Returns

 `TextStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::ChartForgeX.Typography.TextStyle { UnderlineStyle = value };    textStyle.UnderlineStyle(value);
```

## 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:123B62AD84853A9EF935BD404322881AAE1D7153F2BB332E540438415BD9DE44 -->
