Varying Fonts on a Page
This example illustrates a simple font variation within a printout. The task is to print a line-data file having the first line of each page in bold-faced type and the rest in standard type. This requires controls for two fonts in the page definition.
The commands to select a single font for the page, as shown in Figure Data File Printed Using a Single Font, are as follows:
The FONT command contains two names: the local (STANDARD) name and the user-access (M101) name for the selected font.
PAGEDEF ABCD ; FONT STANDARD M101; FONT BOLDFACE M102; LAYOUT 'abc' FONT BOLDFACE NEWPAGE; LAYOUT 'def' FONT STANDARD NEWPAGE; LAYOUT 'ghi' FONT STANDARD;
The following example shows line data using a single font:
Line Data for Single Font Example
def Record 1 ghi Record 2 ghi Record 3 ghi Record 4 ghi Record 5 ghi Record 6 def Record 7 ghi Record 8 ghi Record 9 def Record 10 ghi Record 11 ghi Record 12 ghi Record 13
Data File Printed Using a Single Font
This command stream works on the principle that each line of output whose font you want to change from the font in the previous line must be controlled by a separate LAYOUT command. The FONT subcommand of the LAYOUT command names the font desired for that line. In this example, two LAYOUT commands are used because one font change and two fonts are intended for the output. The user-access font names appear in the two FONT commands immediately below the PAGEDEF command and, optionally, a local name. M101 and M102 in the example are user-access names; BOLDFACE is a local name. Use the local name in the FONT subcommand of LAYOUT if it is included in the corresponding FONT command, as is done for the first LAYOUT command.
Line Data for Two Font Example
abc Record 1 ghi Record 2 ghi Record 3 ghi Record 4 ghi Record 5 ghi Record 6 abc Record 7 ghi Record 8 ghi Record 9 abc Record 10 ghi Record 11 ghi Record 12 ghi Record 13
Font Change Using FONT Commands and Subcommands
Changing fonts field by field is similar to changing them in layouts. You map each field individually with a FIELD command; include a FONT subcommand in the FIELD command. If a font change is desired for a field, as with the FONT subcommand of a LAYOUT command, the font must be previously named in a FONT command.