} while (0)
+static unsigned get_class_def (OTF_ClassDef *, OTF_GlyphID);
+
static int
gstring_subst (OTF *otf, OTF_GlyphString *gstring, int from, int to, int flag,
OTF_GlyphID *ids, int num)
{
gstring->glyphs[from + i].c = otf->cmap->decode_table[ids[i]];
gstring->glyphs[from + i].glyph_id = ids[i];
+ if (otf->gdef)
+ gstring->glyphs[from + i].GlyphClass
+ = get_class_def (&otf->gdef->glyph_class_def, ids[i]);
+ else
+ gstring->glyphs[from + i].GlyphClass = 0;
+ gstring->glyphs[from + i].positioning_type = 0;
gstring->glyphs[from + i].f.index.from = from_idx;
gstring->glyphs[from + i].f.index.to = to_idx;
}
OTF_GSUB_Alternate1 *alt1 = &subtable->u.alternate1;
OTF_AlternateSet *altset = alt1->AlternateSet + coverage_idx;
- gstring_subst (otf, gstring, gidx + 1, gidx + 1, flag,
+ gstring_subst (otf, gstring, gidx, gidx + 1, flag,
altset->Alternate, altset->GlyphCount);
gidx += altset->GlyphCount;;
}