Pango

Pango
Παν語
Pango name written as intended
Developer(s) Behdad Esfahbod
Stable release 1.29.5 / November 22, 2011; 2 months ago (2011-11-22)
Operating system Unix-like, Microsoft Windows
Type Text rendering
License LGPL
Website www.pango.org

Pango (Παν語) is an LGPL licensed open source computing library used by software developers for laying out and rendering text in high quality, emphasising support for multilingual text.[1] Different font backends can be used, allowing cross-platform support, so that Pango-rendered text will appear similar under different operating systems, such as Linux, Apple's Mac OS and Microsoft Windows.

Contents

Utilization

Pango has been integrated into most Linux distributions. The GTK+ UI toolkit uses Pango for all of its text rendering. The Linux versions of the Mozilla Firefox web browser and Mozilla Thunderbird mail client use Pango for text rendering.

Name

The name pango comes from Greek pan (παν, "all") and Japanese go (語, "language").[2]

Support for OpenType features

Pango 1.17 and newer support the locl script tag that allows alternate 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 using Pango markup, e.g.:

pango-view \
 --font="Verdana 24" \
 --markup \
 --text 'In the same text: <span lang="en">şţ</span>(en) and <span lang="ro">şţ</span>(ro).'

The official showcase of Pango's script-aware features is here.

Text and graphics

Complete text handling and graphics rendering is provided when integrated with Cairo.

HarfBuzz

HarfBuzz (in Persian: حرف‌باز) is a layout/shaping engine for OpenType fonts.[3] Its purpose is to standardize text layout in FOSS; its code originally started as part of the FreeType project, was then developed separately in Qt and Pango, and finally merged back into a common repository. Both Qt and Pango currently use HarfBuzz; other standalone users include Firefox and Chromium, the open source project behind Google Chrome.[4]

See also

Notes

  1. ^ "Pango website". http://www.pango.org/. Retrieved 7 July, 2011. 
  2. ^ "The Pango connection: Part 1". Archived from the original on 27 June, 2009. http://www.ibm.com/developerworks/library/l-u-pango1/. Retrieved 7 July, 2011. 
  3. ^ "HarfBuzz Official website". http://freedesktop.org/wiki/Software/HarfBuzz. Retrieved 7 July, 2011. 
  4. ^ Esfahbod, Behdad (18 January, 2010). "State of Text Rendering". http://behdad.org/text/. Retrieved 7 July, 2011. 

References