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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to