Skip to main content

Text area (pixels)

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!
Experimental

Text Area Size (pixels) is an XTerm window manipulation sequence that queries the pixel dimensions of the terminal's text area.

Syntax​

CSI 14 t                   Request text area size in pixels
CSI 14 ; 2 t Request window size in pixels
CSI 4 ; height ; width t Response: pixel dimensions
Formal syntax
(* Request — text area size *)
text_area_request = 0x1b, "[", "1", "4", "t" ;

(* Request — window size *)
window_size_request = 0x1b, "[", "1", "4", ";", "2", "t" ;

(* Response *)
size_response     = 0x1b, "[", "4", ";", Pn, ";", Pn, "t" ;
Pn                = digit, { digit } ;
digit             = "0" | "1" | "2" | "3" | "4"
                | "5" | "6" | "7" | "8" | "9" ;

Response​

FieldDescription
heightHeight of the text area in pixels
widthWidth of the text area in pixels

Description​

This sequence queries the terminal for the pixel size of the text area or the entire window. It is part of the XTerm CSI Ps ; Ps ; Ps t window manipulation family.

  • CSI 14 t — Requests the size of the text area (the region where characters are rendered, excluding window decorations, scroll bars, and padding). The terminal responds with CSI 4 ; height ; width t.
  • CSI 14 ; 2 t — Requests the size of the entire window, including decorations. The terminal responds with the same CSI 4 ; height ; width t format.

The response format matches the parameter format of the Resize (pixels) sequence (CSI 4 ; height ; width t). This symmetry means you can query the current size and later restore it using the same values.

The text area pixel size, combined with the Cell Size report, can be used to calculate the number of character rows and columns, which is equivalent to the Text Area Size (chars) report.

Examples​

# Query text area size in pixels
printf '\e[14t'

# Query window size in pixels (including decorations)
printf '\e[14;2t'

# Read the response
printf '\e[14t'; read -st 1 -d t response; echo "$response"

Specifications​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoRejected per escape_support.md:81-82
Bobcat✓0.9.0Requires WindowReports enabled in profile
contour✓v0.1.0CSI 14 t and CSI 14;2 t implemented (cases 14, 16, 18, 19)
foot✓YesCSI 14 t reports text area/window size in pixels
Ghostty✓v1.0.0CSI 14 t reports text area size in pixels
iTerm2✓v20260216-nightlyCSI 14 t via XTERMCC_REPORT_WIN_PIX_SIZE
Kitty✓YesCSI 14/16/18 t handled via screen_report_size
Konsole✓YesCSI 14 t implemented as reportPixelSize
mintty✓YesCSI 14 t implemented
mlterm✓rel-3_8_0CSI 14 t supported
PuTTY✓0.75CSI 14 t supported at terminal.c:4932-4938
Rio✓v0.0.3
rxvt-unicode✓1.2
st✗NoNo CSI t window manipulation sequences implemented
terminology✗No
VT100✗No
VTE✓YesReports calculated text area size in pixels
WezTerm✓YesReports text area size in pixels
Windows Terminal✓YesCSI 14 t via WindowManipulationType::ReportTextSizeInPixels in adaptDispatch.cpp:3457. Reports virtual pixel size for Sixel
xterm✓xterm-93
xterm.js✓4.4.0CSI 14 t. Requires windowOptions.getWinSizePixels enabled.
Multiplexers
cy✗NoExplicitly ignored
GNU Screen✗NoCSI 14 t not implemented; CSI 18 t reports chars not pixels
tmux✓1.9Reports text area in pixels (CSI 14 t)
tuios✓v0.2.2CSI 14 t, 16 t, and 18 t supported
Zellij✓v0.24.0CSI 14 t and CSI 16 t (character cell size report)

See also​