Пример #1
0
        public static void SetConsoleFont(string fontName = "Consolas")
        {
            CONSOLE_FONT_INFO_EX cfiex = new CONSOLE_FONT_INFO_EX();

            IntPtr hnd = GetStdHandle(STD_OUTPUT_HANDLE);

            GetCurrentConsoleFontEx(hnd, false, cfiex);

            cfiex.FaceName = fontName;

            SetCurrentConsoleFontEx(hnd, false, cfiex);
        }
Пример #2
0
 private static extern bool GetCurrentConsoleFontEx(IntPtr hConsoleOutput, bool bMaximumWindow, [In, Out] CONSOLE_FONT_INFO_EX lpConsoleCurrentFont);
Пример #3
0
 private static extern bool SetCurrentConsoleFontEx(IntPtr ConsoleOutput, bool MaximumWindow, CONSOLE_FONT_INFO_EX ConsoleCurrentFontEx);