Make sure mirroring is done in original direction
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 29 Apr 2010 07:39:39 +0000 (03:39 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 29 Apr 2010 07:39:39 +0000 (03:39 -0400)
Reported by Jonathan Kew.

src/hb-shape.c

index 2754dac..2e4f3f6 100644 (file)
@@ -229,10 +229,13 @@ hb_shape (hb_font_t    *font,
   hb_bool_t substitute_fallback, position_fallback;
 
   hb_form_clusters (buffer);
-  original_direction = hb_ensure_native_direction (buffer);
 
   hb_substitute_default (font, face, buffer, features, num_features);
 
+  /* We do this after substitute_default because mirroring needs to
+   * see the original direction. */
+  original_direction = hb_ensure_native_direction (buffer);
+
   substitute_fallback = !hb_substitute_complex (font, face, buffer, features, num_features);
 
   if (substitute_fallback)