5.6.7 Setting Up PFM Files for Resident and Cartridge Fonts

It is possible to build special PFM files for printer-resident and cartridge fonts. These fonts should be set up as permanently downloaded fonts in the WIN.INI file or collected into a cartridge PCM file. The special PFM files contain the escape sequences that the driver will send to the printer to use the fonts. Font or printer vendors will most likely build the PFM and PCM files.

In short, to set up cartridge and printer-resident fonts, the developer should do the following:

1.Build special PFM files.

2.If appropriate, combine PFMs into a PCM using the PFM Editor.

3.Make a special FINSTALL.DIR file for loading PFM-only fonts or PCM files.

In addition to the structures described for the PFM files, the driver has a driver-specific data structure that must be added to the file. The PFMEXTENSION structure contains a dfDriverInfo member. This member is a file offset to the driver-specific structure. For the PCL driver, the driver-specific structure is the DRIVERINFO structure.

The value of the members in the DRIVERINFO structure should be filled in as follows.

Member Value

epEscape An offset from the top of the file to the escape string that the driver should send to the printer to call the font.
epMemUsage An approximation of the printer memory used by the font.
epSize Size of (DRIVERINFO).
epVersion 1.
firstchar of xtbl (BYTE)0.
lastchar of xtbl (BYTE)0.
len of xtbl 0.
offset of xtbl (long)0.
symbolSet of xtbl epsymGENERIC7 for 7-bit fonts and epsymGENERIC8 for 8-bit fonts.

In addition, the escape string for calling the fonts must be written to the PFM file. The driver will use the escape string pointed to by epEscape to select the font. Once the PFM and PCM files are built, you must make an FINSTALL.DIR file.

In PFM files, the absence of the downloadable font file is indicated by two commas in the font string, as in the following example:

"Acme Ace 12pt"=PL, , CPY_ACE.PFM

The installer loads these fonts as permanently downloadable soft fonts. This has one side effect. When the user quits the installer, it will prompt for download options. Because the installer thinks the fonts are permanent soft fonts, it will try to download them to the printer. However, it will not find the permanent font files because they do not exist. Therefore, the installer will simply ignore the files and not make a download batch file or open a print job. However, if these fonts are mixed in with other “real” permanent soft fonts, then the installer will correctly download those fonts.

If the intended printer is a standard HP LaserJet, the driver will not load soft font PFM files. The driver will not load the PFM files when the intended printer cannot handle soft fonts. However, the user may instruct the driver to load cartridge font (PCM) information to gain access to the cartridge font information. To override the soft font restrictions, you can place the following setting in the driver-specific section of the WIN.INI file:

options=7

This setting instructs the driver to load soft font information regardless of the printer's abilities. However, this is not recommended.