StylePackLoadOptions

extension StylePackLoadOptions
  • Initializes a StylePackLoadOptions

    If metadata is not a valid JSON object, then this initializer returns nil.

    Declaration

    Swift

    public convenience init?(glyphsRasterizationMode: GlyphsRasterizationMode?,
                             metadata: Any? = nil,
                             acceptExpired: Bool = false)

    Parameters

    glyphsRasterizationMode

    If provided, updates the style package’s glyphs rasterization mode, which defines which glyphs will be loaded from the server.

    metadata

    If provided, the custom JSON value will be stored alongside the style package. You can use this field to store custom metadata associated with a style package.

    acceptExpired

    Accepts expired data when loading style resources. Default is false.

  • Specifies the glyphs rasterization mode.

    If provided, updates the style package’s glyphs rasterization mode, which defines which glyphs will be loaded from the server.

    By default, ideographs are rasterized locally and other glyphs are loaded from network (i.e. .ideographsRasterizedLocally is used).

    Declaration

    Swift

    public var glyphsRasterizationMode: GlyphsRasterizationMode? { get }