From: handa Date: Fri, 24 Jun 2005 02:13:10 +0000 (+0000) Subject: (OTF_check_features): If the MSB of a feature tag X-Git-Tag: REL-0-9-5~56 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f6cbe2e4d3975101b5319f731dee8bd1efca5a22;p=m17n%2Flibotf.git (OTF_check_features): If the MSB of a feature tag is set, treat it as a negation flag. --- diff --git a/src/otfopen.c b/src/otfopen.c index b9e93fd..b484003 100644 --- a/src/otfopen.c +++ b/src/otfopen.c @@ -2955,13 +2955,23 @@ OTF_check_features (OTF *otf, int gsubp, for (j = 0; j < n_features; j++) { OTF_Tag feature = features[j]; + int negate = 0; if (feature == 0) continue; + if (((unsigned) feature) & 0x80000000) + { + feature = (OTF_Tag) (((unsigned) feature) & 0x7FFFFFFF); + negate = 1; + } for (i = 0; i < LangSys->FeatureCount; i++) if (feature_list->Feature[LangSys->FeatureIndex[i]].FeatureTag == feature) - break; + { + if (negate) + return 0; + break; + } if (i == LangSys->FeatureCount) return 0; }