You are here:
Add Custom Fonts
When you have custom fonts created by your company, you must complete setup tasks to install them before you can use them.
You must own the licensing for these fonts.
- Create a fonts.json file with a structure for the fontList element and matchPattern element.
-
Set up the fontList element.
Important
You must download a third-party command-line tool, WebFontCreator to complete this setup task. Go to the self-serving substitute fonts page on the PDFTron web site. In the "Customizing the font set" section, click the link for the appropriate version of the webfont creation tool (Linux, Mac, or Windows).
- Set up the matchPattern element.
- Create a Zip file of the fonts folder and upload it to your org as a static resource.
- Run the post-install script to add the font to the main font file.
- Verify that your custom font was installed.
- Create the Fonts.json File
You create the fonts.json file with a text editor using standard JSON format. - Set Up the fontList Element
You must add a list of keys for the fontList element. - Set Up the matchPatterns Element
You must add a list of keys for the matchPatterns element. - Create a Zip File and Upload as a Static Resource
You must create a Zip file and upload it to your org as a static resource. Split your static resource into files that are 5MB or smaller. - Run the Post-Install Script
When you run the following script, your custom font is added to the main font file. - Verify Your Custom Font Installation
After you set up your custom font, you can verify that the font is now in the fonts library.

