# FontSpecFluent

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

 Class  

`ChartForgeX.Typography`

**Namespace**

`ChartForgeX.Typography`

**Assembly**

`ChartForgeX`

**Modifiers**

static

The fluent methods of [FontSpec](/api/chartforgex-typography-fontspec/), 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
- FontSpecFluent

 Filter members   

    Show inherited   

 

## Methods

 `public static FontSpec CollectionIndex(FontSpec fontSpec, int? value)` [#](#method-collectionindex-chartforgex-typography-fontspec-nullable-system-int32) 

Sets [FontSpec.CollectionIndex](/api/chartforgex-typography-fontspec/): Gets or sets an optional TrueType collection face index.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value int? required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::ChartForgeX.Typography.FontSpec { CollectionIndex = value };    fontSpec.CollectionIndex(value);
```

 `public static FontSpec ColorPaletteIndex(FontSpec fontSpec, int value)` [#](#method-colorpaletteindex-chartforgex-typography-fontspec-int32) 

Sets [FontSpec.ColorPaletteIndex](/api/chartforgex-typography-fontspec/): Gets or sets the zero-based CPAL palette index. Zero is the default. Missing or unusable palettes fall back to the font's default palette; bitmap glyphs are unaffected.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value int required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::ChartForgeX.Typography.FontSpec { ColorPaletteIndex = value };    fontSpec.ColorPaletteIndex(value);
```

 `public static FontSpec FaceName(FontSpec fontSpec, string? value)` [#](#method-facename-chartforgex-typography-fontspec-string) 

Sets [FontSpec.FaceName](/api/chartforgex-typography-fontspec/): Gets or sets an optional face name used when selecting a collection member.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value string? required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::ChartForgeX.Typography.FontSpec { FaceName = value };    fontSpec.FaceName(value);
```

 `public static FontSpec Family(FontSpec fontSpec, string value)` [#](#method-family-chartforgex-typography-fontspec-string) 

Sets [FontSpec.Family](/api/chartforgex-typography-fontspec/): Gets or sets the CSS-compatible family or fallback stack.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value string required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::ChartForgeX.Typography.FontSpec { Family = value };    fontSpec.Family(value);
```

 `public static FontSpec FilePath(FontSpec fontSpec, string? value)` [#](#method-filepath-chartforgex-typography-fontspec-string) 

Sets [FontSpec.FilePath](/api/chartforgex-typography-fontspec/): Gets or sets an optional TrueType or TrueType collection path used by raster output.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value string? required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::ChartForgeX.Typography.FontSpec { FilePath = value };    fontSpec.FilePath(value);
```

 `public static FontSpec Italic(FontSpec fontSpec, bool value = true)` [#](#method-italic-chartforgex-typography-fontspec-boolean) 

Sets [FontSpec.Italic](/api/chartforgex-typography-fontspec/): Gets or sets a value indicating whether an italic face is preferred.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::ChartForgeX.Typography.FontSpec { Italic = value };    fontSpec.Italic(value);
```

 `public static FontSpec Variations(FontSpec fontSpec, FontVariationSettings value)` [#](#method-variations-chartforgex-typography-fontspec-chartforgex-typography-fontvariationsettings) 

Sets [FontSpec.Variations](/api/chartforgex-typography-fontspec/): Gets or sets immutable OpenType axis coordinates. The default uses the face's default instance; Weight and Italic retain their existing face-selection policy.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value ChartForgeX.Typography.FontVariationSettings required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::ChartForgeX.Typography.FontSpec { Variations = value };    fontSpec.Variations(value);
```

 `public static FontSpec Weight(FontSpec fontSpec, int value)` [#](#method-weight-chartforgex-typography-fontspec-int32) 

Sets [FontSpec.Weight](/api/chartforgex-typography-fontspec/): Gets or sets the CSS numeric font weight from 1 through 1000, independently of available font faces.

Parameters

**fontSpec ChartForgeX.Typography.FontSpec required**

The instance.

**value int required**

The value.

Returns

 `FontSpec` The same instance. 

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::ChartForgeX.Typography.FontSpec { Weight = value };    fontSpec.Weight(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:A7D14CEF5C0FFAC986B71A8D6A776F42419D3088BCDB1B21A397A835C023F986 -->
