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

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Dec 21 12:49:43 PST 2012


 src/hb-ot-shape-complex-indic.cc                                                 |   15 +++++++---
 test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/MANIFEST     |    1 
 test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/dot-reph.txt |    1 
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 8b217f5ac54aa0dcbba2dd6d59aa89dde33e56c2
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Dec 21 15:48:32 2012 -0500

    [Indic] Reorder Malayalam dot-reph to after base
    
    Test sequence is simple: U+0D4E,U+0D15.  The doth-reph should be
    reordered to after the Ka.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=799565

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index cff2ea6..02cb173 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -467,7 +467,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
     unsigned int limit = start;
     if (indic_plan->mask_array[RPHF] &&
 	start + 3 <= end &&
-	(/* TODO Handle other Reph modes. */
+	(
 	 (indic_plan->config->reph_mode == REPH_MODE_IMPLICIT && !is_joiner (info[start + 2])) ||
 	 (indic_plan->config->reph_mode == REPH_MODE_EXPLICIT && info[start + 2].indic_category() == OT_ZWJ)
 	))
@@ -482,7 +482,14 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
 	base = start;
 	has_reph = true;
       }
-    };
+    } else if (indic_plan->config->reph_mode == REPH_MODE_LOG_REPHA && info[start].indic_category() == OT_Repha)
+    {
+	limit += 1;
+	while (limit < end && is_joiner (info[limit]))
+	  limit++;
+	base = start;
+	has_reph = true;
+    }
 
     switch (indic_plan->config->base_pos)
     {
@@ -570,7 +577,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
      *    base consonants.
      *
      *  Only do this for unforced Reph. (ie. not for Ra,H,ZWJ. */
-    if (has_reph && base == start && start + 2 == limit) {
+    if (has_reph && base == start && start - limit <= 2) {
       /* Have no other consonant, so Reph is not formed and Ra becomes base. */
       has_reph = false;
     }
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/MANIFEST
index 29cfb2f..a6f4f00 100644
--- a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/MANIFEST
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/MANIFEST
@@ -1 +1,2 @@
+dot-reph.txt
 misc.txt
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/dot-reph.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/dot-reph.txt
new file mode 100644
index 0000000..fc17a9b
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/dot-reph.txt
@@ -0,0 +1 @@
+ൎക
commit 742c4ee97e1311e000ebcdf9f33361c4dc6400a4
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Dec 21 15:35:03 2012 -0500

    Minor

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 0bc163a..cff2ea6 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -124,7 +124,7 @@ static const indic_config_t indic_configs[] =
   {HB_SCRIPT_SINHALA,	false,0x0DCA,BASE_POS_FIRST,REPH_POS_AFTER_MAIN, REPH_MODE_EXPLICIT},
   {HB_SCRIPT_KHMER,	false,0x17D2,BASE_POS_FIRST,REPH_POS_DEFAULT,    REPH_MODE_VIS_REPHA},
   /* Myanmar does not have the "old_indic" behavior, even though it has a "new" tag. */
-  {HB_SCRIPT_MYANMAR,	false, 0x1039,BASE_POS_LAST, REPH_POS_DEFAULT,    REPH_MODE_EXPLICIT},
+  {HB_SCRIPT_MYANMAR,	false,0x1039,BASE_POS_LAST, REPH_POS_DEFAULT,    REPH_MODE_EXPLICIT},
 };
 
 



More information about the HarfBuzz mailing list