public void StartRender() { _codePage = NativeMethods.GetConsoleOutputCP(); _istmInitialized = false; var consoleHandle = _outputHandle.Value; CONSOLE_FONT_INFO_EX fontInfo = ConhostConsole.GetConsoleFontInfo(consoleHandle); int fontType = fontInfo.FontFamily & NativeMethods.FontTypeMask; _trueTypeInUse = (fontType & NativeMethods.TrueTypeFont) == NativeMethods.TrueTypeFont; }
public void StartRender() { _codePage = NativeMethods.GetConsoleOutputCP(); _istmInitialized = false; var consoleHandle = _outputHandle.Value; try { CONSOLE_FONT_INFO_EX fontInfo = ConhostConsole.GetConsoleFontInfo(consoleHandle); int fontType = fontInfo.FontFamily & NativeMethods.FontTypeMask; _trueTypeInUse = (fontType & NativeMethods.TrueTypeFont) == NativeMethods.TrueTypeFont; } catch (Exception e) { // Ignore failures to get font information. In Windows Server containers, // the font information cannot be queried. } }