On Oct 30, 2008, at 10:02 AM, Randall Meadows wrote:

On Oct 30, 2008, at 9:53 AM, Randall Meadows wrote:

So how can I get a the width that a particular string is going to be drawn in, *and* disable that subsitution? Will calling NSLayoutManager setUsesScreenFonts:NO before calling NSString sizeWithAttributes: do the right thing? Or is there another tack I should be taking?

And where would I get a layout manager from if I'm trying to disable this before determining the size, not actually drawing it?

OK, I just tried passing

NSSize thisSize = [self boundingRectWithSize:NSMakeSize(CGFLOAT_MAX, CGFLOAT_MAX)
                   options:NSStringDrawingDisableScreenFontSubstitution
                   attributes:attrs].size;

and got the exact same behavior as I originally did, where a point size of 16 generated a height of 18, but a point size of 15 generated a height of 21, so apparently this did NOT disable the substitution. Does that only work in conjunction with other flags?
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to