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

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Feb 12 15:18:34 PST 2013


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

New commits:
commit 85c51ec2e1d518019e32801ae38659c74fc20d80
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Feb 12 18:17:39 2013 -0500

    [Indic] Fix Eyelash Ra with old Devanagari spec

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 2f8771f..5b0d875 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -937,6 +937,38 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
       info[i].mask  |= mask;
   }
 
+  if (indic_plan->is_old_spec &&
+      buffer->props.script == HB_SCRIPT_DEVANAGARI)
+  {
+    /* Old-spec eye-lash Ra needs special handling.  From the
+     * spec:
+     *
+     * "The feature 'below-base form' is applied to consonants
+     * having below-base forms and following the base consonant.
+     * The exception is vattu, which may appear below half forms
+     * as well as below the base glyph. The feature 'below-base
+     * form' will be applied to all such occurrences of Ra as well."
+     *
+     * Test case: U+0924,U+094D,U+0930,U+094d,U+0915
+     * with Sanskrit 2003 font.
+     *
+     * However, note that Ra,Halant,ZWJ is the correct way to
+     * request eyelash form of Ra, so we wouldbn't inhibit it
+     * in that sequence.
+     *
+     * Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915
+     */
+    for (unsigned int i = start; i + 1 < base; i++)
+      if (info[i  ].indic_category() == OT_Ra &&
+	  info[i+1].indic_category() == OT_H  &&
+	  (i + 2 == base ||
+	   info[i+2].indic_category() != OT_ZWJ))
+      {
+	info[i  ].mask |= indic_plan->mask_array[BLWF];
+	info[i+1].mask |= indic_plan->mask_array[BLWF];
+      }
+  }
+
   if (indic_plan->mask_array[PREF] && base + 2 < end)
   {
     /* Find a Halant,Ra sequence and mark it for pre-base reordering processing. */
commit cc5f24cde079b451799562b3af7ce06d932cbe6b
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Feb 12 18:17:12 2013 -0500

    [tests] Add tests for Devanagary Eyelash Ra
    
    Currently broken with Sanskrit 2003 font.

diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/MANIFEST
index a68b307..c384b38 100644
--- a/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/MANIFEST
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/MANIFEST
@@ -1,4 +1,5 @@
 dottedcircle.txt
+eyelash.txt
 joiners.txt
 misc.txt
 spec-deviations.txt
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/eyelash.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/eyelash.txt
new file mode 100644
index 0000000..8e11955
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-devanagari/misc/eyelash.txt
@@ -0,0 +1,3 @@
+त्र्क
+त्र्‍क
+त्र्‌क
commit 63e48bc33b68f940c351af623a55a4cf650db102
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Feb 12 17:57:49 2013 -0500

    [Indic] Apply 'blwf' before 'half'
    
    This reverts 167b625d988b74572d6b2f646c285b666b650d49.  It didn't
    matter before, but that's going to change with next commit.

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index eda0b8e..2f8771f 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -344,8 +344,8 @@ indic_features[] =
   {HB_TAG('r','p','h','f'), false},
   {HB_TAG('r','k','r','f'), true},
   {HB_TAG('p','r','e','f'), false},
-  {HB_TAG('h','a','l','f'), false},
   {HB_TAG('b','l','w','f'), false},
+  {HB_TAG('h','a','l','f'), false},
   {HB_TAG('a','b','v','f'), false},
   {HB_TAG('p','s','t','f'), false},
   {HB_TAG('c','f','a','r'), false},
@@ -376,8 +376,8 @@ enum {
   RPHF,
   _RKRF,
   PREF,
-  HALF,
   BLWF,
+  HALF,
   ABVF,
   PSTF,
   CFAR,
commit 70d656571194d2bd32671244530edbe159722cec
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Feb 12 18:01:21 2013 -0500

    [Indic] Apply 'vatu' before 'cjct'
    
    This essentially reverts 1d6846db9ebf84561bb30a4e48c6c43184914099,
    but that commit is from way back when.  We should be better
    following the spec order now again.

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 41872df..eda0b8e 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -349,8 +349,8 @@ indic_features[] =
   {HB_TAG('a','b','v','f'), false},
   {HB_TAG('p','s','t','f'), false},
   {HB_TAG('c','f','a','r'), false},
-  {HB_TAG('c','j','c','t'), true},
   {HB_TAG('v','a','t','u'), true},
+  {HB_TAG('c','j','c','t'), true},
   /*
    * Other features.
    * These features are applied all at once, after final_reordering.
@@ -381,8 +381,8 @@ enum {
   ABVF,
   PSTF,
   CFAR,
-  _CJCT,
   _VATU,
+  _CJCT,
 
   INIT,
   _PRES,



More information about the HarfBuzz mailing list