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

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Dec 7 13:39:14 PST 2010


 src/hb-ot-shape-private.hh |    2 +-
 src/hb-ot-shape.cc         |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit bbbbe80ec9bc45c5b685bc09c8f993e98496555c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Dec 7 16:22:02 2010 -0500

    Rename original_direction to target_direction

diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh
index 6197406..deaec97 100644
--- a/src/hb-ot-shape-private.hh
+++ b/src/hb-ot-shape-private.hh
@@ -65,7 +65,7 @@ struct hb_ot_shape_context_t
   unsigned int        num_user_features;
 
   /* Transient stuff */
-  hb_direction_t original_direction;
+  hb_direction_t target_direction;
   hb_bool_t applied_substitute_complex;
   hb_bool_t applied_position_complex;
 };
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index f1ca7c2..92c3925 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -193,7 +193,7 @@ hb_mirror_chars (hb_ot_shape_context_t *c)
 {
   hb_unicode_get_mirroring_func_t get_mirroring = c->buffer->unicode->v.get_mirroring;
 
-  if (HB_DIRECTION_IS_FORWARD (c->original_direction))
+  if (HB_DIRECTION_IS_FORWARD (c->target_direction))
     return;
 
   hb_mask_t rtlm_mask = c->plan->map.get_1_mask (HB_TAG ('r','t','l','m'));
@@ -294,7 +294,7 @@ static void
 hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
 {
   /* Save the original direction, we use it later. */
-  c->original_direction = c->buffer->props.direction;
+  c->target_direction = c->buffer->props.direction;
 
   hb_reset_glyph_infos (c); /* BUFFER: Clear buffer var1 and var2 */
 
@@ -336,7 +336,7 @@ hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
       hb_position_complex_fallback_visual (c);
   }
 
-  c->buffer->props.direction = c->original_direction;
+  c->buffer->props.direction = c->target_direction;
 }
 
 void
commit ee8aaf976a6eb42be49b63b4c51c7a0a338e0298
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Dec 7 16:20:42 2010 -0500

    Fix arabic shaping of LTR text
    
    We should ensure-direction before doing any complex work.  The only
    exception is mirroring that needs to see the original / final direction,
    not the native.  Handle that.

diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index 346cb37..f1ca7c2 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -193,7 +193,7 @@ hb_mirror_chars (hb_ot_shape_context_t *c)
 {
   hb_unicode_get_mirroring_func_t get_mirroring = c->buffer->unicode->v.get_mirroring;
 
-  if (HB_DIRECTION_IS_FORWARD (c->buffer->props.direction))
+  if (HB_DIRECTION_IS_FORWARD (c->original_direction))
     return;
 
   hb_mask_t rtlm_mask = c->plan->map.get_1_mask (HB_TAG ('r','t','l','m'));
@@ -300,6 +300,8 @@ hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
 
   hb_set_unicode_props (c); /* BUFFER: Set general_category and combining_class in var1 */
 
+  hb_ensure_native_direction (c);
+
   hb_form_clusters (c);
 
   hb_ot_shape_setup_masks (c); /* BUFFER: Clobbers var2 */
@@ -309,8 +311,6 @@ hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
     /* Mirroring needs to see the original direction */
     hb_mirror_chars (c);
 
-    hb_ensure_native_direction (c);
-
     hb_substitute_default (c);
 
     hb_ot_substitute_complex (c);



More information about the HarfBuzz mailing list