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

Font substitution when Embedding fonts

UPDATE - The Optimize component now includes the option to use a pdfToolbox font substitution policy file.


The font embedding controls in FFCore's Optimize component are fairly simple:

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

When embedding fonts, FFCore will search for fonts installed in windows.

Similarly, FFCore will substitute Helvetica, Time and Courier fonts with similar ones and vice versa. 

 

However, using Preflight with pdfToolbox profiles provides a much more granular level of control over font substitution:

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

 

When a pdfToolbox profile is exported, the selected font substitution policy is embedded in the profile and will be used instead of the default font substitution policy included in FFCore. This means each Preflight preset can have it's own font substitution policy that FFCore will use when embedding fonts.

 

Although pdfToolbox comes with 3 predefined font substitution policies, additional ones can be created by duplicating an existing policy file and editing it (you will have to restart acrobat to see the changes). 

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

 

The prefix on the filname controls the display order of the font policies within pdfToolbox. I would also ensure there are no spaces in any new filenames.

 

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 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: 

SubstituteAll<tab>fontname<tab>fontname<tab>fontname...

 

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.

Example:

SubstituteFirst<tab>'(.*)Regular'<tab>Arial<tab>Helvetica

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

 

SubstituteFirst Regular Expressions also support backreferences.

Example:

SubstituteFirst<tab>'Helvetica(.*)'<tab>'Arial\1'

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: http://www.regular-expressions.info/quickstart.html

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.

 

 

Labels (3)
0 Kudos
2 Replies
ChrisBeech
Premier Partner

Re: Font substitution when Embedding fonts

Looking through the settings I have available within Acrobat for doing this the only option on the embed fonts fixup is to perform the action for visible or invisible text.

 

Am I correct in saying that the options detailed here and the ability to create the configurations are good if I purchase the commercial pdfToolbox software exclusively?

 

0 Kudos
Account Deactivated

Re: Font substitution when Embedding fonts

if you know how to define the font substitution config files then you can create them yourself in a text editor. 

However, using pdfToolbox will let you build and test them more easily since you can iterate within acrobat and get it working as you want before uploading to FFC. 

 

Another option is to use AcrobatDC preflight. That uses a newer version of pdfToolbox vs acrobat XI.

 

One thing to note - if you purchase pdfToolbox, then you will need to ensure you get a v7 download as v8 was not ready in time to be included the current version of FFC. You should also ensure that you can upgrade to pdfToolbox v8 so you can take advantage of new functionality once FFC picks up the latest version of the preflight library. 

0 Kudos