mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
Global (Windows): uses GetCurrentConsoleFontEx instead of GetCurrentConsoleFont
This commit is contained in:
@@ -33,8 +33,8 @@ bool ffDetectTerminalSize(FFTerminalSizeResult* result)
|
||||
return false;
|
||||
|
||||
{
|
||||
CONSOLE_FONT_INFO cfi;
|
||||
if(GetCurrentConsoleFont(hOutput, FALSE, &cfi)) // Only works for ConHost
|
||||
CONSOLE_FONT_INFOEX cfi;
|
||||
if(GetCurrentConsoleFontEx(hOutput, FALSE, &cfi)) // Only works for ConHost
|
||||
{
|
||||
result->width = result->columns * (uint16_t) cfi.dwFontSize.X;
|
||||
result->height = result->rows * (uint16_t) cfi.dwFontSize.Y;
|
||||
|
||||
@@ -960,8 +960,8 @@ static bool getCharacterPixelDimensions(FFLogoRequestData* requestData)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
CONSOLE_FONT_INFO cfi;
|
||||
if(GetCurrentConsoleFont(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi)) // Only works for ConHost
|
||||
CONSOLE_FONT_INFOEX cfi;
|
||||
if(GetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi)) // Only works for ConHost
|
||||
{
|
||||
requestData->characterPixelWidth = cfi.dwFontSize.X;
|
||||
requestData->characterPixelHeight = cfi.dwFontSize.Y;
|
||||
|
||||
Reference in New Issue
Block a user