AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YDAT | YWAIT | Byzgraf | FAQs
stringbounds (String str [, int tight]) typedict.Font
 
Returns a Rectangle that represents the bounds of the string str in user space if it were printed at the origin using this font. The optional tight argument, which is 0 by default, controls the fit of the Rectangle to the str.

By default the result is a "loose fitting" Rectangle that contains the origin and the advance point, which is the where the current point (i.e., the origin) moves after str is printed, and extends ascent units above and descent units below the baseline, which is the line that connects the origin to the advance point. If the optional tight argument is supplied and is non-zero then the result will be a "tight fitting" Rectangle that just covers the characters in str.
 
 Return:   Rectangle
 
 See Also:   stringwidth

 

Yoix is a registered trademark of AT&T Intellectual Property.