get-window-text-extent in Miscellaneous

Returns the pixel size of a string drawn as a window's label or value.

See also get-text-extent .