From 5676d5d52784e16068ae483103d59111a8081854 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 12 Feb 2013 10:31:14 -0500 Subject: [PATCH] [Indic] Make sure New Tai Lue works! --- src/hb-ot-shape-complex-private.hh | 12 ++++++++---- .../texts/in-tree/shaper-indic/south-east-asian/MANIFEST | 1 + .../south-east-asian/script-new-tai-lue/MANIFEST | 1 + .../south-east-asian/script-new-tai-lue/misc/MANIFEST | 1 + .../south-east-asian/script-new-tai-lue/misc/misc.txt | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/MANIFEST create mode 100644 test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/MANIFEST create mode 100644 test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/misc.txt diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh index 6b562fc..c3e03b9 100644 --- a/src/hb-ot-shape-complex-private.hh +++ b/src/hb-ot-shape-complex-private.hh @@ -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/MANIFEST b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/MANIFEST index 5abc7e9..c5761bc 100644 --- a/test/shaping/texts/in-tree/shaper-indic/south-east-asian/MANIFEST +++ b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/MANIFEST @@ -1,2 +1,3 @@ script-khmer +script-new-tai-lue script-thai 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 index 0000000..b8752e7 --- /dev/null +++ b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/MANIFEST @@ -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 index 0000000..29cfb2f --- /dev/null +++ b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/MANIFEST @@ -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 index 0000000..11224a1 --- /dev/null +++ b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-new-tai-lue/misc/misc.txt @@ -0,0 +1 @@ +ᦀᦷᧃᧈ -- 2.7.4