Re: behind the scenes of -drawInRect:
Re: behind the scenes of -drawInRect:
- Subject: Re: behind the scenes of -drawInRect:
- From: Douglas Davidson <email@hidden>
- Date: Fri, 26 May 2006 16:19:49 -0700
On May 26, 2006, at 4:12 PM, Joshua Scott Emmons wrote:
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?
Once you have a layout manager set up properly, you can use it for
drawing directly, rather than using a convenience method like
drawInRect:. However, using
NSTypesetterBehavior_10_2_WithCompatibility is not so bad as all
that; the main differences have to do with line spacing.
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