Embedding fonts: Font substitution file

The Fixup "Embed missing fonts" offers the possiblity to define a "Font substitution file", which can contain one or more lines of text, defining rules of how fonts (which are not available on the respective system) shall be replaced with other fonts.

Besides other options, the "Font substitution policy" can be defined in the Fixup.

When clicking on the pull-down menu, the bottommost entry "Open folder with configuration files" opens a folder with predefined policy files. They should not be changed, but can be used as a starting point to create own substitution policies.

Syntax for font substitution files

Please use a simple text editor to edit or create the policy files and save them as UTF-8.
All values have to be tabulator-separated. Hash signs "#" at the beginning of a line means they are comments and will not be taken into account by the engine.

The following substitution modes are available:

SubstituteFirst

The first font of a list of font names is substituted by the following fonts. The order of the possible replacement fonts is regarded.
Notation:
SubstituteFirst<tab>font substituted<tab>fontname<tab>fontname<tab>fontname ...

Regular Expressions

It is possible to use RegEx in SubstituteFirst lines. Example:
SubstituteFirst   '(.*)Bold(.*)Italic'   'Arial(.*)Bold(.*)Italic'   '\1Regular'   '\1'

Any font name that uses "Bold" and "Italic" with any additional characters will be replaced by any font that uses  "Arial", "Bold" and "Italic" (with any additional characters in between of these phrases). If that cannot be found any font that has the same characters at the beginning (indicated by \1) and then "Regular" and if that is also not present any font that only has the same beginning.
Font substitution with RegEx will be used if normal substitution (without RegEx) was not successful.

Substitute All

This mode allows to define a list of fonts in which all fonts can substitute each other.
If any of the fonts of a list is missing it will be substituted with the next font in the list.
If this next font is also missing the previously listed font name will be searched.
If that is also missing, the font after the next font is tried and so on.
Notation:
SubstituteAll<tab>fontname<tab>fontname<tab>fontname ...

Regular Expressions

In SubsituteAll RegularExpressions are not supported for performance reasons.

Example

The entry below defines that Arial is substituted with Helvetica and Helvetica with Arial.
At the end of this example, there are further entries allowing more comprehensive font substitutions.
To use them the '#' at the beginning of the line needs to be removed.

SubstituteAll	Arial	ArialMT	Helvetica	Helvetica Neue	Futura	Helvetica Neue	Microsoft Sans Serif	MS PGothic	Trebuchet MS	Verdana
SubstituteAll	Arial Bold	Arial-Bold	ArialMT,Bold	Helvetica Bold	Futura-Bold	Futura Bold	Helvetica-Bold
SubstituteAll	Arial Italic	Arial-Italic	ArialMT,Italic	Helvetica Italic	Helvetica-Italic	Futura-Italic	Futura Italic	Arial Oblique	Arial-Oblique	Helvetica Oblique	Helvetica-Oblique	Futura-Oblique	Futura Oblique
SubstituteAll	Arial Bold Italic	Arial-Bold-Italic	ArialMT,BoldItalic	Helvetica Bold Italic	Futura-Bold-Italic	Futura Bold Italic	Arial Bold Oblique	Arial-Bold-Oblique	Arial-BoldOblique	Helvetica Bold Oblique	Helvetica-BoldOblique	Futura-Bold-Oblique	Futura Bold Oblique
SubstituteAll	Arial Black	Arial-Black	Helvetica Black	Helvetica-Black	Futura-Bold	Futura Bold	Arial-Bold
SubstituteAll	Arial Narrow	Helvetica Narrow
SubstituteAll	Arial Narrow Bold	Helvetica Narrow Bold	Arial Narrow Fett	Helvetica Narrow Fett
SubstituteAll	Arial Narrow Bold Italic	Helvetica Narrow Bold Italic	Arial Narrow Fett Kursiv	Helvetica Narrow Fett Kursiv
SubstituteAll	Times-Roman	Times	Times New Roman	Garamond
SubstituteAll	Times-Bold	Times-Roman Bold	Times Bold	Times New Roman Bold	Times Fett	Times New Roman Fett
SubstituteAll	Times-Italic	Times-Roman Italic	Times New Roman Italic	Times Italic	Times Kursiv	Times New Roman Kursiv
SubstituteAll	Times-Bold-Italic	Times-Roman Bold Italic	Times Bold Italic	Times New Roman Bold Italic	Times Fett Kursiv	Times New Roman Fett Kursiv
SubstituteAll	Courier	Courier New	Courier Std New	Lucida Console	MS Gothic
SubstituteAll	CourierStd-Bold	Courier Std Bold	Courier Bold	Courier-Bold	Courier New Bold	Courier New-Bold
SubstituteAll	CourierStd-Oblique	Courier Std Oblique	CourierStd-Italic	Courier Std Italic	Courier Italic	Courier-Italic	Courier New Italic	Courier New-Italic	Courier Oblique	Courier-Oblique	Courier New Oblique	Courier New-Oblique
SubstituteAll	CourierStd-BoldOblique	Courier Std Bold Oblique	Courier BoldItalic	Courier-BoldItalic	Courier New Bold Italic	Courier New-Bold-Italic	Courier BoldOblique	Courier-BoldOblique	Courier New Bold Oblique	Courier New-Bold-Oblique
#SubstituteFirst	'(.*)Regular'	Arial	Helvetica	'\1Regular'	'\1'
#SubstituteFirst	'(.*)Medium'	Arial	Helvetica	'\1Regular'	'\1'
#SubstituteFirst	'(.*)Bold'	'Arial(.*)Bold'	'Helvetica(.*)Bold'	'\1Regular'	'\1'
#SubstituteFirst	'(.*)Italic'	'Arial(.*)Italic'	'Helvetica(.*)Italic'	'\1Regular'	'\1'
#SubstituteFirst	'(.*)Black'	'Arial(.*)Black'	'Helvetica(.*)Black'	'\1Regular'	'\1'	Arial(.*)Bold'	'Helvetica(.*)Bold'
#SubstituteFirst	'(.*)Bold(.*)Italic'	'Arial(.*)Bold(.*)Italic'	'Helvetica(.*)Bold(.*)Italic'	'\1Regular'	'\1'
#SubstituteFirst	'(.*)Bold(.*)'	'Arial(.*)Bold'	'Helvetica(.*)Bold'	'\1Regular'	'\1'
#SubstituteFirst	'(.*)Italic(.*)'	'Arial(.*)Italic'	'Helvetica(.*)Italic'	'\1Regular'	'\1'
#SubstituteFirst	'(.*)'	'\1Regular'	'\1Medium'	'\1'	Arial	Helvetica 

0 Comments

Send Your Comment

E-Mail me when someone replies to this comment