From 5dad0b083ee486f50280326d82030f239df4ef84 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 17 Feb 2005 12:23:44 +0000 Subject: [PATCH] (gstring_subst): Correctly set temp.f.index. (lookup_gsub): Fix updating gidx. --- src/otfdrive.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/otfdrive.c b/src/otfdrive.c index 9a528a8..faabc2a 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -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; } } -- 1.7.10.4