Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Pango::FontFamily Class Reference

A PangoFontFamily C++ wrapper class. More...

#include <xfc/pango/font.hh>

Inheritance diagram for Xfc::Pango::FontFamily:

Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable List of all members.

Public Member Functions

Accessors
Methods

Detailed Description

A PangoFontFamily C++ wrapper class.

FontFamily is used to represent a family of related font faces. The faces in a family share a common design, but differ in slant, weight, width and other aspects.


Constructor & Destructor Documentation

Xfc::Pango::FontFamily::FontFamily ( PangoFontFamily *  family,
bool  owns_reference = true 
) [explicit, protected]

Construct a new FontFamily from an existing PangoFontFamily.

Parameters:
family A pointer to a PangoFontFamily.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The family can be a newly created PangoFontFamily or an existing PangoFontFamily. (see G::Object::Object).

Xfc::Pango::FontFamily::FontFamily ( PangoFontFamily *  family,
bool  owns_reference = true 
) [explicit, protected]

Construct a new FontFamily from an existing PangoFontFamily.

Parameters:
family A pointer to a PangoFontFamily.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The family can be a newly created PangoFontFamily or an existing PangoFontFamily. (see G::Object::Object).


Member Function Documentation

String Xfc::Pango::FontFamily::get_name (  )  const

Gets the name of the family.

Returns:
The name of the family.
The name is unique among all fonts for the font backend and can be used in a FontDescription to specify that a face from this family is desired.

bool Xfc::Pango::FontFamily::is_monospace (  )  const

Determines if the font family is monospace.

Returns:
true if the family is monospace.
A monospace font is a font designed for text display where the the characters form a regular grid. For Western languages this would mean that the advance width of all characters are the same, but this categorization also includes Asian fonts which include double-width characters: characters that occupy two grid cells. G::Unichar::iswide() returns a result that indicates whether a character is typically double-width in a monospace font. The best way to find out the grid-cell size is to call Pango::FontMetrics::get_approximate_digit_width(), since the results of Pango::FontMetrics::get_approximate_char_width() may be affected by double-width characters.

bool Xfc::Pango::FontFamily::list_faces ( std::vector< FontFace * > &  faces  )  const

Lists the different font faces that make up family.

Parameters:
faces A reference to a vector of FontFace* to hold the font faces.
Returns:
true if the vector is not empty.
The faces in a family share a common design, but differ in slant, weight, width and other aspects.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3