, 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
On Nov 15, 2011, at 12:13 AM, Dany Golubitsky wrote:
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
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
I am trying to make cocoa application draw bold or/and italic fonts. Here is
the code I use:
NSFontTraitMask fontStyle = 0;
if (m_bBold)
fontStyle |= NSBoldFontMask;
if (m_bItalic)
fontStyle |= NSItalicFontMask;
NSFontManager* fontManager = [NSFontManager
Danny,
I'm no font expert, but you could try playing with the 'weight' setting. I see
you have it set to 5. Try setting it to 0 and see if that makes a difference.
Sometimes when choosing a bold font, the resulting font anyway has a given
weight. At least this is something I saw only yesterday
Hi Dany,
I'm not sure what's wrong but, for what its worth, I use:
NSFont * aFont = [NSFont fontWithName: @Cochin size: 10.0];
aFont = [fontManager convertFont: aFont
toHaveTrait: NSBoldFontMask];
Cheers,
Steve
On 14 Nov 11,
Hewitson; cocoa-dev@lists.apple.com
Subject: Re: Troubles with Bold and Italic fonts - Cocoa
Danny,
I'm no font expert, but you could try playing with the 'weight' setting. I see
you have it set to 5. Try setting it to 0 and see if that makes a difference.
Sometimes when choosing a bold font
with Bold and Italic fonts - Cocoa
Hi Dany,
I'm not sure what's wrong but, for what its worth, I use:
NSFont * aFont = [NSFont fontWithName: @Cochin size: 10.0];
aFont = [fontManager convertFont: aFont
toHaveTrait: NSBoldFontMask