From f6cbe2e4d3975101b5319f731dee8bd1efca5a22 Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 24 Jun 2005 02:13:10 +0000 Subject: [PATCH] (OTF_check_features): If the MSB of a feature tag is set, treat it as a negation flag. --- src/otfopen.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; } -- 1.7.10.4