[PR #16323] Fix nearby fonts for DxEngine again #30896

Closed
opened 2026-01-31 09:43:39 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16323

State: closed
Merged: Yes


The nearby font loading has to be outside of the try/catch of the
_FindFontFace call, because it'll throw for broken font files.
But in my previous PR I had overlooked that the font variant loop
modifies the only copy of the face name that we got and was in the
same try/catch. That's bad, because once we get to the nearby search
code, the face name will be invalid. This commit fixes the issue by
wrapping each individual _FindFontFace call in a try/catch block.

Closes #16322

Validation Steps Performed

  • Remove every single copy of Windows Terminal from your system
  • Manually clean up Cascadia .ttf files because they aren't gone
  • Destroy your registry by manually removing appx references (fun!)
  • Put the 4 Cascadia .ttf files into the Dev app AppX directory
  • Launch
  • No warning
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16323 **State:** closed **Merged:** Yes --- The nearby font loading has to be outside of the try/catch of the `_FindFontFace` call, because it'll throw for broken font files. But in my previous PR I had overlooked that the font variant loop modifies the only copy of the face name that we got and was in the same try/catch. That's bad, because once we get to the nearby search code, the face name will be invalid. This commit fixes the issue by wrapping each individual `_FindFontFace` call in a try/catch block. Closes #16322 ## Validation Steps Performed * Remove every single copy of Windows Terminal from your system * Manually clean up Cascadia .ttf files because they aren't gone * Destroy your registry by manually removing appx references (fun!) * Put the 4 Cascadia .ttf files into the Dev app AppX directory * Launch * No warning ✅
claunia added the pull-request label 2026-01-31 09:43:39 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30896