Class UIFont

All Implemented Interfaces:
NSCoding, NSObjectProtocol, NSSecureCoding, ObjCProtocol

public class UIFont
extends NSObject
implements NSSecureCoding
  • Constructor Details

  • Method Details

    • getFamilyNames

      public static List<String> getFamilyNames()
    • getFamilyName

      public String getFamilyName()
    • getFontName

      public String getFontName()
    • getPointSize

      public double getPointSize()
    • getAscender

      public double getAscender()
    • getDescender

      public double getDescender()
    • getCapHeight

      public double getCapHeight()
    • getXHeight

      public double getXHeight()
    • getLineHeight

      public double getLineHeight()
    • getLeading

      public double getLeading()
    • getFontDescriptor

      public UIFontDescriptor getFontDescriptor()
    • getLabelFontSize

      public static double getLabelFontSize()
    • getButtonFontSize

      public static double getButtonFontSize()
    • getSmallSystemFontSize

      public static double getSmallSystemFontSize()
    • getSystemFontSize

      public static double getSystemFontSize()
    • supportsSecureCoding

      public static boolean supportsSecureCoding()
    • getSystemFont

      public static UIFont getSystemFont​(double fontSize, UIFontWeight weight)
      Since:
      Available in iOS 8.2 and later.
    • newWithSize

      public UIFont newWithSize​(double fontSize)
    • getPreferredFont

      public static UIFont getPreferredFont​(UIFontTextStyle style)
    • getPreferredFont

      public static UIFont getPreferredFont​(UIFontTextStyle style, UITraitCollection traitCollection)
      Since:
      Available in iOS 10.0 and later.
    • getFont

      public static UIFont getFont​(String fontName, double fontSize)
    • getFontNamesForFamilyName

      public static List<String> getFontNamesForFamilyName​(String familyName)
    • getSystemFont

      public static UIFont getSystemFont​(double fontSize)
    • getBoldSystemFont

      public static UIFont getBoldSystemFont​(double fontSize)
    • getItalicSystemFont

      public static UIFont getItalicSystemFont​(double fontSize)
    • getSystemFont

      public static UIFont getSystemFont​(double fontSize, double weight)
      Since:
      Available in iOS 8.2 and later.
    • getMonospacedDigitSystemFont

      public static UIFont getMonospacedDigitSystemFont​(double fontSize, double weight)
      Since:
      Available in iOS 9.0 and later.
    • getMonospacedSystemFont

      public static UIFont getMonospacedSystemFont​(double fontSize, double weight)
      Since:
      Available in iOS 13.0 and later.
    • getFont

      public static UIFont getFont​(UIFontDescriptor descriptor, double pointSize)
    • encode

      public void encode​(NSCoder coder)
      Specified by:
      encode in interface NSCoding
    • init

      protected long init​(NSCoder coder)