(OTF_check_features): Even if failed in getting features, if all
authorhanda <handa>
Mon, 11 Jul 2005 01:06:58 +0000 (01:06 +0000)
committerhanda <handa>
Mon, 11 Jul 2005 01:06:58 +0000 (01:06 +0000)
requested features are negative, return 1.

src/otfopen.c

index abb4636..d2216a0 100644 (file)
@@ -2927,7 +2927,18 @@ OTF_check_features (OTF *otf, int gsubp,
   int i, j;
 
   if (OTF_get_features (otf, gsubp) < 0)
-    return -1;
+    {
+      for (i = 0; i < n_features; i++)
+       {
+         OTF_Tag feature = features[i];
+
+         if (feature == 0)
+           continue;
+         if ((((unsigned) feature) & 0x80000000) == 0)
+           return -1;
+       }
+      return 1;
+    }
   if (gsubp)
     {
       script_list = &otf->gsub->ScriptList;