Pango

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Script error: No such module "other uses". Template:Use DMY dates Script error: No such module "Infobox".Template:Template other Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters".

Pango (stylized as Παν語) is a text (i.e. glyph) layout engine library which works with the HarfBuzz shaping engine for displaying multi-language text.[1]

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.Script error: No such module "Unsubst".

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".[2]

History and naming

The name pango comes from Greek pan (παν, Template:Gloss) and Japanese go (, Template:Gloss).[3]

In January 2000, the merger of the GScript and GnomeText projects was named Pango.[4][5][6][7][8][9]

Pango version 1.0.0 was released 11 March 2002.[10][11]

Support for OpenType features

File:Pango locl demo.png
Default rendering above, localized Romanian rendering below.

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:

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: şţ(en) and <span lang="ro">şţ(ro).</span>'

Since 1.37.1, Pango added more attributes to provide complete support for processing OpenType feature.[12][13][14]

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

Major users

File:GTK+ software architecture.svg
Simplified software architecture of GTK. Pango, GDK, ATK, GIO, Cairo and GLib.

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

See also

Script error: No such module "Portal".

References

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".
  15. Script error: No such module "citation/CS1".
  16. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links

Template:Free and open-source typography Script error: No such module "Navbox".