Google

logo top
Main Page   Widgets   Namespaces   Book  

Pango::Font Class Reference

A Pango::Font is used to represent a font in a rendering-system-independent matter. More...

Inheritance diagram for Pango::Font:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~Font ()
PangoFont* gobj ()
const PangoFont* gobj () const
PangoFont* gobj_copy ()
FontDescription describe () const
 Returns a description of the font.

Glib::RefPtr<Coverageget_coverage (const Language& language) const
 Computes the coverage map for a given font and language tag.

FontMetrics get_metrics () const
 Gets overall metric information for a font.

FontMetrics get_metrics (const Language& language) const
 Gets overall metric information for a font.

void get_glyph_extents (Glyph glyph, Rectangle& ink_rect, Rectangle& logical_rect) const
 Gets the logical and ink extents of a glyph within a font.

Rectangle get_glyph_ink_extents (Glyph glyph) const
 Get the ink extents of a glyph within the font.

Rectangle get_glyph_logical_extents (Glyph glyph) const
 Gets the logical extents of a glyph within the font.


Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Pango::Font> wrap (PangoFont* object, bool take_copy=false)

Detailed Description

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


Constructor & Destructor Documentation

virtual Pango::Font::~Font (   [virtual]
 


Member Function Documentation

FontDescription Pango::Font::describe (   const
 

Returns a description of the font.

Returns:
A newly-allocated Pango::FontDescription object.

Glib::RefPtr<Coverage> Pango::Font::get_coverage ( const Language   language const
 

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

Parameters:
language The language tag.
Returns:
A newly-allocated Pango::Coverage object.

void 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.

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.

Parameters:
glyph The glyph index.
ink_rect Rectangle used to store the extents of the glyph as drawn or 0 to indicate that the result is not needed.
logical_rect Rectangle used to store the logical extents of the glyph or 0 to indicate that the result is not needed.

Rectangle Pango::Font::get_glyph_ink_extents ( Glyph    glyph const
 

Get the ink extents of a glyph within the font.

Parameters:
glyph The glyph index.
Returns:
The extents of the glyph as drawn.

Rectangle Pango::Font::get_glyph_logical_extents ( Glyph    glyph const
 

Gets the logical extents of a glyph within the font.

Parameters:
glyph The glyph index.
Returns:
The logical extents of the glyph.

FontMetrics Pango::Font::get_metrics ( const Language   language const
 

Gets overall metric information for a font.

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.

Parameters:
language Language tag used to determine which script to get the metrics for, or 0 to indicate to get the metrics for the entire font.
Returns:
A Pango::Metrics object. The caller must call pango_font_metrics_unref() when finished using the object.

FontMetrics Pango::Font::get_metrics (   const
 

Gets overall metric information for a font.

The metrics may be substantially different for different scripts. However, this function overload returns the metrics for the entire font.

const PangoFont* Pango::Font::gobj (   const [inline]
 

Reimplemented from Glib::ObjectBase.

PangoFont* Pango::Font::gobj (   [inline]
 

Reimplemented from Glib::ObjectBase.

PangoFont* Pango::Font::gobj_copy (  
 


Friends And Related Function Documentation

Glib::RefPtr<Pango::Font> wrap ( PangoFont*    object,
bool    take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm by Doxygen 1.3-rc1 © 1997-2001