(lookup_gpos): Don't apply a GPOS feature twice.
authorhanda <handa>
Mon, 26 Jul 2004 00:47:27 +0000 (00:47 +0000)
committerhanda <handa>
Mon, 26 Jul 2004 00:47:27 +0000 (00:47 +0000)
(OTF_drive_gpos): Initialize values positioning_type memeber.

src/otfdrive.c

index 20eef30..df64f80 100644 (file)
@@ -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];