Hi, I have some code that draws attributed string to a given location using given fonts/sizes/styles with [NSAttributedString drawWithRect:options:].
However, I found that the string were not aways aligned to top on some fonts when I supply NSStringDrawingUsesLineFragmentOrigin option, which should use the rect origin as the top left corner of line fragments. http://www.flickr.com/photos/yllan/3405764516/ Here is the figure that explains what I encountered: I don't want the extra red space in this picture. What option/attribute should I supply to make my string align to the top edge of bounding box just like how TextEdit does? The string may contains different fonts/sizes. I'm also curious about why some fonts have these extra space, but some fonts don't. Is this because the metric/feature of fonts or the bug of NSStringDrawing method that calculate the wrong line height? Any suggestions are welcome. Regards, yllan _______________________________________________ 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]
