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
| Field | Description |
|---|---|
height | Height of the text area in pixels |
width | Width 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 withCSI 4 ; height ; width t.CSI 14 ; 2 t— Requests the size of the entire window, including decorations. The terminal responds with the sameCSI 4 ; height ; width tformat.
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
| Specification | Section |
|---|---|
| XTerm ctlseqs | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✗ | No | Rejected per escape_support.md:81-82 |
| Bobcat | ✓ | 0.9.0 | Requires WindowReports enabled in profile |
| contour | ✓ | v0.1.0 | CSI 14 t and CSI 14;2 t implemented (cases 14, 16, 18, 19) |
| foot | ✓ | Yes | CSI 14 t reports text area/window size in pixels |
| Ghostty | ✓ | v1.0.0 | CSI 14 t reports text area size in pixels |
| iTerm2 | ✓ | v20260216-nightly | CSI 14 t via XTERMCC_REPORT_WIN_PIX_SIZE |
| Kitty | ✓ | Yes | CSI 14/16/18 t handled via screen_report_size |
| Konsole | ✓ | Yes | CSI 14 t implemented as reportPixelSize |
| mintty | ✓ | Yes | CSI 14 t implemented |
| mlterm | ✓ | rel-3_8_0 | CSI 14 t supported |
| PuTTY | ✓ | 0.75 | CSI 14 t supported at terminal.c:4932-4938 |
| Rio | ✓ | v0.0.3 | |
| rxvt-unicode | ✓ | 1.2 | |
| st | ✗ | No | No CSI t window manipulation sequences implemented |
| terminology | ✗ | No | |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | Reports calculated text area size in pixels |
| WezTerm | ✓ | Yes | Reports text area size in pixels |
| Windows Terminal | ✓ | Yes | CSI 14 t via WindowManipulationType::ReportTextSizeInPixels in adaptDispatch.cpp:3457. Reports virtual pixel size for Sixel |
| xterm | ✓ | xterm-93 | |
| xterm.js | ✓ | 4.4.0 | CSI 14 t. Requires windowOptions.getWinSizePixels enabled. |
| Multiplexers | |||
| cy | ✗ | No | Explicitly ignored |
| GNU Screen | ✗ | No | CSI 14 t not implemented; CSI 18 t reports chars not pixels |
| tmux | ✓ | 1.9 | Reports text area in pixels (CSI 14 t) |
| tuios | ✓ | v0.2.2 | CSI 14 t, 16 t, and 18 t supported |
| Zellij | ✓ | v0.24.0 | CSI 14 t and CSI 16 t (character cell size report) |
See also
- Resize (pixels) — Resize to specific pixel dimensions
- Text Area Size (chars) — Query text area character dimensions
- Cell Size — Query individual cell pixel dimensions
- Window Position Report — Query window position