From 47d480e77fa70443e8a1fa0c3aa77d2e4c3f2466 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 26 Jul 2004 00:47:27 +0000 Subject: [PATCH] (lookup_gpos): Don't apply a GPOS feature twice. (OTF_drive_gpos): Initialize values positioning_type memeber. --- src/otfdrive.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/otfdrive.c b/src/otfdrive.c index 20eef30..df64f80 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -698,6 +698,7 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, int i; if (! g->glyph_id + || g->positioning_type || (g->GlyphClass && (flag & (1 << g->GlyphClass)))) return (gidx + 1); @@ -748,6 +749,8 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, if (next_gidx >= gstring->used) continue; nextg = gstring->glyphs + next_gidx; + if (nextg->positioning_type) + continue; if (subtable->Format == 1) { OTF_GPOS_Pair1 *pair1 = &subtable->u.pair1; @@ -1235,6 +1238,9 @@ OTF_drive_gpos (OTF *otf, OTF_GlyphString *gstring, if (n < 0) return errret; + for (i = 0; i < gstring->used; i++) + gstring->glyphs[i].positioning_type = 0; + for (i = 0; i < n; i++) { int index = lookup_indices[i]; -- 1.7.10.4