Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Pango::Font

class Pango::Font

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

Instance Methods

find_shaper(language, ch)
Finds the best matching shaper for a font for a particular language tag and character point.
describe
Returns a description of the font.
get_coverage(language)
Computes the coverage map for a given font and language tag.
  • Returns: self
get_glyph_extents(glyph)
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::Rectangle#ascent, Pango::Rectangle#descent, Pango::Rectangle#lbearing and Pango::Rectangle#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.
  • glyph: the glyph index(Integer)
  • Returns: [ink_rect, logical_rect]
metrics(language = nil)
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.
  • language: language tag used to determine which script to get the metrics for, or nil to indicate to get the metrics for the entire font.
  • Returns: a Pango::FontMetrics object.
font_map
Gets the font map for which the font was created. Since 1.9

ChangeLog

2005-10-14 Added. - Masao