Fontable

public protocol Fontable

Fontable entity.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Returns a custom font of the specified size.

    Declaration

    Swift

    func of(size: CGFloat) -> Font

    Parameters

    size

    The size of the font.

    Return Value

    A custom Font object.

  • of(size:) Default implementation

    Default Implementation

    Returns a custom font of the specified size.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func of(size: CGFloat) -> Font

    Parameters

    size

    The size of the font.

    Return Value

    A custom Font object.

  • ofCaptionSize(forSizeClass:) Extension method

    Returns a custom font for caption size based on the user interface size class.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func ofCaptionSize(forSizeClass: UserInterfaceSizeClass?) -> Font

    Parameters

    forSizeClass

    The user interface size class.

    Return Value

    A custom Font object.

  • Returns a custom font for body size based on the user interface size class.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func ofBodyFontSize(forSizeClass: UserInterfaceSizeClass?) -> Font

    Parameters

    forSizeClass

    The user interface size class.

    Return Value

    A custom Font object.

  • Returns a custom font for title size based on the user interface size class.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func ofTitleFontSize(forSizeClass: UserInterfaceSizeClass?) -> Font

    Parameters

    forSizeClass

    The user interface size class.

    Return Value

    A custom Font object.