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


Xfc::Pango::Font Class Reference

A PangoFont C++ wrapper class. More...

#include <xfc/pango/font.hh>

Inheritance diagram for Xfc::Pango::Font:

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

Public Member Functions

Constructors
Accessors
Methods

Protected Member Functions

Constructors

Detailed Description

A PangoFont C++ wrapper class.

Font is used to represent a font in a rendering-system-independent matter.


Constructor & Destructor Documentation

Xfc::Pango::Font::Font PangoFont *  font,
bool  owns_reference = true
[explicit, protected]
 

Construct a new Font from an existing PangoFont.

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


Member Function Documentation

Pointer<FontDescription> Xfc::Pango::Font::describe  )  const
 

Returns a description of the font.

Returns:
A smart pointer to a newly-allocated FontDescription object.

PangoEngineShape* Xfc::Pango::Font::find_shaper unsigned int  character_code,
PangoLanguage *  language
 

Finds the best matching shaper for a font for a particular language tag and character point.

Parameters:
character_code The ISO-10646 character code.
language The language tag.
Returns:
The best matching shaper.

Pointer<Coverage> Xfc::Pango::Font::get_coverage PangoLanguage *  language  )  const
 

Computes the coverage map for a given font and language tag.

Parameters:
language The language tag.
Returns:
A smart pointer to a newly-allocated Coverage object.

void Xfc::Pango::Font::get_glyph_extents Glyph  glyph,
Rectangle ink_rect,
Rectangle logical_rect
const
 

Gets the logical and ink extents of a glyph within a font.

Parameters:
glyph The glyph index.
ink_rect The rectangle used to store the extents of the glyph as drawn, or null to indicate that the result is not needed.
logical_rect The rectangle used to store the logical extents of the glyph, or null to indicate that the result is not needed.
The coordinate system for each rectangle has its origin at the base line and horizontal origin of the character with increasing coordinates extending to the right and down. The macros PANGO_ASCENT(), PANGO_DESCENT(), PANGO_LBEARING(), and PANGO_RBEARING can be used to convert from the extents rectangle to more traditional font metrics. The units of the rectangles are in 1/PANGO_SCALE of a device unit.

Pointer<FontMetrics> Xfc::Pango::Font::get_metrics PangoLanguage *  language = 0  )  const
 

Gets overall metric information for a font.

Parameters:
language The language tag used to determine which script to get the metrics for, or null to indicate to get the metrics for the entire font.
Returns:
A smart pointer to a FontMetrics object.
Since the metrics may be substantially different for different scripts, a language tag can be provided to indicate that the metrics should be retrieved that correspond to the script(s) used by that language.


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