Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Pango::FontMap Class Reference

A PangoFontMap C++ wrapper class. More...

`#include <inti/pango/fontmap.h>`

Inheritance diagram for Inti::Pango::FontMap:

List of all members.

## Public Member Functions

Constructors

- virtual ~FontMap ()
    Destructor.

Accessors

- PangoFontMap * pango_font_map () const
    Get a pointer to the PangoFontMap structure.
- operator PangoFontMap * () const
    Conversion operator; safely converts a FontMap to a PangoFontMap pointer.

Methods

- Font * load_font (Context *context, const FontDescription &desc)
    Load the font in the fontmap that is the closest match for desc.
- Fontset * load_fontset (Context *context, const FontDescription &desc, PangoLanguage *language)
    Load a set of fonts in the fontmap that can be used to render a font matching desc.
- bool list_families (std::vector< FontFamily * > &families)
    List all families for a fontmap.

## Protected Member Functions

Constructors

- FontMap (PangoFontMap *fontmap, bool reference=true)
    Construct a new FontMap from an existing PangoFontMap.

## Detailed Description

A PangoFontMap C++ wrapper class.

FontMap represents the set of fonts available for a particular rendering system. This is a virtual object with implementations being specific to particular rendering systems.

## Constructor & Destructor Documentation

Inti::Pango::FontMap::FontMap | ( | PangoFontMap * | fontmap,
|  | bool | reference = true
| ) | `[explicit, protected]`

Construct a new FontMap from an existing PangoFontMap.

Parameters:

  fontmap | A pointer to a PangoFontMap.
  reference | Set false if the initial reference count is floating, set true if it's not.

The fontmap can be a newly created PangoFontMap or an existing PangoFontMap. (see G::Object::Object).

## Member Function Documentation

bool Inti::Pango::FontMap::list_families | ( | std::vector< FontFamily * > & | families | ) |

List all families for a fontmap.

Parameters:

  families | A reference to a vector of FontFamily* to hold the font families.

Returns:
  true if the vector is not empty.

Font* Inti::Pango::FontMap::load_font | ( | Context * | context,
|  | const FontDescription & | desc
| ) |

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

Parameters:

  context | The Context the font will be used with.
  desc | A FontDescription describing the font to load.

Returns:
  The font loaded, or null if no font matched.

Fontset* Inti::Pango::FontMap::load_fontset | ( | Context * | context,
|  | const FontDescription & | desc,
|  | PangoLanguage * | language
| ) |

Load a set of fonts in the fontmap that can be used to render a font matching desc.

Parameters:

  context | The Context the font will be used with.
  desc | A FontDescription describing the font to load.
  language | A PangoLanguage the fonts will be used for.

Returns:
  The fontset, or null if no font matched.

The documentation for this class was generated from the following file:

- fontmap.h

Main Page - Footer