CDEFNT (Coded Font Name) keyword in printer files

Use this field- or record-level keyword to specify the coded font for printing a named or constant field or fields within a record.

The format of the keyword is:
  CDEFNT([library-name/ | &library-name-field/]
         coded-font-name | &coded-font-name-field
         [(*POINTSIZE height-value | &height-value-field 
         width-value | &width-value-field)])

The coded-font-name parameter is required and can be up to 8 characters in length.

Use the optional library-name parameter to further qualify the coded font name. If you do not specify a library name, *LIBL is used to search for the coded font name at print time. 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 coded font names, you can use the Work with Font Resources (WRKFNTRSC) command and specify coded fonts. The IBM-supplied coded font names all start with the characters X0.

Using the library-name parameter allows the coded font name to be located more rapidly. However, the library list is still used to locate the character set and code page defined by the coded font name.

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

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

When you specify the coded-font-name as a program-to-system field, the field must exist in the same record format as the CDEFNT 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 in 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:

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 CDEFNT 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. You must specify a point size for outline coded fonts. However, some outline coded fonts have a default point size specified with them. If you do not specify a point size for these coded fonts, then the default point size specified with the coded font is used.

    If you do not specify a point size for an outline coded font that does not contain a default point size, 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 coded font value is validated at print time. An error message is issued if it is not valid or when the resource cannot be located.

Specify DEVTYPE(*AFPDS) on the CRTPRTF command when CDEFNT 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.

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

Option indicators are valid for this keyword.

Example

The following example shows how to specify the CDEFNT keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A*
     A          R REC1
     A            FLD1           8A    10 13CDEFNT(QFNTCPL/X0BRTR)
     A*
     A            FLD2          10A    11 13CDEFNT(QFNTCPL/X0BRTP +
     A                                      (*POINTSIZE 10.1))
     A            FLD3          10A    20 13CDEFNT(QFNTCPL/X0BRTP +
     A                                      (*POINTSIZE 5.0 3.0))

FLD1 specifies coded font X0BRTR, which is found in library QFNTCPL. FLD2 specifies font X0BRTP from library QFNTCPL and a point size of 10.1 for that field. FLD3 specifies font X0BRTP with a vertical point size of 5.0 and a horizontal point size of 3.0.