FNTCHRSET (Font Character Set) keyword in printer files

You use this file-level, record-level, or field-level keyword to specify the font for printing a named or constant field within a record.

The format of the keyword is:

  FNTCHRSET([library-name/ | &library-name-field/]
        font-character-set | &font-character-set-field
        [library-name/ | &library-name-field/]
        code-page | &code-page-field
        [(*POINTSIZE height-value | &height-value-field
        width-value | &width-value-field)])

When a program-to-system field is described below for a FNTCHRSET parameter, the program-to-system field is allowed only when the keyword is used at the record or field level.

The font-character-set and code-page parameters are required. Both can be up to eight characters long.

Use the optional library-name parameter to further qualify the font character set or code page. If library-name is not specified, *LIBL is used to search for the font character set and code page. If *LIBL is used, the system-supplied font libraries are added to the library list when searching for the requested font. To view the IBM-supplied font character set names or code page names, you can use the Work with Font Resources (WRKFNTRSC) command and specify font character sets or code pages. The IBM-supplied font character set names all start with the characters C0 and the IBM-supplied code page names all start with T1.

You can specify the library-name and font-character-set as constants, as program-to-system fields, or as a combination of both, as shown in the following examples:

  • [library-name/]font-character-set...
  • [library-name/]&field1
  • [&field2/]font-character-set...

When you specify the library-name as a program-to-system field, the field must exist in the same record format as the FNTCHRSET keyword. It must be defined as length of 10, data type A (character), and usage P (program-to-system).

When you specify the font-character-set as a program-to-system field, the field must exist in the same record format as the FNTCHRSET keyword. It must be defined as length of 8, data type A (character), and usage P (program-to-system).

You can specify the library-name and code-page as constants, as program-to-system fields, or as a combination of both, as shown in the following examples:

  • [library-name/]code-page...
  • [library-name/]&field1
  • [&field2/]code-page...

When you specify the library-name as a program-to-system field, the field must exist in the same record format as the FNTCHRSET keyword. It must be defined as length of 10, data type A (character), and usage P (program-to-system).

When you specify the code-page as a program-to-system field, the field must exist in the same record format as the FNTCHRSET keyword. It must be defined as length of 8, data type A (character), and usage P (program-to-system).

Note: If an application uses private resources (for example, fonts, page segments, overlays, or GDF files not distributed with the system), be aware of the following information. When referencing these resources, if you specify *LIBL or you do not specify a library name, the resources must be available through the library list used by the application creating the spooled file.

Use the optional point-size parameter to further define a numeric font that specifies a point size. Specify the point-size parameter as an expression of the following form:

(*POINTSIZE height-value width-value)

The height-value specifies the point size for the height of the font. The width-value specifies the point size for the width of the font. If the font is to be uniformly scaled (where the height and width are the same), then you can specify only the height-value. You cannot specify the width-value without the height-value. The valid values for this parameter are 0.1 through 999.9.

You can specify the point-size height and point-size width as constants, as program-to-system fields, or as a combination of both, as shown in the following examples:

  • [(*POINTSIZE height-value &field1)]
  • [(*POINTSIZE &field2 width-value)]

When you specify the point-size height-value or width-value as a program-to-system field, the fields must exist in the same record format as the FNTCHRSET keyword. They must be defined as length 4 with 1 decimal position, data type S, and usage P (program-to-system).

Notes:
  1. For raster fonts, Print Services Facility™ (PSF) ignores the point size. PSF does not do any validation at spool intercept time, and it does not issue any error messages.
  2. If you do not specify a point size for an outline font, then PSF cannot print the spooled file. The spooled file is held at print writer time. PSF does not do any validation at spool intercept time.

The font character set and code page values are validated at print time. An error message is issued if they are not valid.

Note: When a printer file is created and a character set and code page are specified for the font character set (FNTCHRSET) parameter, column spacing is done using this printer file-level parameter. Any fonts or code pages specified in the FNTCHRSET keyword are ignored and the font and code page specified in the printer file parameter FNTCHRSET is used.

Specify DEVTYPE(*AFPDS) on the CRTPRTF command when FNTCHRSET is specified in the file. If DEVTYPE is changed to anything other than *AFPDS, the keyword is ignored and a warning message is issued at print time.

FNTCHRSET cannot be specified at the same level as the FONT and CDEFNT keywords.

Option indicators are valid for this keyword.

Example

The following example shows how to specify the FNTCHRSET keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A*
     A          R REC1
     A            FLD1A         14A     3  8FNTCHRSET(C0S0CE12 T1L0PCHN)
     A*
     A            FLD2A         10A     5  8FNTCHRSET(USERLIB/FNTCHR +
     A                                      USERLIB/CODEPG1 +
     A                                      (*POINTSIZE 99.9))
     A*
     A            FLD3A         10A     5  8FNTCHRSET(FNTCHR CODEPG1 +
     A                                      (*POINTSIZE 5.0 3.0))

FLD1A specifies font character set C0S0CE12 and code page T1L0PCHN. *LIBL is used to search for the font character set and code page. FLD2A specifies the font character set FNTCHR, which exists in library USERLIB, and code page CODEPG1, which exists in library USERLIB. FLD2A prints with a point size of 99.9. FLD3A specifies font character set FNTCHR and code page CODEPG1, with a vertical point size of 5.0 and a horizontal point size of 3.0.