FontMap
open class FontMap : Pango.FontMap, FontMapProtocol
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 FontMap
type acts as a reference-counted owner of an underlying PangoCairoFontMap
instance.
It provides the methods that can operate on this data type through FontMapProtocol
conformance.
Use FontMap
as a strong reference or owner of a PangoCairoFontMap
instance.
-
Designated initialiser from the underlying `C` data type.
This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the
FontMap
instance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<PangoCairoFontMap>)
Parameters
op
pointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theFontMap
instance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<PangoCairoFontMap>)
Parameters
op
pointer to the underlying object
-
Optional initialiser from a non-mutating
gpointer
to the underlyingC
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theFontMap
instance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)
Parameters
op
gpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointer
to the underlyingC
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theFontMap
instance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)
Parameters
op
pointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theFontMap
instance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<PangoCairoFontMap>?)
Parameters
op
pointer to the underlying object
-
Optional initialiser from the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theFontMap
instance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<PangoCairoFontMap>?)
Parameters
op
pointer to the underlying object
-
Designated initialiser from the underlying
C
data type. Will retainPangoCairoFontMap
. i.e., ownership is transferred to theFontMap
instance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<PangoCairoFontMap>)
Parameters
op
pointer to the underlying object
-
Reference intialiser for a related type that implements
FontMapProtocol
Will retainPangoCairoFontMap
.Declaration
Swift
@inlinable public init<T>(pangoCairoFontMap other: T) where T : FontMapProtocol
Parameters
other
an instance of a related type that implements
FontMapProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable override public init<T>(cPointer p: UnsafeMutablePointer<T>)
Parameters
cPointer
pointer to the underlying object
-
Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)
Parameters
cPointer
pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable override public init(raw p: UnsafeRawPointer)
Parameters
p
raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable override public init(retainingRaw 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 public required init(raw p: UnsafeMutableRawPointer)
Parameters
p
mutable raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable required public init(retainingRaw raw: UnsafeMutableRawPointer)
Parameters
raw
mutable raw pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable override public init(opaquePointer p: OpaquePointer)
Parameters
p
opaque pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FontMapProtocol
.Declaration
Swift
@inlinable override public init(retainingOpaquePointer p: OpaquePointer)
Parameters
p
opaque pointer to the underlying object
-
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
andPangoCairoFontMap
interfaces on the returned object.The default Cairo fontmap can be changed by using [method
PangoCairo.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 public static func getDefault() -> Pango.FontMap!
-
Creates a new
PangoCairoFontMap
object of the type suitable to be used with cairo font backend of typefonttype
.In most cases one should simply use [func
PangoCairo.FontMap.new
], or in fact in most of those cases, just use [funcPangoCairo.FontMap.get_default
].Declaration
Swift
@inlinable public static func newFor(fontType fonttype: cairo_font_type_t) -> Pango.FontMap!