Style

public struct Style : JSONDictEncodable

A struct containing styling information about a string

  • Undocumented

    See more

    Declaration

    Swift

    public enum Alignment : Int
  • Name of the font as it appears in macOS. Standard naming convention is FontNameInCamelCase-FontWeightInCamelCase. i.e. SFPro-Regular, Arial-Black, HelveticaNeue-UltraLight

    Declaration

    Swift

    public let fontDescriptor: String
  • Font point size

    Declaration

    Swift

    public let fontSize: CGFloat
  • Color of the Segment

    Declaration

    Swift

    public let color: Color
  • Whether the Segment is left, right, or center aligned. The alignment of the first Segment in a Text layer will be inhereted by all other segments

    Declaration

    Swift

    public let alignment: Alignment
  • Whether the Segment is underlined

    Declaration

    Swift

    public let isUnderlined: Bool
  • Creates a Style used for styling a Segment of Text

    Declaration

    Swift

    public init(fontDescriptor: String, fontSize: CGFloat, color: Color, alignment: Alignment, isUnderlined: Bool = false)

    Parameters

    fontDescriptor

    Name of the font as it appears in macOS. Standard naming convention is FontNameInCamelCase-FontWeightInCamelCase. i.e. SFPro-Regular, Arial-Black, HelveticaNeue-UltraLight

    fontSize

    Font point size

    color

    Color of the Segment

    alignment

    Whether the Segment is left, right, or center aligned. The alignment of the first Segment in a Text layer will be inhereted by all other segments

    isUnderlined

    Whether the Segment is underlined

  • Undocumented

    Declaration

    Swift

    public init?(json: [String : Any])
  • Undocumented

    Declaration

    Swift

    public func toJson() -> [String : Any]