diff options
author | Roozbeh Pournader <roozbeh@farsiweb.info> | 2005-08-09 09:40:16 +0000 |
---|---|---|
committer | Roozbeh Pournader <roozbeh@src.gnome.org> | 2005-08-09 09:40:16 +0000 |
commit | 332335292f70cd60963bc31c14f548ffc593c28e (patch) | |
tree | 3598b1bacb34a5326c67e9391f5820f0853e26ef /modules | |
parent | 8cc1c4c35ddae1762e5027a14d9015c7789d5cd0 (diff) | |
download | pango-332335292f70cd60963bc31c14f548ffc593c28e.tar.gz |
Updated to Unicode 4.1, adding new scripts and Arabic joining data.
2005-08-08 Roozbeh Pournader <roozbeh@farsiweb.info>
* docs/tmpl/scripts.sgml, modules/arabic/arabic-ot.c,
pango/pango-script.c, pango/pango-script.h,
pango/pango-script-table.h, tools/gen-script-table.pl: Updated to
Unicode 4.1, adding new scripts and Arabic joining data. (#312884)
`
Diffstat (limited to 'modules')
-rw-r--r-- | modules/arabic/arabic-ot.c | 49 |
1 files changed, 35 insertions, 14 deletions
diff --git a/modules/arabic/arabic-ot.c b/modules/arabic/arabic-ot.c index 2501edb7..681fefed 100644 --- a/modules/arabic/arabic-ot.c +++ b/modules/arabic/arabic-ot.c @@ -31,7 +31,7 @@ /* * * Here a table of the joining classes for characters in the range - * U+0620 - U+06FF. + * U+0620 - U+06FF and U+0750 - U+077F. * * The following character also has a joining class: * @@ -64,8 +64,8 @@ static const joining_class arabic[] = /* U+0650 */ transparent, transparent, transparent, transparent, transparent, transparent, transparent, transparent, - none, none, none, none, - none, none, none, none, + transparent, transparent, transparent, transparent, + transparent, transparent, transparent, none, /* U+0660 */ none, none, none, none, @@ -128,6 +128,27 @@ static const joining_class arabic[] = dual, none, none, dual }; +static const joining_class arabic_supplement[] = +{ + /* U+0750 */ + dual, dual, dual, dual, + dual, dual, dual, dual, + dual, right, right, right, + dual, dual, dual, dual, + + /* U+0760 */ + dual, dual, dual, dual, + dual, dual, dual, dual, + dual, dual, dual, right, + right, dual, none, none, + + /* U+0770 */ + none, none, none, none, + none, none, none, none, + none, none, none, none, + none, none, none, none +}; + #if 0 struct cgc_ { @@ -273,18 +294,18 @@ static joining_class Get_Joining_Class (gunichar* string, if (pos >= length) return none; - - if (string[pos] < 0x0620 || - string[pos] >= 0x0700) - { - if (string[pos] == 0x200D) - return causing; - else - return none; - } + + if (string[pos] >= 0x0620 && + string[pos] < 0x0700) + j = arabic[string[pos] - 0x0620]; + else if (string[pos] >= 0x0750 && + string[pos] < 0x0780) + j = arabic_supplement[string[pos] - 0x0750]; + else if (string[pos] == 0x200D) + return causing; else - j = arabic[string[pos] - 0x0620]; - + return none; + if (!direction || j != transparent) return j; } |