AFP > Fonts and code pages > Mapping fonts and code pages

Mapping fonts and code pages
When using external font and code page resources, i.e. when running the AFP driver in Include or Reference mode, you must make sure the resource names in the AFP data stream file are the same as the names of the external resources. You must therefore map the fonts and code pages used in PageOUT to the corresponding external resources. To do this, you edit the AFP driver file afp2wfnt.map using the Device Tool. You can also use the afp2wfnt.map file to specify options for a specific font or code page. See the Device driver tools documentation for information on how to edit driver files.
The settings in the afp2wfnt.map file override the corresponding AFP driver GUI settings for fonts and code pages. A standard entry for a font has the following format in the afp2wfnt.map file:
Font "TTF_name"
ReadFont "TTF_file" SelectPrefix "TTF_name" Codepage "Source_CP"
Select "AFP_font" Codepage "AFP_CP"
Example 3
Font "Arial"
ReadFont "ARIAL.TTF" SelectPrefix "Arial" Codepage "Ansi"
Select "CZH200" Codepage "T1000870"
 
 
TTF_name
The original TrueType font used in PageOUT. The name must contain all used flags, e.g. bold or italic. You must use underscores as separators. For example Arial_bold_italic
TTF_file
AFP_font
Source_CP
AFP_CP
-Technology[Technology_font]
The font technology to use to generate font resources. You can specify the following Technology_font options:
See Generating font resources for more information about these options.
-Technology[Technology_CP]
The code page technology to use to generate code page resources. You can specify the following Technology_CP options:
See Generating code page resources for more information about these options.
-mode
See Modes for managing AFP resources for more information about these options.
Location_font
If mode is INCLUDE, the resource will be retrieved from this location. If mode is EXPORT, the resource will be exported to this location.
Location_CP
If mode is INCLUDE, the resource is retrieved from this location. If mode is EXPORT, the resource is exported to this location.
-SYSCP[System_CP]
System code page to use for a font, where System_CP is the StreamServe name of the code page to use. For example:
-SYSCP[ISO 8859-1]
Mode
To specify whether to export, include, embed, or reference a specific font or code page resource, you must add the mode parameter to the Select row.
Example 4
Select "CZH200 -EMBED" Codepage "T1000870 -EMBED"
 
Export/Include path
To be able to export or include a font or code page resource, you must add the Location_font and Location_CP parameters to the Select row.
Example 5
Select "CZH200 -INCLUDE Data\Fonts\*.OLN" Codepage "T1000870 
-INCLUDE Data\Fonts\*."
 
Font sizes for raster fonts
You can specify which raster font to use for a specific font size.
Example 6
Font "Arial"
ReadFont "ARIAL.TTF" SelectPrefix "Arial" Codepage "Ansi"
Size 7 Select "COH20080"
Size 8 Select "COH20080 -INCLUDE data\fonts\*.300
Size 9 Select "COH20090.300"
Size 10 Select "COH20000.300"
 
Font technology
You can use the parameter -Technology [Technology_font] to specify which technology to use when generating a specific font.
Example 7
Font "Arial"
ReadFont "ARIAL.TTF" SelectPrefix "Arial" Codepage "Ansi"
Select "COH20000 -EXPORT -Technology [RASTER] data\fonts\*.300"
Font "Times_New_Roman"
ReadFont "TIMES.TTF" SelectPrefix "Times New Roman" Codepage "Ansi"
Select "CZN200 -EXPORT -Technology [CID] data\fonts\*.OLN"
 
System code page
You can use the parameter -SYSCP[System_CP] to specify a specific system code page for a font. This will override the default system code page specified for the output connector.
Example 8
Font "MS_Mincho"
ReadFont "MSMINCHO.TTF" SelectPrefix "MS_Mincho" Codepage "Ansi"
Select "CZM001" Codepage "T1000950 -SYSCP[BIG5]"
 
OpenText StreamServe 5.6 Updated: 2013-03-01