MimiFont

public struct MimiFont : Equatable

Object describing a font to use in Mimi components.

  • Font name.

    Declaration

    Swift

    public var name: String { get }
  • Font size.

    Declaration

    Swift

    public var size: CGFloat { get }
  • Font line spacing.

    Declaration

    Swift

    public var lineSpacing: CGFloat?
  • Kern (Letter Spacing).

    Declaration

    Swift

    public var kern: CGFloat?
  • The raw UIFont associated with the font.

    Declaration

    Swift

    public let font: UIFont
  • Create a new font.

    Declaration

    Swift

    public init?(name: String,
                 size: CGFloat,
                 lineSpacing: CGFloat? = nil,
                 kern: CGFloat? = nil)
    Parameters
    name

    Name of the font.

    size

    Size to use.

    lineSpacing

    Line spacing to use.

    kern

    Kern (Letter Spacing) to use.

  • Create a system font.

    Declaration

    Swift

    public static func systemFont(ofSize size: CGFloat, weight: UIFont.Weight) -> MimiFont
    Parameters
    size

    Size of the font.

    weight

    Font Weight.

    Return Value

    System font.