From a141e25c423648fcda7f19faae7d3dd4eb7eae95 Mon Sep 17 00:00:00 2001 From: Qunxin Liu Date: Fri, 30 Aug 2024 10:09:00 -0700 Subject: [PATCH] [subset] remove unnecessary check on name IDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See: https://learn.microsoft.com/en-us/typography/opentype/spec/features_ae The spec says they are expected to be in the font-specific name ID range (256–32767), though that is not a requirement in this Feature Parameters specification. --- src/hb-ot-layout-common.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 1f38923c6..46d8c66b3 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -646,8 +646,7 @@ struct FeatureParamsCharacterVariants return; unsigned last_name_id = (unsigned) firstParamUILabelNameID + (unsigned) numNamedParameters - 1; - if (last_name_id >= 256 && last_name_id <= 32767) - nameids_to_retain->add_range (firstParamUILabelNameID, last_name_id); + nameids_to_retain->add_range (firstParamUILabelNameID, last_name_id); } bool subset (hb_subset_context_t *c) const