From d5c4edcdd6df32f2f23aca44f14838b4baab4d7a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 17 Jul 2012 10:40:59 -0400 Subject: [PATCH] [Indic] Apply presentation-forms features all at once Seems like this is what Uniscribe is doing, and does not break any fonts we tested (with Devanagari, Malayalam, Khmer, and Bengali), while fixing some Ra Phala sequences for Bengali with Vrinda. Fixes another 2% of Bengali failures (a couple more to go). --- src/hb-ot-shape-complex-indic.cc | 6 +++--- .../in-tree/shaper-indic/indic/script-bengali/misc/misc.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 19bb75c32..48c7a15fc 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -135,6 +135,7 @@ struct feature_list_t { hb_bool_t is_global; }; +/* These features are applied one at a time, given the order in this table. */ static const feature_list_t indic_basic_features[] = { @@ -166,6 +167,7 @@ enum { VATU }; +/* These features are applied all at once. */ static const feature_list_t indic_other_features[] = { @@ -211,10 +213,8 @@ _hb_ot_shape_complex_collect_features_indic (hb_ot_map_builder_t *map, map->add_gsub_pause (final_reordering, NULL); - for (unsigned int i = 0; i < ARRAY_LENGTH (indic_other_features); i++) { + for (unsigned int i = 0; i < ARRAY_LENGTH (indic_other_features); i++) map->add_bool_feature (indic_other_features[i].tag, indic_other_features[i].is_global); - map->add_gsub_pause (NULL, NULL); - } } void diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-bengali/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-bengali/misc/misc.txt index c208625a9..1eb261141 100644 --- a/test/shaping/texts/in-tree/shaper-indic/indic/script-bengali/misc/misc.txt +++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-bengali/misc/misc.txt @@ -47,3 +47,4 @@ ৰ্ভ ৱ্ভ অৗ +ন্ত্র