Recently I'm working on Carbon to Cocoa transition for my App.
The font my App used is "LucidaGrande", I got it from this method:
myUIFont = [NSFont systemFontOfSize: [NSFont systemFontSize]];
Sometimes my app want to show italic style font in its UI, so I call this:
myUIFont = [[NSFontManager sharedFontManager] convertFont:myUIFont toHaveTrait:NSItalicFontMask];
But this conversion failed. I found that it's because that there is no italic style for "LucidaGrande" font. I can verify this by calling:
NSArray* availableNames = [[NSFontManager sharedFontManager] availableFontNamesWithTraits:NSItalicFontMask];
There's no "LucidaGrande" in availableNames. It is very curious because I can use italic "LucidaGrande" font in my Carbon App. Is there any solution to get a italic "LucidaGrande" font for Cocoa App? Or how can I get a similar italic one?
Thanks very much!