Reporting : Native reporting system : Reporting system command language : FONT command
  
FONT command
Note Do not confuse the FONT command with the FONT subcommand (see FONT command and subcommand overview).
Description
Use the FONT command to name a font and define its typeface characteristics such as, size and style. You select the font name (also called the font-identifier) and then define how it should look. Once defined, a font can be applied to global or local report blocks by replacing the font-identifier of the FONT subcommand in a FIELD, SETTING or SELECT statement with the appropriate font name.
Font definitions reduce the amount of typing required to specify the same font in more than one report and encourage you to establish standards and recognizable formats.
Notes
1 The FIELD command is valid in the global definition block or the local definition block of the Report Definition file. If you place the command in the global report block, it affects every report in the Report Definition file. If you place the command in the local report block, it affects only that report.
2 The font characteristics are used when the report is printed. The FONT command does not effect report information displayed in draft mode.
FONT command structure
The structure of the FONT command is:
FONT font-identifier { subcommand subcommand-identifier }
or
FONT font-identifier {
subcommand subcommand-identifier
}
FONT characteristics
Use these FONT commands and subcommand statements to assign a name and characteristics for a font. These FONT subcommands BOLD, ITALIC, UNDERLINE, and STRIKEOUT stand-alone and do not require subcommand-identifiers.
NAME printer-font-name (see NAME)
Assigns a font name.
HEIGHT numeric-points (see HEIGHT)
Defines font point size.
BOLD (see BOLD, ITALIC, UNDERLINE, and STRIKEOUT)
Makes text bold.
ITALIC (see BOLD, ITALIC, UNDERLINE, and STRIKEOUT)
Makes text italics.
STRIKEOUT (see BOLD, ITALIC, UNDERLINE, and STRIKEOUT)
Draws a line through text.
UNDERLINE (see BOLD, ITALIC, UNDERLINE, and STRIKEOUT)
Draws a line under text.
NAME
The NAME subcommand is followed by the actual font name (for example, Helv or Courier), as it appears in the printing or text setting dialogs in System Architect, or in the Microsoft Windows Control Panel. For example:
FONT Default { NAME Helv HEIGHT 12 }
Note printer-font-name (Helv HEIGHT 12 in the example above) must be a valid font name that is currently available by the default printer driver.
HEIGHT
The HEIGHT subcommand is followed by a numeric value with up to one decimal place. The value for HEIGHT is in points; a point is a typesetting measurement.
BOLD, ITALIC, UNDERLINE, and STRIKEOUT
BOLD, ITALIC, UNDERLINE, and STRIKEOUT are style specifications. More than one style specification may be used simultaneously. The style subcommands are not followed by identifiers. For example:
FONT Header { NAME Helv HEIGHT 12 BOLD ITALIC }
Rules for using the FONT command
To create a correct FONT command statement (including subcommands and subcommand-qualifiers, follow these rules:
1 Enclose the list of subcommands and their respective subcommand-identifiers, between curly braces.
2 Separate the FONT command, font-identifier, subcommand, subcommand-identifier, and curly braces by white space.
3 Enclose the font-identifier and subcommand-identifier in quotes if they contain embedded white spaces.
4 Use only those fonts understood by Microsoft Windows, and that are available to the Windows-defined printers in your reports.
5 The FONT command is valid in the global or local definition blocks of the Report Definition file. If you place the command in the global report block, it affects every report in the Report Definition file. If you place the command in the local report block, it affects only that report.
6 Pay attention to upper and lower case letters when specifying a font name because some printer interfaces (for example, PostScript) use case-sensitive font names.
7 Use meaningful words, such as Header and Script to name your fonts. The font name is entirely user-defined so you could name a font Project-A or Font1, Font2, and so on, if you want.
Examples – FONT command
Example 1
Suppose you want to standardize column headings in all your project reports. To do this you may use this command to specify “for the font named ColumnHead, use 10 point italicized helvetica when printing”.
FONT "ColumnHead" {NAME "Helvetica" HEIGHT 10 ITALIC }
SELECT Name FONT "ColumnHead"
Note The SELECT command employs the column heading font defined in the FONT command above it.
Example 2
To specify how the standard report header and footer appear when printed, you could use these command statements to specify “define a font named HeaderFont as 12 point bold, underlined Arial, and define a font named FooterFont, as 8 point bold Times New Roman when printing”.
FONT "HeaderFont" { NAME "Arial" HEIGHT 12 BOLD UNDERLINE }
FONT "FooterFont" { NAME "Times New Roman" HEIGHT 8 BOLD }
SETTING { HEADERFONT "HeaderFont" }
SETTING { FOOTERFONT "FooterFont" }
Note The SETTING commands employ the header and footer fonts defined in the FONT commands above them.
Parent topic
Reporting system command language