Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# script.hh File Reference

A Pango Script C++ wrapper interface. More...

`#include <xfc/glib/unicode.hh>`
`#include <xfc/utfstring.hh>`
`#include <pango/pango-script.h>`
`#include <xfc/pango/inline/script.inl>`

## Namespaces

- namespace Xfc
- namespace Xfc::Pango

## Classes

- class Xfc::Pango::ScriptIter
    A PangoScriptIter C++ wrapper class. More...

## Script Methods

- Script script_for_unichar (G::Unichar ch)
    Looks up the Pango::Script for a particular character (as defined by Unicode Technical report 24).
- PangoLanguage * script_get_sample_language (Script script)
    Given a script, finds a language tag that is reasonably representative of that script.
- bool language_includes_script (PangoLanguage *language, Script script)
    Determines if script is one of the scripts used to write language.

## Enumerations

- enum Script {
  SCRIPT_INVALID_CODE = PANGO_SCRIPT_INVALID_CODE,
  SCRIPT_COMMON = PANGO_SCRIPT_COMMON,
  SCRIPT_INHERITED = PANGO_SCRIPT_INHERITED,
  SCRIPT_ARABIC = PANGO_SCRIPT_ARABIC,
  SCRIPT_ARMENIAN = PANGO_SCRIPT_ARMENIAN,
  SCRIPT_BENGALI = PANGO_SCRIPT_BENGALI,
  SCRIPT_BOPOMOFO = PANGO_SCRIPT_BOPOMOFO,
  SCRIPT_CHEROKEE = PANGO_SCRIPT_CHEROKEE,
  SCRIPT_COPTIC = PANGO_SCRIPT_COPTIC,
  SCRIPT_CYRILLIC = PANGO_SCRIPT_CYRILLIC,
  SCRIPT_DESERET = PANGO_SCRIPT_DESERET,
  SCRIPT_DEVANAGARI = PANGO_SCRIPT_DEVANAGARI,
  SCRIPT_ETHIOPIC = PANGO_SCRIPT_ETHIOPIC,
  SCRIPT_GEORGIAN = PANGO_SCRIPT_GEORGIAN,
  SCRIPT_GOTHIC = PANGO_SCRIPT_GOTHIC,
  SCRIPT_GREEK = PANGO_SCRIPT_GREEK,
  SCRIPT_GUJARATI = PANGO_SCRIPT_GUJARATI,
  SCRIPT_GURMUKHI = PANGO_SCRIPT_GURMUKHI,
  SCRIPT_HAN = PANGO_SCRIPT_HAN,
  SCRIPT_HANGUL = PANGO_SCRIPT_HANGUL,
  SCRIPT_HEBREW = PANGO_SCRIPT_HEBREW,
  SCRIPT_HIRAGANAPANGO_SCRIPT_HIRAGANA,
  SCRIPT_KANNADA = PANGO_SCRIPT_KANNADA,
  SCRIPT_KATAKANA = PANGO_SCRIPT_KATAKANA,
  SCRIPT_KHMER = PANGO_SCRIPT_KHMER,
  SCRIPT_LAO = PANGO_SCRIPT_LAO,
  SCRIPT_LATIN = PANGO_SCRIPT_LATIN,
  SCRIPT_MALAYALAM = PANGO_SCRIPT_MALAYALAM,
  SCRIPT_MONGOLIAN = PANGO_SCRIPT_MONGOLIAN,
  SCRIPT_MYANMAR = PANGO_SCRIPT_MYANMAR,
  SCRIPT_OGHAM = PANGO_SCRIPT_OGHAM,
  SCRIPT_OLD_ITALIC = PANGO_SCRIPT_OLD_ITALIC,
  SCRIPT_ORIYA = PANGO_SCRIPT_ORIYA,
  SCRIPT_RUNIC = PANGO_SCRIPT_RUNIC,
  SCRIPT_SINHALA = PANGO_SCRIPT_SINHALA,
  SCRIPT_SYRIAC = PANGO_SCRIPT_SYRIAC,
  SCRIPT_TAMIL = PANGO_SCRIPT_TAMIL,
  SCRIPT_TELUGU = PANGO_SCRIPT_TELUGU,
  SCRIPT_THAANA = PANGO_SCRIPT_THAANA,
  SCRIPT_THAI = PANGO_SCRIPT_THAI,
  SCRIPT_TIBETAN = PANGO_SCRIPT_TIBETAN,
  SCRIPT_CANADIAN_ABORIGINAL = PANGO_SCRIPT_CANADIAN_ABORIGINAL,
  SCRIPT_YI = PANGO_SCRIPT_YI,
  SCRIPT_TAGALOG = PANGO_SCRIPT_TAGALOG,
  SCRIPT_HANUNOO = PANGO_SCRIPT_HANUNOO,
  SCRIPT_BUHID = PANGO_SCRIPT_BUHID,
  SCRIPT_TAGBANWA = PANGO_SCRIPT_TAGBANWA,
  SCRIPT_BRAILLE = PANGO_SCRIPT_BRAILLE,
  SCRIPT_CYPRIOTPANGO_SCRIPT_CYPRIOT,
  SCRIPT_LIMBUPANGO_SCRIPT_LIMBU,
  SCRIPT_OSMANYA = PANGO_SCRIPT_OSMANYA,
  SCRIPT_SHAVIAN = PANGO_SCRIPT_SHAVIAN,
  SCRIPT_LINEAR_B = PANGO_SCRIPT_LINEAR_B,
  SCRIPT_TAI_LE = PANGO_SCRIPT_TAI_LE,
  SCRIPT_UGARITIC = PANGO_SCRIPT_UGARITIC
  }
    Identifies different writing systems. More...

