Share via


EnumFontFamProc

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

int CALLBACK EnumFontFamProc(
ENUMLOGFONT FAR *lpelf, 
TEXTMETRIC FAR *lpntm, 
int FontType, 
LPARAM lParam
); 

Parameters

  • lpelf
    [out] Pointer to an ENUMLOGFONT structure that contains information about the logical attributes of the font. This structure is locally defined.
  • lpntm
    [out] 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.
  • FontType
    [in] Specifies the type of the font. This parameter can be a combination of the following values:
    • DEVICE_FONTTYPE
    • RASTER_FONTTYPE
    • TRUETYPE_FONTTYPE
  • lParam
    [in] Pointer to the application-defined data passed by the EnumFontFamilies function.

Return Values

Nonzero continues enumeration. Zero stops enumeration.

Remarks

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.

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

Windows CE versions 1.0 and 1.01 does not support TrueType fonts. In version 1.0, the value of the FontType parameter will always be RASTER_FONTTYPE.

In Windows CE versions 2.0 and later, FontType can have a value of either RASTER_FONTTYPE or TRUETYPE_FONTTYPE depending on the Windows CE platform. Any 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.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Wingdi.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

EnumFontFamilies, EnumFonts, ENUMLOGFONT, NEWTEXTMETRIC, TEXTMETRIC

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.