Re: Attr Str drawing vs Layout Manager drawing
Re: Attr Str drawing vs Layout Manager drawing
- Subject: Re: Attr Str drawing vs Layout Manager drawing
- From: Peter Ammon <email@hidden>
- Date: Sun, 10 May 2009 14:35:07 -0700
On May 10, 2009, at 2:24 PM, Seth Willits wrote:
If I create a text view, type in some text with different styles
multiple lines etc, and grab the attributed string object, when I
draw that attributed string using drawInRect: with the same bounds
as the text view, there are small differences between the two. The
line height seems to be one point different, and there's also an
offset for all text, which seems to simply be {5, 0}. The text
container inset is {0, 0} so I'm not sure what's causing the offset,
nor do I know why the line height is different.
Does anyone know? I'd really like the two to line up.
Hi Seth,
You may be seeing differences in the typesetter behavior. See the
discussion of typesetter behaviors at http://developer.apple.com/documentation/Cocoa/Conceptual/TextLayout/Concepts/Typesetters.html
and the "String Drawing and Typesetter Behavior" topic at http://developer.apple.com/documentation/Cocoa/Conceptual/TextLayout/Tasks/DrawingStrings.html
-Peter
_______________________________________________
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