Coded fonts

A coded font is the pairing of a font character set and a code page. Coded fonts allow users to specify a font character set and a code page with one value specified on the printer file.

Coded fonts available on the IBM® i platform can be viewed by using the Work with Font Resources (WRKFNTRSC) command.

Coded font names are read by the system and then translated to a font character set and a code page. These two elements are then sent to the printer.

Naming convention for coded fonts

Unlike other uniformly spaced and mixed-pitch font components, coded font names are generally shortened by excluding the origin and reserved characters (the first two characters of their name). This is necessary because some Advanced Function Presentation (AFP) licensed programs accept only 6 characters for coded font names. However, some applications can use coded fonts named with 6 or 8 characters.

Coded font names on the IBM i platform are 6 or 8 characters long. Each character or group of characters tells something about the coded font.

For example, in the coded font name X0GT10:

X0
The X0 means that this object is a coded font.
XZ
The XZ means that this object is an outline coded font.
GT10
The GT10 indicates the type family, typeface, and pitch for uniformly spaced and mixed-pitch fonts. In this example the GT10 means that this font character set is a Gothic Text style and the characters are 10 pitch or 10 characters per inch.

To find out which font character set and code page make up a coded font name, use the Work with Font Resources (WRKFNTRSC) command. This command allows you to specify the font resource to be worked with, the library it is in, and the attribute (coded font).

Additional naming conventions have been adopted to more explicitly name the code page used with a character set.

For more information about coded fonts, see the manual About Type: IBM's Technical Reference for 240-Pel Digitized Type, GS544-3516.

Selecting coded fonts

A coded font is selected by specifying the coded font name as the value on the coded font (CDEFNT) parameter of the printer file.

You can use the Work with Font Resources (WRKFNTRSC) command to view the coded fonts that are available on the system.

Substituting coded fonts

No substitution of coded fonts takes place on the IBM i platform. If the coded font is not available, the document will not print.

You can use the MAPIGCFNT parameter on the CRTPSFCFG and CHGPSFCFG commands to specify that coded font names of the form X0nnnnnn should be mapped to XZnnnnnn. If the XZnnnnnn coded font is found it is used; if it is not found, the X0nnnnnn coded font will be used.