Suppose you want to use the Helv font, size 8X20, to display text in your program. First, define it as follows:
font TextFont is facename "Helv" size 8 20
Type the facename in uppercase or lowercase exactly as it is shown in the tables; facename "helv" is not the same as facename "Helv".
When the font is defined, you can display text by referencing the font name as follows:
font TextFont text "Select the blue button when ready."
Because Helv is a proportional font, the text "Select the blue button when ready." will appear on the screen in letters that are 20 pixels high and, on average, 8 pixels wide. The l in blue will be less than 8 pixels wide; the w in when more.
You can define a font with bold, italic, strikeout, and underline attributes. You might choose to underline the word "blue" to emphasize that the user should select the blue, not the red, button. To do this, you must define a second font, which is exactly like the first except that it is underlined:
font UFont is facename "Helv" size 8 20 underline
Then change the actions that display the text as follows:
font TextFont text "Select the"
font UFont text "blue"
font TextFont text " button when ready."
You can specify these attributes for all the Windows and ESL fonts. You could also display the same text in the ESL font medium, by defining an underlined version of font medium as follows:
font MUline is facename "medium"
size 8 12 underline
Type medium and the other ESL facenames in uppercase or lowercase exactly as shown in the table ESL Resolution-Dependent Fonts. The size given in the example for font medium, 8x12 (for screen resolution 640 x 480), was obtained from this table.
If medium is the default font, the following actions will display the text as desired.
text "Select the "
font MUline text "blue"
text " button when ready."