Answer to Question #303549 in C++ for ImOP

Question #303549

Which attribute is used to define the font type

1
Expert's answer
2022-02-27T07:03:34-0500
void setConsoleFont(short width, short height) //width and height are size of letters
{
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_FONT_INFOEX fontInfo = {};
    GetCurrentConsoleFontEx(hConsole, FALSE, &fontInfo);
    fontInfo.dwFontSize = { width, height };
    fontInfo.cbSize = sizeof(fontInfo);
    wcscpy_s(fontInfo.FaceName, L"ISOCTEUR"); //L"ISOCTEUR" is name of style for example
    SetCurrentConsoleFontEx(hConsole, FALSE, &fontInfo);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog