Pango
Template:Short description {{#invoke:other uses|otheruses}} Template:Use DMY dates Template:Infobox software
Pango (stylized as Παν語) is a text (i.e. glyph) layout engine library which works with the HarfBuzz shaping engine for displaying multi-language text.<ref>Template:Cite web</ref>
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 and FreeType, as text rendering backends. Pango-processed text will appear similar under different operating systems.Template:Clarify
Pango is a special-purpose library for text and not a general-purpose graphics rendering library such as Cairo, 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".<ref>Template:Cite web</ref>
History and naming
The name pango comes from Greek pan (παν, Template:Gloss) and Japanese go (語, Template:Gloss).<ref>Template:Cite web</ref>
In January 2000, the merger of the GScript and GnomeText projects was named Pango.<ref>Template:Cite web</ref><ref>Template:Cite web</ref><ref>Template:Cite web</ref><ref>Template:Cite web</ref><ref>Template:Cite web</ref><ref>Template:Cite web</ref>
Pango version 1.0.0 was released 11 March 2002.<ref>Template:Cite web</ref><ref>Template:Cite web</ref>
Support for OpenType features
Pango 1.17 and newer support the 'Template:Not a typo' 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: <syntaxhighlight lang="bash"> for lang in en ro do
pango-view \
--font="Verdana 64" \
--text "şţ vs. șț in $lang" \
--language=$lang
done </syntaxhighlight>
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 using Pango markup, e.g.: <syntaxhighlight lang="bash"> pango-view \
--font="Verdana 24" \
--markup \
--text 'In the same text: şţ(en) and şţ(ro).'
</syntaxhighlight>
Since 1.37.1, Pango added more attributes to provide complete support for processing OpenType feature.<ref>Template:Cite web</ref><ref>Template:Cite web</ref><ref>Template:Cite web</ref>
The official showcase of Pango's script-aware features is here.
Major users
Pango has been integrated into most Linux distributions. The GTK UI toolkit uses Pango for all of its text rendering.<ref>Template:Cite web</ref> The Linux versions of the Mozilla Firefox web browser and Mozilla Thunderbird mail client use Pango for text rendering.<ref>Template:Cite web</ref>
See also
- HarfBuzz (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 (multiplatform open source smart-font renderer)
- WorldScript (Old Macintosh multilingual text rendering engine)
- Typographic ligature
- Computer font
References
External links
- Template:Official website
- Pango, an open-source Unicode text layout engine. by Owen Taylor in Twenty fifth Internationalization and unicode conference, April 2004 Template:Webarchive
- "Pango: internationalized text handling" Owen Taylor in Ottawa linux symposium 2001
- Pango Reference Manual
- Template:YouTube, at linux.conf.au 2017 Simon Cozens explained the rendering of fonts
Template:Free and open-source typography Template:Freedesktop.org