From a1d34fedce072bb5436ddf8211777ff98087f649 Mon Sep 17 00:00:00 2001 From: Mar Date: Sat, 17 Oct 2026 13:13:02 +0200 Subject: [PATCH] [subset] Drop feature params when built without them With HB_NO_LAYOUT_FEATURE_PARAMS, FeatureParams::sanitize() checks nothing and collect_name_ids() keeps none of their names, yet FeatureParams::subset() still copied the params by their tag. Return false there too, so the subsetter drops them, like the other FeatureParams readers do in that configuration. Assisted-by: Claude --- src/hb-ot-layout-common.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 1b3df4a16..19113c31e 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -750,6 +750,9 @@ struct FeatureParams bool subset (hb_subset_context_t *c, const Tag* tag) const { +#ifdef HB_NO_LAYOUT_FEATURE_PARAMS + return false; +#endif TRACE_SUBSET (this); if (!tag) return_trace (false); if (*tag == HB_TAG ('s','i','z','e') && hb_barrier ())