internal Font(NSFont font) { var traits = font.FontDescriptor.SymbolicTraits; fontFamily = new FontFamily(font.FamilyName, true); fontStyle = ((traits & NSFontSymbolicTraits.BoldTrait) == NSFontSymbolicTraits.BoldTrait ? FontStyle.Bold : 0) | ((traits & NSFontSymbolicTraits.ItalicTrait) == NSFontSymbolicTraits.ItalicTrait ? FontStyle.Italic : 0); gdiVerticalFont = false; gdiCharSet = DefaultCharSet; sizeInPoints = (float)(font.PointSize * 72f / 96f); size = (float)font.PointSize; unit = GraphicsUnit.Pixel; nativeFont = font.ToCTFont(); }