X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fotfdrive.c;h=3dc6eda562dcb4bb1b150b539c509e3a072da933;hb=092c77ce9d2bd59339ae4a99cc27d2b78318cf06;hp=794438da74e1ae774c08b2ad6bb50fabbc4156cc;hpb=6b600b45ae2e54c5bed03fa9c1dd5ceebc472b08;p=m17n%2Flibotf.git diff --git a/src/otfdrive.c b/src/otfdrive.c index 794438d..3dc6eda 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -102,16 +102,16 @@ gstring_subst (OTF *otf, OTF_GlyphString *gstring, int from, int to, int flag, GSTRING_DELETE (gstring, from, (len - num)); for (i = 0; i < num; i++) { - if (otf->cmap) - gstring->glyphs[from + i].c = otf->cmap->decode_table[ids[i]]; - else - gstring->glyphs[from + i].c = 0; + if (gstring->glyphs[from + i].glyph_id != ids[i]) + { + gstring->glyphs[from + i].c = 0; + 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].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; @@ -763,7 +763,7 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, int i; if (IGNORED_GLYPH (g, flag) - || g->positioning_type) + || (0 & g->positioning_type)) return (gidx + 1); /* Try all subtables until one of them handles the current glyph. */