---
title: "Preferred annotation fonts in Document Engine"
canonical_url: "https://www.nutrient.io/guides/document-engine/configuration/preferred-annotation-fonts/"
md_url: "https://www.nutrient.io/guides/document-engine/configuration/preferred-annotation-fonts.md"
last_updated: "2026-06-19T00:00:00.000Z"
description: "Configure preferred annotation fallback fonts in Document Engine."
---

# Preferred annotation fonts in Document Engine

Set `PSPDFKIT_PREFERRED_FONTS` so Document Engine tries preferred fonts
before it uses the general annotation font fallback behavior.

Use this setting when users create annotations with custom fonts in Nutrient
Web SDK standalone and Document Engine processes those annotations later. For
example, if users create free text annotations with Arabic, Japanese, or Chinese
text in Nutrient Web SDK standalone, configure the same fonts in Document
Engine so exported PDFs use matching annotation fallback fonts.

## How it works

Document Engine first tries to resolve the font requested by the annotation.
If that font is unavailable or can’t render the annotation text, Document
Engine tries the fonts configured in `PSPDFKIT_PREFERRED_FONTS` in order. If
none of the preferred fonts can render the text, Document Engine uses its
default fallback behavior.

## Configure preferred fonts

Mount the font files in the `/custom-fonts` directory. Then set `PSPDFKIT_PREFERRED_FONTS` to a comma-separated list of font names or family names:

```shell

PSPDFKIT_PREFERRED_FONTS=NotoSansArabic-Regular,NotoSansJP-Regular

```

Each value must be a font name or family name that Document Engine can resolve
from its configured fonts. Font names and family names are case-sensitive, so
use the exact values from the configured font metadata. Don’t pass font file
paths in this variable.

To add font files to Document Engine, refer to the [custom fonts](https://www.nutrient.io/guides/document-engine/configuration/custom-fonts.md) guide. To
configure custom fonts in Nutrient Web SDK standalone, refer to the
[Web SDK custom fonts](https://www.nutrient.io/guides/web/features/custom-fonts.md) guide.
---

## Related pages

- [Certificate trust settings](/guides/document-engine/configuration/certificate-trust.md)
- [HTTP/2 shared rendering](/guides/document-engine/configuration/http2-shared-rendering.md)
- [Asset storage configuration](/guides/document-engine/configuration/asset-storage.md)
- [How to configure custom fonts in Document Engine](/guides/document-engine/configuration/custom-fonts.md)
- [Hold workers across short idle gaps such as zoom or scroll pauses:](/guides/document-engine/configuration/large-documents.md)
- [Cache configuration](/guides/document-engine/configuration/cache.md)
- [Configuration options](/guides/document-engine/configuration/options.md)

