- //Get more information about the user's chosen font
- NSFontTraitMask theTraits = [[NSFontManager sharedFontManager] traitsOfFont:theFont];
- int theFontWeight = [[NSFontManager sharedFontManager] weightOfFont:theFont];
- int theFontSize = (int) [theFont pointSize];
-
- wxFontFamily fontFamily = wxFONTFAMILY_DEFAULT;
- //Set the wx font to the appropriate data
- if(theTraits & NSFixedPitchFontMask)
- fontFamily = wxFONTFAMILY_TELETYPE;
-
- fontdata.m_chosenFont = wxFont( theFontSize, fontFamily,
- theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0,
- theFontWeight < 5 ? wxLIGHT : theFontWeight >= 9 ? wxBOLD : wxNORMAL,
- false, wxStringWithNSString([theFont familyName]) );