EnumFontFamProc (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function is an application-defined callback function that retrieves data that describes the available fonts.

int CALLBACK EnumFontFamProc(
  const LOGFONT FAR* lpelf, 
  const TEXTMETRIC FAR* lpntm, 
  DWORD FontType, 
  LPARAM lParam


[in] Pointer to an ENUMLOGFONT structure that contains information about the logical attributes of the font. This structure is locally defined.
[in] Pointer to a NEWTEXTMETRIC structure that contains information about the physical attributes of the font, if the font is a TrueType font. If the font is not a TrueType font, this parameter points to a TEXTMETRIC structure.
[in] DWORD that specifies the type of the font. The following table shows the possible values.
DEVICE_FONTTYPEThe device supports downloading TrueType fonts or the font is a device-resident font.

DEVICE_FONTTYPE is not set 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.

RASTER_FONTTYPEThe font is a raster font. If neither RASTER_FONTTYPE nor TRUETYPE_FONTTYPE is set, the font is a vector font.
TRUETYPE_FONTTYPEThe font is a TrueType font. If neither RASTER_FONTTYPE nor TRUETYPE_FONTTYPE is set, the font is a vector font.
[in] Pointer to the application-defined data passed by the EnumFontFamilies function.

Return Values

Nonzero continues enumeration. Zero stops enumeration.


An application must register this callback function by passing its address to the EnumFontFamilies function.

You can use the AND (&) operator with the RASTER_FONTTYPE, DEVICE_FONTTYPE, and TRUETYPE_FONTTYPE constants to determine the font type.

The physical attributes of the font are always contained in a TEXTMETRIC structure.

Windows CE 1.0 and 1.01 do not support TrueType fonts. In version 1.0, the value of the FontType parameter is always RASTER_FONTTYPE.

In Windows CE 2.0 and later, FontType can have a value of either RASTER_FONTTYPE or TRUETYPE_FONTTYPE, depending on the Windows CE-based platform. Any Windows CE-based platform supports only raster fonts or TrueType fonts, but not both. The OEM chooses the font type, raster or TrueType, at system design time, and the application cannot change the font type.


OS Versions: Windows CE 1.0 and later.
Header: Windows.h.

See Also


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.