From: handa Date: Mon, 11 Jul 2005 01:06:58 +0000 (+0000) Subject: (OTF_check_features): Even if failed in getting features, if all X-Git-Tag: REL-0-9-5~48 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b15462bc7e30a2bade792269de07c0acd800e27c;p=m17n%2Flibotf.git (OTF_check_features): Even if failed in getting features, if all requested features are negative, return 1. --- diff --git a/src/otfopen.c b/src/otfopen.c index abb4636..d2216a0 100644 --- a/src/otfopen.c +++ b/src/otfopen.c @@ -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;