diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index bdc7b38663be99572e7134d53de86aabbd4028b9..6a292a1e838c1d2fbcda5584ced8df5806fb956e 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -920,7 +920,7 @@ struct ReverseChainSingleSubstFormat1 match_coverage, this, 1)) { - c->buffer->cur().codepoint = substitute[index]; + c->replace_glyph_inplace (substitute[index]); c->buffer->idx--; /* Reverse! */ return TRACE_RETURN (true); } diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 6dc2f162ef4bcbc847f76e9a5d9234172c70b407..e2423bcd0331083a6b350d85dc8a92a4cc945b6f 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -246,6 +246,12 @@ struct hb_apply_context_t set_klass_guess (klass_guess); buffer->replace_glyph (glyph_index); } + inline void replace_glyph_inplace (hb_codepoint_t glyph_index, + unsigned int klass_guess = 0) const + { + set_klass_guess (klass_guess); + buffer->cur().codepoint = glyph_index; + } };