[subset] Add avar as dependency for variation tables with avar2

When has_avar2 is true, ensure avar is subsetted before gvar, cvar,
HVAR, VVAR, MVAR, GDEF, and CFF2. This allows avar2 subsetting to
produce state (e.g., self-contained axes) that other tables may need.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad EsfahbodandClaude Opus 4.6 committed 2026-07-01 12:42:56 -06:00
1 parent a8874e6a31
commit d171d444b1
1 file changed
+9
+9
View File
@@ -247,6 +247,15 @@ _dependencies_satisfied (hb_subset_plan_t *plan, hb_tag_t tag,
return !plan->normalized_coords || !pending_subset_tags.has (HB_TAG('g','l','y','f'));
case HB_TAG('G','P','O','S'):
return plan->all_axes_pinned || !pending_subset_tags.has (HB_TAG('G','D','E','F'));
/* For avar2, variation tables must wait for avar to be subsetted first. */
case HB_TAG('g','v','a','r'):
case HB_TAG('c','v','a','r'):
case HB_TAG('H','V','A','R'):
case HB_TAG('V','V','A','R'):
case HB_TAG('M','V','A','R'):
case HB_TAG('G','D','E','F'):
case HB_TAG('C','F','F','2'):
return !plan->has_avar2 || !pending_subset_tags.has (HB_TAG('a','v','a','r'));
default:
return true;
}