diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index b8d9a3acf..4cb69fc71 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -667,10 +667,10 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, * last consonant. * * Reports suggest that in some scripts Uniscribe does this only if there - * is *not* a Halant after last consonant already (eg. Kannada), while it - * does it unconditionally in other scripts (eg. Malayalam, Bengali). We - * don't currently know about other scripts, so we whitelist Malayalam and - * Bengali for now. + * is *not* a Halant after last consonant already. We know that is the + * case for Kannada, while it reorders unconditionally in other scripts, + * eg. Malayalam, Bengali, and Devanagari. We don't currently know about + * other scripts, so we whitelist Malayalam, Bengali, and Devanagari. * * Kannada test case: * U+0C9A,U+0CCD,U+0C9A,U+0CCD @@ -681,15 +681,21 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, * U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D * With lohit-ttf-20121122/Lohit-Malayalam.ttf * - * Bengali test case + * Bengali test case: * U+0998,U+09CD,U+09AF,U+09CD * With Windows XP vrinda.ttf * https://github.com/harfbuzz/harfbuzz/issues/1073 + * + * Devanagari test case: + * U+091F,U+094D,U+0930,U+094D + * With chandas.ttf + * https://github.com/harfbuzz/harfbuzz/issues/1071 */ if (indic_plan->is_old_spec) { bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM && - buffer->props.script != HB_SCRIPT_BENGALI; + buffer->props.script != HB_SCRIPT_BENGALI && + buffer->props.script != HB_SCRIPT_DEVANAGARI; for (unsigned int i = base + 1; i < end; i++) if (info[i].indic_category() == OT_H) { diff --git a/test/shaping/data/in-house/fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf b/test/shaping/data/in-house/fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf new file mode 100644 index 000000000..ca23ef83d Binary files /dev/null and b/test/shaping/data/in-house/fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf differ diff --git a/test/shaping/data/in-house/tests/indic-old-spec.tests b/test/shaping/data/in-house/tests/indic-old-spec.tests index cd5631907..eb967adc4 100644 --- a/test/shaping/data/in-house/tests/indic-old-spec.tests +++ b/test/shaping/data/in-house/tests/indic-old-spec.tests @@ -1,2 +1,4 @@ ../fonts/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf::U+0C9A,U+0CCD,U+0C9A,U+0CCD:[U0C9A_U0CCD.haln=0+1066|U0C9A_0CCD.blwf=0+0] ../fonts/270b89df543a7e48e206a2d830c0e10e5265c630.ttf::U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D:[glyph201=0+1183|U0D4D=0+0] +../fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf::U+091F,U+094D,U+0930,U+094D,U+0020:[Tra=0+550|virAma=0@-73,-110+0|space=4+500] +../fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf::U+091F,U+094D,U+0930,U+0942:[Tra=0+550|UT=0@42,-150+0]