Re: NSString width
Re: NSString width
- Subject: Re: NSString width
- From: Jens Alfke <email@hidden>
- Date: Sat, 5 Sep 2009 23:36:37 -0700
Tip: Measuring string widths is fairly expensive. (It's basically like
drawing the string, minus the actual rendering of the pixels.) If you
can, cache the result instead of calling it frequently.
Also, keep in mind that character shapes may stick out of either edge
by a few pixels, especially with italics or script fonts. It's usually
safest to pad your bounding box by some fraction of the point-size.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden