FontMapProtocol

public protocol FontMapProtocol : ObjectProtocol

A PangoFontMap represents the set of fonts available for a particular rendering system.

This is a virtual object with implementations being specific to particular rendering systems.

The FontMapProtocol protocol exposes the methods and properties of an underlying PangoFontMap 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 FontMap. Alternatively, use FontMapRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying PangoFontMap instance.

    Declaration

    Swift

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

    Typed pointer to the underlying PangoFontMap instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the PangoFontMap instance.

    Declaration

    Swift

    var font_map_ptr: UnsafeMutablePointer<PangoFontMap>! { get }
  • Required Initialiser for types conforming to FontMapProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

FontMap Class: FontMapProtocol extension (methods and fields)

  • changed() Extension method

    Forces a change in the context, which will cause any PangoContext using this fontmap to change.

    This function is only useful when implementing a new backend for Pango, something applications won’t do. Backends should call this function if they have attached extra data to the context and such data is changed.

    Declaration

    Swift

    @inlinable
    func changed()
  • createContext() Extension method

    Creates a PangoContext connected to fontmap.

    This is equivalent to [ctorPango.Context.new] followed by [methodPango.Context.set_font_map].

    If you are using Pango as part of a higher-level system, that system may have it’s own way of create a PangoContext. For instance, the GTK toolkit has, among others, gtk_widget_get_pango_context(). Use those instead.

    Declaration

    Swift

    @inlinable
    func createContext() -> Pango.ContextRef!
  • getFamily(name:) Extension method

    Gets a font family by name.

    Declaration

    Swift

    @inlinable
    func getFamily(name: UnsafePointer<CChar>!) -> Pango.FontFamilyRef!
  • getSerial() Extension method

    Returns the current serial number of fontmap.

    The serial number is initialized to an small number larger than zero when a new fontmap is created and is increased whenever the fontmap is changed. It may wrap, but will never have the value 0. Since it can wrap, never compare it with “less than”, always use “not equals”.

    The fontmap can only be changed using backend-specific API, like changing fontmap resolution.

    This can be used to automatically detect changes to a PangoFontMap, like in PangoContext.

    Declaration

    Swift

    @inlinable
    func getSerial() -> Int
  • list(families:nFamilies:) Extension method

    List all families for a fontmap.

    Note that the returned families are not in any particular order.

    PangoFontMap also implemented the [ifaceGio.ListModel] interface for enumerating families.

    Declaration

    Swift

    @inlinable
    func list(families: UnsafeMutablePointer<UnsafeMutablePointer<UnsafeMutablePointer<PangoFontFamily>?>?>!, nFamilies: UnsafeMutablePointer<gint>!)
  • loadFont(context:desc:) Extension method

    Load the font in the fontmap that is the closest match for desc.

    Declaration

    Swift

    @inlinable
    func loadFont<ContextT, FontDescriptionT>(context: ContextT, desc: FontDescriptionT) -> Pango.FontRef! where ContextT : ContextProtocol, FontDescriptionT : FontDescriptionProtocol
  • Load a set of fonts in the fontmap that can be used to render a font matching desc.

    Declaration

    Swift

    @inlinable
    func loadFontset<ContextT, FontDescriptionT, LanguageT>(context: ContextT, desc: FontDescriptionT, language: LanguageT) -> Pango.FontsetRef! where ContextT : ContextProtocol, FontDescriptionT : FontDescriptionProtocol, LanguageT : LanguageProtocol
  • serial Extension method

    Returns the current serial number of fontmap.

    The serial number is initialized to an small number larger than zero when a new fontmap is created and is increased whenever the fontmap is changed. It may wrap, but will never have the value 0. Since it can wrap, never compare it with “less than”, always use “not equals”.

    The fontmap can only be changed using backend-specific API, like changing fontmap resolution.

    This can be used to automatically detect changes to a PangoFontMap, like in PangoContext.

    Declaration

    Swift

    @inlinable
    var serial: Int { get }
  • parentInstance Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentInstance: GObject { get }