pango.FontMap
Prev | The pango Class Reference | Next

## pango.FontMap

pango.FontMap — an object that represents the set of fonts available for a particular rendering system.

## Synopsis

    class pango.FontMap(gobject.GObject):
        def load_font(context, desc)
        def load_fontset(context, desc, language)
        def list_families()
        def get_shape_engine_type()

## Ancestry

    +-- gobject.GObject
      +-- pango.FontMap

## Description

A `pango.FontMap` object represents the set of fonts available for a particular rendering system. There appears to be no way to retrieve a `pango.FontMap` object in `PyGTK`.

## Methods

### pango.FontMap.load_font

        def load_font(context, desc)

`context` : | the `pango.Context` the font will be used with
`desc` : | a `pango.FontDescription` describing the font to load
Returns : | the loaded font , or `None` if no font matched.

The `load_font`() method loads the `pango.Font` in the fontmap that is the closest match for the `pango.FontDescription` specified by `desc` in the `pango.Context` specified by `context`.

### pango.FontMap.load_fontset

        def load_fontset(context, desc, language)

`context` : | the `pango.Context` the font will be used with
`desc` : | a `pango.FontDescription` describing the font to load
`language` : | a `pango.Language` the fonts will be used for
Returns : | a `pango.FontSet`, or `None` if no font matched.

The `load_fontset`() method loads a set of `pango.Font` objects in the fontmap that can be used to render a font matching the `pango.FontDescription` specified by `desc` for the `pango.Language` specified by `language` in the `pango.Context` specified by `context`.

### pango.FontMap.list_families

        def list_families()

Returns : | a list of `pango.FontFamily` objects.

The `list_families`() method returns a list of all `pango.FontFamily` objects for the fontmap.

### pango.FontMap.get_shape_engine_type

        def get_shape_engine_type()

Returns : | the ID string for the shape engines for the font map.

### Note

This method is available in PyGTK 2.4 and above.

The `get_shape_engine_type`() method returns the render ID for the shape engines for the font map

Prev | Up | Next
pango.FontFamily | Home | pango.FontMetrics