Support for strikethrough text in Windows Terminal #8602

Closed
opened 2026-01-31 01:33:31 +00:00 by claunia · 7 comments
Owner

Originally created by @udif on GitHub (May 26, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.836]
Windows Terminal version (if applicable): Windows Terminal Version: 1.0.1401.0

Steps to reproduce

Please run these under bash (can be from WSL):

echo -e '\e[9mstrikethrough\e[0m'
echo -e 's\u0336t\u0336r\u0336i\u0336k\u0336e\u0336t\u0336h\u0336r\u0336o\u0336u\u0336g\u0336h\u0336'

Expected behavior

In Ubuntu 18.04 under Gnome Terminal (I tested with 3.28) You would get strikethrough in both cases:

vncviewer_KMfTbM1sOW

Actual behavior

In Ubuntu 18.04 WSL1 (or plain windows ssh to a real Ubuntu machive/VM) under Windows terminal you would get neither:

WindowsTerminal_NGGQtnqxgd

I'm trying to get Windows Terminal to print strikethrough, but can't get it to work in either nethod (ANSI control sequence or Unicode combining marks).

Note: I really care about the ANSI sequence issue. I've also tried the unicode path, but since this issue should probably be tracking only one thing, I intended to open it only for the ANSI control sequence issue. I can open a separate issue for the Unicode combining mark if necessary.

