GdkFont

GdkFont

Structure holding font information.

Object Hierarchy

Direct subclasses

None.

Description

A GdkFont is a data structure containing basic information about a font, in terms of its type, ascent and descent. There is no constructor, as the fonts available are provided by the system. The GdkFont structure simply allows a new font to be loaded and queried.

To load a font, use gdk::font_load() . To load a fontset - a range of different fonts - use gdk::fontset_load() . Either function will return a single GdkFont.

Under win32 currently, all fonts are of the type GDK_FONT_FONTSET, regardless of the loading method.

Methods

extents()
  Returns an array of sizing information.
measure()
  The drawn width of a text-string, measured in pixels.
height()
  Returns the line height, measured in pixels.
width()
  The logical width of a text string, measured in pixels.

Properties

type:
  Font or fontset type.
ascent:
  Baseline to top of logical area.
descent:
  Baseline to bottom of logical area.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.