From 14dbdd9e39d3a869fd1521000c889c347433d22b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 18 Jul 2012 13:13:03 -0400 Subject: [PATCH] [Indic] Unbreak Tamil Tamil has only about 150 failures now! --- src/hb-ot-shape-complex-indic.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index bbf502496..394e3f46d 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -365,7 +365,23 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff has_reph = true; }; - if (basic_mask_array[HALF]) + enum base_position_t { + BASE_FIRST, + BASE_LAST + } base_pos; + + switch ((hb_tag_t) buffer->props.script) + { + case HB_SCRIPT_KHMER: + base_pos = BASE_FIRST; + break; + + default: + base_pos = BASE_LAST; + break; + } + + if (base_pos == BASE_LAST) { /* -> starting from the end of the syllable, move backwards */ unsigned int i = end;