[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Dec 21 15:41:39 PST 2010


 src/hb-ot-shape-complex-arabic.cc  |    8 ++++++++
 src/hb-ot-shape-complex-private.hh |    1 +
 2 files changed, 9 insertions(+)

New commits:
commit d86a5b3c5752abcc791724035ba4115958e6b5e2
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Dec 21 18:36:25 2010 -0500

    Bug 32274 - classic mongolian shaper
    
    Add support for classic Mongolian script to the Arabic shaper.
    
    Still work to be done around U+180E MONGOLIAN VOWEL SEPARATOR as it
    should not be included in the final glyph stream the same way that
    ZWNJ, etc should not appear in the final glyph stream.
    
    But the joining part should be done.
    
    There remains the question of how should the U+18A9 MONGOLIAN LETTER ALI
    GALI DAGALGA be handled as it has General Category NSM but a letter
    nonetheless.  For now, our generic logic makes this a joining T instead
    of joining D as other Mongolian letters are.

diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc
index 7c1b7bc..77a9c82 100644
--- a/src/hb-ot-shape-complex-arabic.cc
+++ b/src/hb-ot-shape-complex-arabic.cc
@@ -67,6 +67,14 @@ static unsigned int get_joining_type (hb_codepoint_t u, hb_category_t gen_cat)
       return j_type;
   }
 
+  /* Mongolian joining data is not in ArabicJoining.txt yet */
+  if (unlikely (0x1800 <= u && u <= 0x18AF))
+  {
+    /* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */
+    if (gen_cat == HB_CATEGORY_OTHER_LETTER || u == 0x1807 || u == 0x180A)
+      return JOINING_TYPE_D;
+  }
+
   if (unlikely ((u & ~(0x200C^0x200D)) == 0x200C)) {
     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 788d18a..fed167d 100644
--- a/src/hb-ot-shape-complex-private.hh
+++ b/src/hb-ot-shape-complex-private.hh
@@ -42,6 +42,7 @@ hb_ot_shape_complex_categorize (const hb_segment_properties_t *props)
     case HB_SCRIPT_NKO:
     case HB_SCRIPT_SYRIAC:
     case HB_SCRIPT_MANDAIC:
+    case HB_SCRIPT_MONGOLIAN:
       return hb_ot_complex_shaper_arabic;
 
     default:



More information about the HarfBuzz mailing list