Specifying New Device Fonts in PCL XL Minidrivers
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 you want to support new device fonts in a PCL XL minidriver, you must create Unidrv font metrics (UFM) files for those device fonts.
A UFM file has the following format:
A UNIFM_HDR structure, which serves as a header for the UFM file
A UNIDRVINFO structure
An IFIMETRICS structure
An EXTTEXTMETRIC structure
A character width table
A correctly formatted font selection command must be placed in the correct location in the UFM file. The font selection command consists of 16 bytes for the font selection, one byte for a space character, and as many bytes as are needed to hold the digits of the symbol set number.
Following is an example of how a font selection command would appear in a UFM file. (The numbers in the second line show the position of each character in the font selection command.)
CG Omega BdIt 629
12345678901234567890
The font name and style, CG Omega BdIt (bold/italic) take up the first 16 bytes. After that, there is a single space character, which separates the font name from the symbol set number. The symbol set number, 629, takes up the last three bytes. Unidrv parses the font selection command in the UFM file and sends the font selection command and symbol set number separately.
The font name and symbol set number discussed in the previous example are two of the three attributes required for the SetFont operator, which would appear in the output data from the driver. In the following example, the FontName and SymbolSet attributes of this operator are set to the same values as in the preceding example. The third attribute, CharSize, is set to the value 100.
ubyte_array (CG Omega BdIt) FontName
real32 100 CharSize
uint16 629 SymbolSet
SetFont
For more information about the SetFont font selection command, see the PCL XL Feature Reference Protocol Class 2.0 documentation. (This resource may not be available in some languages and countries.)