term.get_pixel_dimensions

term

get_pixel_dimensions(timeout_ms) -> win_w, win_h, cell_w, cell_h

Query the terminal for pixel dimensions of the window and cells

Sends CSI 14 t (window pixel size) and CSI 16 t (cell pixel size) and reads both xterm-style responses. Returns win_w, win_h, cell_w, cell_h (all in pixels). Returns nil if either response does not arrive within timeout_ms (default 100 ms) or the terminal does not support pixel dimension queries.