# OfficeTextFeatureSettings

Immutable OpenType feature selections used by the shared text-shaping contract.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeTextFeatureSettings.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L22)

**Implements**

`IEquatable<OfficeTextFeatureSettings>`

**Modifiers**

sealed

Immutable OpenType feature selections used by the shared text-shaping contract.

## Inheritance

- object
- OfficeTextFeatureSettings

## Remarks

Tags use the four-character OpenType representation. A value of zero disables a feature; positive values enable it or select an alternate. Features absent from the collection retain the shaping engine's script defaults.

## Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 4

- Property [OfficeDrawingText.FeatureSettings](/api/core/officeimo-drawing-officedrawingtext/#property-featuresettings)
- Method [OfficeTextFeatureSettings.With](/api/core/officeimo-drawing-officetextfeaturesettings/#method-with-string-int32)
- Property [OfficeTextFeatureSettings.Default](/api/core/officeimo-drawing-officetextfeaturesettings/#property-default)
- Property [OfficeTextShapingRequest.FeatureSettings](/api/core/officeimo-drawing-officetextshapingrequest/#property-featuresettings)

### Accepted by parameters 2

- Method [OfficeTextFeatureSettings.Equals](/api/core/officeimo-drawing-officetextfeaturesettings/#method-equals-officeimo-drawing-officetextfeaturesettings) parameter `other`
- Constructor [OfficeTextShapingRequest.OfficeTextShapingRequest](/api/core/officeimo-drawing-officetextshapingrequest/#constructor-ctor-string-string-byte-boolean-int32-officeimo-drawing-officetextdirection-string-officeimo-drawing-officetextfeaturesettings) parameter `featureSettings`

Filter members 

Show inherited

## Constructors

OfficeTextFeatureSettings 2 overloads

`public OfficeTextFeatureSettings()` [#](#constructor-ctor)

[OfficeTextFeatureSettings.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L22)

Creates an empty feature selection.

`public OfficeTextFeatureSettings(IEnumerable<KeyValuePair<string, int>>? features)` [#](#constructor-ctor-collections-generic-ienumerable-system-collections-generic-keyvaluepair-system-string-system-int32)

[OfficeTextFeatureSettings.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L26)

Creates an immutable snapshot of feature tag values.

Parameters

**features System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, int>>? required**

## Methods

Equals 2 overloads

`public bool Equals(OfficeTextFeatureSettings? other)` [#](#method-equals-officeimo-drawing-officetextfeaturesettings)

[OfficeTextFeatureSettings.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L65)

Indicates whether the current object is equal to another object of the same type.

Parameters

**other OfficeIMO.Drawing.OfficeTextFeatureSettings? required**

An object to compare with this object.

Returns

`bool` true if the current object is equal to the other parameter; otherwise, false.

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

[OfficeTextFeatureSettings.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L74)

Determines whether the specified object is equal to the current object.

Parameters

**obj object? required**

The object to compare with the current object.

Returns

`bool` true if the specified object is equal to the current object; otherwise, false.

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

[OfficeTextFeatureSettings.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L78)

Serves as the default hash function.

Returns

`int` A hash code for the current object.

`public bool TryGetValue(string tag, out int value)` [#](#method-trygetvalue-string-int32)

[OfficeTextFeatureSettings.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L50)

Returns the explicit value for a feature tag.

Parameters

**tag string required**

**value int required**

Returns

`bool`

`public OfficeTextFeatureSettings With(string tag, int value)` [#](#method-with-string-int32)

[OfficeTextFeatureSettings.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L54)

Returns a new immutable selection with one feature value added or replaced.

Parameters

**tag string required**

**value int required**

Returns

`OfficeTextFeatureSettings`

## Inherited Methods

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

Inherited from object

Returns

`Type`

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

Inherited from object

Returns

`string?`

## Properties

`public static OfficeTextFeatureSettings Default { get; }` [#](#property-default)

[OfficeTextFeatureSettings.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L18)

No explicit feature overrides.

`public IReadOnlyDictionary<string, int> Features { get; }` [#](#property-features)

[OfficeTextFeatureSettings.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L44)

Explicit OpenType feature values keyed by four-character tag.

`public bool IsDefault { get; }` [#](#property-isdefault)

[OfficeTextFeatureSettings.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextFeatureSettings.cs#L47)

True when no feature differs from the shaping engine's defaults.

<!-- PowerForge markdown artifact sha256:DD3DB676C0798C791252D345E6169FF9D47E8DAB5EF874D4BDBFABAF6FEEB823 -->
