Поделиться через


EnumFontFamProc (Windows Embedded CE 6.0)

1/6/2010

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 ENUMLOGFONT structure that contains information about the logical attributes of the font. This structure is locally defined.
  • lpntm
    [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.
  • 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 EnumFontFamilies function.

Return Value

Nonzero continues enumeration. Zero stops enumeration.

Remarks

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 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

See Also

Reference

EnumFontFamilies
EnumFonts
ENUMLOGFONT
NEWTEXTMETRIC
TEXTMETRIC

Other Resources

Fonts Functions