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

# Xfc::Pango::Fontset Class Reference

A PangoFontset C++ wrapper class. More...

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

Inheritance diagram for Xfc::Pango::Fontset:

List of all members.

## Public Types

- typedef sigc::slot< bool,
  const Font & > ForeachSlot
    Signature of the callback slot to be called for font in the fontset.

## Public Member Functions

Constructors

- virtual ~Fontset ()
    Destructor.

Accessors

- PangoFontset * pango_fontset () const
    Get a pointer to the PangoFontset structure.
- operator PangoFontset * () const
    Conversion operator; safely converts a Fontset to a PangoFontset pointer.
- Pointer< Font > get_font (unsigned int wc) const
    Returns the font in the fontset that contains the best glyph for the unicode character wc.
- Pointer< FontMetrics > get_metrics () const
    Get overall metric information for the fonts in the fontset.

Methods

- void foreach (const ForeachSlot &each)
    Iterates through all the fonts in the fontset, calling each for each one.

## Protected Member Functions

Constructors

- Fontset (PangoFontset *fontset, bool owns_reference=true)
    Construct a new Fontset from an existing PangoFontset.

## Detailed Description

A PangoFontset C++ wrapper class.

A Fontset represents a set of Font to use when rendering text. It is the result of resolving a FontDescription against a particular Context. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset.

## Member Typedef Documentation

typedef sigc::slot<bool, const Font&> Xfc::Pango::Fontset::ForeachSlot

Signature of the callback slot to be called for font in the fontset.

Example: Method signature for ForeachSlot.

                 bool method(const Font& font);

                 // font: A Pango::font.
                 // return true to stop the iteration.

## Constructor & Destructor Documentation

Xfc::Pango::Fontset::Fontset | ( | PangoFontset * | fontset,
|  | bool | owns_reference = `true`
| ) | `[explicit, protected]`

Construct a new Fontset from an existing PangoFontset.

Parameters:

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

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

## Member Function Documentation

void Xfc::Pango::Fontset::foreach | ( | const ForeachSlot & | each | ) |

Iterates through all the fonts in the fontset, calling each for each one.

Parameters:

  | each | The callback slot.

Returns:
  true to stops the iteration.

Pointer<Font> Xfc::Pango::Fontset::get_font | ( | unsigned int | wc | ) | const

Returns the font in the fontset that contains the best glyph for the unicode character wc.

Parameters:

  | wc | A unicode character.

Returns:
  A smart pointer to a Font.

Pointer<FontMetrics> Xfc::Pango::Fontset::get_metrics | ( |  | ) | const

Get overall metric information for the fonts in the fontset.

Returns:
  A smart pointer to a FontMetrics object.

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

- fontset.hh

Xfce Foundation Classes

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