Mapping fonts for AFP files

If AFP Visual Environment does not display a custom AFP font correctly in the sample AFP file, you can map the font to a comparable Java font of the same point size and style, and you can change how particular code points map to Unicode code points.

You can also change the default code page that AFP Visual Environment uses to another encoding.

When you are creating or editing index tags and you cannot read the text, you can change the code page mapping so the index value is readable. When you want to change the way the text is displayed in AFP Visual Environment, you can change the character set mapping.

AFP font mappings can be located in multiple places. AFP Visual Environment looks for font mappings in this order:

  1. Job font mappings in the AFP Visual Environment control file
  2. Installation font mappings in font-mapping files
  3. System font mappings

You cannot change system font mappings, but you can create job font mappings for an AFP file that are saved in the control file, and you can edit installation font mappings in one or more of these font-mapping files that are shipped with AFP Visual Environment:

  • Maps an AFP character set to corresponding font attributes or a AFP font global identifier (FGID) to a corresponding Java font name and style.
  • Maps an AFP coded font to an AFP character set and AFP code page.
  • Maps an AFP code page or a Java charset encoding to an AFP code page global identifier (CPGID).
  • SampleCodePointMap.cp: Maps a code point to a Unicode code point. Use this file to create a code point map file for each AFP code page that does not use standard Unicode code-point mapping. The name of the file must contain the name of the AFP code page.

You can change the default Java font that AFP Visual Environment uses by defining the font in the control file or in the font-mapping files. The default Java font, unless you change it, is an 11-point font with an EBCDIC code page.