FONT-TABLE system handle (Windows only; Graphical interfaces only) A handle to the current font table. Note: Does not apply to SpeedScript programming. Syntax FONT-TABLE [ :attribute | :method ] attribute Specifies an attribute of the FONT-TABLE handle. method Specifies a method of the FONT-TABLE handle. Attributes HANDLE attribute INSTANTIATING-PROCEDURE attribute NUM-ENTRIES attribute TYPE attribute – – Methods GET-TEXT-HEIGHT-CHARS( ) method GET-TEXT-HEIGHT-PIXELS( ) method GET-TEXT-WIDTH-CHARS( ) method GET-TEXT-WIDTH-PIXELS( ) method Example This code shows how to query and set the integer attribute, NUM-ENTRIES: DEFINE VARIABLE ix AS INTEGER NO-UNDO. ix = FONT-TABLE:NUM-ENTRIES. /* to query */ /* or */ ix = 255. FONT-TABLE:NUM-ENTRIES = ix. /* to set */ Notes Unlike the COLOR-TABLE system handle, the FONT-TABLE system handle does not allow you to set fonts dynamically. Font entries can only be changed by the user through the font system dialog box. Fonts are always dynamic. The current font table is the font table in the current environment, which is the startup environment or the environment most recently specified in a USE statement. To determine the number of font entries in the font table, query the NUM-ENTRIES attribute. To change the number of font entries in the font table, set the NUM-ENTRIES attribute. To allow users to set dynamic font table entries at run time, an application can display a font common dialog with the SYSTEM-DIALOG FONT statement. To save font definitions from the font table to the current environment file, use the PUT-KEY-VALUE statement. To retrieve the font definition specified in the current environment file, use the GET-KEY-VALUE statement. The TYPE attribute returns the widget type, PSEUDO-WIDGET. See also GET-KEY-VALUE statement, PUT-KEY-VALUE statement, SYSTEM-DIALOG FONT statement, USE statement
FONT-TABLE [ :attribute | :method ]
DEFINE VARIABLE ix AS INTEGER NO-UNDO.
ix = FONT-TABLE:NUM-ENTRIES. /* to query */
/* or */
ix = 255.
FONT-TABLE:NUM-ENTRIES = ix. /* to set */