Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function is an application–defined callback function that retrieves data that describes the available fonts.
Syntax
int CALLBACK EnumFontFamProc( const LOGFONT FAR* lpelf, const TEXTMETRIC FAR* lpntm, DWORD FontType, LPARAM lParam ); |
Parameters
- lpelf
-
[in] Pointer to an ENUMLOGFONTstructure that contains information about the logical attributes of the font. This structure is locally defined.
- lpntm
-
[in] Pointer to a NEWTEXTMETRICstructure 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 TEXTMETRICstructure.
- FontType
-
[in] DWORD that specifies the type of the font. The following table shows the possible values.
Value Description DEVICE_FONTTYPE
The 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_FONTTYPE
The font is a raster font. If neither RASTER_FONTTYPE nor TRUETYPE_FONTTYPE is set, the font is a vector font.
TRUETYPE_FONTTYPE
The font is a TrueType font. If neither RASTER_FONTTYPE nor TRUETYPE_FONTTYPE is set, the font is a vector font.
- lParam
-
[in] Pointer to the application-defined data passed by the EnumFontFamiliesfunction.
Return Value
Nonzero continues enumeration. Zero stops enumeration.
Remarks
An application must register this callback function by passing its address to the EnumFontFamiliesfunction.
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 TEXTMETRICstructure.
Windows CE 1.0 and 1.01 do not support TrueType fonts. In version 1.0, the value of the FontTypeparameter is always RASTER_FONTTYPE.
In Windows CE 2.0 and later, FontTypecan have a value of either RASTER_FONTTYPE or TRUETYPE_FONTTYPE, depending on the Windows Embedded CE-based platform. Any Windows Embedded 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.
Requirements
Header | windows.h |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |