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.
EnumDFonts
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD EnumDFonts(lpDestDev, lpFaceName, lpCallbackFunc, lpClientData)
LPPDEVICE lpDestDev;      /* points to physical device or bitmap       */
LPSZ lpFaceName;          /* points to name of font face               */
FARPROC lpCallbackFunc;   /* points to user-supplied callback function */
LPVOID lpClientData;      /* points to user-supplied data              */
 
The EnumDFonts function returns information about device fonts by passing
the information to the specified callback function. GDI calls this function
when processing the EnumFonts function (GDI.70) to determine what device
fonts are available.
 
Every graphics driver must export an EnumDFonts function.
 
Parameter       Description
────────────────────────────────────────────────────────────────────────────
 
lpDestDev       Points to a PDEVICE or PBITMAP structure.
 
lpFaceName      Points to the null-terminated string specifying the name of
                a font. If lpFaceName points to a name, EnumDFonts calls the
                callback function with information for the fonts having the
                same font name. If there are no fonts of that name, the
                function returns 1.
 
                If lpFaceName is NULL, EnumDFonts randomly selects one font
                of each name 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 callback function, see the following
                "Comments" section.
 
lpClientData    Points to a buffer containing user-supplied data.
                EnumDFonts does not use this data; instead it passes the
                data back to application through the callback function.
 
Return Value
 
The return value is the last value returned by the callback function. The
function returns 1 if there are no fonts having the specified font name.
 
Comments
 
The export ordinal for this function is 6.
 
EnumDFonts 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)
LPLFONT lpLogFont;
LPTEXTMETRICS lpTextMetrics;
WORD wFontType;
LPVOID lpClientData;
 
Parameter      Description
────────────────────────────────────────────────────────────────────────────
lpLogFont      Points to a LFONT structure defining the logical attributes
               of a font. All sizes are in device units.
 
lpTextMetrics  Points to a TEXTMETRIC structure containing the same values
               that would be returned by the GetTextMetrics (GDI.93)
               function. All sizes are in device units.
 
wFontType      Specifies the type of the font. It can be one of the
               following values.
 
               Value                Meaning
               ─────────────────────────────────────────────────────────────
               RASTER_FONTTYPE (1)  Font consists of raster bitmaps rather
                                    than vector strokes.
 
               DEVICE_FONTTYPE (2)  Font is provided by the device rather
                                    than GDI.
 
               ENGINE_FONTTYPE (4)  Font is provided by TrueType rather than
                                    GDI or device.
 
               Bit 3 in the wFontType parameter is reserved; must be zero.
 
lpClientData   Points to the user-supplied data passed to EnumDFonts.
 
The callback function must return a nonzero value to continue to receive
information about the fonts. If the callback function returns zero,
EnumDFonts stops enumerating the fonts and returns to GDI.
 
If the device can generated scaled, bold, or italicized fonts, EnumDFonts
should pass only the information about the base font to the callback
function. EnumDFonts should then leave it to the application to inquire
about the device's text transformation abilities.
 
 
                                      ♦