次の方法で共有


EnumFontFamProc (Compact 2013)

3/28/2014

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

Syntax

int CALLBACK EnumFontFamProc(
  const ENUMLOGFONT 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.

FontType can have a value of either RASTER_FONTTYPE or TRUETYPE_FONTTYPE, depending on the Windows Embedded Compact-based platform. Any Windows Embedded Compact-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

See Also

Reference

Fonts Functions
EnumFontFamilies
EnumFonts
ENUMLOGFONT
NEWTEXTMETRIC
TEXTMETRIC