Re: Where to get 'PangoContext*' from?



On Wed, Jan 20, 2010 at 02:28:14PM -0500, Behdad Esfahbod wrote:
> On 01/20/2010 04:29 AM, Petr Tomasek wrote:
> > 
> > Hello!
> > 
> > I'd like to use pango_itemize in a command-line utility to split an
> > unicode string into parts of same script. I don't need any other pango
> > functionality (in this utility, of course ;-).
> 
> Use PangoScriptIter then.  Itemization does a lot more than what you need.

Thanks a lot! That's exactly what I need :).

One more question: wouldn't it make sense to have a method
in pango (or better in glib?) to stringify the PangoScript / GUnicodeScript?

This made the trick for me now:

const char *unicode_scripts[] = {
	"zyyy", "qaai", "arab", "armn", "beng", "bopo", "cher", "qaac", "cyrl", 
	"dsrt", "deva", "ethi", "geor", "goth", "grek", "gujr", "guru", "hani", 
	"hang", "hebr", "hira", "knda", "kana", "khmr", "laoo", "latn", "mlym", 
	"mong", "mymr", "ogam", "ital", "orya", "runr", "sinh", "syrc", "taml", 
	"telu", "thaa", "thai", "tibt", "cans", "yiii", "tglg", "hano", "buhd", 
	"tagb", "brai", "cprt", "limb", "osma", "shaw", "linb", "tale", "ugar", 
	"talu", "bugi", "glag", "tfng", "sylo", "xpeo", "khar", "zzzz", "bali", 
	"xsux", "phnx", "phag", "nkoo", "kali", "lepc", "rjng", "sund", "saur", 
	"cham", "olck", "vaii", "cari", "lyci", "lydi"
};

But the problem is it changes (is extended) with every unicode
revision and it would perhaps be usefull for more people?

-- 
Petr Tomasek <http://www.etf.cuni.cz/~tomasek>
Jabber: butrus jabbim cz
SIP: butrus ekiga net


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]