Add support for double width/height lines #10952

Closed
opened 2026-01-31 02:34:33 +00:00 by claunia · 4 comments
Owner

Originally created by @j4james on GitHub (Oct 8, 2020).

Description of the new feature/enhancement

The VT100 (and later DEC terminals) had a bunch of operations that could alter the width and height of characters on a per-line basis: DECDWL, DECDHL, and DECSWL. Despite their limitations, they're still quite useful for sprucing up a UI.

As an example, here's a UI for a chess app rendered with and without line attribute support:

image

Proposed technical implementation details (optional)

I've been playing around with a POC of this for a while now, and I've come to realise there's actually a lot more work involved than you might first expect. Other than the basic rendering of characters, we need to handle text decoration, cursor rendering, selection marking, window resizing, mouse position detection, and every VT operation that depends on window boundaries will potentially need to take line attributes into account.

So before I spend more time on this, I wanted to make sure it's something you'd be happy to accept. I should say that I'm inclined to make it conhost-only to start with. I have also looked at the WT side of things, but that basically doubles the workload, and there are extra complications introduced by conpty that I don't have a good answer for.

Originally created by @j4james on GitHub (Oct 8, 2020). # Description of the new feature/enhancement The VT100 (and later DEC terminals) had a bunch of operations that could alter the width and height of characters on a per-line basis: [`DECDWL`](https://vt100.net/docs/vt510-rm/DECDWL.html), [`DECDHL`](https://vt100.net/docs/vt510-rm/DECDHL.html), and [`DECSWL`](https://vt100.net/docs/vt510-rm/DECSWL.html). Despite their limitations, they're still quite useful for sprucing up a UI. As an example, here's a UI for a chess app rendered with and without line attribute support: ![image](https://user-images.githubusercontent.com/4181424/95500478-c0428600-099e-11eb-991f-2ca9cdf47fce.png) # Proposed technical implementation details (optional) I've been playing around with a POC of this for a while now, and I've come to realise there's actually a lot more work involved than you might first expect. Other than the basic rendering of characters, we need to handle text decoration, cursor rendering, selection marking, window resizing, mouse position detection, and every VT operation that depends on window boundaries will potentially need to take line attributes into account. So before I spend more time on this, I wanted to make sure it's something you'd be happy to accept. I should say that I'm inclined to make it conhost-only to start with. I have also looked at the WT side of things, but that basically doubles the workload, and there are extra complications introduced by conpty that I don't have a good answer for.
claunia added the Issue-FeatureProduct-ConhostResolution-Fix-CommittedArea-VT labels 2026-01-31 02:34:33 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Oct 9, 2020):

I'm sure we'd be happy to accept, but I think the real trick here is going to be the conpty bit. I really have no idea how the renderer could be updated to support such a thing.

I guess if we start by scoping this to conhost only, then it's not like it's going to be any worse in the Terminal than it currently is. I'd probably break it into 3 PRs - one for conhost, one for rendering with conpty, and a final one for implementing in Terminal.

@zadjii-msft commented on GitHub (Oct 9, 2020): I'm sure we'd be happy to accept, but I think the real trick here is going to be the conpty bit. I really have no idea how the renderer could be updated to support such a thing. I guess if we start by scoping this to conhost only, then it's not like it's going to be any worse in the Terminal than it currently is. I'd probably break it into 3 PRs - one for conhost, one for rendering with conpty, and a final one for implementing in Terminal.
Author
Owner

@skyline75489 commented on GitHub (Oct 9, 2020):

If there's a way for conpty to support this, then my working Sixel implementation might also benefit from it.

@skyline75489 commented on GitHub (Oct 9, 2020): If there's a way for conpty to support this, then my working Sixel implementation might also benefit from it.
Author
Owner

@j4james commented on GitHub (Oct 9, 2020):

My plan for this is to leave it conhost-only until we are in a position to rethink the conpty architecture. I would have advised the same thing for Sixel, but I thought maybe you already had a solution for that.

@j4james commented on GitHub (Oct 9, 2020): My plan for this is to leave it conhost-only until we are in a position to rethink the conpty architecture. I would have advised the same thing for Sixel, but I thought maybe you already had a solution for that.
Author
Owner

@skyline75489 commented on GitHub (Oct 10, 2020):

Well I made it working...partially. See https://github.com/microsoft/terminal/issues/448#issuecomment-705946110

But I’m also blocked by the conpty infra and haven’t figured it out.

获取 Outlook for iOShttps://aka.ms/o0ukef

@skyline75489 commented on GitHub (Oct 10, 2020): Well I made it working...partially. See https://github.com/microsoft/terminal/issues/448#issuecomment-705946110 But I’m also blocked by the conpty infra and haven’t figured it out. 获取 Outlook for iOS<https://aka.ms/o0ukef>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10952