## Detailed Description

A Pango Script C++ wrapper interface.

Provides PangoScript and PangoScriptIter which are used to identify the writing system, or script of individual characters and of ranges within a larger text string.

## Enumeration Type Documentation

enum Script

Identifies different writing systems.

The values correspond to the names defined in the Unicode standard (see Unicode Standard Annex 24: Script names).

Enumeration values:

  SCRIPT_INVALID_CODE | A value never used for any unicode character.
  SCRIPT_COMMON | Zyyy; a character used by multiple different scripts.
  SCRIPT_INHERITED | Qaai; a mark glyph that takes its script from the base glyph to which it is attached.
  SCRIPT_ARABIC | Arab.
  SCRIPT_ARMENIAN | Armn.
  SCRIPT_BENGALI | Beng.
  SCRIPT_BOPOMOFO | Bopo.
  SCRIPT_CHEROKEE | Cher.
  SCRIPT_COPTIC | Qaac.
  SCRIPT_CYRILLIC | Cyrl (Cyrs).
  SCRIPT_DESERET | Dsrt.
  SCRIPT_DEVANAGARI | Deva.
  SCRIPT_ETHIOPIC | Ethi.
  SCRIPT_GEORGIAN | Geor (Geon, Geoa).
  SCRIPT_GOTHIC | Goth.
  SCRIPT_GREEK | Grek.
  SCRIPT_GUJARATI | Gujr.
  SCRIPT_GURMUKHI | Guru.
  SCRIPT_HAN | Hani.
  SCRIPT_HANGUL | Hang.
  SCRIPT_HEBREW | Hebr.
  SCRIPT_HIRAGANAPANGO_SCRIPT_HIRAGANA | Hira.
  SCRIPT_KANNADA | Knda.
  SCRIPT_KATAKANA | Kana.
  SCRIPT_KHMER | Khmr.
  SCRIPT_LAO | Laoo.
  SCRIPT_LATIN | Latn (Latf, Latg).
  SCRIPT_MALAYALAM | Mlym.
  SCRIPT_MONGOLIAN | Mong.
  SCRIPT_MYANMAR | Mymr.
  SCRIPT_OGHAM | Ogam.
  SCRIPT_OLD_ITALIC | Ital.
  SCRIPT_ORIYA | Orya.
  SCRIPT_RUNIC | Runr.
  SCRIPT_SINHALA | Sinh.
  SCRIPT_SYRIAC | Syrc (Syrj, Syrn, Syre).
  SCRIPT_TAMIL | Taml.
  SCRIPT_TELUGU | Telu.
  SCRIPT_THAANA | Thaa.
  SCRIPT_THAI | Thai.
  SCRIPT_TIBETAN | Tibt.
  SCRIPT_CANADIAN_ABORIGINAL | Cans.
  SCRIPT_YI | Yiii.
  SCRIPT_TAGALOG | Tglg.
  SCRIPT_HANUNOO | Hano.
  SCRIPT_BUHID | Buhd.
  SCRIPT_TAGBANWA | Tagb.
  SCRIPT_BRAILLE | Brai.
  SCRIPT_CYPRIOTPANGO_SCRIPT_CYPRIOT | Cprt.
  SCRIPT_LIMBUPANGO_SCRIPT_LIMBU | Limb.
  SCRIPT_OSMANYA | Osma.
  SCRIPT_SHAVIAN | Shaw.
  SCRIPT_LINEAR_B | Linb.
  SCRIPT_TAI_LE | Tale.
  SCRIPT_UGARITIC | Ugar.

## Function Documentation

bool language_includes_script | ( | PangoLanguage * | language,
|  | Script | script
| ) |

Determines if script is one of the scripts used to write language.

Parameters:

  | language | A PangoLanguage.
  | script | A Pango::Script

Returns:
  true if script is one of the scripts used to write language, or if nothing is known about language.

The returned value is conservative; if nothing is known about the language tag language, true will be returned, since, as far as Pango knows, script might be used to write language.

This routine is used in Pango's itemization process when determining if a supplied language tag is relevant to a particular section of text. It probably is not useful for applications in most circumstances.

Script script_for_unichar | ( | G::Unichar | ch | ) |

Looks up the Pango::Script for a particular character (as defined by Unicode Technical report 24).

Parameters:

  | ch | A unicode character

Returns:
  The PangoScript for the character.

No check is made for ch being valid unicode character; if you pass in an invalid character, the result is undefined.

PangoLanguage* script_get_sample_language | ( | Script | script | ) |

Given a script, finds a language tag that is reasonably representative of that script.

Parameters:

  | script | A Pango::Script

Returns:
  A PangoLanguage that is representative of the script, or null if no such language exists.

This will usually be the most widely spoken or used language written in that script: for instance, the sample language for Pango::SCRIPT_CYRILLIC is ru (Russian), the sample lanugage for Pango::SCRIPT_ARABIC is ar. For some scripts, no sample language will be returned because there is no language that is sufficiently representative. The best example of this is Pango::SCRIPT_HAN, where various different variants of written Chinese, Japanese, and Korean all use significantly different sets of Han characters and forms of shared characters. No sample language can be provided for many historical scripts as well.

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3