Repository: microsoft/terminal (language: cpp)

Issue:
Font Features is inconsistent
### Windows Terminal version (or Windows build number)

10.0.19043.1237, 1.11.2421.0

### Other Software

_No response_

### Steps to reproduce

I'm using the Nerd-Font port of FiraCode as my font for Windows Terminal. Using the new Font Features options, I've configured WT to use the alternate zero glyph which replaces the slash in the middle of the character with a dot. There have been a couple instances in which I've launched a terminal only for the zero glyph to have reverted back to the old style, though launching a new terminal does fix the issue.

Here is my settings config:
```
"font": 
{
  "face": "FiraCode NF",
  "features": 
  {
    "calt": 0,
    "ss04": 1,
    "zero": 1
  },
  "size": 12
},
```

~~I think I've found a way to reproduce this. It seems like it happens when you first launch windows terminal from a full restart.~~
Ignore that last one, it doesn't happen all the time. I can trigger the effect by dragging my window from a display at 100% scaling to one with 125% scaling.

### Expected Behavior

The font should display with the correct `0` symbol

### Actual Behavior

The zero symbol is incorrect.


Discussion / hints:
Updated as I think I have a reproduction case now
Updated with a better reproduction example
Thanks, this is really helpful. I'm betting that when we added the new version of `UpdateFont` that took font features, we didn't consistently call it in all scenarios (like DPI change!). /cc @PankajBhojwani

Fix patch:
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<int>(dpi),
-                                     _desiredFont,
-                                     _actualFont);
+        // _updateFont relies on the new _compositionScale set above
+        _updateFont();
 
         const auto actualFontNewSize = _actualFont.GetSize();
         if (actualFontNewSize != actualFontOldSize)


Test patch: