add head table to CFF/CFF2

pull/1113/head
Michiharu Ariza 7 years ago
parent 3cae9c7515
commit 1234a81368
  1. 4
      src/hb-ot-cff1-table.hh
  2. 4
      src/hb-ot-cff2-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<head> (plan->source);
success = success && head_blob && plan->add_table (HB_OT_TAG_head, head_blob);
hb_blob_destroy (head_blob);
} else {
success = false;
}

@ -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;
}

Loading…
Cancel
Save