Repository: microsoft/terminal (language: cpp)

Issue:
Long sequences of repeating characters are misaligned
### Windows Terminal version

1.17.1023

### Windows build number

10.0.22621.1265

### Other Software

Font: Iosevka Term 19.0.1

### Steps to reproduce

Simply type long sequences of repeating characters like `------` or `!!!!!!!!!`.

### Expected Behavior

Characters should appear aligned to the grid.

### Actual Behavior

Characters get misaligned within the grid, such that the cursor position no longer corresponds to location where typed characters appear. Happens on any prompt, shell, WSL2 distro and in applications such as Vim.

https://user-images.githubusercontent.com/40664661/219950686-315eb4fc-71fe-4ec7-a6e6-8a61784566e9.mp4



Discussion / hints:
I'd reckon that this would be a bug with the way the font is authored. I do see that there's the upstream https://github.com/be5invis/Iosevka/issues/1553 though and we're just [spiderman.png](https://cdn.vox-cdn.com/thumbor/mFiywP9BUHDC8AIRBDYJvXdfQiA=/1400x1050/filters:format(jpeg)/cdn.vox-cdn.com/uploads/chorus_asset/file/23265504/Spider_Man_meme.jpg)'ing here. 

Maybe @lhecker can take a look at the metrics under the debugger and figure out what's going on here. 
I'd also be curious to know if any earlier versions of Iosevka Term worked. That would _quickly_ help narrow it down. 

Fix patch:
diff --git a/src/renderer/atlas/AtlasEngine.api.cpp b/src/renderer/atlas/AtlasEngine.api.cpp
index 6f4a2d02b75..5cf54d18583 100644
--- a/src/renderer/atlas/AtlasEngine.api.cpp
+++ b/src/renderer/atlas/AtlasEngine.api.cpp
@@ -711,7 +711,7 @@ void AtlasEngine::_resolveFontMetrics(const wchar_t* requestedFaceName, const Fo
         fontMetrics->fontName = std::move(fontName);
         fontMetrics->fontSizeInDIP = fontSizeInDIP;
         fontMetrics->baselineInDIP = baseline / static_cast<float>(_api.dpi) * 96.0f;
-        fontMetrics->advanceScale = cellWidth / adjustedWidth;
+        fontMetrics->advanceScale = cellWidth / advanceWidth;
         fontMetrics->cellSize = { cellWidth, cellHeight };
         fontMetrics->fontWeight = fontWeightU16;
         fontMetrics->underlinePos = underlinePosU16;


Test patch: