FontMapRef

public struct FontMapRef : FontMapProtocol, GWeakCapturing

PangoCairoFontMap is an interface exported by font maps for use with Cairo.

The actual type of the font map will depend on the particular font technology Cairo was compiled to use.

The FontMapRef type acts as a lightweight Swift reference to an underlying PangoCairoFontMap instance. It exposes methods that can operate on this data type through FontMapProtocol conformance. Use FontMapRef only as an unowned reference to an existing PangoCairoFontMap instance.

  • ptr
    Untyped pointer to the underlying `PangoCairoFontMap` instance.
    

    For type-safe access, use the generated, typed pointer font_map_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

FontMap Interface

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<PangoCairoFontMap>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<PangoCairoFontMap>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<PangoCairoFontMap>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<PangoCairoFontMap>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements FontMapProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : FontMapProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> FontMapRef where T : FontMapProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to FontMapProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to FontMapProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to FontMapProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to FontMapProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to FontMapProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Gets a default `PangoCairoFontMap` to use with Cairo.
    

    Note that the type of the returned object will depend on the particular font backend Cairo was compiled to use; you generally should only use the PangoFontMap and PangoCairoFontMap interfaces on the returned object.

    The default Cairo fontmap can be changed by using [methodPangoCairo.FontMap.set_default]. This can be used to change the Cairo font backend that the default fontmap uses for example.

    Note that since Pango 1.32.6, the default fontmap is per-thread. Each thread gets its own default fontmap. In this way, PangoCairo can be used safely from multiple threads.

    Declaration

    Swift

    @inlinable
    static func getDefault() -> Pango.FontMapRef!
  • Creates a new PangoCairoFontMap object of the type suitable to be used with cairo font backend of type fonttype.

    In most cases one should simply use [funcPangoCairo.FontMap.new], or in fact in most of those cases, just use [funcPangoCairo.FontMap.get_default].

    Declaration

    Swift

    @inlinable
    static func newFor(fontType fonttype: cairo_font_type_t) -> Pango.FontMapRef!