Re: behind the scenes of -drawInRect:
Re: behind the scenes of -drawInRect:
- Subject: Re: behind the scenes of -drawInRect:
- From: Aki Inoue <email@hidden>
- Date: Fri, 26 May 2006 16:22:13 -0700
Is there any way to make -[NSAttributedString drawInRect:] use
10.4's typesetting instead of making NSLayoutManager use 10.2's?
Unfortunately, no.
One thing I'm curious about is why using -[NSAttributedString
drawInRect:] when you have NSLayoutManager ?
It's more efficient to match up measurement/rendering API in text
handling.
Aki
Take a look at Aki's post on typesetter behavior.
So looking at Aki's post, the problem is that NSLayoutManager is
using the NSTypesetterLatestBehavior (NSTypesetterBehavior_10_4, in
this case), and the -[NSAttributedString drawInRect:] uses
NSTypesetterBehavior_10_2_WithCompatibility.
To sum up, layout == 10.4 but drawInRect == 10.2.
Aki's proposed solution to this is to degrade NSLayoutManager to
10.2, which undoubtedly gives the most consistent performance across
all OS X versions. But my app is 10.4-only (it uses CoreData) and is
seems a shame to knock myself down to 10.2's typesetting engine if I
don't have to.
Is there any way to make -[NSAttributedString drawInRect:] use
10.4's typesetting instead of making NSLayoutManager use 10.2's?
Many thanks,
-Joshua Emmons
_______________________________________________
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
_______________________________________________
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