Interface

PangoCairo-1.0PangoCairoFontMapNamespace

interface FontMapNamespace {
    $gtype: GType<PangoCairo.FontMap<GObject.Object>>;
    prototype: PangoCairo.FontMap;
    get_default(): Pango.FontMap;
    new(): Pango.FontMap;
    new_for_font_type(fonttype: cairo.FontType): Pango.FontMap<GObject.Object>;
}
Index

Properties

prototype: PangoCairo.FontMap

Methods

  • Gets a default PangoCairo.FontMap 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 Pango.FontMap and PangoCairo.FontMap interfaces on the returned object.

    The default Cairo fontmap can be changed by using 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.

    Returns Pango.FontMap

  • Creates a new PangoCairo.FontMap object.

    A fontmap is used to cache information about available fonts, and holds certain global parameters such as the resolution. In most cases, you can use `func@PangoCairo.font_map_get_default] instead.

    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 Pango.FontMap and PangoCairo.FontMap interfaces on the returned object.

    You can override the type of backend returned by using an environment variable PANGOCAIRO_BACKEND. Supported types, based on your build, are fc (fontconfig), win32, and coretext. If requested type is not available, NULL is returned. Ie. this is only useful for testing, when at least two backends are compiled in.

    Returns Pango.FontMap