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).

Figure of example 1

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.

Proportionally spaced and typographic fonts can be specified on the CRTPRTF, CHGPRTF, or OVRPRTF command when you use an externally described printer file. The point size can be specified for typographic fonts. The point size is ignored for fonts that are not typographic. As previously noted, the implied characters-per-inch value of the font identifier specified on the FONT parameter is used to position fields on a printed page. The same rule for positioning fields on a printed page is used with proportionally spaced and typographic fonts. The width of a blank character is used to position fields on a page. Output should be tested to see that using externally described printer files with proportionally spaced fonts produces satisfactory results because overprinting and gaps can occur in the output. Because of slight adjustments made for position checks, it is suggested not to print on line 1 when specifying 8 or 9 LPI on an IPDS printer.
Note: The amount of printed space for a field varies depending on which characters are in a field. Enough space should be left between fields to allow for the widest characters (uppercase characters) expected in that field.

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.

Figure of example 2

Font substitution

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.

A slight adjustment is sometimes made to the first or last line of a page when the lines per inch (LPI) parameter value is greater than 6. This adjustment prevents IPDS printers from reporting position check errors due to part of a character printing off the top or bottom of the page. For the first line on a page, a slight downward adjustment is made. For the last line on a page, a slight upward adjustment is made. This adjustment is about 1/72 of an inch. No other lines on the page are adjusted. This adjustment is made only for spooled files with DEVTYPE of *SCS or *IPDS when printed on IPDS-capable printers. It is suggested that the first line on a page not be used for printing if the lines per inch (LPI) parameter on the printer file is 8 or greater.
Note: If an optical character recognition (OCR) font is specified with a non-OCR code page, the code page is changed to an OCR code page. If a non-OCR font is specified with an OCR code page, the font is changed to an OCR font.