Re: Troubles with Bold and Italic fonts - Cocoa
Re: Troubles with Bold and Italic fonts - Cocoa
- Subject: Re: Troubles with Bold and Italic fonts - Cocoa
- From: Jens Alfke <email@hidden>
- Date: Mon, 14 Nov 2011 10:29:34 -0800
>> NSFontManager* fontManager = [NSFontManager sharedFontManager];
>> NSFont* font = [fontManager fontWithFamily:@"Helvetica" traits:fontStyle weight:5 size:12];
>> However, the displayed font is not always what I asked. For example, It works with Verdana (I see it bold). But it does not works with Helvetica. Although the name is converted to Helvetica-Bold, the fonts are still regular.
I haven’t used that NSFontManager method before. My guess is that by specifying an explicit weight you’ve overridden the bold mask (although that’s not quite what the docs say.)
How are you rendering the text?
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden