## Display Device Driver Reference for OS/2

[prev][next][parent][TOC]

### FmQueryFonts

Description: This function returns an array of currently loaded font information that belongs to the set specified.

flOptions(BIT32) (in) Enumeration options

FM_PUBLIC Enumerate public fonts

FM_PRIVATE Enumerate private fonts

pfmFont(PFMFONTINFO) (in/out) The address of the buffer to receive an array of font information. If a NULL is specified for this parameter, the function returns the number of fonts currently loaded by the font manager. The returned font segments always have PM font compatible font metrics. The accessibility of font definitions is dependent on the font segment type returned in flType.

FM_PM_FONT-Indicates that the returned font segment is SBCS/PM font compatible. When the font is opened by FmOpenFont, the device driver can read both font metrics and SBCS font definitions directly. The DBCS font definitions are valid just after the font segment is validated with specified glyph indexes by FmCharstr.

FM_CACHE_FONT-Indicates that the font definitions are not resident in this segment. The font definitions are valid just after the font segment is validated with specified glyph indexes by FmCharStr.

The cbCache shows the number of fonts that can be loaded in this font segment at once. This value limits the length of the glyph list index array to be passed to the FmCharStr call. Note that this field is valid only when the font is FM_CACHE_FONT.

                 typedef struct _FMFONTINFO {
                     HFM     hfm;                /* font manager font handle        */
                     PBYTE   pFont;              /* pointer to the font segment     */
                     ULONG   ulLen;              /* length of font segment          */
                     BIT32   flType;             /* type flag                       */
                     CHAR    szGlyphlist[16];    /* glyph list name                 */
                     LONG    lMatch;             /* match identifier                */
                     USHORT  cbCache;            /* cache size (FM_CACHE_FONT only) */
                 } FMFONTINFO;

hfm (HFM) (in) The font handle returned by FmOpenFont. This parameter is used to get the specified font information. When this parameter is specified, it is not necessary to fill the startFont and reqFont parameters . The flOptions parameter should also be specified in this case.

startFont (LONG) (in) Starting number of the font that the device driver requests. It begins at 1.

reqFont (LONG) (in) The number of fonts that the device driver requests.

RETURN (LONG) The number of fonts (if NULL specified for pfmFont) or return codes:

FM_ERROR

FM_SUCCESS

Remarks All of the size values returned in font metrics are in device coordinates. The device driver must select GPI/VIO default fonts from the returned list of fonts at initialization time.