Double-width and double-height in libvterm and pangoterm

I've been keeping a list of terminal sequences unrecognised by libvterm and pangoterm. For a while I've kept the DEC double-width line and double-height line sequences in there, because I wasn't sure how they would interact with the arbitrary scrolling rectangles defined by VT4xx. The VT400 manual doesn't really mention how to handle this, but by chance I happened to be reading a VT500 manual instead, which does. It explains that the double-width or -height sequences aren't recognised in SLRM (Set Left/Right Mode; newly renamed from the identical but differently-named Vertical Split-Screen Mode in VT400); and that enabling SLRM will revert all lines back to single-width, single-height.

This neatly handles the problem that would otherwise occur, in that these line modes apply to entire lines. If a partial scrolling operation were to affect such a line, what would happen to the double-width characters in it? By linking it with SLRM this is avoided - either the terminal is in a mode where double-width can happen, or it's an a mode where partial lines can be scrolled - but never both.

With this neatly resolved, I finally got around to implementing DECDHL and DECDWL in libvterm and pangoterm. Here's a screenshot showing the ever-useful vttest.

With this out of the way, the list of unsupported VT1xx features is rapidly diminishing. About all that's left asides real-hardware things like interlace mode (which will be impossible to do), is 80/132 column mode. That's another one I'm still not sure how to implement...

No comments:

Post a Comment