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.

  • ptr

    Untyped pointer to the underlying PangoCairoFont instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • font_ptr Default implementation

    Typed 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)

Font Interface: FontProtocol extension (methods and fields)

  • getScaledFont() Extension method

    Gets the cairo_scaled_font_t used by font. The scaled font can be referenced and kept using cairo_scaled_font_reference().

    Declaration

    Swift

    @inlinable
    func getScaledFont() -> Cairo.ScaledFontRef!
  • scaledFont Extension method

    Gets the cairo_scaled_font_t used by font. The scaled font can be referenced and kept using cairo_scaled_font_reference().

    Declaration

    Swift

    @inlinable
    var scaledFont: Cairo.ScaledFontRef! { get }