public static void SetConsoleFont() { var fontInfoEx = new FontInfoEx { cbSize = Marshal.SizeOf <FontInfoEx>(), FontIndex = 0, FontFamily = FIXED_WIDTH_TRUE_TYPE, FontName = "MS Gothic", FontWeight = 400, FontSize = 48 }; var consoleOutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); SetCurrentConsoleFontEx(consoleOutputHandle, false, ref fontInfoEx); }
private static extern bool SetCurrentConsoleFontEx(IntPtr hConsoleOutput, bool MaximumWindow, ref FontInfoEx ConsoleCurrentFontEx);