Hardware-resident fonts

Important

The modern print platform is Windows' preferred means of communicating with printers. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.

For more information, see Modern print platform and the Print support app design guide.

If your printer contains hardware-resident fonts, you must provide specifications of font metrics for these fonts in .ufm or .ifi files.

Each hardware resident font is described in a separate .ufm or .ifi file. To make these files available to Unidrv, do the following steps:

  • In the printer's resource DLL, specify .ufm files by using the RC_UFM resource type, and specify .ifi files by using the RC_FONT resource type.

  • In the printer's GPD file, use the *ResourceDLL attribute to specify the resource DLL's name.

  • In the printer's GPD file, use a *DeviceFonts entry to specify the resource identifiers associated with the RC_UFM or RC_FONT entries in the resource DLL.

The format of the *DeviceFonts entry is as follows:

*DeviceFonts: LIST (FontResourceID, FontResourceID, ...)

where FontResourceID is the RC_UFM resource identifier associated with a .ufm file, or the RC_FONT resource identifier associated with an .ifi file.

Following is an example:

*% Assume that RC_FONT_xxx ids are references to 
*% value macros defined by the GPD file creator.
*DeviceFonts: LIST(=RC_FONT_COURIER10, =RC_FONT_ARIALR,
+                  =RC_FONT_ARIALI, =RC_FONT_ARIALB, 
+                  =RC_FONT_ARIALBI, =RC_FONT_TIMESNRR,
+                  =RC_FONT_TIMESNRI, =RC_FONT_TIMESNRB,
+                  =RC_FONT_TIMESNRBI)

You can include several *DeviceFonts entries in Unidrv minidrivers. The GPD parser concatenates multiple entries and makes all listed fonts available for all configurations of the printer's features. If you need to specify that some fonts are only available with certain configurations, you can include *DeviceFonts entries within conditional statements.