add head table to CFF/CFF2
diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh
index 22a447f..c3cb6ab 100644
--- a/src/hb-ot-cff1-table.hh
+++ b/src/hb-ot-cff1-table.hh
@@ -27,6 +27,7 @@
 #ifndef HB_OT_CFF1_TABLE_HH
 #define HB_OT_CFF1_TABLE_HH
 
+#include "hb-ot-head-table.hh"
 #include "hb-ot-cff-common.hh"
 #include "hb-subset-cff1.hh"
 
@@ -1206,6 +1207,9 @@
     bool success = true;
     if (hb_subset_cff1 (plan, &cff_prime)) {
       success = success && plan->add_table (HB_OT_TAG_cff1, cff_prime);
+      hb_blob_t *head_blob = hb_sanitize_context_t().reference_table<head> (plan->source);
+      success = success && head_blob && plan->add_table (HB_OT_TAG_head, head_blob);
+      hb_blob_destroy (head_blob);
     } else {
       success = false;
     }
diff --git a/src/hb-ot-cff2-table.hh b/src/hb-ot-cff2-table.hh
index 8e2ee34..f7c3423 100644
--- a/src/hb-ot-cff2-table.hh
+++ b/src/hb-ot-cff2-table.hh
@@ -27,6 +27,7 @@
 #ifndef HB_OT_CFF2_TABLE_HH
 #define HB_OT_CFF2_TABLE_HH
 
+#include "hb-ot-head-table.hh"
 #include "hb-ot-cff-common.hh"
 #include "hb-subset-cff2.hh"
 
@@ -537,6 +538,9 @@
     bool success = true;
     if (hb_subset_cff2 (plan, &cff2_prime)) {
       success = success && plan->add_table (HB_OT_TAG_cff2, cff2_prime);
+      hb_blob_t *head_blob = hb_sanitize_context_t().reference_table<head> (plan->source);
+      success = success && head_blob && plan->add_table (HB_OT_TAG_head, head_blob);
+      hb_blob_destroy (head_blob);
     } else {
       success = false;
     }