Main Page Widgets Namespaces Book

# Pango::FontMetrics Class Reference

A Pango::FontMetrics holds the overall metric information for a font (possibly restricted to a script). More...

List of all members.

## Public Methods
| FontMetrics ()
| FontMetrics (PangoFontMetrics* gobject, bool make_a_copy=true)
| FontMetrics (const FontMetrics& other)
FontMetrics& | operator= (const FontMetrics& other)
| ~FontMetrics ()
void | swap (FontMetrics& other)
PangoFontMetrics* | gobj ()
| Provides access to the underlying C instance.
const PangoFontMetrics* | gobj () const
| Provides access to the underlying C instance.
PangoFontMetrics* | gobj_copy () const
int | get_ascent () const
| Gets the ascent from a font metrics structure.
int | get_descent () const
| Gets the descent from a font metrics structure.
int | get_approximate_char_width () const
| Gets the approximate character width for a font metrics structure.
int | get_approximate_digit_width () const
| Gets the approximate digit width for a font metrics structure.
## Protected Attributes
PangoFontMetrics* | gobject_
## Related Functions
(Note that these are not member functions.)
void | swap (FontMetrics& lhs, FontMetrics& rhs)
Pango::FontMetrics | wrap (PangoFontMetrics* object, bool take_copy=false)

## Detailed Description

A Pango::FontMetrics holds the overall metric information for a font (possibly restricted to a script).

## Constructor & Destructor Documentation

Pango::FontMetrics::FontMetrics | ( |  | ) |

Pango::FontMetrics::FontMetrics | ( | PangoFontMetrics* | gobject,
|  | bool | make_a_copy = true
| ) | `[explicit]`

Pango::FontMetrics::FontMetrics | ( | const FontMetrics& | other | ) |

Pango::FontMetrics::~FontMetrics | ( |  | ) |

## Member Function Documentation

int Pango::FontMetrics::get_approximate_char_width | ( |  | ) |

| Gets the approximate character width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this. Returns: The character width, in pango units. (1 point == Pango::SCALE pango units.).

int Pango::FontMetrics::get_approximate_digit_width | ( |  | ) |

| Gets the approximate digit width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider and narrower than this, though this value is generally somewhat more accurate than the result of pango_font_metrics_get_approximate_digit_width(). Returns: The digit width, in pango units. (1 point == Pango::SCALE pango units.).

int Pango::FontMetrics::get_ascent | ( |  | ) |

| Gets the ascent from a font metrics structure. The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.) Returns: The ascent, in pango units. (1 point == Pango::SCALE pango units.).

int Pango::FontMetrics::get_descent | ( |  | ) |

| Gets the descent from a font metrics structure. The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.) Returns: The descent, in pango units. (1 point == Pango::SCALE pango units.).

const PangoFontMetrics* Pango::FontMetrics::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C instance.

PangoFontMetrics* Pango::FontMetrics::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C instance.

PangoFontMetrics* Pango::FontMetrics::gobj_copy | ( |  | ) |

FontMetrics& Pango::FontMetrics::operator= | ( | const FontMetrics& | other | ) |

void Pango::FontMetrics::swap | ( | FontMetrics& | other | ) |

## Friends And Related Function Documentation

void swap | ( | FontMetrics& | lhs,
|  | FontMetrics& | rhs
| ) | `[related]`

Pango::FontMetrics wrap | ( | PangoFontMetrics* | object,
|  | bool | take_copy = false
| ) | `[related]`

## Member Data Documentation

PangoFontMetrics* Pango::FontMetrics::gobject_`[protected]`

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

- fontmetrics.h