DECDHL/DECDWL
DECDHL (Double-Height Line) and DECDWL (Double-Width Line) are DEC VT100 escape sequences that control the height and width of individual lines on the display.
Syntax
ESC # 3 DECDHL — Double-height line, top half
ESC # 4 DECDHL — Double-height line, bottom half
ESC # 5 DECSWL — Single-width, single-height line (reset)
ESC # 6 DECDWL — Double-width, single-height line
DECDHL_TOP = 0x1b, "#", "3" ; (* top half *) DECDHL_BOT = 0x1b, "#", "4" ; (* bottom half *) DECSWL = 0x1b, "#", "5" ; DECDWL = 0x1b, "#", "6" ;
Description
These sequences are line attributes — they affect the entire line the cursor is on, not individual characters. Each line on the display independently has one of these attributes.
DECDHL — Double-height (ESC # 3 / ESC # 4)
Double-height characters are created by applying ESC # 3 and ESC # 4 to two adjacent lines containing identical text. ESC # 3 renders the top half and ESC # 4 renders the bottom half. Both lines must contain the same characters at the same positions for the effect to display correctly.
Double-height lines are also double-width: each character occupies two columns, so only half as many characters fit on the line compared to normal width.
DECDWL — Double-width (ESC # 6)
Makes the current line double-width at single height. Each character takes up two cell widths, halving the number of characters that fit on the line. Per the VT510 manual, if the line was previously single-width, characters to the right of the screen center are lost.
DECSWL — Single-width (ESC # 5)
Resets the current line to normal single-width, single-height rendering. This is the default attribute for all new lines.
Examples
# Create double-height text across two lines
printf '\e#3Double Height\n'
printf '\e#4Double Height\n'
# Make current line double-width
printf '\e#6Wide Line\n'
Specifications
| Specification | Section |
|---|---|
| VT510 Reference | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✗ | No | No double-height/double-width line support found |
| Bobcat | ✓ | 0.9.0 | Double-width/height line attributes, TerminalCtrl DEC compatibility |
| contour | ✓ | v0.6.1 | ESC # 3/4/6 for double-height/width lines; configureCurrentLineSize() |
| foot | ✗ | No | No implementation found for ESC #3-6 |
| Ghostty | ✗ | No | No implementation found for ESC #3-6 double-height/width line sequences |
| iTerm2 | ~ | Yes | Sequences recognized but ignored (no-op) |
| Kitty | ✗ | No | |
| Konsole | ✓ | Yes | |
| mintty | ✓ | Yes | DECDHL top/bottom at src/termout.c:2010-2019, DECDWL at src/termout.c:2023-2027 |
| mlterm | ✓ | rel-0_2_1 | |
| PuTTY | ✓ | 0.45 | |
| Rio | ✗ | No | No ESC # 3-6 handling found |
| rxvt-unicode | ✗ | No | Only DECALN (ESC # 8) handled; ESC # 3-6 ignored |
| st | ✗ | No | Not implemented in tdectest |
| terminology | ✗ | No | Only DECALN (ESC # 8) implemented; ESC # 3-6 consumed but ignored |
| VT100 | ✓ | Yes | |
| VTE | ✗ | No | Not implemented, marked as 'not worth implementing' |
| WezTerm | ✓ | Yes | Handled in performer.rs:635-649 via EscCode::DecDoubleHeight* and DecDoubleWidth* (ESC #3-6) |
| Windows Terminal | ✓ | Yes | ESC #3-6 dispatch SetLineRendition() with DoubleHeightTop/Bottom/DoubleWidth in OutputStateMachineEngine.cpp:274-284 |
| xterm | ✓ | Yes | Implemented in charproc.c:3782-3798 via xterm_DECDHL/DECDWL/DECSWL |
| xterm.js | ✗ | No | Not implemented |
| Multiplexers | |||
| cy | ✗ | No | ESC # sequences not handled |
| GNU Screen | ✗ | No | Only ESC # 8 (DECALN) is handled; ESC # 3-6 not implemented |
| tmux | ✗ | No | ESC #3-6 sequences not implemented |
| tuios | ✗ | No | |
| Zellij | ✗ | No | |