[PR #4934] Always use the system's locale to render text #26035

Open
opened 2026-01-31 09:13:31 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Summary of the Pull Request

Always use the system's locale to render text to ensure the correct font variants are used.

_ResolveFontFaceWithFallback() overrides the last argument with the locale name of the font, but users normally configure fonts with latin alphabet only and use font linking to display non-latin characters, which causes the the locale names of the latin fonts are used to render the non-latin fonts. https://github.com/microsoft/terminal/issues/4508#issuecomment-598552472

PR Checklist

  • Closes Permissions needed to run Terminal (#4508)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation

On a zh-hans system, simplified Chinese hans are used after this patch (above), versus Japanese hans before (below).

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4934 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Always use the system's locale to render text to ensure the correct font variants are used. `_ResolveFontFaceWithFallback()` overrides the last argument with the locale name of the font, but users normally configure fonts with latin alphabet only and use font linking to display non-latin characters, which causes the the locale names of the latin fonts are used to render the non-latin fonts. https://github.com/microsoft/terminal/issues/4508#issuecomment-598552472 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #4508 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation On a zh-hans system, simplified Chinese hans are used after this patch (above), versus Japanese hans before (below). ![](https://user-images.githubusercontent.com/1297550/76591589-c9b06080-652b-11ea-904a-f7dd6d178372.png)
claunia added the pull-request label 2026-01-31 09:13:31 +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#26035