1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS Console Server DLL 4 * FILE: win32ss/user/winsrv/concfg/font.h 5 * PURPOSE: Console Fonts Management 6 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr) 7 * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com) 8 */ 9 10 #pragma once 11 12 /* DEFINES ********************************************************************/ 13 14 #define CP_SHIFTJIS 932 // Japanese Shift-JIS 15 #define CP_HANGUL 949 // Korean Hangul 16 #define CP_GB2312 936 // Chinese Simplified (GB2312) 17 #define CP_BIG5 950 // Chinese Traditional (Big5) 18 19 /* IsFarEastCP(CodePage) */ 20 #define IsCJKCodePage(CodePage) \ 21 ((CodePage) == CP_SHIFTJIS || (CodePage) == CP_HANGUL || \ 22 (CodePage) == CP_BIG5 || (CodePage) == CP_GB2312) 23 24 /* FUNCTIONS ******************************************************************/ 25 26 BYTE 27 CodePageToCharSet( 28 IN UINT CodePage); 29 30 HFONT 31 CreateConsoleFontEx( 32 IN LONG Height, 33 IN LONG Width OPTIONAL, 34 IN OUT LPWSTR FaceName, // Points to a WCHAR array of LF_FACESIZE elements 35 IN ULONG FontFamily, 36 IN ULONG FontWeight, 37 IN UINT CodePage); 38 39 HFONT 40 CreateConsoleFont2( 41 IN LONG Height, 42 IN LONG Width OPTIONAL, 43 IN OUT PCONSOLE_STATE_INFO ConsoleInfo); 44 45 HFONT 46 CreateConsoleFont( 47 IN OUT PCONSOLE_STATE_INFO ConsoleInfo); 48 49 BOOL 50 GetFontCellSize( 51 IN HDC hDC OPTIONAL, 52 IN HFONT hFont, 53 OUT PUINT Height, 54 OUT PUINT Width); 55 56 BOOL 57 IsValidConsoleFont2( 58 IN PLOGFONTW lplf, 59 IN PNEWTEXTMETRICW lpntm, 60 IN DWORD FontType, 61 IN UINT CodePage); 62 63 BOOL 64 IsValidConsoleFont( 65 IN LPCWSTR FaceName, 66 IN UINT CodePage); 67 68 /* EOF */ 69