From 1234a8136891429bb7353f47480595f44615f322 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Thu, 13 Sep 2018 10:55:56 -0700 Subject: [PATCH] add head table to CFF/CFF2 --- src/hb-ot-cff1-table.hh | 4 ++++ src/hb-ot-cff2-table.hh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 22a447f98..c3cb6ab89 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 @@ struct cff1 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 (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 8e2ee3487..f7c34235d 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 @@ struct cff2 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 (plan->source); + success = success && head_blob && plan->add_table (HB_OT_TAG_head, head_blob); + hb_blob_destroy (head_blob); } else { success = false; }