Progress
Portability Guide
Fonts
Like colors, fonts are stored in the environment files. If you use multiple fonts on different graphical interface platforms, you must make sure that you have fonts that match, particularly in size.
A character unit is based on the default font. The default font specified in the Startup Section of the registry or the
progress.ini
determines the size of the character unit.Fonts are bound into r-code at compile time. If you build your application with one font and try to deploy it with a different font, the result is unpredictable. The environment file you use at compile time should have the same font definitions as the environment file at run time.
Use the GET-TEXT-WIDTH method of the FONT-TABLE handle to calculate the length of a string in pixels or character units. Use the GET-TEXT-HEIGHT method of the FONT-TABLE handle to calculate the height of a font in pixels or character units using the font number. See the Progress Language Reference for more information on these methods.
There is no direct way to set font values in Progress. Font entries can only be changed by the user through the Font system dialog box. You must either use the SYSTEM-DIALOG FONT statement on Windows, or set them manually in the environment files. The SYSTEM-DIALOG FONT statement displays a dialog box that allows the user to select and associate a system font with the specified font number. See the SYSTEM-DIALOG FONT Statement reference entry in the Progress Language Reference.
NOTE: On Windows, the AppBuilder runs with both small and large fonts on 800 x 600 and 1,024 x 768 display resolutions, but only runs with small fonts on 640 x 480 displays.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |