(gstring_subst): Correctly set temp.f.index.
authorhanda <handa>
Thu, 17 Feb 2005 12:23:44 +0000 (12:23 +0000)
committerhanda <handa>
Thu, 17 Feb 2005 12:23:44 +0000 (12:23 +0000)
(lookup_gsub): Fix updating gidx.

src/otfdrive.c

index 9a528a8..faabc2a 100644 (file)
@@ -85,6 +85,8 @@ gstring_subst (OTF_GlyphString *gstring, int from, int to, int flag,
          OTF_Glyph temp = *g;
 
          memmove (g, g + 1, sizeof (OTF_Glyph) * (non_ignored_idx - i));
+         temp.f.index.from = from_idx;
+         temp.f.index.to = to_idx;
          gstring->glyphs[non_ignored_idx--] = temp;
          len--;
        }
@@ -499,7 +501,7 @@ lookup_gsub (OTF_LookupList *lookup_list, unsigned lookup_list_index,
                    continue;
                  gstring_subst (gstring, gidx, gidx + 1 + n, flag,
                                 &lig->LigGlyph, 1);
-                 gidx++;
+                 gidx += lig->CompCount;
                  break;
                }
            }