Updated 2018-05-16 12:02:41 by HolgerJ
font measure font ?-displayof window? text

Measures the amount of space the string text would use in the given font when displayed in window. font is a font description; see FONT DESCRIPTIONS below. If the window argument is omitted, it defaults to the main window. The return value is the total width in pixels of text, not including the extra pixels used by highly exaggerated characters such as cursive "f". If the string contains newlines or tabs, those characters are not expanded or treated specially when measuring the string.


See also edit