GetFontInfo

(Engine-Level Function)

Description: Accepts a Font object as a parameter and returns an index-able 'FontInfo' struct containing all of the font's relevant information, such as Name, Size, and Weight.
Returns: FontInfo struct
Usage: Steady State only.
Function Groups: Graphics
Related to: Font | FontDialog |GUIText
Format: GetFontInfo(FontObject);
Parameters:  
Font
Required. A Font object.
Comments:

Returns the same information required for the Font object parameters as an index-able struct, Name, CharSet, Height, Rotation, Weight, Decoration, and Fixed.

As such, the returned struct values can be accessed as class variables or array elements, for example "FontInfo.Name" or "FontInfo[0]", respectively.

Example

The font object:

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

GetFontInfo is used to create the FontInfo struct:

FontInfo = GetFontInfo(InputFont);

The FontInfo struct contains the following information:

{
   Name = "ARIAL";
   CharSet = 0;
   Height = 14;
   Rotation = 0;
   Weight = 5;
   Decoration = 1;
   Fixed = FALSE;
}