From cb90b1bbe6d27ca6968b70d2dbfea7ab7fb73293 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 15 Feb 2013 07:02:08 -0500 Subject: [PATCH] [OTLayout] Respect syllable boundaries for backtrack/lookahead matching Originally we meant to match backtrack/lookahead across syllable boundaries. But a bug in the code meant that this was NOT done for backtrack. We "fixed" that in 2c7d0b6b80d412de3fddd443ed1a485ea1cbb03c, but that broke Myanmar shaping. We now believe that for Indic-like shapers (which is where syllables are used), all basic shaping forms should be fully contained within their syllables, so now we limit backtrack/lookahead matching to the syllable too. Unbreaks Myanmar. --- src/hb-ot-layout-gsubgpos-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index a709c321f..a15dd23d8 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -381,8 +381,8 @@ struct hb_apply_context_t if (!context_match) { matcher.set_mask (c->lookup_mask); - matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0); } + matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0); } inline void set_lookup_props (unsigned int lookup_props) { matcher.set_lookup_props (lookup_props); } inline void set_syllable (unsigned int syllable) { matcher.set_syllable (syllable); } @@ -454,8 +454,8 @@ struct hb_apply_context_t if (!context_match) { matcher.set_mask (c->lookup_mask); - matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0); } + matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0); } inline void set_lookup_props (unsigned int lookup_props) { matcher.set_lookup_props (lookup_props); } inline void set_syllable (unsigned int syllable) { matcher.set_syllable (syllable); }