From 31ec3c2ec41161c6ae75bc91d1c237bf2d245e37 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Tue, 6 Feb 2018 15:37:34 -0800 Subject: [PATCH] Create a subset plan in hb_subset. --- src/hb-subset.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hb-subset.cc b/src/hb-subset.cc index fe821e0aa..6ae3ed7a2 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -28,6 +28,7 @@ #include "hb-object-private.hh" #include "hb-private.hh" #include "hb-subset-private.hh" +#include "hb-subset-plan.hh" struct hb_subset_profile_t { hb_object_header_t header; @@ -150,6 +151,17 @@ hb_subset (hb_subset_profile_t *profile, { if (!profile || !input || !face) return false; + hb_subset_plan_t *plan = hb_subset_plan_create (face->face, profile, input); + + // TODO: + // - Create initial header + table directory + // - Loop through the set of tables to be kept: + // - Perform table specific subsetting if defined. + // - copy the table into the output. + // - Fix header + table directory. + *result = hb_face_reference_blob(face->face); + + hb_subset_plan_destroy (plan); return true; }