bug 714067 - correction in ligature indexing when combining marks are present. r=behdad
authorJonathan Kew <jfkthame@gmail.com>
Sun, 15 Jan 2012 08:52:00 +0000
changeset 85765 006ab840347570b92f26c28f2efe05973357ced6
parent 85764 1b67951de0a28eb0f308fdd1061a02a48c07c767
child 85766 bc30dee3a6f22a57e17d8382f9d416fbde1413ed
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbehdad
bugs714067
milestone12.0a1
bug 714067 - correction in ligature indexing when combining marks are present. r=behdad
gfx/harfbuzz/src/hb-ot-layout-gsub-private.hh
--- a/gfx/harfbuzz/src/hb-ot-layout-gsub-private.hh
+++ b/gfx/harfbuzz/src/hb-ot-layout-gsub-private.hh
@@ -371,19 +371,19 @@ struct Ligature
     if (first_was_mark && found_non_mark)
       c->guess_glyph_class (HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE);
 
     /* Allocate new ligature id */
     unsigned int lig_id = allocate_lig_id (c->buffer);
     c->buffer->info[c->buffer->i].lig_comp() = 0;
     c->buffer->info[c->buffer->i].lig_id() = lig_id;
 
-    if (j == c->buffer->i + i) /* No input glyphs skipped */
+    if (j < c->buffer->i + count) /* No input glyphs skipped */
     {
-      c->replace_glyphs_be16 (i, 1, (const uint16_t *) &ligGlyph);
+      c->replace_glyphs_be16 (count, 1, (const uint16_t *) &ligGlyph);
     }
     else
     {
       c->replace_glyph (ligGlyph);
 
       /* Now we must do a second loop to copy the skipped glyphs to
 	 `out' and assign component values to it.  We start with the
 	 glyph after the first component.  Glyphs between component