Gets the dimensions of a string drawn into this device context. The result is four real numbers:
the total width of the text (depends on both the font and the text);
the total height of the font (depends only on the font);
the distance from the baseline of the font to the bottom of the descender (included in the height, depends only on the font); and
extra vertical space added to the font by the font designer (included in the height, and often zero; depends only on the font).
The returned width and height define a rectangle is that guaranteed to contain the text string when it is drawn, but the fit is not necessarily tight. Some undefined number of pixels on the left, right, top, and bottom of the drawn string may be ``whitespace,'' depending on the whims of the font designer and the platform-specific font-scaling mechanism.
Unlike most methods, this method can be called for a
object without a bitmap installed.
( -> four non-negative real numbers: width, height, descent, and space
string : string
font = :
font% object or
big-chars? = : boolean
offset = : exact non-negative integer
Returns the size of
string at it would be drawn in the device
context, starting from the
offset character of
and continuing until the end of
string or the first null
font argument specifies the font to use in
measuring the text; if it is
#f, the current font of the
drawing area is used. (See also
string is interpreted as
a string or Unicode or 16-bit characters instead of an ASCII string,
but such strings are not yet fully supported.