Re: Getting font info
Re: Getting font info
- Subject: Re: Getting font info
- From: Brian Webster <email@hidden>
- Date: Fri, 31 May 2002 15:44:21 -0500
On Friday, May 31, 2002, at 02:49 PM, cocoa-dev-
email@hidden wrote:
Getting an NSDictionary from the FontAttributes of the
attributed string
dict = [as fontAttributesInRange:NSMakeRange(0,1)];
And finally, reading the font attribute and checking it for the "Bold"
string.
Try this:
NSFont *font = [dict objectForKey:NSFontAttributeName];
if(([[NSFontManager defaultManager] traitsOfFont:font] &
NSBoldFontMask) != 0)
//the font is bold
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.