The font statement specifies the font in which to display text. A font can be specified in the following places in the program:
•At the beginning of the program, as the default font for all static text in the program (but not controls). The font environment declaration should be placed just after the screen size environment declaration. For example:
screen size 640 480
font "esl mono"
Note that text drawn by the ESL Business Graphics module is not affected by the font environment declaration.
•If a defined font is used in the environment definition, its definition should be placed before the font environment declaration.
screen size 640 350
# Font definition
font Normal is facename "esl mono" size 7 11
# Font environment declaration
font Normal
When you declare a defined font, do not enclose the font name in quotation marks. For example, font Normal in the preceding example is not enclosed in quotation marks.
•In a drawing statement for an individual text string. For example:
add to StopSign
font Normal "STOP"
•In the definition of a textual region. For example:
textual region News
window size 19 columns 5 lines
at position 100 100
font "esl mono"
You can reference up to 20 fonts, plus the default font (specified in the configuration file), in a program at compile time. If you want to reference more in a program, you must modify the FNTCNT= option in your EslConfig.ini file.