From e9c4d7aae7d61da9fcb1cca6bc7cf345b629c36f Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 25 Jul 2006 01:02:20 +0000 Subject: [PATCH] (gstring_subst): Setup all members of struct OTF_Glyph. (lookup_gsub): Call gstring_subst with correct args. --- src/otfdrive.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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;; } -- 1.7.10.4