PDFs use different encoding systems to map character codes to glyphs. The most common are:

- **Standard encodings** (WinAnsiEncoding, MacRomanEncoding) — Maps character codes to Unicode values, enabling viewers to substitute fonts reliably.

- **Identity-H encoding** — Maps character codes directly to glyph positions within a specific font file. This encoding is commonly used for CJK (Chinese, Japanese, Korean) fonts and some complex scripts.

### Checking font encoding

To determine if a font uses Identity-H encoding:

1. Open a PDF in Adobe Acrobat Pro/Reader.

2. Go to **File** > **Document Properties** > **Fonts**.

3. Look for fonts with encoding listed as Identity-H or Identity-V.

### Why Identity-H fonts need special handling

When a PDF uses Identity-H encoding without embedding a font, the PDF refers to glyph positions (e.g. glyph #245) rather than Unicode characters. In these cases:

- The viewer needs either the exact original font or a `ToUnicode` map in the PDF to determine which characters to display.

- If neither is available, the viewer cannot reliably render the text, regardless of which custom fonts you provide.

### Working with embedded fonts

If your PDF document has embedded fonts, any viewer on any device should render them as expected. A PDF viewer will replace a font if the document doesn’t have it embedded and if it’s not available on the device.

Here’s how to determine if your PDF document has embedded fonts:

- Open the PDF document in [Acrobat Pro](https://acrobat.adobe.com/) or [Acrobat Reader](https://get.adobe.com/reader/) (free and available on all platforms).

- Go to the **File** menu, right-click anywhere empty on the page, and select **Document Properties**.

- Click the **Fonts** tab.

- See the fonts used in the PDF and ensure they’re included in your **Custom Fonts**.

Ensure that the embedded font in your PDF is indeed included in your custom fonts array. If a subset of a font is embedded, this means only the characters used in that particular document are embedded.

### Combining font substitution with custom or dynamic fonts

If your PDF references non-embedded fonts by name (e.g. CJK system fonts like MS Gothic or MS 明朝), you can use [`fontSubstitutions`](https://www.nutrient.io/guides/web/viewer/fonts/substitution/) to remap those names to font faces you provide via [`customFonts`](https://www.nutrient.io/guides/web/features/custom-fonts/) or [`dynamicFonts`](https://www.nutrient.io/guides/web/viewer/fonts/dynamic-fonts/). This is the recommended approach when you know which fonts a document expects but cannot reembed them. See the [font substitution](https://www.nutrient.io/guides/web/viewer/fonts/substitution.md) guide for configuration examples.

### When custom fonts won’t help

Custom fonts configured via `customFonts` **will not resolve** rendering issues when:

- The PDF uses Identity-H encoding without `ToUnicode` maps.

- The PDF uses Type 3 fonts (custom vector glyphs).

- The font is embedded but corrupted in the PDF.

In these cases, the PDF itself must be regenerated with proper font embedding or encoding.

### Collecting diagnostic information

When reporting font rendering issues to support, always include a sample PDF demonstrating the issue so that we can look at its properties and determine the issue.
---

## Related pages

- [Rendering PDF documents](/guides/web/troubleshooting/complexities-of-rendering-pdfs.md)
- [Pspdfkit Doesnt Show The Pdf Form](/guides/web/rendering-issues/pspdfkit-doesnt-show-the-pdf-form.md)

