• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Troubles with Bold and Italic fonts - Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Troubles with Bold and Italic fonts - Cocoa


  • Subject: RE: Troubles with Bold and Italic fonts - Cocoa
  • From: Dany Golubitsky <email@hidden>
  • Date: Tue, 15 Nov 2011 03:13:31 -0500
  • Acceptlanguage: en-US
  • Thread-topic: Troubles with Bold and Italic fonts - Cocoa

Hello Jens.
The documentation says Weight parameter is ignored when I use NSBoldFontMask.
Changing the weight will not affect the result - I tried it.

As for render - we have a part of code that generates bitmap from it and we draw it using OpenGL. I am not really familiar with this part of code.
I do not think it is related, since, as I said some fonts do work, so it is not render problem.

Thanks, anyway.


-----Original Message-----
From: cocoa-dev-bounces+danyg=email@hidden [mailto:cocoa-dev-bounces+danyg=email@hidden] On Behalf Of Jens Alfke
Sent: Monday, November 14, 2011 20:30
To: Steve Steinitz
Cc: Cocoa Dev
Subject: Re: Troubles with Bold and Italic fonts - Cocoa


>>   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
_______________________________________________

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

  • Follow-Ups:
    • Re: Troubles with Bold and Italic fonts - Cocoa
      • From: Jens Alfke <email@hidden>
References: 
 >RE: Troubles with Bold and Italic fonts - Cocoa (From: Dany Golubitsky <email@hidden>)
 >Re: Troubles with Bold and Italic fonts - Cocoa (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSOutlineView doesn't call outlineView:shouldSelectItem: after selectRowIndexes:byExtendingSelection:
  • Next by Date: A handy console output category .
  • Previous by thread: Re: Troubles with Bold and Italic fonts - Cocoa
  • Next by thread: Re: Troubles with Bold and Italic fonts - Cocoa
  • Index(es):
    • Date
    • Thread