(OTF_check_features): Even if no feature is
authorhanda <handa>
Wed, 21 Apr 2010 07:31:34 +0000 (07:31 +0000)
committerhanda <handa>
Wed, 21 Apr 2010 07:31:34 +0000 (07:31 +0000)
specified, check script support.

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)
     {