WFONT-GET-FONT (op-code 101)

This operation returns a font on the system that matches the specifications in WFONT-DATA. If a matching font is found, its handle is returned in FONT-HANDLE and WFONT-STATUS is set to "1". If no matching font is found, FONT-HANDLE is set to NULL and WFONT-STATUS returns the WFONTERR-FONT-NOT-FOUND error condition.

Note:

Fonts occupy memory. If you no longer need a font, you can free the memory used by the font by using the DESTROY verb on the font's handle. The runtime automatically destroys all fonts when it terminates.

In WFONT-GET-FONT, the WFONT-DATA fields are used to describe the desired font. These fields are described in detail below. You should always INITIALIZE the group item WFONT-DATA prior to filling in these fields to ensure that unused fields contain the proper default values.

If you do not specify WFONT-NAME, WFONT-CHAR-SET, or WFONT-SIZE, the corresponding aspect of the font will be arbitrary. In general, you should always specify WFONT-NAME and WFONT-SIZE to get useful results.