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

# Xfc::Pango::FontFace Class Reference

A PangoFontFace C++ wrapper class. More...

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

Inheritance diagram for Xfc::Pango::FontFace:

List of all members.

## Public Member Functions

Constructors

- virtual ~FontFace ()
    Destructor.

Accessors

- PangoFontFace * pango_font_face () const
    Get a pointer to the PangoFontFace structure.
- operator PangoFontFace * () const
    Conversion operator; safely converts a FontFace to a PangoFontFace pointer.
- Pointer< FontDescription > describe () const
    Returns the family, style, variant, weight and stretch of a font face.
- String get_face_name () const
    Gets a name representing the style of this face among the different faces in the font family for the face.

Methods

- bool list_sizes (std::vector< int > &sizes) const
    List the available sizes for a font.

## Protected Member Functions

Constructors

- FontFace (PangoFontFace *face, bool owns_reference=true)
    Construct a new FontFace from an existing PangoFontFace.

## Detailed Description

A PangoFontFace C++ wrapper class.

The FontFace is used to represent a group of fonts with the same family, slant, weight, width, but varying sizes.

## Constructor & Destructor Documentation

Xfc::Pango::FontFace::FontFace | ( | PangoFontFace * | face,
|  | bool | owns_reference = `true`
| ) | `[explicit, protected]`

Construct a new FontFace from an existing PangoFontFace.

Parameters:

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

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

## Member Function Documentation

Pointer<FontDescription> Xfc::Pango::FontFace::describe | ( |  | ) | const

Returns the family, style, variant, weight and stretch of a font face.

Returns:
  A smart pointer to newly-created FontDescription holding the description of the face.

The size field of the resulting font description will be unset.

String Xfc::Pango::FontFace::get_face_name | ( |  | ) | const

Gets a name representing the style of this face among the different faces in the font family for the face.

Returns:
  The face name for the face.

This name is unique among all faces in the family and is suitable for displaying to users.

bool Xfc::Pango::FontFace::list_sizes | ( | std::vector< int > & | sizes | ) | const

List the available sizes for a font.

Parameters:

  | sizes | A reference to a vector of int to hold the font sizes.

Returns:
  true if the vector is not empty.

This is only applicable to bitmap fonts. For scalable fonts, stores null at the location in sizes. The sizes returned are in pango units and are sorted in ascending order.

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

- font.hh

Xfce Foundation Classes

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