GETFONT

Returns the AFPDS font whose local ID in the MCF record for the page matches the requested font number. This function can only be used in the PAGE section of the rule file.

Syntax

GETFONT(fontnumber)

Arguments

Argument Description Default
fontnumber Font number (local ID) specified in an MCF1 or MCF2 record. None

Results

Result Description
Return One of the following:
  • The coded font name (if present) corresponding to requested font number.
  • The code page name concatenated with the character set (typeface) corresponding to requested font number.
  • Null if function fails.
%%RC One of the following:
0 The function was successful.
-1 The print stream is not AFPDS
-2 The function was not called from the PAGE section of the rule file. GETFONT can only be used in the PAGE Section of the rule file.
-3 The font number does not exist on the page.
%%RM A null string (‘’).
%%RV Always set to 0.

Examples

Function Call Return %%RC
GETFONT(3) X0D0GT12 0
GETFONT(5) T1EX0000CDD0GT12 0
GETFONT(300) Null -3