


On graphical systems, you are not limited to only one font. ACUCOBOL-GT provides general support for access to most fonts known to the system.
In ACUCOBOL-GT, fonts are represented in your program by handles (for more about handles, see section 4.1). Once created, a font handle indirectly refers to all the information the system needs to manage that particular font. When you want to specify a particular font in your program, you use its handle.
In ACUCOBOL-GT, you have access to most of the systems add-on fonts (TrueType), as well as several predefined fonts. The set of predefined fonts is used because they are guaranteed to be available on all Windows systems. These fonts correspond to the various Windows system fonts that are accessed with the GetStockObject API function.
Font handles are created in two ways: with the W$FONT library routine, and with the ACCEPT FROM STANDARD OBJECT verb. The ACCEPT FROM STANDARD OBJECT verb provides access to the system predefined fonts only. See section 6.6, Book 3, "Reference Manual" for a description of the ACCEPT verb and a list of the available fonts.
The W$FONT library routine provides access to most of the fonts known to the system, including TrueType fonts. W$FONT provides three primary functions.
1. It returns a handle to the font on the system that either exactly or most closely matches a font description.
2. Given a font handle, it returns a complete description of the font's characteristics.
3. It creates and presents to the user a font selection dialog box, returning a description of the font that the user selected.
For a complete description of W$FONT see Appendix I, Book 4, "Appendices."