(OTF_check_features): If language is specified but not found, return 0
authorhanda <handa>
Wed, 22 Sep 2010 03:46:17 +0000 (03:46 +0000)
committerhanda <handa>
Wed, 22 Sep 2010 03:46:17 +0000 (03:46 +0000)
instead of using the default langsys.

src/otfopen.c

index 299c23b..8aa062d 100644 (file)
@@ -3210,8 +3210,10 @@ OTF_check_features (OTF *otf, int gsubp,
       for (i = 0; i < Script->LangSysCount && ! LangSys; i++)
        if (Script->LangSysRecord[i].LangSysTag == language)
          LangSys = Script->LangSys + i;
+      if (! LangSys)
+       return 0;
     }
-  if (! LangSys)
+  else
     LangSys = &Script->DefaultLangSys;
   for (j = 0; j < n_features; j++)
     {