DECDLD Down Line Load
Load the glyphs of a soft character set, which can then be designated like any other.
DCS Pfn ; Pcn ; Pe ; Pcmw ; Pss ; Pu ; Pcmh ; Pcss { Dscs Sxbp1 ; … ; Sxbpn ST
- DEC STD 070
- §10, ch. 4 Down Line Load (Font File), p. 5
- VT510
- DECDLD—Dynamically Redefinable Character Sets
DECDLD is a device control string that loads glyphs into a dynamically redefinable character set (DRCS), a soft font. The parameters say which font buffer to load, the first character in it to load, the size of the character cell, and whether the set has 94 or 96 characters. The string starts with Dscs, the intermediate and final bytes that will name the set when it is designated with SCS, and then gives one sixel bitmap per character, separated by ;. DEC STD 070 defines DECDLD in its DRCS extension, chapter 4, from p. 5, for level 2 and above.
DEC STD 070 is explicit about what DECDLD leaves alone: “The DECDLD control does not clear the screen”, though characters from the set that are already on the screen may change to the new glyphs. Its notes on p. 6 say which resets keep the loaded set: “A Soft Reset function (DECSTR) does not erase font files loaded by the DECDLD command”, and RIS does.
xterm accepts DECDLD at level 2 and above (misc.c), but in a default build it does nothing with it. Its parse_decdld exists only in a trace build, where it writes the glyphs to the trace log and loads nothing; every other build defines it away (misc.c):
#define parse_decdld(p,q) /* nothing */
and soft fonts are off unless xterm is configured for them (ptyx.h). So a default xterm consumes DECDLD and loads nothing, and the cases follow it, as the sources page explains. The case runner sees which characters are in the cells and not how they are drawn, so the cases check what can be seen that way: that the string is consumed, and that the screen is left as it was.
Not in libghostty-vt
libghostty-vt has no soft fonts. Its DCS handler in dcs.zig recognizes tmux control mode, XTGETTCAP (DCS + q) and DECRQSS (DCS $ q), and drops every other device control string, DECDLD included. Both cases pass because dropping the string is all they can observe.
Validation
DECDLD-1: The font is not displayed
\eP1;1;1{\x20@~~~~~~~~/????????;????????/~~~~~~~~\e\\ # two glyphs
X
|X____|
cursor 1,2
reply none
DECDLD-2: The screen is not cleared
AB
\eP1;1;1{\x20@~~~~~~~~/????????\e\\
C
|ABC__|
|_____|
cursor 1,4