# FontFormatException class

> Raised for a font file that is damaged, truncated, or of a kind that is not supported.

Namespace: [PdfNetStack.Fonts](https://www.jadev-corp.com/api/pdfnetstack-fonts/)  
Assembly: PdfNetStack.dll  
Package: `PdfNetStack`

Raised for a font file that is damaged, truncated, or of a kind that is not supported.

```csharp
public sealed class FontFormatException : FormatException, ISerializable
```

**Inheritance**

[object](https://learn.microsoft.com/dotnet/api/system.object) ← 
[Exception](https://learn.microsoft.com/dotnet/api/system.exception) ← 
[SystemException](https://learn.microsoft.com/dotnet/api/system.systemexception) ← 
[FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception) ← 
[FontFormatException](https://www.jadev-corp.com/api/pdfnetstack-fonts/fontformatexception/)

**Implements**

[ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable)

## Constructors

### <a id="PdfNetStack_Fonts_FontFormatException__ctor_System_String_"></a> FontFormatException\(string\)

Creates the exception with a message.

```csharp
public FontFormatException(string message)
```

#### Parameters

`message` [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="PdfNetStack_Fonts_FontFormatException__ctor_System_String_System_Exception_"></a> FontFormatException\(string, Exception\)

Creates the exception with a message and inner exception.

```csharp
public FontFormatException(string message, Exception inner)
```

#### Parameters

`message` [string](https://learn.microsoft.com/dotnet/api/system.string)

`inner` [Exception](https://learn.microsoft.com/dotnet/api/system.exception)

### <a id="PdfNetStack_Fonts_FontFormatException__ctor"></a> FontFormatException\(\)

Creates the exception with no message.

```csharp
public FontFormatException()
```

## Used in

- [Fonts and text in PDF with C# and .NET](https://www.jadev-corp.com/guides/fonts-and-text/)

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-fonts/fontformatexception/
