• 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
Figure out the size of an NSAttributedString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Figure out the size of an NSAttributedString


  • Subject: Figure out the size of an NSAttributedString
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Wed, 26 Nov 2008 18:14:57 -0500

I know this might seem like a weird idea, but I need to figure out the size (width and height) of an NSAttributedString that I am drawing... basically I need to know it because I am drawing it inside a larger image and I need to position it... however the string can be of any font/size/length... is there a way to do this?? I'm guessing the height would probably be the font's point? (i.e. font size 24 would result in a height of 24pt?) how about the width? any way to find that out before drawing it? (or even after drawing it to an intermediate image if I really need to?)

Any ideas are welcomed!

Jean-Nicolas Jolivet
email@hidden
http://www.silverscripting.com

_______________________________________________

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: Figure out the size of an NSAttributedString
      • From: Jean-Nicolas Jolivet <email@hidden>
    • Re: Figure out the size of an NSAttributedString
      • From: Gerd Knops <email@hidden>
    • Re: Figure out the size of an NSAttributedString
      • From: Jean-Daniel Dupas <email@hidden>
    • Re: Figure out the size of an NSAttributedString
      • From: Nick Zitzmann <email@hidden>
    • Re: Figure out the size of an NSAttributedString
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Live editing an NSTextView
  • Next by Date: Core Data modeling question
  • Previous by thread: Re: Live editing an NSTextView
  • Next by thread: Re: Figure out the size of an NSAttributedString
  • Index(es):
    • Date
    • Thread