[PR #5407] [CLOSED] Introduce UnicodeAttribute for better Unicode support #26305

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5407
Author: @skyline75489
Created: 4/18/2020
Status: Closed

Base: mainHead: feature/unicode-attribute


📝 Commits (6)

📊 Changes

16 files changed (+331 additions, -23 deletions)

View changed files

📝 src/buffer/out/OutputCell.cpp (+5 -0)
📝 src/buffer/out/OutputCell.hpp (+11 -0)
📝 src/buffer/out/OutputCellIterator.cpp (+23 -6)
📝 src/buffer/out/OutputCellView.cpp (+11 -0)
📝 src/buffer/out/OutputCellView.hpp (+4 -0)
📝 src/buffer/out/RowCellIterator.cpp (+2 -1)
src/buffer/out/UnicodeAttribute.hpp (+170 -0)
📝 src/buffer/out/lib/bufferout.vcxproj (+2 -1)
📝 src/buffer/out/textBufferCellIterator.cpp (+4 -1)
📝 src/host/conimeinfo.cpp (+3 -2)
📝 src/host/screenInfo.cpp (+1 -1)
📝 src/renderer/base/Cluster.cpp (+12 -0)
📝 src/renderer/base/renderer.cpp (+74 -8)
📝 src/renderer/inc/Cluster.hpp (+5 -0)
📝 src/types/CodepointWidthDetector.cpp (+2 -2)
📝 src/types/inc/CodepointWidthDetector.hpp (+2 -1)

📄 Description

Summary of the Pull Request

This is the successor of #3578 which aims to improve Unicode support in the perspective of M:N cell rendering and ZWJ/ZWNJ.

References

#1472 #3546 #3578

PR Checklist

Detailed Description of the Pull Request / Additional comments

I'm trying to add the possibility of Unicode support while leaving good old cmd.exe along. So I added a UnicodeAttribute class, which is specifically crafted for the all kinds of Unicode thingy.

The code is in its very early stage and the tests are left broken. Just wanna share the idea.

I managed to get many features including Combing/ZWJ/ZWNJ to work. Emoji with VSS-16 also works . But without VSS-16 those emoji will still be half-sized.

Hangul composition requires more interaction with clusters inside CustomTextLayout which I believe is out of the scope of this PR.

I'm not really sure what I did in the PR is the correct direction overall. Cluster category and adhesive logic (which @reli-msft mentioned) may also leads to the same result.

Validation Steps Performed

WIP


🔄 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/5407 **Author:** [@skyline75489](https://github.com/skyline75489) **Created:** 4/18/2020 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/unicode-attribute` --- ### 📝 Commits (6) - [`35a95b7`](https://github.com/microsoft/terminal/commit/35a95b7b865d0d0628b75f195db99532963198e2) Introduce Unicode Attribute - [`aca7f4d`](https://github.com/microsoft/terminal/commit/aca7f4d4fd3cb5f44209357b6d2d7e99c65583f9) Actually use it for rendering - [`bed3c47`](https://github.com/microsoft/terminal/commit/bed3c47c4036ef62be34c34e37dcd50514a96c0b) Looking good enough - [`672120d`](https://github.com/microsoft/terminal/commit/672120dc694aea15f5576263a2cf973c1b3e7b69) VSS 16 - [`ea37acb`](https://github.com/microsoft/terminal/commit/ea37acbcf7d48bd32e02c95dad79e536dcf1ea2d) Revert submodule change - [`eb2000b`](https://github.com/microsoft/terminal/commit/eb2000bb79caf4608098ec9a728535c75ba85ebc) Hangul detection ### 📊 Changes **16 files changed** (+331 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/OutputCell.cpp` (+5 -0) 📝 `src/buffer/out/OutputCell.hpp` (+11 -0) 📝 `src/buffer/out/OutputCellIterator.cpp` (+23 -6) 📝 `src/buffer/out/OutputCellView.cpp` (+11 -0) 📝 `src/buffer/out/OutputCellView.hpp` (+4 -0) 📝 `src/buffer/out/RowCellIterator.cpp` (+2 -1) ➕ `src/buffer/out/UnicodeAttribute.hpp` (+170 -0) 📝 `src/buffer/out/lib/bufferout.vcxproj` (+2 -1) 📝 `src/buffer/out/textBufferCellIterator.cpp` (+4 -1) 📝 `src/host/conimeinfo.cpp` (+3 -2) 📝 `src/host/screenInfo.cpp` (+1 -1) 📝 `src/renderer/base/Cluster.cpp` (+12 -0) 📝 `src/renderer/base/renderer.cpp` (+74 -8) 📝 `src/renderer/inc/Cluster.hpp` (+5 -0) 📝 `src/types/CodepointWidthDetector.cpp` (+2 -2) 📝 `src/types/inc/CodepointWidthDetector.hpp` (+2 -1) </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 This is the successor of #3578 which aims to improve Unicode support in the perspective of M:N cell rendering and ZWJ/ZWNJ. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #1472 #3546 #3578 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes #3546 * [ ] 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 <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments I'm trying to add the possibility of Unicode support while leaving good old `cmd.exe` along. So I added a `UnicodeAttribute` class, which is specifically crafted for the all kinds of Unicode thingy. The code is in its very early stage and the tests are left broken. Just wanna share the idea. I managed to get many features including Combing/ZWJ/ZWNJ to work. Emoji with VSS-16 also works . But without VSS-16 those emoji will still be half-sized. Hangul composition requires more interaction with clusters inside CustomTextLayout which I believe is out of the scope of this PR. I'm not really sure what I did in the PR is the correct direction overall. Cluster category and adhesive logic (which @reli-msft mentioned) may also leads to the same result. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed WIP --- <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:15:15 +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#26305