---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/FontEmbedder
---

# FontEmbedder

## Overview

`FontEmbedder` is a class in Aspose.PDF FOSS for .NET.

Embeds TrueType fonts into PDF documents for custom text rendering.

This class provides 5 methods for working with FontEmbedder objects in .NET programs.
Available methods include: `AddToPage`, `Embed`, `EmbedFromFile`, `EmbedSubset`, `EmbedSubsetFromFile`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `PostScriptName`, `ResourceName`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `ResourceName` | `string` | Read | The resource name to use in content streams (e.g., "F1"). |
| `PostScriptName` | `string` | Read | The PostScript name of the embedded font. |

## Methods

| Signature | Description |
|-----------|-------------|
| `Embed(document: Document, ttfData: byte[], resourceName: string)` | Embed a TrueType font from file bytes into a document. |
| `EmbedFromFile(document: Document, path: string, resourceName: string)` | Embed a TrueType font from a file path. |
| `EmbedSubset(document: Document, ttfData: byte[], text: string, resourceName: string)` | Embed a subset of a TrueType font containing only the glyphs needed for the given text. |
| `EmbedSubsetFromFile(document: Document, path: string, text: string, resourceName: string)` | Embed a subset of a TrueType font from a file path. |
| `AddToPage(page: Page)` | Add the font resource to a page's resource dictionary. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)