Skip to main content

DECDHL/DECDWL

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

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
Formal syntax
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​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoNo double-height/double-width line support found
Bobcat✓0.9.0Double-width/height line attributes, TerminalCtrl DEC compatibility
contour✓v0.6.1ESC # 3/4/6 for double-height/width lines; configureCurrentLineSize()
foot✗NoNo implementation found for ESC #3-6
Ghostty✗NoNo implementation found for ESC #3-6 double-height/width line sequences
iTerm2~YesSequences recognized but ignored (no-op)
Kitty✗No
Konsole✓Yes
mintty✓YesDECDHL top/bottom at src/termout.c:2010-2019, DECDWL at src/termout.c:2023-2027
mlterm✓rel-0_2_1
PuTTY✓0.45
Rio✗NoNo ESC # 3-6 handling found
rxvt-unicode✗NoOnly DECALN (ESC # 8) handled; ESC # 3-6 ignored
st✗NoNot implemented in tdectest
terminology✗NoOnly DECALN (ESC # 8) implemented; ESC # 3-6 consumed but ignored
VT100✓Yes
VTE✗NoNot implemented, marked as 'not worth implementing'
WezTerm✓YesHandled in performer.rs:635-649 via EscCode::DecDoubleHeight* and DecDoubleWidth* (ESC #3-6)
Windows Terminal✓YesESC #3-6 dispatch SetLineRendition() with DoubleHeightTop/Bottom/DoubleWidth in OutputStateMachineEngine.cpp:274-284
xterm✓YesImplemented in charproc.c:3782-3798 via xterm_DECDHL/DECDWL/DECSWL
xterm.js✗NoNot implemented
Multiplexers
cy✗NoESC # sequences not handled
GNU Screen✗NoOnly ESC # 8 (DECALN) is handled; ESC # 3-6 not implemented
tmux✗NoESC #3-6 sequences not implemented
tuios✗No
Zellij✗No