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.



Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

Pango Dependencies


Fontconfig-2.14.2 (must be built with FreeType-2.12.1 using HarfBuzz-6.0.0), FriBidi-1.0.12, and GLib-2.74.5



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

User Notes:

Installation of Pango

Fix the installation directory of API documentation:

sed "/docs_dir =/s@\$@ / 'pango-1.50.12'@" -i docs/

Install Pango by running the following commands:

mkdir build &&
cd    build &&

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

To test the results, issue: ninja test. Two tests, test-font and test-layout are known to fail.

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.

-Dgtk_doc=true: Although the default value of this option is false, the API documentation will be rebuilt and installed if Gi-DocGen-2023.1 is available, either as a meson submodule (see below the --wrap-mode option) or on the system. The only difference when setting this option to true is that meson exits with in error if gi-docgen is not available.

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

--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.50.12 (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