Getting the size of an NSFont

×

This post was originally published in 2010
It may contain stale & outdated information. Or it may have grown more awesome with age, like the author.

You’d think this would work right

[NSFont fontSize]

Well that didn’t work for me. This did:

[[[(NSFont*)[option objectForKey:kFont] fontDescriptor] objectForKey:NSFontSizeAttribute] floatValue]

May this post save your some of the frustration I experienced!

Comments (2) | Trackback