Reporting > Native reporting system > Reporting system command language > FONT command
  
FONT command
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. After a font has been defined, it 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.
Do not confuse the FONT command with the FONT subcommand (see FONT command and subcommand overview).
Notes
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.
The font characteristics are used when the report is printed. The FONT command does not effect report information displayed in draft mode.
FONT syntax
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.
NAME printer-font-name
Assigns a font 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 }
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 numeric-points
Defines font point size.
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.
BOLD makes text bold.
ITALIC makes text italic.
UNDERLINE draws a line under the text.
STRIKEOUT draws a line through the text.
More than one style specification can 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:
Enclose the list of subcommands and their respective subcommand-identifiers, between { } braces.
Separate the FONT command, font-identifier, subcommand, subcommand-identifier, and { } by white space.
If the font-identifier and subcommand-identifier contain spaces, enclose them in double quotation marks.
Use only those fonts understood by Microsoft Windows, and that are available to the Windows-defined printers in your reports.
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.
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.
Use meaningful words, such as Header and Script to name your fonts. The font name is user-defined, so you could name a font Project-A or Font1, Font2, and so on.
Examples: FONT command
Example 1
Suppose you want to standardize column headings in all your project reports. To do this, use the following 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"
The SELECT command uses 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 the following 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" }
The SETTING commands use the header and footer fonts defined in the FONT commands above them.
Parent topic
Reporting system command language