Re: Height of an NSAttributedString
Re: Height of an NSAttributedString
- Subject: Re: Height of an NSAttributedString
- From: Philip Dow <email@hidden>
- Date: Wed, 21 Dec 2005 19:06:02 +0100
Hi Douglas,
So give this guy a try:
http://homepage.mac.com/philipdow/
PDScrollingText.zip
I've included an rtfd file for testing. It's the about text for my
app. Run the test using that file as is. It should work okay. Now
open up that file and change the font, for kicks to Times rather than
Times New Roman. On my end, the height calculation is no longer
correct. Even worse is Lucida Grande or just about anything else.
Okay, switch back to Times New Roman. Change the line height. Run
test...
Note that I'm not yet pleased with the fade gradient. Still working
on it. I'm no graphics guy, ya know? =)
-Phil
On Dec 21, 2005, at 6:34 PM, Douglas Davidson wrote:
You should now be able to use -[NSString
boundingRectWithSize:options:attributes:] or -[NSAttributedString
boundingRectWithSize:options:]. Alternatively, you can certainly
use a text view to do the measuring for you, or for the most
control, set up a text storage, text container, and layout manager
yourself.
I'm not sure exactly what you mean when you say that you are not
getting accurate results; perhaps you could produce and post a
simple example, showing the results you expect and the results you
actually see.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden