[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] estimating printed width of some text



|Just make a rectangle which is more than large enough to hold a
|given character (ie: use a 30x30 box for the 9pt font).  Then print the
|character inside of the box and scan across to see how large the
|character is.

Or, just call StringWidth (or VisibleLength if you've got some styled
text), which a) is much easier, and b) gives you an exact answer without
making unwarranted assumptions about the size of the characters in a
font.

Brian

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch