Gtk2::Pango(3pm)

Gtk2::Pango3pm

Constants for use with pango

Usage

  use Gtk2; # gets the actual Pango objects and methods
  use Gtk2::Pango; # load extra constants

Overview

To use Pango effectively, you need a few extra constants that are not supplied in normal ways by the type system or by other means.

This module exports all of those extra constants when you load it. They use the fully-prefixed names from the C documentation.

Export

PangoWeight is indeed defined as an enumerated type whose values can be used as nickname strings in the perl bindings, but in several places where a weight is needed, a gint is requested instead. This is because PangoWeight is actually just a set of predefined values for an integer-valued property. The PANGO_WEIGHT_* constants give you the predefined values:

        PANGO_WEIGHT_ULTRALIGHT
        PANGO_WEIGHT_LIGHT
        PANGO_WEIGHT_NORMAL
        PANGO_WEIGHT_BOLD
        PANGO_WEIGHT_ULTRABOLD
        PANGO_WEIGHT_HEAVY

These are #defined in the C source, and thus are not available anywhere except here:

        PANGO_SCALE_XX_SMALL
        PANGO_SCALE_X_SMALL
        PANGO_SCALE_SMALL
        PANGO_SCALE_MEDIUM
        PANGO_SCALE_LARGE
        PANGO_SCALE_X_LARGE
        PANGO_SCALE_XX_LARGE

PANGO_SCALE is needed to convert between Pango units and pixels. It is also available as Gtk2::Pango->scale.

        PANGO_SCALE

Releases

7 releases since Debian 3.1 (Sarge); the text changed 6 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 9
  7. 10

Bugs

This module shouldn't exist, but some parts of the API just aren't clean.

This stuff is hardcoded directly from the headers of pango 1.2.1.

Author

muppet <scott AT asofyet.org>

From libgtk2-perl-doc 2:1.24992-1 in Debian 10 (Buster). Parsed by carta from the page's man source.