diff --git a/src/interactivity/onecore/ConsoleInputThread.cpp b/src/interactivity/onecore/ConsoleInputThread.cpp index 6786c970cc..fafbee3d20 100644 --- a/src/interactivity/onecore/ConsoleInputThread.cpp +++ b/src/interactivity/onecore/ConsoleInputThread.cpp @@ -53,6 +53,8 @@ DWORD WINAPI ConsoleInputThreadProcOneCore(LPVOID /*lpParam*/) if (NT_SUCCESS(Status)) { + globals.getConsoleInformation().GetActiveOutputBuffer().RefreshFontWithRenderer(); + globals.ntstatusConsoleInputInitStatus = Status; globals.hConsoleInputInitEvent.SetEvent(); diff --git a/src/renderer/wddmcon/WddmConRenderer.cpp b/src/renderer/wddmcon/WddmConRenderer.cpp index e7d8870b99..d701103389 100644 --- a/src/renderer/wddmcon/WddmConRenderer.cpp +++ b/src/renderer/wddmcon/WddmConRenderer.cpp @@ -339,19 +339,9 @@ HRESULT WddmConEngine::UpdateDrawingBrushes(COLORREF const /*colorForeground*/, } [[nodiscard]] -HRESULT WddmConEngine::UpdateFont(const FontInfoDesired& /*pfiFontInfoDesired*/, FontInfo& fiFontInfo) noexcept +HRESULT WddmConEngine::UpdateFont(const FontInfoDesired& fiFontInfoDesired, FontInfo& fiFontInfo) noexcept { - COORD coordSize = {0}; - LOG_IF_FAILED(GetFontSize(&coordSize)); - - fiFontInfo.SetFromEngine(fiFontInfo.GetFaceName(), - fiFontInfo.GetFamily(), - fiFontInfo.GetWeight(), - fiFontInfo.IsTrueTypeFont(), - coordSize, - coordSize); - - return S_OK; + return GetProposedFont(fiFontInfoDesired, fiFontInfo, USER_DEFAULT_SCREEN_DPI); } [[nodiscard]] @@ -374,10 +364,20 @@ HRESULT WddmConEngine::UpdateViewport(const SMALL_RECT /*srNewViewport*/) noexce } [[nodiscard]] -HRESULT WddmConEngine::GetProposedFont(const FontInfoDesired& /*pfiFontInfoDesired*/, - FontInfo& /*pfiFontInfo*/, +HRESULT WddmConEngine::GetProposedFont(const FontInfoDesired& /*fiFontInfoDesired*/, + FontInfo& fiFontInfo, int const /*iDpi*/) noexcept { + COORD coordSize = { 0 }; + LOG_IF_FAILED(GetFontSize(&coordSize)); + + fiFontInfo.SetFromEngine(fiFontInfo.GetFaceName(), + fiFontInfo.GetFamily(), + fiFontInfo.GetWeight(), + fiFontInfo.IsTrueTypeFont(), + coordSize, + coordSize); + return S_OK; }