Using raster fonts

The afp2pdf transform supports the use of raster fonts. Raster fonts contain a set of bitmaps that represent the character shapes for a certain font.

When you use raster fonts to create a PDF file, the afp2pdf transform uses the information received from the FOCA structure fields (character glyphs and widths) to create an Adobe PDF Type3 font. This Adobe PDF Type3 font contains an Encoding dictionary. The text written with this Type3 font is searchable.

Raster fonts can be embedded as internal resources, or they can be referenced as external resources and mapped. In either case, the font may be defined through the coded font name or with a character set/code page pair.

The afp2pdf transform parses and extracts the raster font character set information it needs when outputting the text and saves the information in these files:

PFM file
Contains general information about the raster font obtained from the character set. This file can be external, saved on the hard drive, or kept in memory.
PFB file
Contains the data about the raster font. It must be extracted and kept on the hard drive or in memory.

For both cases (embedded or external raster fonts), the PFM and PFB files are embedded within the PDF document, and the text is written in the PDF file using the embedded PFM and PFB information.

The afp2pdf transformer creates a temporary .cnv file to be used by ICU for the conversion of text from Unicode to the specified codepage and for the conversion of text from the code page to Unicode.