新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Pango::FontMetrics

class Pango::FontMetrics

A Pango::FontMetrics object holds the overall metric information for a font (possibly restricted to a script). The properties of this object are private to implementations of a font backend. See the documentation of the corresponding getters for documentation of their meaning.

Instance Methods

ascent
Gets the ascent from a font metrics object. 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.)
descent
Gets the descent from a font metrics object. 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.)
approximate_char_width
Gets the approximate character width for a font metrics object. 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.)
approximate_digit_width
Gets the approximate digit width for a font metrics object. 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::FontMetrics#approximate_digit_width.
  • Returns: the digit width, in pango units. (1 point == Pango::SCALE pango units.)
underline_thickness
Gets the suggested thickness to draw for the underline. Since 1.6
  • Returns: the suggested underline thickness, in Pango units.
underline_position
Gets the suggested position to draw the underline. The value returned is the distance above the baseline of the top of the underline. Since most fonts have underline positions beneath the baseline, this value is typically negative. Since 1.6
  • Returns: the suggested underline position, in Pango units.
strikethrough_thickness
Gets the suggested thickness to draw for the strikethrough. Since 1.6
  • Returns : the suggested strikethrough thickness, in Pango units.
strikethrough_position
Gets the suggested position to draw the strikethrough. The value returned is the distance above the baseline of the top of the strikethrough. Since 1.6
  • Returns: the suggested strikethrough position, in Pango units.

ChangeLog

  • 2005-11-04 Added. - Masao?
更新日時:2005/11/17 02:43:42
キーワード:
参照:[Pango::FontMetrics] [Pango::Fontset] [Pango::Font] [Pango::FontFamily] [Ruby/Pango]