Skip to content

Latest commit

 

History

History
125 lines (84 loc) · 5.12 KB

nf-wingdi-enumfontfamiliesw.md

File metadata and controls

125 lines (84 loc) · 5.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wingdi.EnumFontFamiliesW
EnumFontFamiliesW function (wingdi.h)
The EnumFontFamilies function enumerates the fonts in a specified font family that are available on a specified device. (Unicode)
EnumFontFamilies
EnumFontFamilies function [Windows GDI]
EnumFontFamiliesW
_win32_EnumFontFamilies
gdi.enumfontfamilies
wingdi/EnumFontFamilies
wingdi/EnumFontFamiliesW
gdi\enumfontfamilies.htm
gdi
4960afbb-eeba-4030-ac89-d1ff077bb2f3
12/05/2018
EnumFontFamilies, EnumFontFamilies function [Windows GDI], EnumFontFamiliesA, EnumFontFamiliesW, _win32_EnumFontFamilies, gdi.enumfontfamilies, wingdi/EnumFontFamilies, wingdi/EnumFontFamiliesA, wingdi/EnumFontFamiliesW
wingdi.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
EnumFontFamiliesW (Unicode) and EnumFontFamiliesA (ANSI)
Gdi32.lib
Gdi32.dll
Windows
19H1
EnumFontFamiliesW
wingdi/EnumFontFamiliesW
c++
APIRef
kbSyntax
DllExport
gdi32.dll
Ext-MS-Win-GDI-Font-l1-1-0.dll
Ext-MS-Win-GDI-Font-l1-1-1.dll
ext-ms-win-gdi-font-l1-1-2.dll
Ext-MS-Win-GDI-Font-L1-1-3.dll
Ext-MS-Win-GDI-Internal-Desktop-L1-1-0.dll
GDI32Full.dll
EnumFontFamilies
EnumFontFamiliesA
EnumFontFamiliesW

EnumFontFamiliesW function

-description

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

Note  This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the EnumFontFamiliesEx function.
 

-parameters

-param hdc [in]

A handle to the device context from which to enumerate the fonts.

-param lpLogfont [in]

A pointer to a null-terminated string that specifies the family name of the desired fonts. If lpszFamily is NULL, EnumFontFamilies selects and enumerates one font of each available type family.

-param lpProc [in]

A pointer to the application defined callback function. For information, see EnumFontFamProc.

-param lParam [in]

A pointer to application-supplied data. The data is passed to the callback function along with the font information.

-returns

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.

When the graphics mode on the device context is set to GM_ADVANCED using the SetGraphicsMode function and the DEVICE_FONTTYPE flag is passed to the FontType parameter, this function returns a list of type 1 and OpenType fonts on the system. When the graphics mode is not set to GM_ADVANCED, this function returns a list of type 1, OpenType, and TrueType fonts on the system.

The fonts for many East Asian languages have two typeface names: an English name and a localized name. EnumFonts, EnumFontFamilies, and EnumFontFamiliesEx return the English typeface name if the system locale does not match the language of the font.

Examples

For examples, see Enumerating the Installed Fonts.

Note

The wingdi.h header defines EnumFontFamilies as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

EnumFontFamProc

EnumFontFamiliesEx

EnumFonts

Font and Text Functions

Fonts and Text Overview