Pango (stylized as Παν語) is a text (i.e.
glyph
A glyph ( ) is any kind of purposeful mark. In typography, a glyph is "the specific shape, design, or representation of a character". It is a particular graphical representation, in a particular typeface, of an element of written language. A ...
) layout engine
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
which works with the
HarfBuzz
HarfBuzz (loose transliteration of Persian language, Persian calque ''harf-bāz'', literally "open type") is a software library for supporting text shaping, which is the process of converting Unicode text to glyph indices and positions. The ne ...
shaping engine for displaying multi-language text.
Full-function rendering of text and cross-platform support is achieved when Pango is used with platform APIs or third-party libraries, such as
Uniscribe Uniscribe is the Microsoft Windows set of services for rendering Unicode-encoded text, supporting complex text layout. It is implemented in the dynamic link library . Uniscribe was released with Windows 2000 and Internet Explorer 5.0. In addition ...
and
FreeType, as text rendering
backends. Pango-processed text will appear similar under different operating systems.
Pango is a special-purpose library for text and not a general-purpose graphics rendering library such as
Cairo
Cairo ( ; , ) is the Capital city, capital and largest city of Egypt and the Cairo Governorate, being home to more than 10 million people. It is also part of the List of urban agglomerations in Africa, largest urban agglomeration in Africa, L ...
, with which Pango can be used. The Cairo documentation recommends Pango be used to "render" text rather than Cairo for all but the simplest text "rendering".
History and naming
The name pango comes from Greek ''pan'' (
παν, ) and Japanese ''go'' (
語, ).
In January 2000, the merger of the GScript and GnomeText projects was named Pango.
Pango version 1.0.0 was released 11 March 2002.
Support for OpenType features
Pango 1.17 and newer support the '' feature tag that allows localized glyphs to be used for the same Unicode code point. Assuming you have
Verdana version 5.01 installed, which supports the 'locl' feature for the latn/ROM (Romanian) script, a quick demonstration (on Linux) is:
for lang in en ro
do
pango-view \
--font="Verdana 64" \
--text "şţ vs. șț in $lang" \
--language=$lang
done
For an explanation of the substitutions rules for Romanian, see this
discussion.
Setting the locale via the POSIX environment variable, e.g. LANG=ro_RO.UTF-8 will also cause Pango to use 'locl' font feature. Finally, you can change the language on the fly in the same text usin
Pango markup e.g.:
pango-view \
--font="Verdana 24" \
--markup \
--text 'In the same text: şţ(en) and şţ(ro).'
Since 1.37.1, Pango added more attributes to provide complete support for processing OpenType feature.
The official showcase of Pango's script-aware features i
here
Major users
Pango has been integrated into most Linux distributions. The
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both Free software, free and ...
UI toolkit uses Pango for all of its text rendering. The
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
versions of the
Mozilla Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curren ...
web browser and
Mozilla Thunderbird
Mozilla Thunderbird is a free and open-source email client that also functions as a personal information manager with a Digital calendar, calendar and contactbook, as well as an RSS feed reader, chat client (IRC/XMPP/Matrix (protocol), Matrix), ...
mail client use Pango for text rendering.
See also
*
HarfBuzz
HarfBuzz (loose transliteration of Persian language, Persian calque ''harf-bāz'', literally "open type") is a software library for supporting text shaping, which is the process of converting Unicode text to glyph indices and positions. The ne ...
(text shaping engine which is incorporated into Pango itself but can be also used stand-alone)
*
Core Text (modern multilingual text rendering engine introduced in
Mac OS X 10.5)
*
Graphite
Graphite () is a Crystallinity, crystalline allotrope (form) of the element carbon. It consists of many stacked Layered materials, layers of graphene, typically in excess of hundreds of layers. Graphite occurs naturally and is the most stable ...
(multiplatform open source smart-font renderer)
*
WorldScript (Old Macintosh multilingual text rendering engine)
*
Typographic ligature
In writing and typography, a ligature occurs where two or more graphemes or letters are joined to form a single glyph. Examples are the characters and used in English and French, in which the letters and are joined for the first ligature ...
*
Computer font
A computer font is implemented as a digital data file containing a set of graphically related glyphs. A computer font is designed and created using a font editor. A computer font specifically designed for the computer screen, and not for printi ...
References
External links
*
Pango, an open-source Unicode text layout engine. by Owen Taylor in Twenty fifth Internationalization and unicode conference, April 2004
"Pango: internationalized text handling" Owen Taylor in Ottawa linux symposium 2001Pango Reference Manual* , at
linux.conf.au 2017 Simon Cozens explained the rendering of fonts
{{Freedesktop.org
1999 software
C (programming language) libraries
Free computer libraries
Free software programmed in C
Freedesktop.org libraries
GNOME libraries
GTK
Software that uses Meson
Text rendering libraries