# OfficeFontFaceDescriptor

CSS-compatible face attributes used when selecting among registered font faces.

Struct 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeFontFaceDescriptor.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L19)

**Base**

`ValueType`

**Implements**

`IEquatable<OfficeFontFaceDescriptor>`

**Modifiers**

sealed

CSS-compatible face attributes used when selecting among registered font faces.

## Inheritance

- ValueType
- OfficeFontFaceDescriptor

## Usage

Explore 17 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 5

- Property [OfficeFontFace.Descriptor](/api/core/officeimo-drawing-officefontface/#property-descriptor)
- Method [OfficeFontFaceDescriptor.FromStyle](/api/core/officeimo-drawing-officefontfacedescriptor/#method-fromstyle-officeimo-drawing-officefontstyle)
- Property [OfficeFontFaceDescriptor.Regular](/api/core/officeimo-drawing-officefontfacedescriptor/#property-regular)
- Property [OfficeFontInfo.Face](/api/core/officeimo-drawing-officefontinfo/#property-face)
- Property [OfficeTrueTypeFont.FaceDescriptor](/api/core/officeimo-drawing-officetruetypefont/#property-facedescriptor)

### Accepted by parameters 12

- Method [OfficeFontFaceCollection.Add](/api/core/officeimo-drawing-officefontfacecollection/#method-add-string-byte-officeimo-drawing-officefontfacedescriptor) parameter `descriptor`
- Method [OfficeFontFaceCollection.PlanFallbackRuns](/api/core/officeimo-drawing-officefontfacecollection/#method-planfallbackruns-string-string-officeimo-drawing-officefontfacedescriptor) parameter `descriptor`
- Method [OfficeFontFaceCollection.TryAdd](/api/core/officeimo-drawing-officefontfacecollection/#method-tryadd-string-byte-officeimo-drawing-officefontfacedescriptor) parameter `descriptor`
- Method [OfficeFontFaceCollection.TryResolveFaceForText](/api/core/officeimo-drawing-officefontfacecollection/#method-tryresolvefacefortext-string-string-officeimo-drawing-officefontfacedescriptor-double-officeimo-drawing-officefontface) parameter `descriptor`
- Method [OfficeFontFaceDescriptor.Equals](/api/core/officeimo-drawing-officefontfacedescriptor/#method-equals-officeimo-drawing-officefontfacedescriptor) parameter `other`
- Method [OfficeFontFaceDescriptor.op_Equality](/api/core/officeimo-drawing-officefontfacedescriptor/#method-op-equality-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontfacedescriptor) parameter `left`
- Method [OfficeFontFaceDescriptor.op_Equality](/api/core/officeimo-drawing-officefontfacedescriptor/#method-op-equality-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontfacedescriptor) parameter `right`
- Method [OfficeFontFaceDescriptor.op_Inequality](/api/core/officeimo-drawing-officefontfacedescriptor/#method-op-inequality-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontfacedescriptor) parameter `left`
- Method [OfficeFontFaceDescriptor.op_Inequality](/api/core/officeimo-drawing-officefontfacedescriptor/#method-op-inequality-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontfacedescriptor) parameter `right`
- Constructor [OfficeFontInfo.OfficeFontInfo](/api/core/officeimo-drawing-officefontinfo/#constructor-ctor-string-double-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontstyle) parameter `face`
- Method [OfficeFontInfo.WithFace](/api/core/officeimo-drawing-officefontinfo/#method-withface-officeimo-drawing-officefontfacedescriptor) parameter `face`
- Method [OfficeTrueTypeFont.TryLoadFontFamilyForText](/api/core/officeimo-drawing-officetruetypefont/#method-tryloadfontfamilyfortext-string-officeimo-drawing-officefontfacedescriptor-string-officeimo-drawing-officefontstyle) parameter `descriptor`

Filter members 

Show inherited

## Constructors

`public OfficeFontFaceDescriptor(int weight = 400, double stretchPercent = 100, OfficeFontSlant slant = Normal, double obliqueAngleDegrees = 14)` [#](#constructor-ctor-int32-double-officeimo-drawing-officefontslant-double)

[OfficeFontFaceDescriptor.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L19)

Creates a face descriptor.

Parameters

**weight int = 400 optional**

Numeric font weight from 1 through 1000.

**stretchPercent double = 100 optional**

Face width as a percentage of normal width.

**slant OfficeIMO.Drawing.OfficeFontSlant = Normal optional**

Normal, italic, or oblique face classification.

**obliqueAngleDegrees double = 14 optional**

Oblique angle in degrees when slant is oblique.

## Methods

Equals 2 overloads

`public bool Equals(OfficeFontFaceDescriptor other)` [#](#method-equals-officeimo-drawing-officefontfacedescriptor)

[OfficeFontFaceDescriptor.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L64)

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

Parameters

**other OfficeIMO.Drawing.OfficeFontFaceDescriptor 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)

[OfficeFontFaceDescriptor.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L70)

Indicates whether this instance and a specified object are equal.

Parameters

**obj object? required**

The object to compare with the current instance.

Returns

`bool` true if obj and this instance are the same type and represent the same value; otherwise, false.

`public static OfficeFontFaceDescriptor FromStyle(OfficeFontStyle style)` [#](#method-fromstyle-officeimo-drawing-officefontstyle)

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

Creates a descriptor matching the legacy bold/italic flags.

Parameters

**style OfficeIMO.Drawing.OfficeFontStyle required**

Returns

`OfficeFontFaceDescriptor`

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

[OfficeFontFaceDescriptor.cs:75](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L75)

Returns the hash code for this instance.

Returns

`int` A 32-bit signed integer that is the hash code for this instance.

`public static bool op_Equality(OfficeFontFaceDescriptor left, OfficeFontFaceDescriptor right)` [#](#method-op-equality-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontfacedescriptor)

[OfficeFontFaceDescriptor.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L84)

Equality operator.

Parameters

**left OfficeIMO.Drawing.OfficeFontFaceDescriptor required**

**right OfficeIMO.Drawing.OfficeFontFaceDescriptor required**

Returns

`bool`

`public static bool op_Inequality(OfficeFontFaceDescriptor left, OfficeFontFaceDescriptor right)` [#](#method-op-inequality-officeimo-drawing-officefontfacedescriptor-officeimo-drawing-officefontfacedescriptor)

[OfficeFontFaceDescriptor.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L87)

Inequality operator.

Parameters

**left OfficeIMO.Drawing.OfficeFontFaceDescriptor required**

**right OfficeIMO.Drawing.OfficeFontFaceDescriptor required**

Returns

`bool`

`public OfficeFontStyle ToStyle()` [#](#method-tostyle)

[OfficeFontFaceDescriptor.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L57)

Compatibility style flags inferred from the numeric face attributes.

Returns

`OfficeFontStyle`

## Inherited Methods

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

Inherited from object

Returns

`Type`

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

Inherited from ValueType

Returns

`string?`

## Properties

`public int Weight { get; }` [#](#property-weight)

[OfficeFontFaceDescriptor.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L35)

Numeric face weight from 1 through 1000.

`public double StretchPercent { get; }` [#](#property-stretchpercent)

[OfficeFontFaceDescriptor.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L38)

Face width as a percentage of normal width.

`public OfficeFontSlant Slant { get; }` [#](#property-slant)

[OfficeFontFaceDescriptor.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeFontFaceDescriptor.cs#L41)

Normal, italic, or oblique face classification.

`public double ObliqueAngleDegrees { get; }` [#](#property-obliqueangledegrees)

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

Oblique face angle in degrees, or zero for normal and italic faces.

`public static OfficeFontFaceDescriptor Regular { get; }` [#](#property-regular)

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

Regular 400-weight, normal-width, upright face.

<!-- PowerForge markdown artifact sha256:90D18BBE5E84FD137DC4738A2A20D45048C995FA85B5C6A06E3C1E4378006EE2 -->
