Skip to main content
ansicode

DECDLD — Dynamically Redefinable Character Set (DCS ... { ... ST)

Download a soft glyph bitmap into a slot the terminal can then display alongside the built-in font — pure DEC VT220+ legacy.

Byte forms

Every common string-literal form so you can paste-and-search either direction.

\\x1b[\x1bPPfn;Pcn;Pe;Pcms;Pw;Pt{Dscs Sxbp1;Sxbp2;...\x1b\\
\\033[\033PPfn;Pcn;Pe;Pcms;Pw;Pt{Dscs ...\033\\
\\e[\ePPfn;Pcn;Pe;Pcms;Pw;Pt{Dscs ...\e\\
ESC [ESC P Pfn ; Pcn ; Pe ; Pcms ; Pw ; Pt { Dscs SIXEL-DATA ESC \
hex1b 50 ... 7b ... 1b 5c

Description

DECDLD — Dynamically Redefinable Character Set. A DCS frame whose body is a 6-parameter header followed by the literal `{` (0x7b), a final byte naming the Dynamic Soft Character Set, then per-glyph sixel-encoded bitmaps separated by `/` (column break) and `;` (next glyph). **Pfn** = font number, **Pcn** = starting character code in the slot, **Pe** = erase control (0 = erase all glyphs, 2 = erase only ones being redefined), **Pcms** = character matrix size, **Pw** = font width (5 = 80 columns, 6 = 132 columns), **Pt** = text/full-cell mode. The payload is the same `?`..`~` sixel alphabet as `dcs-sixel`, but each byte encodes a 6-pixel vertical strip of one glyph cell. xterm, vttest, and `tek4014` emulators decode it; modern terminals universally ignore — their fonts come from the OS font system and they have no concept of a per-session bitmap slot. Still relevant today: terminal-spec authors (vttest's font-edit page), historical-VT preservation projects, and emulator developers who need a DECDLD decode path for compatibility tests.

Spec citation: DEC STD 070 (DECDLD)

Examples

bash
# Define one tiny glyph at code 41 (capital 'A') in font slot 1 — payload is a 1-cell sixel.\nprintf '\033P1;41;0;15;0;0{ @???A;????\033\\'
python
import sys; sys.stdout.write('\x1bP1;41;0;15;0;0{ @???A;????\x1b\\\\')
go
fmt.Print("\x1bP1;41;0;15;0;0{ @???A;????\x1b\\\\")
javascript
process.stdout.write('\x1bP1;41;0;15;0;0{ @???A;????\x1b\\\\')
c
printf("\x1bP1;41;0;15;0;0{ @???A;????\x1b\\\\");

Terminal support

xterm
yes
Linux console (fbcon)
no
macOS Terminal.app
no
iTerm2
no
Windows Terminal
no
cmd.exe / ConPTY
no
kitty
no
alacritty
no
WezTerm
no
Ghostty
no
GNOME Terminal
no
Konsole
no
tmux
no
GNU screen
no

Related sequences

In the family cookbook

DCS cookbook · 4. VT remap surfaces — DECUDK (user-defined keys) and DECDLD (downloaded glyphs)