[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Feb 17 09:16:17 PST 2013


 src/hb-ot-shape-complex-sea.cc                                  |   13 +++++-----
 test/shaping/texts/in-tree/shaper-sea/script-cham/misc/misc.txt |    1 
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit b1f440759161cb5a54e1b1b910f3a8383b8e8472
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 17 12:12:37 2013 -0500

    [SEA] Fix order of pre-base reordering Ra and left matras
    
    The code was confused because it was expecting left matra to have
    POS_PRE_M, like we do in the Myanmar shaper, but that is not what
    we were doing in this shaper.  Rewrite to rely on category only.
    
    Test case: U+AA06,U+AA34,U+AA2F

diff --git a/src/hb-ot-shape-complex-sea.cc b/src/hb-ot-shape-complex-sea.cc
index e1debd8..9438658 100644
--- a/src/hb-ot-shape-complex-sea.cc
+++ b/src/hb-ot-shape-complex-sea.cc
@@ -164,8 +164,8 @@ set_sea_properties (hb_glyph_info_t &info)
 
 static void
 setup_masks_sea (const hb_ot_shape_plan_t *plan HB_UNUSED,
-		   hb_buffer_t              *buffer,
-		   hb_font_t                *font HB_UNUSED)
+		 hb_buffer_t              *buffer,
+		 hb_font_t                *font HB_UNUSED)
 {
   HB_BUFFER_ALLOCATE_VAR (buffer, sea_category);
   HB_BUFFER_ALLOCATE_VAR (buffer, sea_position);
@@ -221,8 +221,9 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
       info[i].sea_position() = POS_PRE_C;
       continue;
     }
-    if (info[i].sea_position() < POS_BASE_C) /* Left matra */
+    if (info[i].sea_category() == OT_VPre) /* Left matra */
     {
+      info[i].sea_position() = POS_PRE_M;
       continue;
     }
 
@@ -246,9 +247,9 @@ initial_reordering_broken_cluster (const hb_ot_shape_plan_t *plan,
 
 static void
 initial_reordering_non_sea_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED,
-					hb_face_t *face HB_UNUSED,
-					hb_buffer_t *buffer HB_UNUSED,
-					unsigned int start HB_UNUSED, unsigned int end HB_UNUSED)
+				    hb_face_t *face HB_UNUSED,
+				    hb_buffer_t *buffer HB_UNUSED,
+				    unsigned int start HB_UNUSED, unsigned int end HB_UNUSED)
 {
   /* Nothing to do right now.  If we ever switch to using the output
    * buffer in the reordering process, we'd need to next_glyph() here. */
diff --git a/test/shaping/texts/in-tree/shaper-sea/script-cham/misc/misc.txt b/test/shaping/texts/in-tree/shaper-sea/script-cham/misc/misc.txt
index 29b4dba..32b793a 100644
--- a/test/shaping/texts/in-tree/shaper-sea/script-cham/misc/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-sea/script-cham/misc/misc.txt
@@ -1,2 +1,3 @@
 ꩀꨴ
 ꨗꨪꨇꨮꩃꨯꨗꨱꨧꨩꩂꨯꨨꨱꩃꨨꨮ
+ꨆꨴꨯ



More information about the HarfBuzz mailing list