Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Pango::FontMap Class Reference

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

`#include <xfc/pango/fontmap.hh>`

Inheritance diagram for Xfc::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) const
    List all families for a fontmap.

## Protected Member Functions

Constructors

- FontMap (PangoFontMap *fontmap, bool owns_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

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

Construct a new FontMap from an existing PangoFontMap.

Parameters:

  | fontmap | A pointer to a PangoFontMap.
  | owns_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 Xfc::Pango::FontMap::list_families | ( | std::vector< FontFamily * > & | families | ) | const

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* Xfc::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* Xfc::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.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3