DefaultFontFamily

public struct DefaultFontFamily : FontFamily

Information about a font family. Default implementation of FontFamily.

  • Suffix to use for italic family font names “Italic”

    Declaration

    Swift

    public static let italicSuffix: String
  • Font family root name, e.g. “AvenirNext”

    Declaration

    Swift

    public let familyName: String
  • Font style, e.g. regular or italic

    Declaration

    Swift

    public let style: Typography.FontStyle
  • Initialize a DefaultFontFamily object

    Declaration

    Swift

    public init(familyName: String, style: Typography.FontStyle = .regular)

    Parameters

    familyName

    font family name

    style

    font style (default = .regular)

  • Optional suffix to use for the font name.

    Used by FontFamily.fontName(for:compatibleWith:) e.g. “Italic” is a typical suffix for italic fonts. default = “”

    Declaration

    Swift

    public var fontNameSuffix: String { get }