PDFTextStyle

public class PDFTextStyle : Hashable

Structure to combine multiple aspects of text styling.

Used to define text styling configuration in a global context.

Furthermore, styles of a PDFDocument should be used to select headers for a PDFTableOfContent. See PDFTableOfContent for details.

  • Name of style

    Declaration

    Swift

    public var name: String
  • Font of the text

    Declaration

    Swift

    public var font: Font?
  • Color of the text

    Declaration

    Swift

    public var color: Color?
  • Creates a new style with the given parameters.

    By setting all parameters to nil (except name, which is required) the style can be used only to detect text objects for the PDFTableOfContent, without actually affecting the styling of the text.

    Declaration

    Swift

    public init(name: String, font: Font? = nil, color: Color? = nil)

    Parameters

    name

    Name of style

    font

    Font of text, defaults to nil

    color

    Color of text, defaults to nil

Equatable

  • nodoc

    Declaration

    Swift

    public static func == (lhs: PDFTextStyle, rhs: PDFTextStyle) -> Bool

Hashable

  • nodoc

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)