# PdfFontDescriptor

## Content

# Class: PdfFontDescriptor

Specifies metrics and other attributes of a [PdfFontSimple](PdfFontSimple) or a [PdfCIDFont](PdfCIDFont) as a whole,
as distinct from the metrics of individual glyphs.
These font metrics provide information that enables a consumer application to synthesize a substitute font or
select a similar font when the font program is unavailable.

## Extends

- [`ObjectBase`](ObjectBase)

## Accessors

### ascent

#### Get Signature

```ts
get ascent(): number;
```

Gets the maximum height above the baseline reached by glyphs in this font,
excluding the height of glyphs for accented characters.

##### Returns

`number`

***

### avgWidth

#### Get Signature

```ts
get avgWidth(): number;
```

Gets the average width of glyphs in the font.

##### Returns

`number`

***

### capHeight

#### Get Signature

```ts
get capHeight(): number;
```

Gets the vertical coordinate of the top of flat capital letters, measured from the baseline.

##### Returns

`number`

***

### descent

#### Get Signature

```ts
get descent(): number;
```

Gets the maximum depth below the baseline reached by glyphs in this font.
The value is a negative number.

##### Returns

`number`

***

### flags

#### Get Signature

```ts
get flags(): PdfFontDescriptorFlags;
```

Gets the flags defining various characteristics of the font.

##### Returns

[`PdfFontDescriptorFlags`](../enumerations/PdfFontDescriptorFlags)

***

### fontBBox

#### Get Signature

```ts
get fontBBox(): Rect;
```

Gets a rectangle expressed in the glyph coordinate system, specifying the font bounding box.
This is the smallest rectangle enclosing the shape that would result if all
of the glyphs of the font were placed with their origins coincident and then filled.

##### Returns

[`Rect`](../type-aliases/Rect)

***

### fontFamily

#### Get Signature

```ts
get fontFamily(): string;
```

Gets the preferred font family name.
For example, for the font Times Bold Italic, the fontFamily is Times.

##### Returns

`string`

***

### fontStretch

#### Get Signature

```ts
get fontStretch(): PdfFontStretch;
```

Gets the font stretch value.

##### Returns

[`PdfFontStretch`](../enumerations/PdfFontStretch)

***

### fontWeight

#### Get Signature

```ts
get fontWeight(): PdfFontWeight;
```

Gets the weight (thickness) component of the fully-qualified font name or font specifier.

##### Returns

[`PdfFontWeight`](../enumerations/PdfFontWeight)

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### italicAngle

#### Get Signature

```ts
get italicAngle(): number;
```

Gets the angle, expressed in degrees counterclockwise from the vertical,
of the dominant vertical strokes of the font.

##### Returns

`number`

***

### leading

#### Get Signature

```ts
get leading(): number;
```

Gets the spacing between baselines of consecutive lines of text.

##### Returns

`number`

***

### maxWidth

#### Get Signature

```ts
get maxWidth(): number;
```

Gets the maximum width of glyphs in the font.

##### Returns

`number`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### stemH

#### Get Signature

```ts
get stemH(): number;
```

Gets the thickness, measured vertically, of the dominant horizontal stems of glyphs in the font.

##### Returns

`number`

***

### stemV

#### Get Signature

```ts
get stemV(): number;
```

Gets the thickness, measured horizontally, of the dominant vertical stems of glyphs in the font.

##### Returns

`number`

***

### xHeight

#### Get Signature

```ts
get xHeight(): number;
```

Gets the font's x height: the vertical coordinate of the top of flat non ascending lowercase letters
(like the letter x), measured from the baseline, in fonts that have Latin characters.

##### Returns

`number`

## Methods

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
