Crear  Editar  FrontPage  Indexes  Buscar  Cambios  History  RSS  Login


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.
  • language: the language tag(Pango::Language?)
  • ch: the ISO-10646 character code. (Fixnum)
  • Returns: the best matching shaper. (Pango::EngineShape)
Returns a description of the font.
Computes the coverage map for a given font and language tag.
  • language: the language tag(Pango::Language?)
  • Returns: a newly-allocated Pango::Coverage? object.
  • Returns: self
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]
    • ink_rect:the extents of the glyph as drawn (Pango::Rectangle?)
    • logical_rect : the logical extents of the glyph (Pango::Rectangle?)
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.
Gets the font map for which the font was created. Since 1.9


2005-10-14 Added. - Masao?