# Substitute fonts

Setting up your own 'substitute' fonts to replace those supplied in the original document is normally a job for experts, but you may avoid much of the technical detail using an EscapeE ".SUB" Font Substitute file.

 ▪ Matching font attributes to set up a Font Substitute file; renaming substitute fonts
 ▪ Choosing the substitute fonts for viewing on-screen and printing in PDF and PS formats: see Selecting substitute fonts.
 ▪ Syntax of a font substitute file describes .SUB files and their keywords.
 ▪ About Wildcards in font substitution with examples of /SUBST and /SUBSTDEF options.

Using the original PCL fonts in a PDF, for example, may not be desirable since incorporating the font in the PDF may make it quite large, particularly in the case of bitmap fonts. You may use standard Adobe fonts or any of your Windows fonts for substitution, but note that Windows fonts will only work on systems that also have these fonts. These substitutions will be used when exporting to Postscript or PCL as well as PDF.

 PCL note

When a PCL file is opened, EscapeE searches for its substitution file using the following order of priority:

 i. the file specified by the /SUBST option. If the SUBST symbol has not been set, then:
 ii. a file with the same name as the input file but with extension .SUB. If the .SUB file cannot be found:
 iii. the file specified by the SUBSTDEF symbol in the PCLVIEW section of the INI file. If this symbol has not been set, then
 iv. a file called DEFAULT.SUB in the same folder as the input file is used.

For example, if the calling line was

escapee /SUBST *.sub /SUBSTDEF c:\escapee\default.sub

or the equivalent definitions had been configured previously then if a file xxx.pcl is opened, EscapeE will try for a file xxx.sub and if that does not exist, use file c:\escapee\default.sub. Note that if the path is omitted from either specification then EscapeE will look in the folder of the PCL file. Hence the command

escapee /SUBST default.sub /SUBSTDEF c:\escapee\default.sub

would look for a file called default.sub in the folder of the PCL file, and failing that revert to the one in folder c:\escapee.

More complex possibilities include partial wild cards e.g.

/SUBST ??def.sub

which would use the first two characters of the PCL file name to construct a font substitute file name, so a file xxx.pcl would use xxdef.sub

 AFP note
 If fonts are not included in an AFP datastream, you may set up substitute TrueType fonts to be used in place of any given original coded font name. Create a file named afpsubstitutefonts.txt in the same directory as the RT.INI file using the syntax: CodedFontName,SubstituteTruetypeName,size where size is specified in units of 1/100 point. Optionally, this may be followed by: ,B for Bold or ,I for Italic. Comments must be preceded by a semicolon. For example:  X1H210AC,Arial,1000  X1H2106C,Arial,600 ;6 point  X1H410BC,Arial,1100,B ;11 point bold  C0HE09I0.T1HEL500,Arial,900,I ;9 point Italic