EnumFontFamilies

The EnumFontFamilies function enumerates the fonts in a specified font family that are available on a specified device.

EnumFontFamilies and EnumFontFamProc are maintained for compatibility with 16-bit versions of Windows. Win32-based applications should call the EnumFontFamiliesEx function.

int EnumFontFamilies(
  HDC hdc,             // handle to device control
  LPCTSTR lpszFamily,  // pointer to family-name string
  FONTENUMPROC lpEnumFontFamProc,
                       // pointer to callback function
  LPARAM lParam        // pointer to application-supplied data
);
 

Parameters

hdc
Handle to the device context.
lpszFamily
Pointer to a null-terminated string that specifies the family name of the desired fonts. If lpszFamily is NULL, EnumFontFamilies randomly selects and enumerates one font of each available type family.
lpEnumFontFamProc
Specifies the procedure-instance address of the application-defined callback function. For information about the callback function, see EnumFontFamProc.
lParam
Pointer to application-supplied data. The data is passed to the callback function along with the font information.

Return Values

The return value is the last value returned by the callback function. Its meaning is implementation specific.

Remarks

For each font having the typeface name specified by the lpszFamily parameter, the EnumFontFamilies function retrieves information about that font and passes it to the function pointed to by the lpEnumFontFamProc parameter. The application-defined callback function can process the font information as desired. Enumeration continues until there are no more fonts or the callback function returns zero.

Windows CE: Windows CE version 1.0 supports only raster fonts.

Windows CE version 2.0 supports systems that use either TrueType or raster fonts but not both. The font type (raster or TrueType) is chosen at system design time, and cannot be changed by an application.

See Also

Fonts and Text Overview, Font and Text Functions, EnumFontFamiliesEx, EnumFontFamProc