mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-12 18:41:01 -06:00
inbox: Synchronize the font between the WDDMCon Renderer and the SCREEN_INFORMATION (#1089)
Synchronize the font between the WDDMCon Renderer and the SCREEN_INFORMATION when the OneCore Interactivity library starts up. #21717424 Retrieved from rs_onecore_dep_acioss ccca0315e7db34c09f5fcd9dfabae666ede1687b Fixes #958.
This commit is contained in:
parent
71e19cd825
commit
880272c748
@ -53,6 +53,8 @@ DWORD WINAPI ConsoleInputThreadProcOneCore(LPVOID /*lpParam*/)
|
|||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
globals.getConsoleInformation().GetActiveOutputBuffer().RefreshFontWithRenderer();
|
||||||
|
|
||||||
globals.ntstatusConsoleInputInitStatus = Status;
|
globals.ntstatusConsoleInputInitStatus = Status;
|
||||||
globals.hConsoleInputInitEvent.SetEvent();
|
globals.hConsoleInputInitEvent.SetEvent();
|
||||||
|
|
||||||
|
|||||||
@ -339,19 +339,9 @@ HRESULT WddmConEngine::UpdateDrawingBrushes(COLORREF const /*colorForeground*/,
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
HRESULT WddmConEngine::UpdateFont(const FontInfoDesired& /*pfiFontInfoDesired*/, FontInfo& fiFontInfo) noexcept
|
HRESULT WddmConEngine::UpdateFont(const FontInfoDesired& fiFontInfoDesired, FontInfo& fiFontInfo) noexcept
|
||||||
{
|
{
|
||||||
COORD coordSize = {0};
|
return GetProposedFont(fiFontInfoDesired, fiFontInfo, USER_DEFAULT_SCREEN_DPI);
|
||||||
LOG_IF_FAILED(GetFontSize(&coordSize));
|
|
||||||
|
|
||||||
fiFontInfo.SetFromEngine(fiFontInfo.GetFaceName(),
|
|
||||||
fiFontInfo.GetFamily(),
|
|
||||||
fiFontInfo.GetWeight(),
|
|
||||||
fiFontInfo.IsTrueTypeFont(),
|
|
||||||
coordSize,
|
|
||||||
coordSize);
|
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
@ -374,10 +364,20 @@ HRESULT WddmConEngine::UpdateViewport(const SMALL_RECT /*srNewViewport*/) noexce
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
HRESULT WddmConEngine::GetProposedFont(const FontInfoDesired& /*pfiFontInfoDesired*/,
|
HRESULT WddmConEngine::GetProposedFont(const FontInfoDesired& /*fiFontInfoDesired*/,
|
||||||
FontInfo& /*pfiFontInfo*/,
|
FontInfo& fiFontInfo,
|
||||||
int const /*iDpi*/) noexcept
|
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;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user