Xfce Foundation Classes
Main Page  | IndexNamespace 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

Classes

Script Methods

Enumerations


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