Download

This is still early code. The API isn't finalized, there is portability has not been tested, it is somewhat inefficient, and there are plenty of bugs to be found.

Pango

To get Pango to compile, you'll need: 1

  • The development version of GLib
  • An implementation of iconv() that handles a good set of common character sets. The iconv() in GNU libc 2.1 works well. GLib also contains support for building with libiconv if your C library does not contain sufficiently good iconv().

The pango-viewer example program included with Pango itself requires Qt 2 to build. If you don't have Qt installed, the example will not be built. In order to see Pango in action, you'll either want to build this example, or try out the GTK+ snapshots as described below.

GTK+ Snapshots

The development versions of GTK+ now depend on Pango, and are probably the best way to try out the capabilities of Pango. The development versions of GTK+ are numbered GTK+-1.3.x, leading up to the eventual release of a stable GTK+-2.0. The development versions of GTK+ are installed in a different set of directories than the stable version of GTK+, so you can have both installed at once.

Tarballs

Tarballs of GLib and GTK+ 1.3.3 are available from:

In order to build GTK+-1.3, you'll first need to have the libtiff, libgiff, and libjpeg libraries on your system, then build and install GLib-1.3, FriBidi, Pango, and GTK+-1.3 in that order. Sources for the various dependencies of GTK+ can be found in:

The README file in the directory lists the original location for these libraries.

CVS

The latest development versions of Pango, as well as GTK+ and GLib can be found in GNOME CVS. The Pango sources are in the pango module; GTK+ and GLib are in the gtk+ and glib modules respectively. There is even less guarantee than with the snapshot tarballs that what you get from CVS will work correctly, but if you want the very latest stuff, this is where to get it.

RPMS

Pre-built RPM packages of GLib, FriBidi, Pango, and GTK+ for Red Hat 7.0 can be found in:

The SRPM source packages can most like be sucessfully rebuilt on similar systems.

To install the packages on a Red Hat 7.0 i386 system, simply download all the files in ftp://ftp.gtk.org/pub/gtk/v1.3/binary/RedHat-7.0/RPMS/i386/ into a directory, and then in that directory, type:

    rpm -Uvh *.i386.rpm
  

You may also want to grab and install the pango-fonts package from ftp://ftp.gtk.org/pub/gtk/v1.3/binary/RedHat-7.0/RPMS/noarch/. This contains fonts that work with the Pango's shapers for Indic languages.

Trying it out

So, now that you've got your bright and shiny version of GTK+ with Pango support, what is there to see? Two relevant test programs are included with GTK+; testgtk, which is the standard GTK= test program, and testtext, a test program for the new text widget. If you installed built from the tarballs or CVS, these will be found in the gtk/ subdirectory of the GTK+ tree. If you installed the RPMS, they will be in /usr/bin.

If you run testgtk, you should be able to observe the following:

  • All labels are displaying their text via Pango. This generally is going to look much the same as before, but if you go to the 'labels' test, you'll see labels displaying text in a number of different languages. That was done simply by putting the appropriate UTF-8 text in each label.

  • Many (though not all) widgets now support mirroring so that the interface can be ordered appropriate for right-to-left languages in addition to individual strings. Bring up the 'flipping' test along with a few other tests, and try toggling the global direction.

  • The entry widget displays via Pango, and has support for bidirectional editing. (Note that the text widget in testgtk is the old text widget, and doesn't have Pango support. To see the new text widget in action, run testtext.

If you run testtext, you will be able to view a sample of some of the new Text widgets capabilities, and load, view and save UTF-8 encoded files.



Last modified 03-Apr-2001
Owen Taylor <otaylor@redhat.com>