We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This was a feature request from a user, who shared a way you can change fonts on Windows:
actual fun changeConsoleFonts() { platform.posix.system("chcp 65001") memScoped { val fontName = "Lucida Console" val hnd = GetStdHandle(STD_OUTPUT_HANDLE) if (hnd != INVALID_HANDLE_VALUE) { val info = alloc<CONSOLE_FONT_INFOEX>() info.cbSize = sizeOf<CONSOLE_FONT_INFOEX>().toUInt() val tt: Boolean // First determine whether there's already a TrueType font. if (GetCurrentConsoleFontEx(hnd, FALSE, info.ptr) == TRUE) { // tt = (info.FontFamily and TMPF_TRUETYPE.toUInt()).toInt() == TMPF_TRUETYPE // if (tt) { // println("The console already is using a TrueType font.") // return // } // Set console font to Lucida Console. val newInfo = alloc<CONSOLE_FONT_INFOEX>() newInfo.cbSize = sizeOf<CONSOLE_FONT_INFOEX>().toUInt() newInfo.FontFamily = TMPF_TRUETYPE.toUInt() newInfo.FaceName.writeBytes(fontName.encodeToByteArray()) // Get some settings from current font. newInfo.dwFontSize.X = info.dwFontSize.X newInfo.dwFontSize.Y = info.dwFontSize.Y newInfo.FontWeight = info.FontWeight SetCurrentConsoleFontEx(hnd, FALSE, newInfo.ptr) } else { println("GetCurrentConsoleFontEx false.") } } } }
Windows is actually pretty powerful with their console API. I'm not sure it's a standard feature, however.
So questions...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This was a feature request from a user, who shared a way you can change fonts on Windows:
Windows is actually pretty powerful with their console API. I'm not sure it's a standard feature, however.
So questions...
The text was updated successfully, but these errors were encountered: