Example #1
0
 public static NSFont ToNSFont(this FontStyle fontStyle, string fontFamilyName = "Verdana", int weight = 0, float?size = null)
 {
     if (!size.HasValue)
     {
         size = NSFont.LabelFontSize;
     }
     return(NSFontManager.SharedFontManager.FontWithFamily(
                fontFamilyName,
                fontStyle.ToNSFontTraitMask(),
                weight,
                size.Value
                ));
 }