We're trying to create a font by doing something like the following:
NSFont * font;
font = [[NSFontManager sharedFontManager]
fontWithFamily:@"Arial"
traits:(NSUnboldFontMask | NSUnitalicFontMask)
weight:5
size:8.0];
But the font manager is returning "nil". I've verified that the "Arial" font is present on the customer's computer. Is there anything else that could be going on here?
The documentation doesn't talk about it at all, other than saying "it might return nil". Is there anything I can do other than "pick a font from the list of available fonts that the font manager reports exist"?
I'm not sure why that's not working for you (it does here) but you might try using the simpler
NSFont
method: