[Indic] Make sure New Tai Lue works!
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Feb 2013 15:31:14 +0000 (10:31 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Feb 2013 15:31:14 +0000 (10:31 -0500)
src/hb-ot-shape-complex-private.hh
test/shaping/texts/in-tree/shaper-indic/south-east-asian/MANIFEST
test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/MANIFEST [new file with mode: 0644]
test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/MANIFEST [new file with mode: 0644]
test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/misc.txt [new file with mode: 0644]

index 6b562fc..c3e03b9 100644 (file)
@@ -285,11 +285,15 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
     case HB_SCRIPT_SHARADA:
     case HB_SCRIPT_TAKRI:
 
-      /* Only use Indic shaper if the font has Indic tables. */
-      if (planner->map.found_script[0])
-       return &_hb_ot_complex_shaper_indic;
-      else
+      /* If the designer designed the font for the 'DFLT' script,
+       * use the default shaper.  Otherwise, use the Indic shaper.
+       * Note that for some scripts, like New Tai Lue, there may
+       * not be *any* GSUB/GPOS needed, so there may be no scripts
+       * found! */
+      if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
        return &_hb_ot_complex_shaper_default;
+      else
+       return &_hb_ot_complex_shaper_indic;
 
     case HB_SCRIPT_KHMER:
       /* A number of Khmer fonts in the wild don't have a 'pref' feature,
diff --git a/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/MANIFEST b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/MANIFEST
new file mode 100644 (file)
index 0000000..b8752e7
--- /dev/null
@@ -0,0 +1 @@
+misc
diff --git a/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/MANIFEST
new file mode 100644 (file)
index 0000000..29cfb2f
--- /dev/null
@@ -0,0 +1 @@
+misc.txt
diff --git a/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/misc.txt
new file mode 100644 (file)
index 0000000..11224a1
--- /dev/null
@@ -0,0 +1 @@
+ᦀᦷᧃᧈ