-usedRectForTextContainer: and attachments
-usedRectForTextContainer: and attachments
- Subject: -usedRectForTextContainer: and attachments
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 27 May 2011 13:20:01 -0600
Short version: How do I get -[NSLayoutManager usedRectForTextContainer:] to quit ignoring attachments?
Long version: I'm using -usedRectForTextContainer: to calculate the drawing height of a line of text that has already been laid out using -glyphRangeForTextContainer:. I've found that, when the last character is an attachment, and the width of the text container wraps the attachment on to a separate line from the rest of the text, then instead of -usedRectForTextContainer: returning a rect with enough height to display the text on one line and the attachment on another line, it just ignores the attachment, and returns a rect with only enough height to display the one line of text.
If I resize the text container so that the text before the attachment gets wrapped onto a second line, then -usedRectForTextContainer: returns the expected result, which makes me wonder if it's ignoring the attachment in the returned rect. I already tried changing the typesetter behavior, and that didn't resolve the problem. What can I do here, if anything?
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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