IBM Content Manager OnDemand

Using custom AFP raster font files

Custom AFP raster fonts can be mapped using AFP2PDF Transform. To do this, the AFP resources, coded fonts, code pages, and character sets, must be either inline or available in the resource directories. This is the order that the transform checks for resources to map the raster fonts:

  1. The transform looks for an entry in the |afpfont.fnt file that maps the resource set. The entry can include limited wildcards: a question mark (?) can be used to represent any character in one position; an asterisk (*) can be used to indicate one or more characters. For example, the entry C?T175* can represent any of these values: C0T17500, C0T17560, and C1T17500. This is the hierarchy that is followed:
    1. If the resource is allowed and it is inline, it is used.
    2. If the resource is not found, the second character in the name is replaced with "0" and the inline resource is checked again.
    3. If the resource is not inline, a file is looked for in the resource paths (the ResourceDataPath parameter in the transform options file can be used to indicate the location of these paths; the default is the \resource subdirectory in the current working directory).
    4. If the resource is still not found, the second character in the name is replaced with "0" and the resource paths are searched again.
    5. If the resource files have an extension, it can be specified using the FontExt parameter in the transform options file (for example, "FontExt=*.240" searches for fonts with the extension ".240").
  2. If there is no entry in the |afpfont.fnt file or if the resource is not found, the icoded.fnt, cpdef.fnt, and csdef.fnt files are checked to see if the resource is to be mapped. If the resource is found, it is mapped. If Enable_Auto_Font_Image=True in the transform options file, the resources are checked as follows:
    1. If the resource is inline, it is used.
    2. If the resource is not found, the second character in the name is replaced with "0" and the inline resource is checked again.
    3. If the resource is not inline, a file is looked for in the resource paths (the ResourceDataPath parameter in the transform options file can be used to indicate the location of these paths; the default is the \resource subdirectory in the current working directory).
    4. If the resource is still not found, the second character in the name is replaced with "0" and the resource paths are searched again.
    5. If the resource files have an extension, it can be specified using the FontExt parameter in the transform options file (for example, "FontExt=*.240" searches for fonts with the extension, ".240").
  3. If the resources still have not been found, the defaults are used.
Note:
If a file is using:

Figure 7 defines raster fonts in a font mapping file. In this example, code pages T1K99MAP, T1K99MCP, and T1KNIC4 are mapped. Character sets C?CONWAY, C?K99MAP, C?K99MCP, and C?WSMITH are also mapped.

Figure 7. Font mapping file example
[CODEDFNT]
 ;Coded Font
 ;X?*
 [CODEPG]
 ;Code Page
 ;T?*
 T1K99MAP
 T1K99MCP
 T1KNIC4
 [CHARSET]
 ;Character Set
 ;C?*
 C?CONWAY
 C?K99MAP
 C?K99MCP
 C?WSMITH

The font mapping file can also be used in these situations:

Figure 8 shows entries in the transform options file that define resource paths. In this example, "c:\res1" is searched first for resources with an extension of ".240" and then "c:\res2" is searched.

Figure 8. Transform options file example
ResourceDataPath='c:\res1\;c:\res2'
 FontExt=*.240


Last updated: May 2010
(c) Copyright IBM Corporation 2010. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)