The EnumFontFamProc function is an application-defined callback function used with the EnumFontFamilies function. It receives data describing the available fonts. The FONTENUMPROC type defines a pointer to this callback function. EnumFontFamProc is a placeholder for the application-defined function name.
EnumFontFamilies and EnumFontFamProc are maintained for compatibility with 16-bit versions of Windows. Win32-based applications should call the EnumFontFamiliesEx function.
int CALLBACK EnumFontFamProc(
ENUMLOGFONT FAR *lpelf, // pointer to logical-font data
NEWTEXTMETRIC FAR *lpntm, // pointer to physical-font data
int FontType, // type of font
LPARAM lParam // pointer to application-defined data
);
DEVICE_FONTTYPE
RASTER_FONTTYPE
TRUETYPE_FONTTYPE
The return value must be a nonzero value to continue enumeration; to stop enumeration, it must return zero.
An application must register this callback function by passing its address to the EnumFontFamilies function.
The AND (&) operator can be used with the RASTER_FONTTYPE, DEVICE_FONTTYPE, and TRUETYPE_FONTTYPE constants to determine the font type. If the RASTER_FONTTYPE bit is set, the font is a raster font. If the TRUETYPE_FONTTYPE bit is set, the font is a TrueType font. If neither bit is set, the font is a vector font. DEVICE_FONTTYPE is set when a device (for example, a laser printer) supports downloading TrueType fonts or when the font is a device-resident font; it is zero if the device is a display adapter, dot-matrix printer, or other raster device. An application can also use DEVICE_FONTTYPE to distinguish graphics device interface (GDI)-supplied raster fonts from device-supplied fonts. GDI can simulate bold, italic, underline, and strikeout attributes for GDI-supplied raster fonts, but not for device-supplied fonts.
Windows CE: The physical attributes of the font are always contained in a TEXTMETRIC structure.
Windows CE version 1.0 does not support TrueType fonts. In version 1.0, the value of the FontType parameter will always be RASTER_FONTTYPE.
In Windows CE version 2.0, FontType can have a value of either RASTER_FONTTYPE or TRUETYPE_FONTTYPE depending on the Windows CE platform. Any given Windows CE platform will support only raster fonts or TrueType fonts but not both. The font type (raster or TrueType) is chosen at system design time, and cannot be changed by an application.
Fonts and Text Overview, Font and Text Functions, EnumFontFamilies, ENUMLOGFONT, NEWTEXTMETRIC, TEXTMETRIC