CONSOLE_FONT_INFOEX structure
Important
This document describes console platform functionality that is no longer a part of our ecosystem roadmap. We do not recommend using this content in new products, but we will continue to support existing usages for the indefinite future. Our preferred modern solution focuses on virtual terminal sequences for maximum compatibility in cross-platform scenarios. You can find more information about this design decision in our classic console vs. virtual terminal document.
Contains extended information for a console font.
Syntax
typedef struct _CONSOLE_FONT_INFOEX {
ULONG cbSize;
DWORD nFont;
COORD dwFontSize;
UINT FontFamily;
UINT FontWeight;
WCHAR FaceName[LF_FACESIZE];
} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;
Members
cbSize
The size of this structure, in bytes. This member must be set to sizeof(CONSOLE_FONT_INFOEX)
before calling GetCurrentConsoleFontEx or it will fail.
nFont
The index of the font in the system's console font table.
dwFontSize
A COORD structure that contains the width and height of each character in the font, in logical units. The X member contains the width, while the Y member contains the height.
FontFamily
The font pitch and family. For information about the possible values for this member, see the description of the tmPitchAndFamily member of the TEXTMETRIC structure.
FontWeight
The font weight. The weight can range from 100 to 1000, in multiples of 100. For example, the normal weight is 400, while 700 is bold.
FaceName
The name of the typeface (such as Courier or Arial).
Remarks
To obtain the size of the font, pass the font index to the GetConsoleFontSize function.
Requirements
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Header | WinCon.h (include Windows.h) |