Progress
Programming
Handbook
FONT–TABLE Handle
The NUM–ENTRIES attribute sets and returns the number of fonts available in the font table. The FONT–TABLE methods return information about font sizes. Each method takes an optional font number as an argument:
- GET–TEXT–HEIGHT–CHARS( ) and GET–TEXT–HEIGHT–PIXELS( ) return the height of the default font in either character units or pixels. You can pass a font number to these methods to get the height of a specific font. This example looks for the first font from the start of the font table with a height of at least two character units.
- GET–TEXT–WIDTH–CHARS(string) and GET–TEXT–WIDTH–PIXELS(string) return the width of the passed string expression in the default font in either character units or pixels. You can optionally pass a font number to these methods to get the width of the string in a specific font. This example tests whether a title for a new window will fit based on the font of the current window.
For more information on the FONT–TABLE handle, see the Progress Language Reference .
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |