Index

Package: Font_Metrics

Description

package Pango.Font_Metrics is
---------------------------------------------------------------------------- -- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- Copyright (C) 2000-2014, AdaCore -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. -- -- You should have received a copy of the GNU General Public License and -- a copy of the GCC Runtime Library Exception along with this program; -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- <http://www.gnu.org/licenses/>. -- -- ----------------------------------------------------------------------------

Classes

Pango_Font_Metrics

type Pango_Font_Metrics is new Glib.C_Boxed with null record;

Ancestors:

Primitive operations:

From_Object_Free
Get_Approximate_Char_Width
Get_Approximate_Digit_Width
Get_Strikethrough_Position
Get_Strikethrough_Thickness
Get_Underline_Position
Get_Underline_Thickness

Constants & Global variables

Null_Pango_Font_Metrics (Pango_Font_Metrics)

Null_Pango_Font_Metrics : constant Pango_Font_Metrics;

Subprograms & Entries

From_Object

function From_Object 
(Object: System.Address) return Pango_Font_Metrics;

From_Object_Free

function From_Object_Free 
(B: access Pango_Font_Metrics'Class) return Pango_Font_Metrics;

Get_Type

function Get_Type return Glib.GType;

Get_Approximate_Char_Width

function Get_Approximate_Char_Width 
(Self: Pango_Font_Metrics) return Gint;
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.

Get_Approximate_Digit_Width

function Get_Approximate_Digit_Width 
(Self: Pango_Font_Metrics) return Gint;
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 or narrower than this, though this value is generally somewhat more accurate than the result of Pango.Font_Metrics.Get_Approximate_Char_Width for digits.

Get_Ascent

function Get_Ascent 
(Self: Pango_Font_Metrics) return Gint;
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.)

Get_Descent

function Get_Descent 
(Self: Pango_Font_Metrics) return Gint;
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.)

Get_Strikethrough_Position

function Get_Strikethrough_Position 
(Self: Pango_Font_Metrics) return Gint;
Gets the suggested position to draw the strikethrough. The value returned is the distance *above* the baseline of the top of the strikethrough. Since: gtk+ 1.6

Get_Strikethrough_Thickness

function Get_Strikethrough_Thickness 
(Self: Pango_Font_Metrics) return Gint;
Gets the suggested thickness to draw for the strikethrough. Since: gtk+ 1.6

Get_Underline_Position

function Get_Underline_Position 
(Self: Pango_Font_Metrics) return Gint;
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: gtk+ 1.6

Get_Underline_Thickness

function Get_Underline_Thickness 
(Self: Pango_Font_Metrics) return Gint;
Gets the suggested thickness to draw for the underline. Since: gtk+ 1.6

Ref

function Ref 
(Self: Pango_Font_Metrics) return Pango_Font_Metrics;
Increase the reference count of a font metrics structure by one.

Unref

procedure Unref 
(Self: Pango_Font_Metrics);
Decrease the reference count of a font metrics structure by one. If the result is zero, frees the structure and any associated memory.