[PR #16993] Fix bugs introduced in #16821 (custom font fallback) #31085

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

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

State: closed
Merged: Yes


  • Since FindFontWithLocalizedName is broken (intentionally and
    temporarily until #16943 is fixed) we have to be extra be careful
    not to return a nullptr Font.
  • Portable builds may not have a broken font cache, but also not have
    the given font (Cascadia Mono for instance) installed. This requires
    us to load the nearby fonts even if there aren't any exceptions.

Validation Steps Performed

  • Open src/cascadia/CascadiaResources.build.items
    and remove the Condition for .ttf files
  • Deploy on a clean Windows 10 VM
  • Cascadia Mono loads without issues
  • Open the Settings > Defaults > Appearance,
    enter a non-existing font and hit Save
  • Doesn't crash
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16993 **State:** closed **Merged:** Yes --- * Since `FindFontWithLocalizedName` is broken (intentionally and temporarily until #16943 is fixed) we have to be extra be careful not to return a nullptr `Font`. * Portable builds may not have a broken font cache, but also not have the given font (Cascadia Mono for instance) installed. This requires us to load the nearby fonts even if there aren't any exceptions. ## Validation Steps Performed * Open `src/cascadia/CascadiaResources.build.items` and remove the `Condition` for .ttf files * Deploy on a clean Windows 10 VM * Cascadia Mono loads without issues ✅ * Open the `Settings > Defaults > Appearance`, enter a non-existing font and hit Save * Doesn't crash ✅
claunia added the pull-request label 2026-01-31 09:44:58 +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#31085