From a6c82d4b8c6bc130889b67bd53971be7ee513e4a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 9 Jun 2022 13:04:28 -0600 Subject: [PATCH] [myanmar] Simplify to not use position info from the indic table for shaping --- src/hb-ot-shaper-myanmar.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-shaper-myanmar.cc b/src/hb-ot-shaper-myanmar.cc index af037e9ec..cc5097e55 100644 --- a/src/hb-ot-shaper-myanmar.cc +++ b/src/hb-ot-shaper-myanmar.cc @@ -163,16 +163,15 @@ set_myanmar_properties (hb_glyph_info_t &info) { switch ((int) pos) { - case POS_PRE_C: cat = (myanmar_category_t) M_Cat(VPre); - pos = POS_PRE_M; break; - case POS_ABOVE_C: cat = (myanmar_category_t) M_Cat(VAbv); break; - case POS_BELOW_C: cat = (myanmar_category_t) M_Cat(VBlw); break; - case POS_POST_C: cat = (myanmar_category_t) M_Cat(VPst); break; + case POS_PRE_C: cat = (myanmar_category_t) M_Cat(VPre); break; + case POS_ABOVE_C: cat = (myanmar_category_t) M_Cat(VAbv); break; + case POS_BELOW_C: cat = (myanmar_category_t) M_Cat(VBlw); break; + case POS_POST_C: cat = (myanmar_category_t) M_Cat(VPst); break; } } info.myanmar_category() = cat; - info.myanmar_position() = pos; + info.myanmar_position() = 0; /* Doesn't use the existing position info. */ } static void @@ -307,8 +306,9 @@ initial_reordering_consonant_syllable (hb_buffer_t *buffer, info[i].myanmar_position() = POS_PRE_C; continue; } - if (info[i].myanmar_position() < POS_BASE_C) /* Left matra */ + if (info[i].myanmar_category() == M_Cat(VPre)) /* Left matra */ { + info[i].myanmar_position() = POS_PRE_M; continue; } if (info[i].myanmar_category() == M_Cat(VS))