# Fonts and Document Layout

> Find replaced fonts with AdaptFont in a WPF application, keep line and page breaks stable with FormattingPrinter, and save PDF/A with EmbeddableFontsOnly.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > Troubleshooting > Fonts and Document Layout
- **1059 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/fonts/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/fonts/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/fonts/llms-full.txt

---

TX Text Control .NET for WPF lays out a document with the fonts installed on Windows and the text dimensions of a printer. When a font of the document isn't installed on a machine, another font replaces it, and lines and pages can break in other places. The problems below start from what you see in the document; the first section shows how to find out which fonts are replaced.

### Find Out Which Fonts Are Replaced

Before you change anything, find out which fonts TX Text Control replaces. Set [FontSettings.AdaptFontEvent](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/fontsettings/adaptfontevent-property/llms-full.txt) to `true`, handle the [AdaptFont](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/adaptfont-event/llms-full.txt) event and log its [FontName](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/adaptfonteventargs/fontname-property/llms-full.txt), the font of the document, and [AdaptedFontName](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/adaptfonteventargs/adaptedfontname-property/llms-full.txt), the font that replaces it. Without `AdaptFontEvent`, the event doesn't occur. [Choose the Replacement Fonts](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/fonts/#choose-the-replacement-fonts) shows the handler, which can also set another replacement from [SupportedFonts](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/adaptfonteventargs/supportedfonts-property/llms-full.txt).

### Text Appears in Another Font on Another Machine

A document looks right on your machine, but on another one, text is shown in another font, and lines or pages break in other places.

On Windows, TX Text Control uses the fonts installed on the system. Windows usually has fonts such as Arial, Calibri and Times New Roman, but newer systems, such as Windows Server 2025, don't always have a full set of fonts. When a font of the document isn't installed, TX Text Control adapts it while it loads and renders the document, and the changed text metrics move line and page breaks.

1. Find out which fonts are replaced, as the previous section shows.
2. Install the missing fonts on the machine, if their licenses allow it.
3. Or choose the replacement yourself: set `AdaptedFontName` in the `AdaptFont` handler to one of the fonts in `SupportedFonts`.

The blog article [Check TX Text Control Template Dependencies Before Deployment](https://www.textcontrol.com/blog/2026/07/28/check-tx-text-control-template-dependencies-before-deployment/) checks the fonts of templates before they are deployed.

### The Layout Depends on the Printer

Line and page breaks change when another printer is the default printer, or the list of available fonts differs between machines with the same fonts installed.

TX Text Control formats a document with the text dimensions of the printer that [FormattingPrinter](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/formattingprinter-property/llms-full.txt) names. The fonts that [GetSupportedFonts](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedfonts-method/llms-full.txt) returns depend on that device as well, and `AdaptFont` occurs when another printer is set. `Standard` means the standard printer of the system, which differs between machines, and a printer that isn't installed is replaced with the standard printer. `Display` uses the font dimensions of the screen, which are the same on all machines.

1. Set `FormattingPrinter` to the printer you print on, or to `Display` for a layout that is the same on every machine.
2. Read `GetSupportedFonts` only after the control is initialized; before, it returns `null`.

[Printing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/printing/#line-and-page-breaks-on-paper-differ-from-the-screen) describes the effect on printed documents.

### A Document Can't Be Saved as PDF/A

Saving with `StreamType.AdobePDFA` fails with one of these messages:

```text
To save PDF/A the FontSettings.EmbeddableFontsOnly property must be set to true.
```

```text
Text filter error: The document cannot be saved, because it contains a non-embeddable font.
```

A PDF/A document must contain its fonts, but not every font can be embedded: the license of a font can forbid it, or the font depends on a device. TX Text Control treats only OpenType and TrueType fonts as embeddable. [FontSettings.EmbeddableFontsOnly](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/fontsettings/embeddablefontsonly-property/llms-full.txt) restricts the document to such fonts and must be `true` to save PDF/A. The second message is a [FilterException](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/filterexception/llms-full.txt) with the reason `NonEmbeddableFont`.

1. Set `FontSettings.EmbeddableFontsOnly` to `true`, as [Create a PDF](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/create/llms-full.txt) shows.
2. Handle `AdaptFont` to see which fonts are replaced by embeddable ones, and choose the replacements yourself if needed.
3. Save the document again with `StreamType.AdobePDFA`.

### Related Pages

- [Product Architecture](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/overview/architecture/llms-full.txt): how formatting, the printer and the display work together.
- [Printing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/printing/llms-full.txt): printed documents that look different from the screen.
- [Document Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/conversion/llms-full.txt): other errors when a document is loaded or saved.

---

## Nearby

- **Previous:** [Native Libraries and Architecture Mismatches](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/native-libraries/llms-full.txt)
- **Next:** [DPI and Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/troubleshooting/dpi-scaling/llms-full.txt)
