[PR #2081] [MERGED] Fix a couple of the DEC Special Graphics characters #24798

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2081
Author: @j4james
Created: 7/24/2019
Status: ✅ Merged
Merged: 7/25/2019
Merged by: @DHowett-MSFT

Base: master ← Head: fix-special-graphics


📝 Commits (4)

  • 712b135 Map the code point 0x5F to a blank glyph in the Special Graphics character set.
  • 4d57f0b Map code point 0x60 in the Special Graphics character set to the Unicode "black diamond suite", rather than the "black diamond", since the latter is currently rendered as a double width glyph.
  • 7d7fba8 Correct a couple of the comments on the Special Graphics translation table to match the DEC documentation.
  • ccc997b Make hex values consistently lowercase for the Unicode characters in the Special Graphics translation table.

📊 Changes

1 file changed (+14 additions, -14 deletions)

View changed files

📝 src/terminal/adapter/terminalOutput.cpp (+14 -14)

📄 Description

Summary of the Pull Request

Corrects the 0x5f code point in the DEC Special Graphics character set, which is meant to map to a blank glyph rather than an underscore. and updates the 0x60 code point to map to a "black diamond suite" glyph, rather than the "black diamond" glyph, since the latter currently renders as a double width character.

PR Checklist

Detailed Description of the Pull Request / Additional comments

The was mostly a matter of updating the s_rgDECSpecialGraphicsTranslations table in the TerminalOutput class, but also required a change in the TranslateKey method, to make sure the 0x5f code point was included in the range of translatable characters.

I've also made a few cosmetic changes to the source, fixing the comments on the translation table to match the DEC documentation (a couple of them were not quite right), and tidying up the case of the hex values in the table, so they're all consistently lowercase now.

The latter changes have been committed separately, so they're easy enough to revert if there are any objections to including them in this PR.

Validation Steps Performed

I've tested manually with Vttest's Test of character sets, making sure the two code points are mapped as expected, and the diamond glyph doesn't break the layout by being too wide.


🔄 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/2081 **Author:** [@j4james](https://github.com/j4james) **Created:** 7/24/2019 **Status:** ✅ Merged **Merged:** 7/25/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `fix-special-graphics` --- ### 📝 Commits (4) - [`712b135`](https://github.com/microsoft/terminal/commit/712b135c579c5fe045665ccc8f119cb428d17368) Map the code point 0x5F to a blank glyph in the Special Graphics character set. - [`4d57f0b`](https://github.com/microsoft/terminal/commit/4d57f0b6f8dbdcf42810e05a74eacb61ae582801) Map code point 0x60 in the Special Graphics character set to the Unicode "black diamond suite", rather than the "black diamond", since the latter is currently rendered as a double width glyph. - [`7d7fba8`](https://github.com/microsoft/terminal/commit/7d7fba8cbdaeab7056c0a5edc10745c37befeb37) Correct a couple of the comments on the Special Graphics translation table to match the DEC documentation. - [`ccc997b`](https://github.com/microsoft/terminal/commit/ccc997b965c0c651be731f93bda5987e4940e5c3) Make hex values consistently lowercase for the Unicode characters in the Special Graphics translation table. ### 📊 Changes **1 file changed** (+14 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/adapter/terminalOutput.cpp` (+14 -14) </details> ### 📄 Description <!-- 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 Corrects the 0x5f code point in the DEC Special Graphics character set, which is meant to map to a blank glyph rather than an underscore. and updates the 0x60 code point to map to a "black diamond suite" glyph, rather than the "black diamond" glyph, since the latter currently renders as a double width character. ## PR Checklist * [x] Closes #2049 * [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 * [x] 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: #2049 ## Detailed Description of the Pull Request / Additional comments The was mostly a matter of updating the `s_rgDECSpecialGraphicsTranslations` table in the `TerminalOutput` class, but also required a change in the `TranslateKey` method, to make sure the 0x5f code point was included in the range of translatable characters. I've also made a few cosmetic changes to the source, fixing the comments on the translation table to match the DEC documentation (a couple of them were not quite right), and tidying up the case of the hex values in the table, so they're all consistently lowercase now. The latter changes have been committed separately, so they're easy enough to revert if there are any objections to including them in this PR. ## Validation Steps Performed I've tested manually with [Vttest's](https://invisible-island.net/vttest/) _Test of character sets_, making sure the two code points are mapped as expected, and the diamond glyph doesn't break the layout by being too wide. --- <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:05:23 +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#24798