Skip over multiple variation selectors in a row
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 7 Jun 2013 00:17:32 +0000 (20:17 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 10 Jun 2013 19:08:49 +0000 (15:08 -0400)
src/hb-ot-shape-normalize.cc

index 7f83d9d..51ef77b 100644 (file)
@@ -219,6 +219,12 @@ handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, uns
       /* The next two lines are some ugly lines... But work. */
       c->font->get_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().glyph_index());
       buffer->replace_glyphs (2, 1, &buffer->cur().codepoint);
+      /* Skip any further variation selectors. */
+      while (buffer->idx < end && unlikely (buffer->unicode->is_variation_selector (buffer->cur().codepoint)))
+      {
+       set_glyph (buffer->cur(), c->font);
+       buffer->next_glyph ();
+      }
     } else {
       set_glyph (buffer->cur(), c->font);
       buffer->next_glyph ();