Font

(Engine-Level Function)

Description: Returns a font value.
Returns: Font
Usage: Steady State only.
Function Groups: Graphics
Related to: FontDialog | GUIText | ZText
Format: Font(Name, CharSet, Height, Rotation, Weight, Decoration, Fixed)
Parameters:  
Name
Required. Any text expression that gives the name of the font. This must be the same as the Microsoft Windows™ name for the font. For example, "ARIAL".
CharSet

Required. Any numeric expression giving the Font Character Sets for this font.
If you are uncertain as to a valid value, set CharSet to 0, thereby obtaining English characters.
The keyword, DEFAULT_CHARSET may be used, auto-selecting the character set based on the configured Windows locale. OEM_CHARSET will do the same, but will use the DOS equivalent.

Height
Required. Any numeric expression giving the height of the font in points.
Rotation
Required. Any numeric expression giving the rotation of each character in degrees.
Weight
Required. Any numeric expression giving the weight of the font. Larger numbers give a more bold appearance. The range is 0 to 9.
Decoration

Required bit-wise flag

(See: Bitwise Parameters & Operations)

0 Normal
0b01 Italic
0b10 Underline
charFixed
Required. Any logical expression. If true (non-0), all of the characters used by the font will be the same width and height, that of the largest character. If false (0), and the font is a proportional or a true type font, then the characters may have different sizes.
Comments:

This function is for use in layered graphics statements that display text. A good idea is to use variables for font parameters in the layered graphics statements. If it is desired to change the font later, it need only be changed at one place - where the assignment is made to the variable. This also promotes a consistent use of fonts.

Parameters are suggestions. Substitutions will be made if the parameters describe a font that cannot be found.
Supported font types include TRUEType, OpenType and PostScript CFF.

Example:

  InputFont = Font("ARIAL" { Font name },
                   0 { Character set }, 
                   14 { Height in points }, 
                   0 { Rotation }, 
                   5 { Weight - somewhat bold }, 
                   0 { Not italic }, 
                   0 { Non-fixed });