From b8398d865b0df83dd8635575e236722ee2d8b478 Mon Sep 17 00:00:00 2001 From: PankajBhojwani Date: Tue, 15 Feb 2022 16:07:44 -0800 Subject: [PATCH] Fix font axes/features not working on DPI change (#12492) When the dpi is changed, call `updateFont()` instead of `TriggerFontChange`, this means that we continue to use the existing font features/axes Closes #11287 (cherry picked from commit 3b4679431df558ac35adec991f35d75545a1f896) --- src/cascadia/TerminalControl/ControlCore.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cascadia/TerminalControl/ControlCore.cpp b/src/cascadia/TerminalControl/ControlCore.cpp index 27202a114e0..6bca14aa18c 100644 --- a/src/cascadia/TerminalControl/ControlCore.cpp +++ b/src/cascadia/TerminalControl/ControlCore.cpp @@ -917,16 +917,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation return; } - const auto dpi = (float)(scale * USER_DEFAULT_SCREEN_DPI); - const auto actualFontOldSize = _actualFont.GetSize(); auto lock = _terminal->LockForWriting(); _compositionScale = scale; - _renderer->TriggerFontChange(::base::saturated_cast(dpi), - _desiredFont, - _actualFont); + // _updateFont relies on the new _compositionScale set above + _updateFont(); const auto actualFontNewSize = _actualFont.GetSize(); if (actualFontNewSize != actualFontOldSize)