Terminal Guide

Change/Query Font (xterm)

ESC1B ]5D 5035 30 ;3b font ESC1B \5C
urxvt
xterm
🔧
konsole

[This sequence collides with osc-50_konsole]

Set or query fonts.

If font starts with ?3f  this is a query. Without further characters in font the terminal replies with the currently selected font as ESC1b ]5d 535 030 ;3b font ESC1b \5c . Otherwise the reply contains the slot number and the slot to query can be specified as a number optionally with +/- as described below (omit the '#' in the query form). The response has the format ESC1b ]5d 535 030 ;3b #23 slot 20 font ESC1b \5c .

If font starts with #23  followed by a number optionally prefixed with -2d  or +2b  then it selects one of xterms font slots. Without +/- this selects the font slot to act on. With +1 it selects the next bigger font from the font slots and with -1 it selects the next smaller font. Higher relative numbers are also supported. The relative selection does not wrap. The font slots are numbered 0 to 6.

If font does not start with #, acts on the currently selected font slot.

The rest of font is interpreted as name of the font to set for the specified slot. The specified slot is also set as active slot. The font name is depending on configuration either a X11 font (XLFD) or a Xft font name.

urxvt ( ☹ )

Syntax is different. Prefer using set base font, set bold font, set italic font and set bold italic font.