diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl index bf77b0234..b26e2a72a 100644 --- a/src/hb-ot-shape-complex-indic-machine.rl +++ b/src/hb-ot-shape-complex-indic-machine.rl @@ -77,6 +77,7 @@ main := |* #define process_syllable(func) \ HB_STMT_START { \ + /* printf ("syllable %d..%d %s\n", last, p+1, #func); */ \ for (unsigned int i = last; i < p+1; i++) \ info[i].syllable() = syllable_serial; \ PASTE (initial_reordering_, func) (map, buffer, mask_array, last, p+1); \ diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index ec6073844..a3a75e461 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -191,6 +191,17 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map, hb_buffer_t *buffer, h info.indic_category() = type & 0x0F; info.indic_position() = type >> 4; + /* The spec says U+0952 is OT_A. However, testing shows that Uniscribe + * treats U+0951..U+0952 all as OT_VD. + * TESTS: + * U+092E,U+0947,U+0952 + * U+092E,U+0952,U+0947 + * U+092E,U+0947,U+0951 + * U+092E,U+0951,U+0947 + * */ + if (unlikely (hb_in_range (info.codepoint, 0x0951, 0x0954))) + info.indic_category() = OT_VD; + if (info.indic_category() == OT_C) { info.indic_position() = consonant_position (info.codepoint); if (is_ra (info.codepoint)) @@ -203,11 +214,6 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map, hb_buffer_t *buffer, h else if (unlikely (info.codepoint == 0x200D)) info.indic_category() = OT_ZWJ; - /* The spec only suggests this for U+0952, but we do more. */ - if (unlikely (hb_in_range (info.codepoint, 0x0951, 0x0954))) { - info.indic_category() = OT_A; - info.indic_position() = POS_SMVD; - } } }