(OTF_check_features): Even if no feature is
[m17n/libotf.git] / src / otfopen.c
index 229bd40..299c23b 100644 (file)
@@ -3178,6 +3178,8 @@ OTF_check_features (OTF *otf, int gsubp,
 
   if (OTF_get_features (otf, gsubp) < 0)
     {
+      if (gsubp ? ! otf->gsub : ! otf->gpos)
+       return 0;
       for (i = 0; i < n_features; i++)
        {
          OTF_Tag feature = features[i];
@@ -3187,7 +3189,6 @@ OTF_check_features (OTF *otf, int gsubp,
          if ((((unsigned) feature) & 0x80000000) == 0)
            return -1;
        }
-      return 1;
     }
   if (gsubp)
     {