• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString width
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString width


  • Subject: Re: NSString width
  • From: Dave Keck <email@hidden>
  • Date: Sat, 5 Sep 2009 23:03:29 -1000

> 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.

I've noticed this too. If you need the absolute precise pixel-size of
some text, then the only way I know of (that works with all different
styles of text) is manually drawing the text into some temporary
context, and analyzing its pixels.

I'd love to be wrong on that, though, if anyone knows a better way.
_______________________________________________

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

  • Follow-Ups:
    • Re: NSString width
      • From: Jens Alfke <email@hidden>
References: 
 >NSString width (From: Massimiliano Gargani <email@hidden>)
 >Re: NSString width (From: Dave Keck <email@hidden>)
 >Re: NSString width (From: Massimiliano Gargani <email@hidden>)
 >Re: NSString width (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: What about revamping OpenUp.app for Snow Leopard?
  • Next by Date: Re: Making an Outline View delete a rows children when the parent is deleted.
  • Previous by thread: Re: NSString width
  • Next by thread: Re: NSString width
  • Index(es):
    • Date
    • Thread