Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EngineEnumerateFont
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD EngineEnumerateFont(lpFaceName, lpCallbackFunc, lpClientData)
LPSZ lpFaceName;          /* points to name of font face               */
FARPROC lpCallbackFunc;   /* points to user-supplied callback function */
LPVOID lpClientData;      /* points to user-supplied data              */
 
The EngineEnumerateFont function returns information about TrueType fonts by
passing the information to the specified callback function. A driver calls
this function when processing its EnumDFonts function to determine what
TrueType fonts are available.
 
Import Module.Ordinal: GDI.300.
 
Parameter       Description
────────────────────────────────────────────────────────────────────────────
 
lpFaceName      Points to the null-terminated string specifying the name of
                a font face. If lpFaceName points to a name,
                EngineEnumerateFont calls the callback function with
                information for the fonts having the same font face name. If
                there are no fonts of that face, the function returns 1.
 
                If lpFaceName is NULL, EngineEnumerateFont selects one font
                of each face at random and calls the callback function with
                information for these fonts. If there are no fonts, the
                function returns 1.
 
lpCallbackFunc  Points to a user-supplied callback function. For more
                information about the function, see the following "Comments"
                section.
 
lpClientData    Points to a buffer containing user-supplied data.
                EngineEnumerateFont does not use this data; instead it
                passes the data back to application through the callback
                function.
 
Return Value
 
This function returns the last value returned by the callback function. The
function returns 1 if there are no fonts having the specified font face
name.
 
Comments
 
EngineEnumerateFont calls the callback function once for each font. It
continues to call the callback function until there are no more fonts or the
callback function returns zero.
 
The callback function has the following form:
 
WORD CallbackFunction(lpLogFont, lpTextMetrics, wFontType,
    lpClientData)
LPLOGFONT lpLogFont;
LPTEXTMETRICS lpTextMetrics;
WORD wFontType;
LPVOID lpClientData;
 
Parameter      Description
────────────────────────────────────────────────────────────────────────────
lpLogFont      Points to a LOGFONT structure defining the logical attributes
               of a font.
 
lpTextMetrics  Points to a TEXTMETRIC structure containing the same values
               that would be returned by the GetTextMetrics function.
 
wFontType      Specifies the type of the font. It can be one of the
               following values:
 
               Value            Meaning
               ─────────────────────────────────────────────────────────────
               RASTER_FONTTYPE  Indicates that the font is composed of a
                                raster bitmap rather than vector strokes.
 
lpClientData   Points to the user-supplied data passed to
               EngineEnumerateFont. Sizes are in device units.
 
The callback function must return a non-zero value to continue to receive
information about the fonts. If the callback function returns zero,
EngineEnumerateFont stops enumerating the fonts and returns to its caller.
 
If the engine can generated scaled, emboldened, or italicized fonts,
EngineEnumerateFont passes only information about the base font to the
callback function. The callback function is responsible for inquiring about
the engine's text transformation abilities to determine which additional
fonts are available directly from the engine.
 
See Also
 
EnumDFonts