From 2fca1426ca06cabbe8f027f2dc9dee9c27560c76 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Jul 2012 18:46:41 -0400 Subject: [PATCH] [GSUB] Don't erase glyph classes if GDEF does not have glyph classes --- src/hb-ot-layout-gsubgpos-private.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index e2423bcd0..61dea3a14 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -231,7 +231,10 @@ struct hb_apply_context_t inline void set_klass_guess (unsigned int klass_guess) const { - buffer->cur().props_cache() = has_glyph_classes ? 0 : klass_guess; + if (likely (has_glyph_classes)) + buffer->cur().props_cache() = 0; + else if (klass_guess) + buffer->cur().props_cache() = klass_guess; } inline void output_glyph (hb_codepoint_t glyph_index,