[subset] Drop fvar, avar, cvar, MVAR tables when in HB_NO_VAR mode

This commit is contained in:
Thomas Petillon 2023-09-20 20:17:48 +02:00 committed by Behdad Esfahbod
parent 5ec21d4af4
commit 284889b031

View file

@ -515,6 +515,8 @@ _subset_table (hb_subset_plan_t *plan,
case HB_OT_TAG_HVAR: return _subset<const OT::HVAR> (plan, buf);
case HB_OT_TAG_VVAR: return _subset<const OT::VVAR> (plan, buf);
#endif
#ifndef HB_NO_VAR
case HB_OT_TAG_fvar:
if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag);
return _subset<const OT::fvar> (plan, buf);
@ -527,6 +529,8 @@ _subset_table (hb_subset_plan_t *plan,
case HB_OT_TAG_MVAR:
if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag);
return _subset<const OT::MVAR> (plan, buf);
#endif
case HB_OT_TAG_STAT:
if (!plan->user_axes_location.is_empty ()) return _subset<const OT::STAT> (plan, buf);
else return _passthrough (plan, tag);