add head table to CFF/CFF2

This commit is contained in:
Michiharu Ariza 2018-09-13 10:55:56 -07:00
parent 3cae9c7515
commit 1234a81368
2 changed files with 8 additions and 0 deletions

View File

@ -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<head> (plan->source);
success = success && head_blob && plan->add_table (HB_OT_TAG_head, head_blob);
hb_blob_destroy (head_blob);
} else {
success = false;
}

View File

@ -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<head> (plan->source);
success = success && head_blob && plan->add_table (HB_OT_TAG_head, head_blob);
hb_blob_destroy (head_blob);
} else {
success = false;
}