13#define INVALID_CP ((UINT)-1)
21#define CP_SHIFTJIS 932
31#define CP_JAPANESE CP_SHIFTJIS
32#define CP_KOREAN CP_HANGUL
33#define CP_CHINESE_SIMPLIFIED CP_GB2312
34#define CP_CHINESE_TRADITIONAL CP_BIG5
37#define IsCJKCodePage(CodePage) \
38 ((CodePage) == CP_SHIFTJIS || (CodePage) == CP_HANGUL || \
40 (CodePage) == CP_BIG5 || (CodePage) == CP_GB2312)
42#if !defined(_WINGDI_) || defined(NOGDI)
43#define SHIFTJIS_CHARSET 128
44#define HANGEUL_CHARSET 129
45#define HANGUL_CHARSET 129
47#define JOHAB_CHARSET 130
49#define GB2312_CHARSET 134
50#define CHINESEBIG5_CHARSET 136
54#define IsCJKCharSet(CharSet) \
55 ((CharSet) == SHIFTJIS_CHARSET || (CharSet) == HANGUL_CHARSET || \
57 (CharSet) == GB2312_CHARSET || (CharSet) == CHINESEBIG5_CHARSET)
59#define IsBoldFont(Weight) \
60 ((Weight) >= FW_SEMIBOLD)
168#define IsAdditionalTTFont(FaceName) \
169 (FindCachedTTFont((FaceName), INVALID_CP) != NULL)
171#define IsAdditionalTTFontCP(FaceName, CodePage) \
172 (FindCachedTTFont((FaceName), (CodePage)) != NULL)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define _In_reads_or_z_opt_(size)
#define _Inout_updates_z_(size)
_Inout_updates_z_(LF_FACESIZE) PWSTR FaceName
WCHAR FaceName[LF_FACESIZE]
WCHAR FaceNameAlt[LF_FACESIZE]
static CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo
PTT_FONT_ENTRY FindCachedTTFont(_In_reads_or_z_opt_(LF_FACESIZE) PCWSTR FaceName, _In_ UINT CodePage)
Searches for a font in the console TrueType font cache, with the specified code page.
HFONT CreateConsoleFont(_Inout_ PCONSOLE_STATE_INFO ConsoleInfo)
A wrapper for CreateConsoleFontEx().
VOID InitTTFontCache(VOID)
Initializes the console TrueType font cache.
BOOL IsValidConsoleFont2(_In_ PLOGFONTW lplf, _In_ PNEWTEXTMETRICW lpntm, _In_ DWORD FontType, _In_ UINT CodePage)
Validates whether a given font can be supported in the console, under the specified code page.
struct _FONT_DATA FONT_DATA
struct _FONT_DATA * PFONT_DATA
struct _TT_FONT_ENTRY * PTT_FONT_ENTRY
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
struct _TT_FONT_ENTRY TT_FONT_ENTRY
HFONT CreateConsoleFontEx(_In_ LONG Height, _In_opt_ LONG Width, _Inout_updates_z_(LF_FACESIZE) PWSTR FaceName, _In_ ULONG FontWeight, _In_ ULONG FontFamily, _In_ UINT CodePage, _In_ BOOL UseDefaultFallback, _Out_ PFONT_DATA FontData)
Validates and creates a suitable console font based on the font characteristics given in input.
BOOL IsValidConsoleFont(_In_ PCWSTR FaceName, _In_ UINT CodePage)
Validates whether a given font can be supported in the console, under the specified code page.
HFONT CreateConsoleFont2(_In_ LONG Height, _In_opt_ LONG Width, _Inout_ PCONSOLE_STATE_INFO ConsoleInfo)
A wrapper for CreateConsoleFontEx().
BYTE CodePageToCharSet(_In_ UINT CodePage)
Retrieves the character set associated with a given code page.
VOID ClearTTFontCache(VOID)
Clears the console TrueType font cache.
VOID RefreshTTFontCache(VOID)
Refreshes the console TrueType font cache, by clearing and re-initializing it.