int errret = -1;
int len = to - from;
int i;
+ int c = gstring->glyphs[from].c;
+ int from_idx = gstring->glyphs[from].f.index.from;
+ int to_idx = gstring->glyphs[to - 1].f.index.to;
if (len < num)
GSTRING_INSERT (gstring, from, (num - len));
else if (len > num)
GSTRING_DELETE (gstring, from, (len - num));
for (i = 0; i < num; i++)
- gstring->glyphs[from + i].glyph_id = ids[i];
+ {
+ gstring->glyphs[from + i].c = c;
+ gstring->glyphs[from + i].glyph_id = ids[i];
+ gstring->glyphs[from + i].f.index.from = from_idx;
+ gstring->glyphs[from + i].f.index.to = to_idx;
+ }
return 0;
}
if (n < 0)
return errret;
+ for (i = 0; i < gstring->used; i++)
+ gstring->glyphs[i].f.index.from = gstring->glyphs[i].f.index.to = i;
+
for (i = 0; i < n; i++)
{
int index = lookup_indices[i];