Skip to main content
Version: Version 4.4

Install fonts for the SDK

When text is created by the PDF Toolbox SDK, all fonts from the Font directories can be used.

Install system fonts

On Windows, macOS, and Linux, when a font is installed, it is by default installed only for a particular user. It is important to either install fonts for all users, or make sure the PDF Toolbox SDK is run under that user and the user profile is loaded.

For Linux, it is recommended you use Font Manager to install all system fonts.

Font directories

The location of the font directories depends on the operating system. Font directories are traversed recursively in the order as specified below.

If two fonts with the same name are found, the latter one takes precedence, i.e. user fonts always take precedence over system fonts.

  1. %SystemRoot%\Fonts
  2. User fonts listed in the registry key \HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Fonts. This includes user-­specific fonts from C:\Users\<user>\AppData\Local\Microsoft\Windows\Fonts and app specific fonts from C:\Program Files\WindowsApps
  3. Fonts directory, which must be a direct subdirectory of where PdfToolboxAPI.dll resides.
  1. /usr/share/fonts
  2. /usr/local/share/fonts
  3. ~/.fonts
  4. $PDFFONTDIR or /usr/lib/X11/fonts/Type1
  1. /System/Library/Fonts
  2. /Library/Fonts

Font cache

A cache of all fonts in all font directories is created. If fonts are added or removed from the font directories, the cache is updated automatically.

To achieve optimal performance, make sure that the cache directory is writable for the PDF Toolbox SDK. Otherwise, the font cache cannot be updated and the font directories have to be scanned on each program startup.

The font cache is created in the subdirectory <CacheDirectory>/Installed Fonts of the cache directory.