EnumFontFamExProc callback function
The EnumFontFamExProc function is an application defined callback function used with the EnumFontFamiliesEx function. It is used to process the fonts. It is called once for each enumerated font. The FONTENUMPROC type defines a pointer to this callback function. EnumFontFamExProc is a placeholder for the application defined function name.
Syntax
int CALLBACK EnumFontFamExProc(
const LOGFONT *lpelfe,
const TEXTMETRIC *lpntme,
DWORD FontType,
LPARAM lParam
);
Parameters
lpelfe
A pointer to an LOGFONT structure that contains information about the logical attributes of the font. To obtain additional information about the font, you can cast the result as an ENUMLOGFONTEX or ENUMLOGFONTEXDV structure.
lpntme
A pointer to a structure that contains information about the physical attributes of a font. The function uses the NEWTEXTMETRICEX structure for TrueType fonts; and the TEXTMETRIC structure for other fonts.
This can be an ENUMTEXTMETRIC structure.
FontType
The type of the font. This parameter can be a combination of these values:
DEVICE_FONTTYPE
RASTER_FONTTYPE
TRUETYPE_FONTTYPE
lParam
The application-defined data passed by the EnumFontFamiliesEx function.
Return value
The return value must be a nonzero value to continue enumeration; to stop enumeration, the return value must be zero.
Remarks
An application must register this callback function by passing its address to the EnumFontFamiliesEx function.
When the graphics mode on the device context is set to GM_ADVANCED using the SetGraphicsMode function and the DEVICE_FONTTYPE flag is passed to the FontType parameter, this function returns a list of type 1 and OpenType fonts on the system. When the graphics mode is not set to GM_ADVANCED, this function returns a list of type 1, OpenType, and TrueType fonts on the system.
Unlike the EnumFontFamProc callback function, EnumFontFamExProc receives extended information about a font. The ENUMLOGFONTEX structure includes the localized name of the script (character set) and the NEWTEXTMETRICEX structure includes a font-coverage signature.
Requirements
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
Wingdi.h (include Windows.h) |
Unicode and ANSI names |
EnumFontFamExProcW (Unicode) and EnumFontFamExProcA (ANSI) |