Printer font considerations
You might want to take these into consideration when deciding which font to use for printing.
Characters per inch versus font
Most SCS printers use the CPI parameter on the Create Printer File (CRTPRTF), Change Printer File (CHGPRTF), or Override with Printer File (OVRPRTF) command to determine the pitch (characters per inch) of the printed output. However, the 3812, 3816, 5219, and all IPDS printers use the FONT parameter to select both an implied pitch (characters per inch) and a font style. For these printers, the CPI parameter is ignored except when the page size (PAGESIZE) is converted from *UOM to *ROWCOL. Conversely, the FONT parameter is ignored on printers where it is not applicable.
To provide flexibility in your print job, the pitch of the font identifier (FONT parameter) should match, where possible, the value specified on the CPI parameter. By setting the FONT parameter to FONT(*CPI), the system selects a font of the same pitch as the CPI parameter value. A print job intended for a printer that supports fonts can then be printed on another printer without significant changes in the appearance of the printed output. For example, a printer file that has FONT(222), Gothic font with 15 pitch, and CPI(15) can print on a 3812, 4224, or 5219 Printer (that uses the FONT parameter), or on a 4214, 4230, 4234, 4247, 5224, or 5225 Printer (that supports 15 characters per inch). If this print job is directed to a printer that supports only 10 characters per inch, printer file redirection is used. For more information about redirecting spooled files to SCS printers, see Redirecting output considerations.
When you use an SCS externally described printer file, the value specified in the CPI parameter is normally used to position fields on the printed page. For example, if a printer file has 10 characters per inch specified and FIELDA is specified to start in column 51, then there are 50 blanks to the left of FIELDA (50 blanks at 10 characters per inch is 5 inches).
For the IPDS externally described printer files, the pitch implied by the FONT parameter on the CRTPRTF, CHGPRTF, and OVRPRTF commands is used instead of the CPI parameter or the value of the FONT DDS keyword to determine the starting column of fields on a printed page. In the preceding example, if CPI(10) and FONT(087) are specified and the specified printer supports fonts, FIELDA specified to start in column 51 is 50 blanks at 12 characters per inch (implied CPI value for font 087) or 50/12 inches, which is 4.167 inches from the left margin of the paper. The default for FONT is (*CPI). When *CPI is selected, the IBM® i licensed program automatically selects a font of the pitch specified on the CPI parameter.
Proportionally spaced and typographic fonts
All IPDS printers support proportionally spaced fonts. For proportionally spaced fonts, characters vary in width depending on the character being printed (for example, i is a narrow character, and W is a wide character). See AFP compatibility fonts and font substitution topic for a list of all supported fonts. The implied characters-per-inch column in this table lists the value of the width of a blank character for the font selected.
When using proportionally spaced fonts, fold and truncation (FOLD parameter) might not work as intended. This is because the system does not keep track of the width of each individual character.
These printers also support typographic fonts: 3812, 3130, 3160, 3816, 3820, 3825, 3827, 3829, 3831, 3835, 3900, 3916, 3930, 3935, 4028, 4312, 4317, 4324, InfoPrint 3000, and InfoPrint 4000. You can specify a typographic font by indicating the point size (height of font). A point measures 1/72 of an inch. An 8-point font is 1/9 of an inch high, and a 24-point font is 1/3 of an inch high. When you use fonts that contain tall characters, it might be necessary to double or triple space to prevent lines from overlapping when the page is being printed.
Because proportionally spaced and typographic fonts have characters of variable widths, be careful with the use of underlining and overstriking. The highlighting or underlining method of printing a line with a Space After (SPACEA) value of 0 followed by printing another line might not work correctly.
In the previous example, if CPI(10) and FONT(1351) are specified and the printer used is a 3812 Printer, then FIELDA specified to start in column 51 is 50 blanks at 17.14 characters per inch (implied CPI value for font 1351) or 50/17.14 inches, which is 2.975 inches from the left margin of the paper.
In this example, FIELDA starts 2.975 inches from the left margin of the paper, regardless of how many fields were defined to its left. When you use an increment value (+n) instead of a column number (positions 42 through 44 in data description specifications), fields are positioned in the same way for proportionally spaced fonts as they are for fixed pitch fonts. That is, the field is positioned based on the width of the blank for the specified font. The following example illustrates that using either absolute column numbers or relative increment numbers (+n) supplies the same result.
If the font identifier specified on the FONT parameter is not supported by the printer being used, printer data management selects a substitute font that is supported by the printer (if possible). A substitute font is at the same pitch or a higher pitch whenever possible to ensure that as much data as possible fits on the printed page. For a complete list of fonts supported and the substitute font selected for each printer that supports the FONT parameter, see AFP compatibility fonts and font substitution topic. If a substitute font cannot be used, spool redirection is done. An inquiry message is sent to the message queue associated with the device or printer writer. The inquiry message gives you the option of holding or printing the file. If the print option is used, then the spooled file is reformatted with the print attributes of file QPSPLPRT. Output might not look as intended. See the printer's reference manual for information about what conditions cause the substitute font not to be used.
For the SCS 3812, 3816 and 5219 printers, font substitution can be made only at the file level. For font changes made in the document, font substitution is not done. In this case, spool redirection (described previously) is used.
IPDS printer FONT parameter considerations
When a printer has AFP(*YES) specified in the printer device description and the DEVTYPE specified for the printer file being used is *AFPDS, the FNTCHRSET, CDEPGE, and CDEFNT printer file parameters can be used to select a font resource to be downloaded to the printer. This applies to all IPDS printers except the 4224, 4230, 4234, 4247, and 64xx. If these parameters are not used, then the value specified in the FONT printer file parameter is used.
When FONT(*DEVD) is specified on the CRTPRTF, CHGPRTF, and OVRPRTF commands, the following limitations are imposed:
- Bar codes are positioned on the page assuming that a 10-pitch font is specified in the device description.
- When you use a combination of bar code (BARCODE), page rotate from a printer file or DDS (PAGRTT), and character size (CHRSIZ) parameters in an externally described printer file, unpredictable results might occur. This is because the printer device FONT parameter value is not known when the spooled file is created.
- The data stream created might be longer than if a specific font were selected. This means the spooled file might take more storage in the output queue. Fields are positioned with spaces (hex 40) between them. Commands are not used to specify the location where a field is to be placed.
- If a proportionally spaced font is used with a field in the file, any following fields might not be positioned in the column used if a specific font were specified at the file level. This is caused by the variable width of the characters in the proportionally spaced font, which are followed by spaces (hex 40) to position the next field.
- If the value of the FONT parameter on the printer device description is *DEVD or 0, font 011 is selected.
The maximum number of fonts that can be sent to a printer file is 48. When more than 48 fonts are requested, an error message is sent.