From bbc7a99d01298f9be1ebaaceacbc9bc961e247e5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 21 May 2010 18:24:34 +0100 Subject: [PATCH] Move mirroring around a bit --- src/hb-ot-shape.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index a226b434..062cbfaa 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -351,7 +351,6 @@ hb_substitute_default (hb_font_t *font, hb_feature_t *features HB_UNUSED, unsigned int num_features HB_UNUSED) { - hb_mirror_chars (buffer); hb_map_glyphs (font, face, buffer); } @@ -445,12 +444,13 @@ hb_ot_shape (hb_font_t *font, buffer->clear_masks (); - hb_substitute_default (font, face, buffer, features, num_features); + /* Mirroring needs to see the original direction */ + hb_mirror_chars (buffer); - /* We do this after substitute_default because mirroring needs to - * see the original direction. */ original_direction = hb_ensure_native_direction (buffer); + hb_substitute_default (font, face, buffer, features, num_features); + substitute_fallback = !hb_ot_substitute_complex (font, face, buffer, features, num_features, original_direction); if (substitute_fallback) -- GitLab