From 0bfe3f5202198b82b415214ebbc12605d4b8c151 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Tue, 16 Jun 2020 13:23:34 +0100 Subject: [PATCH] Fine-tuning for non-null FeatureParams See https://github.com/MicrosoftDocs/typography-issues/issues/439 and https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags and "Registered features, definitions and implementations", a-e and p-t: https://docs.microsoft.com/en-us/typography/opentype/spec/features_ae https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt --- OTFontFileVal/OTLVal.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OTFontFileVal/OTLVal.cs b/OTFontFileVal/OTLVal.cs index 64f4b0e..a2be4e1 100644 --- a/OTFontFileVal/OTLVal.cs +++ b/OTFontFileVal/OTLVal.cs @@ -581,9 +581,13 @@ public bool Validate(Validator v, string sIdentity, OTTable table) { bool bRet = true; - if (sIdentity.EndsWith("(size), FeatureTable")) + if (sIdentity.EndsWith("(size), FeatureTable") || + sIdentity.Contains("(cv") || + sIdentity.Contains("(ss0") || // avoid matching "ssty" + sIdentity.Contains("(ss1") || + sIdentity.Contains("(ss2")) { - // The "size" feature is special in having non-null FeatureParams + // The "size", "cvNN" and "ssNN" features are special in having non-null FeatureParams // TODO }