[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Nov 2 10:21:42 PDT 2012


 src/hb-ot-shape-complex-arabic.cc                                       |   15 ++++++++--
 src/hb-ot-shape-complex-private.hh                                      |    4 --
 test/shaping/texts/in-tree/shaper-arabic/MANIFEST                       |    1 
 test/shaping/texts/in-tree/shaper-arabic/script-mongolian/misc/misc.txt |    3 ++
 test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/MANIFEST       |    1 
 test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/MANIFEST  |    1 
 test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/misc.txt  |   14 +++++++++
 7 files changed, 33 insertions(+), 6 deletions(-)

New commits:
commit c21498afd857e78230f761ee5c9e73adece89dd0
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Nov 2 10:21:26 2012 -0700

    Add Mongolian and 'Phags-pa joining test cases

diff --git a/test/shaping/texts/in-tree/shaper-arabic/MANIFEST b/test/shaping/texts/in-tree/shaper-arabic/MANIFEST
index cb39e70..eb8f9ec 100644
--- a/test/shaping/texts/in-tree/shaper-arabic/MANIFEST
+++ b/test/shaping/texts/in-tree/shaper-arabic/MANIFEST
@@ -2,4 +2,5 @@ script-arabic
 script-mandaic
 script-mongolian
 script-nko
+script-phags-pa
 script-syriac
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-mongolian/misc/misc.txt b/test/shaping/texts/in-tree/shaper-arabic/script-mongolian/misc/misc.txt
index 009112a..57317de 100644
--- a/test/shaping/texts/in-tree/shaper-arabic/script-mongolian/misc/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-mongolian/misc/misc.txt
@@ -1,3 +1,6 @@
 ᠬᠦᠮᠦᠨ ᠮᠤᠩᠭᠣᠯ ᠪᠢᠴᠢᠭ᠌
 ᠪᠢᠴᠢᠭ᠌ ᠬᠦᠮᠦᠨ ᠮᠤᠩᠭᠣᠯ
 ᠮᠤᠩᠭᠣᠯ ᠪᠢᠴᠢᠭ᠌ ᠬᠦᠮᠦᠨ
+ᠡ᠆ᠡ
+ᠡ᠇ᠡ
+á ¡á Šá ¡
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/MANIFEST b/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/MANIFEST
new file mode 100644
index 0000000..b8752e7
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/MANIFEST
@@ -0,0 +1 @@
+misc
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/MANIFEST
new file mode 100644
index 0000000..29cfb2f
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/MANIFEST
@@ -0,0 +1 @@
+misc.txt
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/misc.txt b/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/misc.txt
new file mode 100644
index 0000000..d535b67
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-phags-pa/misc/misc.txt
@@ -0,0 +1,14 @@
+ꡳꡡ
+ꡡꡳꡡ
+ê¡žê¡žê¡ž ê¡ž
+ê¡Ÿê¡Ÿê¡Ÿ ê¡Ÿ
+ê¡ ê¡ ê¡  ê¡ 
+ê¡¡ê¡¡ê¡¡ ê¡¡
+‍ꡡ‍
+‍ꡡ
+ꡡ‍
+ꡞ‌ꡟ‌ꡠ‌ꡡ
+ꡉꡞ
+ꡉꡞ︀
+ꡪꡞ
+ꡪꡞ︀
commit 3ba7bc14ea652d27639f34109e51a497a678a54a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 1 20:05:04 2012 -0700

    Implement 'Phags-pa shaping
    
    Through the Arabic shaper.  It's similar to Mongolian.

diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc
index 8428534..bacee5d 100644
--- a/src/hb-ot-shape-complex-arabic.cc
+++ b/src/hb-ot-shape-complex-arabic.cc
@@ -64,15 +64,24 @@ static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_categ
       return j_type;
   }
 
-  /* Mongolian joining data is not in ArabicJoining.txt yet */
+  /* Mongolian joining data is not in ArabicJoining.txt yet. */
   if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x1800, 0x18AF)))
   {
     /* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */
-    if (gen_cat == HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER || u == 0x1807 || u == 0x180A)
+    if ((FLAG(gen_cat) & (FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) |
+			  FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER)))
+	|| u == 0x1807 || u == 0x180A)
       return JOINING_TYPE_D;
   }
 
-  if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x200C, 0x200D))) {
+  /* 'Phags-pa joining data is not in ArabicJoining.txt yet. */
+  if (unlikely (hb_in_range<hb_codepoint_t> (u, 0xA840, 0xA872)))
+  {
+      return JOINING_TYPE_D;
+  }
+
+  if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x200C, 0x200D)))
+  {
     return u == 0x200C ? JOINING_TYPE_U : JOINING_TYPE_C;
   }
 
diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
index e84c490..065264e 100644
--- a/src/hb-ot-shape-complex-private.hh
+++ b/src/hb-ot-shape-complex-private.hh
@@ -130,6 +130,7 @@ hb_ot_shape_complex_categorize (const hb_segment_properties_t *props)
 
     /* Unicode-5.0 additions */
     case HB_SCRIPT_NKO:
+    case HB_SCRIPT_PHAGS_PA:
 
     /* Unicode-6.0 additions */
     case HB_SCRIPT_MANDAIC:
@@ -199,9 +200,6 @@ hb_ot_shape_complex_categorize (const hb_segment_properties_t *props)
     /* Unicode-4.1 additions */
     case HB_SCRIPT_SYLOTI_NAGRI:
 
-    /* Unicode-5.0 additions */
-    case HB_SCRIPT_PHAGS_PA:
-
     /* Unicode-5.1 additions */
     case HB_SCRIPT_KAYAH_LI:
 



More information about the HarfBuzz mailing list