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

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

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

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2081 **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 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.
claunia added the pull-request label 2026-01-31 09:05:25 +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#24803