Choose shaper based on chosen OT script tag

For Arabic and Indic shapers, if the font doesn't have a script system
for the script, use default shaper.

Make an exception for Arabic script since we have fallback logic for
that one.
diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh
index 71c9fc1..11d97e1 100644
--- a/src/hb-ot-map-private.hh
+++ b/src/hb-ot-map-private.hh
@@ -194,12 +194,16 @@
 
   HB_INTERNAL void add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func);
 
+  public:
+
   hb_face_t *face;
   hb_segment_properties_t props;
 
   hb_tag_t chosen_script[2];
   unsigned int script_index[2], language_index[2];
 
+  private:
+
   unsigned int current_stage[2]; /* GSUB/GPOS */
   hb_prealloced_array_t<feature_info_t,16> feature_infos;
   hb_prealloced_array_t<pause_info_t, 1> pauses[2]; /* GSUB/GPOS */
diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
index c3e5ba5..ddad5d2 100644
--- a/src/hb-ot-shape-complex-private.hh
+++ b/src/hb-ot-shape-complex-private.hh
@@ -135,7 +135,11 @@
     /* Unicode-6.0 additions */
     case HB_SCRIPT_MANDAIC:
 
-      return &_hb_ot_complex_shaper_arabic;
+      if (planner->map.chosen_script[0] != HB_OT_TAG_DEFAULT_SCRIPT ||
+	  planner->props.script == HB_SCRIPT_ARABIC)
+	return &_hb_ot_complex_shaper_arabic;
+      else
+	return &_hb_ot_complex_shaper_default;
 
 
     /* Unicode-1.1 additions */
@@ -253,7 +257,10 @@
     case HB_SCRIPT_SHARADA:
     case HB_SCRIPT_TAKRI:
 
-      return &_hb_ot_complex_shaper_indic;
+      if (planner->map.chosen_script[0] != HB_OT_TAG_DEFAULT_SCRIPT)
+	return &_hb_ot_complex_shaper_indic;
+      else
+	return &_hb_ot_complex_shaper_default;
   }
 }