From: handa Date: Tue, 25 Jul 2006 01:02:20 +0000 (+0000) Subject: (gstring_subst): Setup all members of struct X-Git-Tag: REL-0-9-5~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e9c4d7aae7d61da9fcb1cca6bc7cf345b629c36f;p=m17n%2Flibotf.git (gstring_subst): Setup all members of struct OTF_Glyph. (lookup_gsub): Call gstring_subst with correct args. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index 1263164..987c649 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -65,6 +65,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite } 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) @@ -99,6 +101,12 @@ gstring_subst (OTF *otf, OTF_GlyphString *gstring, int from, int to, int flag, { 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; } @@ -473,7 +481,7 @@ lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index, 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;; }