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 protected])

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 [email protected]

Reply via email to