> For the complete documentation index, see [llms.txt](https://docs.wisej.com/system.drawing.managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md).

# FontFamily

Namespace: **System.Drawing**

Assembly: **System.Drawing.Managed** (4.0.0.0)

Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.

{% tabs %}
{% tab title="C#" %}

```csharp
public class FontFamily : MarshalByRefObject, IDisposable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class FontFamily
    Inherits MarshalByRefObject
    Implements IDisposable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) FontFamily(name)

Initializes a new instance of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) class.

| Name     | Type                                                          | Description                                                                                                |
| -------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **name** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The name of the new [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md). |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) FontFamily(name, fontCollection)

Initializes a new instance of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) class from the specified generic font family.

| Name               | Type                                                                                                    | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------- | ----------- |
| **name**           | [String](https://docs.microsoft.com/dotnet/api/system.string)                                           |             |
| **fontCollection** | [FontCollection](/system.drawing.managed/api/system.drawing.text/system.drawing.text.fontcollection.md) |             |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) FontFamily(genericFamily)

Initializes a new instance of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) class from the specified generic font family.

| Name              | Type                                                                                                              | Description                                                                                                                                                                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **genericFamily** | [GenericFontFamilies](/system.drawing.managed/api/system.drawing.text/system.drawing.text.genericfontfamilies.md) | The [GenericFontFamilies](/system.drawing.managed/api/system.drawing.text/system.drawing.text.genericfontfamilies.md) from which to create the new [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md). |

## Properties

### ![](/files/eguYxwyd6jAtQFHRrmJW) Families

[FontFamily\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.fontfamily): Gets an array that contains all the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) objects associated with the current graphics context.

### ![](/files/eguYxwyd6jAtQFHRrmJW) GenericMonospace

[FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md): Gets a generic monospace [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md).

### ![](/files/eguYxwyd6jAtQFHRrmJW) GenericSansSerif

[FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md): Gets a generic sans serif [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) object.

### ![](/files/eguYxwyd6jAtQFHRrmJW) GenericSerif

[FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md): Gets a generic serif [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Name

[String](https://docs.microsoft.com/dotnet/api/system.string): Gets the name of this [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md).

## Methods

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Dispose()

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetCellAscent(style)

Returns the cell ascent, in design units, of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) of the specified style.

| Parameter | Type                                                                                | Description                                                                                                                         |
| --------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **style** | [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) that contains style information for the font. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The cell ascent for this [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that uses the specified [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetCellDescent(style)

Returns the cell descent, in design units, of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) of the specified style.

| Parameter | Type                                                                                | Description                                                                                                                         |
| --------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **style** | [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) that contains style information for the font. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The cell descent for this [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that uses the specified [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetEmHeight(style)

Returns the height, in design units, of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) of the specified style.

| Parameter | Type                                                                                | Description                                                                                                                         |
| --------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **style** | [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) that contains style information for the font. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The height for this [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that uses the specified [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetLineSpacing(style)

Returns the line spacing, in design units, of the [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) of the specified style. The line spacing is the vertical distance between the base lines of two consecutive lines of text.

| Parameter | Type                                                                                | Description                                                                                       |
| --------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| **style** | [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) | The [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) to apply. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The distance between two consecutive lines of text.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetName(language)

Returns the name, in the specified language, of this [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md).

| Parameter    | Type                                                        | Description                                 |
| ------------ | ----------------------------------------------------------- | ------------------------------------------- |
| **language** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The language in which the name is returned. |

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). A [String](https://docs.microsoft.com/dotnet/api/system.string) that represents the name, in the specified language, of this [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) IsStyleAvailable(style)

Indicates whether the specified [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) enumeration is available.

| Parameter | Type                                                                                | Description                                                                                      |
| --------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **style** | [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) | The [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) to test. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). if the specified [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) is available; otherwise, .


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
