CINXE.COM
The GTK Project - A free and open-source cross-platform widget toolkit
<!DOCTYPE html><html lang="en"dir="ltr"><head><meta charset="UTF-8"><meta name="viewport"content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,shrink-to-fit=no"><meta http-equiv="X-UA-Compatible"content="ie=edge"><meta name="theme-color"content="#ffffff"><meta name="apple-mobile-web-app-status-bar-style"content="#ffffff"><meta name="generator"content="Jekyll v4.0.1"><meta name="author"content="The GTK Team"><meta name="keywords"content="gtk, gtk, gimp, gnome, toolkit, user interface"><title>The GTK Project - A free and open-source cross-platform widget toolkit</title><meta itemprop="description"name="description"content="GTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces."><meta property="og:locale"content="en_US"><meta property="og:type"content="article"><meta property="og:title"content="The GTK Project - A free and open-source cross-platform widget toolkit"><meta property="og:url"content="https://www.gtk.org/docs/architecture/pango"><meta property="og:image"content="/assets/img/logo-gtk.png"><meta property="og:site_name"content="The GTK Team"><meta property="og:description"content="GTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces."><meta property="twitter:title"content="The GTK Project - A free and open-source cross-platform widget toolkit"><meta property="twitter:description"content="GTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces."><meta name="twitter:site"content="@"><meta name="twitter:creator"content="@"><meta name="twitter:card"content="summary"><link rel="apple-touch-icon"sizes="180x180"href="https://www.gtk.org/assets/img/icons/apple-touch-icon.png"><link rel="icon"type="image/png"sizes="32x32"href="https://www.gtk.org/assets/img/icons/favicon-32x32.png"><link rel="icon"type="image/png"sizes="16x16"href="https://www.gtk.org/assets/img/icons/favicon-16x16.png"><link rel="canonical"href="https://www.gtk.org/docs/architecture/pango"><link rel="stylesheet"href="https://www.gtk.org/assets/@fortawesome/fontawesome-free/css/all.min.css"type="text/css"media="screen"><link rel="stylesheet"href="https://www.gtk.org/assets/css/markdown.css"type="text/css"media="screen"><link rel="stylesheet"href="https://www.gtk.org/assets/css/theme.css"type="text/css"media="screen"><link rel="stylesheet"href="https://www.gtk.org/assets/css/colorful.css"type="text/css"media="screen"><link rel="stylesheet"href="https://www.gtk.org/assets/css/index.css"type="text/css"media="screen"></head><body><header class="navbar small bg-dark"><nav class="container navbar-expand-md px-0 px-md-3"><a href="https://www.gtk.org"class="navbar-brand text-white"><img src="https://www.gtk.org/assets/img/logo-gtk-sm.png"class="pr-2"style="max-width:40px;"><strong>GTK</strong></a> <a class="btn navbar-toggler border-0 bg-white"role="button"data-toggle="collapse"data-target="#navbarSupportedContent"href="#"><i class="fas fa-ellipsis-h text-dark"></i></a><div class="collapse navbar-collapse"id="navbarSupportedContent"><ul class="navbar-nav ml-auto"><a href="https://www.gtk.org/features/"class="nav-link-dark float-right text-white rounded">Features</a> <a href="https://www.gtk.org/docs/"class="nav-link-dark float-right text-white rounded">Docs</a> <a href="https://www.gtk.org/community/"class="nav-link-dark float-right text-white rounded">Community</a> <a href="https://gitlab.gnome.org/GNOME/gtk/"target="_blank"class="nav-link-dark float-right text-white rounded">Code</a> <a href="https://blog.gtk.org/"target="_blank"class="nav-link-dark float-right text-white rounded">Development Blog</a></ul></div></nav></header><button class="d-none btn border border-info bg-white rounded-circle position-fixed"id="btn-go-to-top"><i class="fas fa-angle-up"></i></button><section><div class="container"><div class="row"><div class="col-md-3 small p-0 nav-side"id="mySidenav"><div class="text-break bg-white p-0 pt-2 pt-md-4 h-100"><a href="#"class="btn d-md-none btn-close mt-2"onclick="closeSideNav()"><i class="fas fa-times fa-halfx"></i></a><ul class="list-group"><li class="list-group-item border-0 group-header pb-4"><a href="https://www.gtk.org/docs/getting-started/"class="text-dark"><i class="fas fa-cogs fa-fw"></i> <strong>Getting Started</strong></a><ul class="list-group"><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/getting-started/hello-world/"class="text-muted stretched-link">Hello World</a></li></ul></li><li class="list-group-item border-0 group-header pb-4"><a href="https://www.gtk.org/docs/installations/"class="text-dark"><i class="fas fa-box-open fa-fw"></i> <strong>Installations</strong></a><ul class="list-group"><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/installations/linux/"class="text-muted stretched-link">Linux</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/installations/macos/"class="text-muted stretched-link">Macos</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/installations/windows/"class="text-muted stretched-link">Windows</a></li></ul></li><li class="list-group-item border-0 group-header pb-4"><a href="https://www.gtk.org/docs/language-bindings/"class="text-dark"><i class="fas fa-random fa-fw"></i> <strong>Language Bindings</strong></a><ul class="list-group"><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/language-bindings/cpp/"class="text-muted stretched-link">Cpp</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/language-bindings/guile/"class="text-muted stretched-link">Guile</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/language-bindings/javascript/"class="text-muted stretched-link">Javascript</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/language-bindings/python/"class="text-muted stretched-link">Python</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/language-bindings/rust/"class="text-muted stretched-link">Rust</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/language-bindings/vala//"class="text-muted stretched-link">Vala</a></li></ul></li><li class="list-group-item border-0 group-header pb-4"><a href="https://www.gtk.org/docs/dev-tools/"class="text-dark"><i class="fas fa-tools fa-fw"></i> <strong>Dev Tools</strong></a><ul class="list-group"><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/dev-tools/eclipse/"class="text-muted stretched-link">Eclipse</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/dev-tools/gnome-builder/"class="text-muted stretched-link">Gnome Builder</a></li></ul></li><li class="list-group-item border-0 group-header pb-4"><a href="https://www.gtk.org/docs/apis/"class="text-dark"><i class="fas fa-cubes fa-fw"></i> <strong>API References</strong></a><ul class="list-group"><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://docs.gtk.org/gtk4/"class="text-muted stretched-link">GTK</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://docs.gtk.org/gdk4/"class="text-muted stretched-link">GDK</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://docs.gtk.org/gsk4/"class="text-muted stretched-link">GSK</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://docs.gtk.org/gdk-pixbuf/"class="text-muted stretched-link">GdkPixbuf</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://docs.gtk.org/Pango/"class="text-muted stretched-link">Pango</a></li></ul></li><li class="list-group-item border-0 group-header pb-4"><a href="https://www.gtk.org/docs/architecture/"class="text-dark"><i class="fas fa-vector-square fa-fw"></i> <strong>Architecture</strong></a><ul class="list-group"><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/architecture/glib/"class="text-muted stretched-link">Glib</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.gtk.org/docs/architecture/pango/"class="text-muted stretched-link">Pango</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.cairographics.org/documentation/"class="text-muted stretched-link">Cairo</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.opengl.org/"class="text-muted stretched-link">OpenGL</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://www.vulkan.org/"class="text-muted stretched-link">Vulkan</a></li><li class="list-group-item border-0 p-0 py-1 padding-icon"><a href="https://wayland.freedesktop.org/"class="text-muted stretched-link">Wayland</a></li></ul></li></ul></div></div><div class="col-md-9 py-4 px-sm-4 bg-light border-0 border-md-left"><div class="d-flex flex-sm-row flex-column py-3 py-md-0 app-shadow"><div class="w-100"><button class="btn btn-mdcolor btn-sm d-inline-block d-md-none"onclick="openSideNav()"role="button"><i class="fas fa-bars fa-fw pr-2"></i>More Topics</button><nav aria-label="breadcrumb"><ol class="breadcrumb small bg-transparent pl-0 m-0"><li class="breadcrumb-item"><a href="https://www.gtk.org/docs/">Docs</a></li><li class="breadcrumb-item"><a href="https://www.gtk.org/docs/architecture/">Architecture</a></li><li class="breadcrumb-item active"aria-current="page">Pango</li></ol></nav></div></div><article class="markdown-body my-4"><h1 id="pango">Pango</h1><p>Pango is a library for laying out and rendering of text, with an emphasis on internationalization. Pango 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. Pango forms the core of text and font handling for GTK.</p><p>The name comes from the Greek Παν (“Pan”), meaning “all”, and the Japanese 語 (“Go”), meaning “language”.</p><h2 id="features">Features</h2><p>Pango is designed to be modular; the core Pango layout engine can be used with different font backends. There are three basic backends, with multiple options for rendering with each:</p><ul><li>Client side fonts using the FreeType and fontconfig libraries. Rendering can be with Cairo or Xft libraries, or directly to an in-memory buffer with no additional libraries.</li><li>Native fonts on Microsoft Windows. Rendering can be done via Cairo or directly using the native Win32 API.</li><li>Native fonts on MacOS X, rendering via Cairo.</li></ul><p>As well as the low-level layout rendering routines, Pango includes <code class="highlighter-rouge">PangoLayout</code>, a high-level driver for laying out entire blocks of text, and routines to assist in editing internationalized text.</p><p>Complex-text support is provided by <a href="https://harfbuzz.org/">HarfBuzz</a>, on all platforms.</p><p>The integration of Pango with <a href="https://www.cairographics.org">Cairo</a> provides a complete solution with high quality text handling and graphics rendering.</p><h2 id="documentation">Documentation</h2><ul><li><a href="https://docs.gtk.org/Pango/">API reference for Pango</a></li><li><a href="https://docs.gtk.org/PangoCairo/">API reference for Cairo integration</a></li><li><a href="https://docs.gtk.org/PangoFT2/">API reference for FreeType2 integration</a></li><li><a href="https://docs.gtk.org/PangoFc/">API reference for Fontconfig integration</a></li><li><a href="https://docs.gtk.org/Pango/pango_markup.html">Pango markup documentation</a></li></ul><h2 id="sources">Sources</h2><p>The Pango source is available on GNOME’s GitLab instance at: https://gitlab.gnome.org/GNOME/pango</p><p>You can download the release archives from: https://download.gnome.org/sources/pango</p><h2 id="reporting-issues">Reporting issues</h2><p>If you have an issue using Pango, open a topic on GNOME’s Discourse instance under the <a href="https://discourse.gnome.org/tag/pango">“pango” tag</a>.</p><p>You can report bugs on the project’s <a href="https://gitlab.gnome.org/GNOME/pango/-/issues">GitLab issue tracker</a>.</p></article><div class="bg-white p-3 border rounded shadow-sm small"><i class="fas fa-edit text-info fa-fw pr-2"></i> <span>Observed a typo or some missing information, <a href="https://gitlab.gnome.org/Teams/Websites/www.gtk.org/tree/master/_docs/architecture/pango.md">edit this page</a>.</span><br><i class="fas fa-plus-square text-info fa-fw pr-2"></i> <span>Read on <a href="https://gitlab.gnome.org/Teams/Websites/www.gtk.org/tree/master/CONTRIBUTING.md/">how to contribute</a> to this website.</span></div></div></div></div></section><script src="https://www.gtk.org/assets/jquery/dist/jquery.min.js"></script><script src="https://www.gtk.org/assets/popper.js/dist/umd/popper.min.js"></script><script src="https://www.gtk.org/assets/bootstrap/dist/js/bootstrap.min.js"></script><script>var btnTop = $("#btn-go-to-top"); $(window).scroll(function() { if ($(window).scrollTop() < 400) { btnTop.addClass("d-none"); } else { btnTop.removeClass("d-none"); } }); btnTop.on("click", function(e) { e.preventDefault(); $("html, body").animate({scrollTop: 0}); });</script><script>// handles the sidebar opening and closing functionality function openSideNav() { document.querySelector(".nav-side").style.left = "0%"; document.querySelector(".nav-side").style.opacity = "1"; } function closeSideNav() { document.querySelector(".nav-side").style.left = "-100%"; document.querySelector(".nav-side").style.opacity = "0"; } // adds anchor links to the headings in the markdown body var headings = document.querySelectorAll( '.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6' ); headings.forEach(heading => { heading.innerHTML = heading.innerHTML + ` <a id="${heading.id}" href="#${heading.id}" class="anchor"><i class="fas fa-link octicon octicon-link text-secondary" style="font-size: 0.8rem;"></i></a> `; });</script><footer class="container-fluid bg-dark navbar-dark text-info py-4 small"><div class="container"><div class="row"><div class="col-sm-5 col-lg-4 py-3 py-sm-2"><a href="https://www.gnome.org/"><img src="https://www.gtk.org/assets/img/logo-gnome-horizontal.svg"class="img-fluid pb-2"width="100"></a><p>GTK is hosted by GNOME.</p><p>GTK is maintained by the <a href="https://www.gtk.org/community#contributors"class="text-muted font-weight-bold">GTK Team</a>.</p><p>© 1997-2024, The GTK Team. All Rights Reserved.</p><p>GTK and the GTK logo are <a href="https://foundation.gnome.org/legal-and-trademarks/"class="text-muted font-weight-bold">trademarks of the GNOME Foundation</a>.</p></div><div class="col-sm-7 col-lg-5 py-3 py-sm-2"><div class="d-flex"><div class="col pl-0"><h6 class="text-muted">PROJECT</h6><ul class="list-unstyled text-small"><li><a href="https://www.gtk.org/"class="text-info">GTK</a></li><li><a href="https://www.gtk.org/features/"class="text-info">Features</a></li><li><a href="https://www.gtk.org/docs/"class="text-info">Docs</a></li><li><a href="https://download.gnome.org/sources/gtk/"class="text-info">Downloads</a></li><li><a href="https://gitlab.gnome.org/GNOME/gtk/tree/master/COPYING"class="text-info">License</a></li><li><a href="https://gitlab.gnome.org/GNOME/gtk/-/releases"class="text-info">Releases</a></li><li><a href="https://gitlab.gnome.org/GNOME/gtk/"class="text-info">Code</a></li></ul></div><div class="col pl-0"><h6 class="text-muted">SUPPORT</h6><ul class="list-unstyled text-small"><li><a href="https://docs.gtk.org/gtk4/question_index.html"class="text-info">FAQs</a></li><li><a href="https://gitlab.gnome.org/GNOME/gtk/issues/new"class="text-info">Report a Bug</a></li><li><a href="https://gitlab.gnome.org/GNOME/gtk/issues/new"class="text-info">Request a feature</a></li></ul></div><div class="col pl-0"><h6 class="text-muted">COMMUNITY</h6><ul class="list-unstyled text-small"><li><a href="https://www.gtk.org/community/"class="text-info">Community</a></li><li><a href="https://blog.gtk.org/"class="text-info">Development Blog</a></li><li><a href="https://discourse.gnome.org"class="text-info">Discussion</a></li><li><a href="https://conduct.gnome.org"class="text-info">Code of Conduct</a></li><li><a href="http://www.gnome.org/foundation/"class="text-info">Donate</a></li></ul></div></div></div><div class="col-sm-12 col-lg-3 py-3 py-sm-2"><h5>About the Site</h5><ul class="list-unstyled text-small"><li>Hosted on <a href="https://gitlab.gnome.org/Teams/Websites/www.gtk.org"class="text-muted font-weight-bold">Gitlab</a>.</li><li>Powered by <a href="https://jekyllrb.com/"class="text-muted font-weight-bold">Jekyll</a>.</li><li>Report <a href="https://gitlab.gnome.org/Teams/Websites/www.gtk.org/-/issues/new"class="text-muted font-weight-bold">an issue</a>.</li></ul><ul class="list-unstyled list-inline text-small"><li class="list-inline-item"><a href="https://gitlab.gnome.org/GNOME/gtk/"rel="me"class="text-muted text-primary"><i class="fab fa-gitlab"></i></a></li><li class="list-inline-item"><a href="https://discourse.gnome.org/c/platform/core/"rel="me"class="text-muted text-primary"><i class="fab fa-discourse"></i></a></li><li class="list-inline-item"><a href="https://floss.social/@GTK"rel="me"class="text-muted text-primary"><i class="fab fa-mastodon"></i></a></li></ul></div></div></div></footer></body></html>