[PR #10591] [MERGED] #10497: Do not force the font on output codepage change #28127

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10591
Author: @alabuzhev
Created: 7/8/2021
Status: Merged
Merged: 7/8/2021
Merged by: @undefined

Base: mainHead: main


📝 Commits (1)

  • fe089ae #10497: Do not force the font on output codepage change

📊 Changes

1 file changed (+0 additions, -21 deletions)

View changed files

📝 src/host/misc.cpp (+0 -21)

📄 Description

Currently, when the user changes the console codepage (manually or via a script) the GDI engine tries to find and set the "best possible" font. The "best possible" here is charset-wise, it doesn't mean that the font is actually better or more eye-candy for the user.

Example:

  • Open cmd
  • Set the font to Consolas
  • Enter chcp 932
  • Suddenly, a wild MS Gothic appears!

This kind of makes sense ("if I'm changing the codepage I probably want to see the national characters") but it doesn't happen anywhere else - all other apps just substitute the missing glyphs.

After #10472 / #10478 this magic should finally work here as well. So, do we still need to change the whole font? Terminal doesn't do that after all.

Validation Steps Performed

Download 932.cmd.txt,
rename to 932.cmd, run it, check if the output is still readable.

Closes #10497


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10591 **Author:** [@alabuzhev](https://github.com/alabuzhev) **Created:** 7/8/2021 **Status:** ✅ Merged **Merged:** 7/8/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`fe089ae`](https://github.com/microsoft/terminal/commit/fe089ae24f0dc7ad5cdcc93b91b578380960ee36) #10497: Do not force the font on output codepage change ### 📊 Changes **1 file changed** (+0 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `src/host/misc.cpp` (+0 -21) </details> ### 📄 Description Currently, when the user changes the console codepage (manually or via a script) the GDI engine tries to find and set the "best possible" font. The "best possible" here is charset-wise, it doesn't mean that the font is actually better or more eye-candy for the user. Example: - Open cmd - Set the font to Consolas - Enter `chcp 932` - Suddenly, a wild MS Gothic appears! This kind of makes sense (*"if I'm changing the codepage I probably want to see the national characters"*) but it doesn't happen anywhere else - all other apps just substitute the missing glyphs. After #10472 / #10478 this magic should finally work here as well. So, do we still need to change the whole font? Terminal doesn't do that after all. ## Validation Steps Performed Download [932.cmd.txt](https://github.com/microsoft/terminal/files/6697577/932.cmd.txt), rename to 932.cmd, run it, check if the output is still readable. Closes #10497 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:26:30 +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#28127