FontProtocol
public protocol FontProtocol
PangoCairoFont
is an interface exported by fonts for
use with Cairo.
The actual type of the font will depend on the particular font technology Cairo was compiled to use.
The FontProtocol
protocol exposes the methods and properties of an underlying PangoCairoFont
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see Font
.
Alternatively, use FontRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
PangoCairoFont
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
font_ptr
Default implementationTyped pointer to the underlying
PangoCairoFont
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
PangoCairoFont
instance.Declaration
Swift
var font_ptr: UnsafeMutablePointer<PangoCairoFont>! { get }
-
Required Initialiser for types conforming to
FontProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getScaledFont()
Extension methodGets the
cairo_scaled_font_t
used byfont
. The scaled font can be referenced and kept usingcairo_scaled_font_reference()
.Declaration
Swift
@inlinable func getScaledFont() -> Cairo.ScaledFontRef!
-
scaledFont
Extension methodGets the
cairo_scaled_font_t
used byfont
. The scaled font can be referenced and kept usingcairo_scaled_font_reference()
.Declaration
Swift
@inlinable var scaledFont: Cairo.ScaledFontRef! { get }