(OTF_check_features): If gsubp is zero, check gpos
authorhanda <handa>
Tue, 14 Jun 2005 11:06:24 +0000 (11:06 +0000)
committerhanda <handa>
Tue, 14 Jun 2005 11:06:24 +0000 (11:06 +0000)
scripts and features.

src/otfopen.c

index 22dddca..abd1909 100644 (file)
@@ -2929,8 +2929,16 @@ OTF_check_features (OTF *otf, int gsubp,
 
   if (OTF_get_features (otf, gsubp) < 0)
     return -1;
-  script_list = &otf->gsub->ScriptList;
-  feature_list = &otf->gsub->FeatureList;
+  if (gsubp)
+    {
+      script_list = &otf->gsub->ScriptList;
+      feature_list = &otf->gsub->FeatureList;
+    }
+  else
+    {
+      script_list = &otf->gpos->ScriptList;
+      feature_list = &otf->gpos->FeatureList;
+    }
   for (i = 0; i < script_list->ScriptCount && ! Script; i++)
     if (script_list->Script[i].ScriptTag == script)
       Script = script_list->Script + i;