From 3ec77d6ae0510dc2c0ec64382c4948bc6e109844 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 8 Jun 2012 21:44:06 -0400 Subject: [PATCH] Don't use replace_glyphs_be for MultipleSubst --- src/hb-ot-layout-gsub-table.hh | 5 ++++- src/hb-ot-layout-gsubgpos-private.hh | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 41b88b7..47c000d 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -213,7 +213,10 @@ struct Sequence if (unlikely (!substitute.len)) return TRACE_RETURN (false); unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE ? HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH : 0; - c->replace_glyphs_be16 (1, substitute.len, (const char *) substitute.array, klass); + unsigned int count = substitute.len; + for (unsigned int i = 0; i < count; i++) + c->output_glyph (substitute.array[i], klass); + c->buffer->skip_glyph (); return TRACE_RETURN (true); } diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index a33bce6..bc8d9bc 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -221,7 +221,12 @@ struct hb_apply_context_t } - + inline void output_glyph (hb_codepoint_t glyph_index, + unsigned int klass = 0) const + { + buffer->cur().props_cache() = klass; /*XXX if has gdef? */ + buffer->output_glyph (glyph_index); + } inline void replace_glyph (hb_codepoint_t glyph_index, unsigned int klass = 0) const { -- 2.7.4