From 7fbbf86efe675e4c038dfc5985c24bbc544620cd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Jul 2012 18:36:42 -0400 Subject: [PATCH] [GSUB] Minor --- src/hb-ot-layout-gsub-table.hh | 2 +- src/hb-ot-layout-gsubgpos-private.hh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index bdc7b38..6a292a1 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 6dc2f16..e2423bc 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; + } }; -- 2.7.4