[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 2c7d0b6b80
,
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.
This commit is contained in:
parent
ee9c3a17d0
commit
cb90b1bbe6
|
@ -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); }
|
||||
|
|
Loading…
Reference in New Issue