Originally created by @udif on GitHub (May 26, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.836] Windows Terminal version (if applicable): Windows Terminal Version: 1.0.1401.0 ``` # Steps to reproduce Please run these under bash (can be from WSL): echo -e '\e[9mstrikethrough\e[0m' echo -e 's\u0336t\u0336r\u0336i\u0336k\u0336e\u0336t\u0336h\u0336r\u0336o\u0336u\u0336g\u0336h\u0336' # Expected behavior In Ubuntu 18.04 under Gnome Terminal (I tested with 3.28) You would get strikethrough in both cases: ![vncviewer_KMfTbM1sOW](https://user-images.githubusercontent.com/809640/82905883-16250d00-9f6d-11ea-97a8-dac8fd924f90.png) <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior In Ubuntu 18.04 WSL1 (or plain windows ssh to a real Ubuntu machive/VM) under Windows terminal you would get neither: ![WindowsTerminal_NGGQtnqxgd](https://user-images.githubusercontent.com/809640/82905941-2e952780-9f6d-11ea-92a7-e1095d6ca84e.png) I'm trying to get Windows Terminal to print strikethrough, but can't get it to work in either nethod (ANSI control sequence or Unicode combining marks). **Note:** I really care about the ANSI sequence issue. I've also tried the unicode path, but since this issue should probably be tracking only one thing, I intended to open it only for the ANSI control sequence issue. I can open a separate issue for the Unicode combining mark if necessary.
Author
Owner

@zadjii-msft commented on GitHub (May 26, 2020):

Huh, I would have assumed we'd have an issue for this by now. We've got issues for bold, italics, overline, but not for strikethrough. We've already got support in the buffer for this fortunately, now it's just a task of rendering them correctly.

Thanks!

@zadjii-msft commented on GitHub (May 26, 2020): Huh, I would have assumed we'd have an issue for this by now. We've got issues for **bold**, _italics_, <span style="text-decoration:overline">overline</span>, but not for ~~strikethrough~~. We've already got support in the buffer for this fortunately, now it's just a task of rendering them correctly. Thanks!
Author
Owner

@jdebp commented on GitHub (May 26, 2020):

Italics is #5461. Bold is #109. Underlined is #2916. As I have already noted, there are quite a few attributes missing and Attributes.ps1 demonstrates which ones are. You don't have issues for several other missing attributes. (Note that the modern trend is to not support blink, but there are several other missing attributes.)

@jdebp commented on GitHub (May 26, 2020): Italics is #5461. Bold is #109. Underlined is #2916. As I have already noted, there are quite a few attributes missing and [`Attributes.ps1`](https://github.com/jdebp/terminal-tests/blob/master/PowerShell/Attributes.ps1) demonstrates which ones are. You don't have issues for several other missing attributes. (Note that the modern trend is to _not_ support blink, but there are several other missing attributes.)
Author
Owner

@egmontkob commented on GitHub (May 26, 2020):

Note that the modern trend is to not support blink

Not sure how much it's an explicit intent not to support it (because it's annoying and should die), or just developer laziness / lack of time / being somewhere down there on the todo list. Properly implementing blinking is truly tricky – although I had quite some fun finding a nice solution for VTE.

@egmontkob commented on GitHub (May 26, 2020): > Note that the modern trend is to _not_ support blink Not sure how much it's an explicit intent not to support it (because it's annoying and should die), or just developer laziness / lack of time / being somewhere down there on the todo list. Properly implementing blinking is truly tricky – although I had quite some fun finding a nice solution for VTE.
Author
Owner

@j4james commented on GitHub (May 26, 2020):

Note that the modern trend is to not support blink

In my (admittedly limited) experience, blinking was actually one of the most widely supported attributes, I'm assuming because it's one of the original DEC attributes. It's possible some terminals might have it disabled by default though.

Of the ANSI/ECMA attributes that we don't yet handle, the most widely supported (again in my experience) were faint, concealed, italicized, and crossed-out (in that order). A number of terminals implement doubly underlined as an alias for the regular underline, but I haven't seen many with a real double underline. And overlined doesn't seem to have that much support either, but that should be an easy one for us.

There is also a bunch of ANSI/ECMA stuff with very limited or non-existent support, like framed, encircled, the alternative fonts, and the ideogram attributes. Although the latter might actually be useful for us to pass the CJK gridlines through conpty - not sure how appropriate that is.

So I think the big ones we're missing issues for are blinking, faint, and concealed. But I'm not sure it's worth actually raising issues for each of them unless a user does it for us. That way we know it's something that users actually want.

@j4james commented on GitHub (May 26, 2020): > Note that the modern trend is to _not_ support blink In my (admittedly limited) experience, _blinking_ was actually one of the most widely supported attributes, I'm assuming because it's one of the original DEC attributes. It's possible some terminals might have it disabled by default though. Of the ANSI/ECMA attributes that we don't yet handle, the most widely supported (again in my experience) were _faint_, _concealed_, _italicized_, and _crossed-out_ (in that order). A number of terminals implement _doubly underlined_ as an alias for the regular _underline_, but I haven't seen many with a real double underline. And _overlined_ doesn't seem to have that much support either, but that should be an easy one for us. There is also a bunch of ANSI/ECMA stuff with very limited or non-existent support, like _framed_, _encircled_, the alternative fonts, and the ideogram attributes. Although the latter might actually be useful for us to pass the CJK gridlines through conpty - not sure how appropriate that is. So I think the big ones we're missing issues for are _blinking_, _faint_, and _concealed_. But I'm not sure it's worth actually raising issues for each of them unless a user does it for us. That way we know it's something that users actually want.
Author
Owner

@egmontkob commented on GitHub (May 26, 2020):

So I think the big ones we're missing issues for are blinking, faint, and concealed.

Faint is somewhat problematic, similarly to bold/bright. The legacy behavior is that bold/bright brightens colors 0..7 into their counterpart colors 8..15, and have no effect on colors 8..15. Faint, however, has no palette colors to map to, so it's often computed from colors 0..7 using some hardwired formula. Then it's unclear if faint on colors 8..15 should revert to colors 0..7, or apply that same formula. It's also unclear if bold/bright and faint are supposed to be mutually exclusive or not.

And with the modern trend of fully separating bold typeface from the colors, faint shouldn't tamper with the colors either. This means that either faint cannot be supported in this mode, or maybe it should pick a thinner font.

See https://github.com/microsoft/terminal/issues/109#issuecomment-624889312 and follow the second link for further thoughts.

While at it, I personally can't recall ever encountering an app that used faint. But maybe it's just me. In my opinion, it's absolutely fair not to support faint.


A new style on the rise is curly (maybe dotted and dashed, too) and colored underlines, mainly for spell checking purposes. Supported at least by Kitty, VTE, hterm, mintty, iTerm2; probably a few more. See e.g. https://gitlab.com/gnachman/iterm2/-/issues/6382. Much more useful than blinking, faint or concealed – IMHO.

@egmontkob commented on GitHub (May 26, 2020): > So I think the big ones we're missing issues for are blinking, faint, and concealed. Faint is somewhat problematic, similarly to bold/bright. The legacy behavior is that bold/bright brightens colors 0..7 into their counterpart colors 8..15, and have no effect on colors 8..15. Faint, however, has no palette colors to map to, so it's often computed from colors 0..7 using some hardwired formula. Then it's unclear if faint on colors 8..15 should revert to colors 0..7, or apply that same formula. It's also unclear if bold/bright and faint are supposed to be mutually exclusive or not. And with the modern trend of fully separating bold typeface from the colors, faint shouldn't tamper with the colors either. This means that either faint cannot be supported in this mode, or maybe it should pick a thinner font. See https://github.com/microsoft/terminal/issues/109#issuecomment-624889312 and follow the second link for further thoughts. While at it, I personally can't recall ever encountering an app that used faint. But maybe it's just me. In my opinion, it's absolutely fair not to support faint. --- A new style on the rise is curly (maybe dotted and dashed, too) and colored underlines, mainly for spell checking purposes. Supported at least by Kitty, VTE, hterm, mintty, iTerm2; probably a few more. See e.g. https://gitlab.com/gnachman/iterm2/-/issues/6382. Much more useful than blinking, faint or concealed – IMHO.
Author
Owner

@jdebp commented on GitHub (May 28, 2020):

Not supporting blink may well be unconscious in some cases. But the reasons to consciously not support it are much the same as the arguments for not having a blinking cursor. The Kitty underline subparameters are already in #2916 which I listed. Overline is #6000. I'll add that to the attributes test script when I get a moment.

@jdebp commented on GitHub (May 28, 2020): Not supporting blink may well be unconscious in some cases. But the reasons to consciously not support it are much the same as the arguments for not having a blinking cursor. The Kitty underline subparameters are already in #2916 which I listed. Overline is #6000. I'll add that to the attributes test script when I get a moment.
Author
Owner

@ghost commented on GitHub (Aug 26, 2020):

:tada:This issue was addressed in #7143, which has now been successfully released as Windows Terminal Preview v1.3.2382.0.🎉

Handy links:

@ghost commented on GitHub (Aug 26, 2020): :tada:This issue was addressed in #7143, which has now been successfully released as `Windows Terminal Preview v1.3.2382.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.3.2382.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8602