Showing results for 
Search instead for 
Did you mean: 
Account Deactivated

Font substitution when embedding fonts

The font embedding controls in FFCore's Optimize component provide the following options:

Screen Shot 2017-05-08 at 12.22.53 PM.png


There are a few things to consider when embedding fonts:

  • Fonts will honor the font embedding flag in the font file
  • FFCore searches for fonts installed in the windows server running FFCore
  • FFCore will also search for fonts uploaded via the Manage Additional Fonts dialog.

Font substitution is controlled via pdfToolbox Font Substitution Policy files. FFCore includes the standard policy files included with pdfToolbox.

Screen Shot 2017-05-08 at 12.27.52 PM.png

Additional policy files can be created and uploaded to the FFCore sandbox.



The font substitution policies are plain text files with the following content:


DisplayName 1 My Special Name


SubstituteAll Arial Helvetica Helvetica Neue Futura Helvetica Neue Microsoft Sans Serif MS PGothic Trebuchet MS Verdana
SubstituteFirst Arial Bold Arial-Bold Helvetica Bold Futura-Bold Futura Bold Helvetica-Bold


The DisplayName defines the name that will appear in the pdfToolbox UI:

Screen Shot 2014-12-09 at 4.35.48 PM.png

The DisplayName is not used by FFCore as it displays the filename in the sandbox.


The remaining lines specify which fonts may be substituted by which fonts and the precedence for substitution.

SubstituteAll - all fonts in the list are substituted for each other. When a font is missing pdfToolbox will work down the list until it reaches the name of an available font.

Config file syntax: 



SubstituteFirst - only the first font in the list is substituted. pdfToolbox will work down the list until it reaches the name of an available font.

Config file syntax:

SubstituteFirst<tab>font to be substituted<tab>fontname...


SubstituteFirst also supports Regular Expressions for matching font names.



The above substitutes fonts whose "Fontname" includes "Regular" with Arial or Helvetica.


SubstituteFirst Regular Expressions also support backreferences.



The above substitutes fonts whose "Fontname" starts with Helvetica with Arial variants. The portion of the "Fontname" after 'Helvetica' is retained and used in the new name via the backreference: \1

The above example replaces Helvetica-Bold with Arial-Bold and Helvetica-Italic with Arial-Italic


Regular Expression introduction:

Note: Not sure about the comprehensiveness of pdfToolbox's Regular Expression support. I believe that it is fairly comprehensive and aligns with Perl Compatible Regular Expressions.


Note: the font names must match what pdfToolbox will find. The best way to ascertain that is to run a preflight on the file and copy the names off the report.



FFCore can also use pdfToolbox profiles with the Preflight component to embed fonts (and to perform other preflight checks and fixups). Using Preflight for font embedding allows use of additional options, including disabling the use of system fonts for embedding and allowing changes to the content that's evaluated when looking for fonts to embed

Screen Shot 2017-05-08 at 12.35.37 PM.png



Labels (3)
0 Kudos