[1.22.x] [Unicode] Poor complex script support #22196

Closed
opened 2026-01-31 08:06:11 +00:00 by claunia · 6 comments
Owner

Originally created by @Thirumalai on GitHub (Aug 31, 2024).

Windows Terminal version

1.22.2362.0

Windows build number

10.0.22631.4037

Other Software

No response

Steps to reproduce

Try to render any Tamil scripts

Sample:
Kural.txt

Expected Behavior

Complex script texts should be rendered properly at the correct width, without any overlapping

Actual Behavior

Complex script texts are not rendered properly. Although 1.22.x preview claims to have better support for Unicode complex scripts, but the rendering has further worsened compared to 1.21.x

image

Originally created by @Thirumalai on GitHub (Aug 31, 2024). ### Windows Terminal version 1.22.2362.0 ### Windows build number 10.0.22631.4037 ### Other Software _No response_ ### Steps to reproduce Try to render any Tamil scripts Sample: [Kural.txt](https://github.com/user-attachments/files/16823853/Kural.txt) ### Expected Behavior Complex script texts should be rendered properly at the correct width, without any overlapping ### Actual Behavior Complex script texts are not rendered properly. Although 1.22.x preview claims to have better support for Unicode complex scripts, but the rendering has further worsened compared to 1.21.x ![image](https://github.com/user-attachments/assets/97996e9c-61d7-4fe2-afb5-a8b7a43c7c0a)
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:06:11 +00:00
Author
Owner

@Thirumalai commented on GitHub (Aug 31, 2024):

maybe related to this: https://github.com/microsoft/terminal/pull/16916

@Thirumalai commented on GitHub (Aug 31, 2024): maybe related to this: https://github.com/microsoft/terminal/pull/16916
Author
Owner

@ehoogeveen-medweb commented on GitHub (Aug 31, 2024):

The overlap is probably fixed by https://github.com/microsoft/terminal/pull/17826

@ehoogeveen-medweb commented on GitHub (Aug 31, 2024): The overlap is probably fixed by https://github.com/microsoft/terminal/pull/17826
Author
Owner

@german-one commented on GitHub (Aug 31, 2024):

#17826 should have fixed the regression in 1.22.
However, Tamil letters still overlap. E.g.
'nna' U+0BA3
'ha' U+0BB9
'au' U+0B94
... advance the cursor only one place while occupying three.

@german-one commented on GitHub (Aug 31, 2024): #17826 should have fixed the regression in 1.22. However, Tamil letters still overlap. E.g. `ண` 'nna' U+0BA3 `ஹ` 'ha' U+0BB9 `ஔ` 'au' U+0B94 ... advance the cursor only one place while occupying three.
Author
Owner

@lhecker commented on GitHub (Sep 1, 2024):

Unicode only has a spec for the widths of "East Asian" characters and Tamil is South Asian. Because of that they're assigned an ea (East Asian width) attribute of N (Neutral = Not East Asian). ED7 in the UAX #11 spec states that this is the same as Narrow in the context of the spec:

[...] because for all practical purposes they behave like Na, they are treated as narrow characters (the same as Na) under the recommendations below.

Unicode would need to extend the specification to include all languages. If we fixed this ourselves, we'd be the only ones doing so.

The same is true for Devanagari by the way: All of its characters are assigned a width of 1 for the same reason. This results in an ugly layout, even with #17826 merged. Without an official Unicode specification that includes Devanagari, Tamil, etc., however we cannot assume a width of 2, because the only existing specification explicitly says all those characters get a width of 1 (as mentioned above).

Unrelatedly, even with a Unicode specification I believe that neither of the two languages can currently be used in a terminal, since no monospace font for them exists.
With some major caveats it'd probably be possible to work around both issues on our side by adding support for proportional text rendering (like in VS Code). It would not be difficult to do so, at least on a basic level.

@lhecker commented on GitHub (Sep 1, 2024): Unicode only has a spec for the widths of "East Asian" characters and Tamil is South Asian. Because of that they're assigned an `ea` (East Asian width) attribute of `N` (Neutral = Not East Asian). [ED7 in the UAX #11 spec](https://www.unicode.org/reports/tr11/#ED7) states that this is the same as Narrow in the context of the spec: > [...] because for all practical purposes they behave like Na, they are treated as narrow characters (the same as Na) under the recommendations below. Unicode would need to extend the specification to include all languages. If we fixed this ourselves, we'd be the only ones doing so. The same is true for Devanagari by the way: All of its characters are assigned a width of 1 for the same reason. This results in an ugly layout, even with #17826 merged. Without an official Unicode specification that includes Devanagari, Tamil, etc., however we cannot assume a width of 2, because the only existing specification explicitly says all those characters get a width of 1 (as mentioned above). Unrelatedly, even with a Unicode specification I believe that neither of the two languages can currently be used in a terminal, since no monospace font for them exists. With some major caveats it'd probably be possible to work around both issues on our side by adding support for proportional text rendering (like in VS Code). It would not be difficult to do so, at least on a basic level.
Author
Owner

@lhecker commented on GitHub (Sep 3, 2024):

I'll be closing this issue for now. We're tracking progress on the proposal to the Unicode consortium, but outside of that there's unfortunately not much we can do ourselves here, not even in the long-term.

@Thirumalai Would you be interested in a proportional text renderer for the terminal? In that case I'd gladly open a new issue to track progress on that.

@lhecker commented on GitHub (Sep 3, 2024): I'll be closing this issue for now. We're tracking progress on the [proposal to the Unicode consortium](https://www.unicode.org/L2/L2023/23107-terminal-suppt.pdf), but outside of that there's unfortunately not much we can do ourselves here, not even in the long-term. @Thirumalai Would you be interested in a proportional text renderer for the terminal? In that case I'd gladly open a new issue to track progress on that.
Author
Owner

@Thirumalai commented on GitHub (Sep 13, 2024):

@lhecker Thanks for your response. It would be great if Windows Terminal could gain proportional text renderer support to improve the readability of languages requiring complex script rendering.

@Thirumalai commented on GitHub (Sep 13, 2024): @lhecker Thanks for your response. It would be great if Windows Terminal could gain proportional text renderer support to improve the readability of languages requiring complex script rendering.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22196