get-text-extent in dc<%>
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.
( -> four non-negative real numbers: width, height, descent, and space
send a-dc get-text-extent string font big-chars? offset)
string : string
font = : #ffont% object or #f
big-chars? = : boolean
#f
offset = : exact non-negative integer0
Returns the size of string at it would be drawn in the device
context, starting from the offset character of string,
and continuing until the end of string or the first null
character. The 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
set-font.)
If big-chars? is #t, then 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.