Hello,

I'm confused about the returned height from -[NSString sizeWithAttributes:].

> NSFont *font = [NSFont fontWithName:@"Menlo" size:11.0];
> [@"Hello World" sizeWithAttributes:[NSDictionary 
> dictionaryWithObjectsAndKeys:font, NSFontAttributeName, nil]];

This returns a height of 17.0. However when using this font (Menlo 11.0) in 
TextEdit (plain text document), I'm seeing a line height of 13.0.

Monaco 10.0 returns a height of 14.0 which is also what I'm seeing in TextEdit.
Helvetica 12.0 returns a height of 15.0 but I'm seeing 14.0 in TextEdit.

Why these differences?
How do I get programmatically the value I'm seeing in TextEdit?


Thomas_______________________________________________

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