Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Pango::Font Class Reference

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

#include <inti/pango/font.h>

Inheritance diagram for Inti::Pango::Font:

Inti::G::Object Inti::G::TypeInstance Inti::MemoryHandler Inti::ReferencedBase 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

Inti::Pango::Font::Font PangoFont *  font,
bool  reference = true
[explicit, protected]
 

Construct a new Font from an existing PangoFont.

Parameters:
font A pointer to a PangoFont.
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> Inti::Pango::Font::describe  )  const
 

Returns a description of the font.

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

PangoEngineShape* Inti::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> Inti::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 Inti::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> Inti::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: Main Page - Footer


Generated on Sun Sep 14 20:08:24 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002