Font Reference Definition
Define a font for later use with the font reference.
font FONT_NAME is
facename FACE_NAME {POINT_SIZE point|size XSIZE YSIZE }
[bold] [italic] [under line] [strikeout]
FONT_NAME
The identifier for a font.
facename FACE_NAME
A value representing the face name of a Windows or PM font, or the string value representing an ESL fixed-cell or resolution-dependent font.
POINT_SIZE point
The size, in points, in which you want the font to appear.
size XSIZE YSIZE
Integer values (not variables) indicating the average sizes in pixels of the font.
bold
Make the font bold.
italic
Slant the font.
under line
Put a line on the base line of each character.
strikeout
Put a line through the middle of each character.
Description
Once you have defined a FONT_NAME, you can use it with a text drawing statement for any object.
Non-proportional fonts contain extended ASCII characters for display of National Language characters in a textual region.
Any font can be displayed in a graphical region.
Defining Windows Fonts
The following table lists the fonts provided with Windows. Note that, for a given face name, the display resolution with which you are running Windows will determine which font sizes are available. For proportional-width fonts, the widths listed in the table are average widths.
Face Name |
Char Set |
Fixed Width |
EGA Sizes |
VGA Sizes |
8514/A, XGA Sizes |
System |
ANSI |
No |
7x12 |
7x16 |
9x20 |
Roman |
ANSI |
No |
16x32 |
12x32 |
12x32 |
Script |
ANSI |
No |
14x37 |
11x37 |
11x37 |
Modern |
ANSI |
No |
14x32 |
11x32 |
11x32 |
Helv |
ANSI |
No |
5x10, 7x12, 8x15, 9x18, 12x22, 16x28 |
5x13, 7x16, 8x20, 9x24, 12x29, 16x37 |
7x16, 8x20, 10x25, 12x29, 15x36, 20x46 |
Courier |
ANSI |
Yes |
8x10, 9x12, 12x15 |
8x13, 9x16, 12x20 |
9x16 |
Tms Rmn |
ANSI |
No |
5x10, 6x12, 8x15, 9x16, 12x20, 16x26 |
5x13, 6x16, 8x19, 9x21, 12x27, 16x35 |
6x16, 8x20, 10x23, 12x27, 14x33, 19x43 |
Face Name |
Char Set |
Fixed Width |
EGA Sizes |
VGA Sizes |
8514/A, XGA Sizes |
Terminal |
OEM |
Yes |
8x8 |
8x12 |
None |
8514fix |
ANSI |
Yes |
None |
None |
10x20 |
8514oem |
OEM |
Yes |
None |
None |
10x20 |
**The Symbol font contains special symbols not found in either the ANSI or OEM character sets.
Using TrueType Fonts
In addition to the fonts listed in the previous section, ESL also supports the use of all TrueType fonts, in any point size. Under Windows, you can see a list of installed TrueType fonts by selecting the "Fonts" icon from the Control Panel. The list box that displays the installed fonts appears as follows:
Arial
Arial Bold
Arial Bold Italic
Arial Italic
...
These are not the actual face names to use when defining a font. The face name for all these fonts is "Arial." When creating a font, Windows will ignore the Bold, Italic, etc., portion of the face name. That is, Windows defines the parts of the font name as follows:
Arial is the facename.
Bold Italic is the style.
Arial Bold Italic is the full name.
Therefore, when defining a TrueType font for use with ESL, be sure to specify the parts of the name in the proper places; for example:
font ArialBold is facename "Arial" 12 point bold
This will create a 12 point bold Arial font.
The following specification will result in the definition of a regular (non-bold) 12 point Arial font because it does not include the bold keyword:
font ArialBold is facename "Arial Bold" 12 point
To use the System Proportional font in a font is statement, specify an XSIZE/YSIZE of 0 0. The appropriate size will be determined at runtime.
For example:
font SystemItalic is
facename "System"
size 0 0 italic
Fonts and Dialog Controls
Note the following points in reference to the use of fonts with dialog controls:
In addition to using fonts defined by XSIZE/YSIZE, multiple- line entry fields and list boxes can now use fonts defined by point size.
You cannot change the font of a control at runtime.
Example
font Newfont is facename "Helv" size 16 28 bold italic
font Newfont is facename "Helv Bold italic" 10 point bold italic
See Also
font Reference
text Drawing Statement
The tables under font Reference for information about ESL Fonts.