Introduction to Pango

Pango is a library for laying out and rendering text, with an emphasis on internationalization. It can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the context of the GTK+ widget toolkit.

This package is known to build and work properly using an LFS 12.1 platform.

Package Information

Pango Dependencies


Fontconfig-2.15.0 (must be built with FreeType-2.13.2 using HarfBuzz-8.3.0), FriBidi-1.0.13, and GLib-2.78.4



Cantarell fonts (for tests), Gi-DocGen-2023.3 (to generate documentation), help2man, libthai, and sysprof

Installation of Pango

Install Pango by running the following commands:

mkdir build &&
cd    build &&

meson setup --prefix=/usr          \
            --buildtype=release    \
            --wrap-mode=nofallback \
            ..                     &&

If you have Gi-DocGen-2023.3 installed and wish to build the API documentation for this package, issue:

sed "/docs_dir =/s@\$@ / 'pango-1.51.2'@" -i ../docs/ &&
meson configure -Dgtk_doc=true                                   &&

To test the results, issue: ninja test. One test, test-font is known to fail. Some tests may fail if no Opentype or Truetype fonts are installed in /usr/share/fonts.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dintrospection=disabled: Use this switch if you do not want to use gobject-introspection-1.78.1.

--wrap-mode=nofallback: This switch prevents meson from using subproject fallbacks for any dependency declarations in the build files, stopping it downloading any optional dependency which is not installed on the system.

Configuring Pango

Config Files

/etc/pango/pangorc, ~/.pangorc and the file specified in the environment variable PANGO_RC_FILE


Installed Programs: pango-list, pango-segmentation, and pango-view
Installed Libraries:,,, and
Installed Directories: /usr/include/pango-1.0 and /usr/share/doc/pango-1.51.2 (if gi-docgen is available)

Short Descriptions


displays a list of fonts that Pango can use that are currently installed on the system


shows text segmentation as determined by Pango.


renders a given text file through Pango for viewing purposes

contains low level layout rendering routines, a high level driver for laying out entire blocks of text, and routines to assist in editing internationalized text