Add an instance of glyf::accelerator_t to hb-subset-glyf.
This commit is contained in:
parent
ef62dfed3f
commit
53aa0e9542
@ -24,6 +24,7 @@
|
||||
* Google Author(s): Garret Rieger
|
||||
*/
|
||||
|
||||
#include "hb-ot-glyf-table.hh"
|
||||
#include "hb-subset-glyf.hh"
|
||||
|
||||
/**
|
||||
@ -36,10 +37,16 @@
|
||||
**/
|
||||
bool
|
||||
hb_subset_glyf (hb_subset_plan_t *plan,
|
||||
hb_blob_t *glyf,
|
||||
hb_face_t *face,
|
||||
hb_blob_t **glyf_prime /* OUT */)
|
||||
{
|
||||
*glyf_prime = hb_blob_get_empty ();
|
||||
OT::glyf::accelerator_t glyf_accelerator;
|
||||
glyf_accelerator.init(face);
|
||||
|
||||
// TODO
|
||||
|
||||
glyf_accelerator.fini();
|
||||
|
||||
*glyf_prime = hb_blob_get_empty ();
|
||||
return true;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
bool
|
||||
hb_subset_glyf (hb_subset_plan_t *plan,
|
||||
hb_blob_t *glyf,
|
||||
hb_face_t *face,
|
||||
hb_blob_t **glyf_prime /* OUT */);
|
||||
|
||||
#endif /* HB_SUBSET_GLYF_HH */
|
||||
|
@ -160,15 +160,13 @@ hb_subset (hb_subset_profile_t *profile,
|
||||
|
||||
bool success = true;
|
||||
|
||||
hb_blob_t *glyf = hb_face_reference_table (face->face, HB_OT_TAG_glyf);
|
||||
hb_blob_t *glyf_prime = nullptr;
|
||||
if (hb_subset_glyf (plan, glyf, &glyf_prime)) {
|
||||
if (hb_subset_glyf (plan, face->face, &glyf_prime)) {
|
||||
// TODO: write new glyf to new face.
|
||||
} else {
|
||||
success = false;
|
||||
}
|
||||
hb_blob_destroy (glyf_prime);
|
||||
hb_blob_destroy (glyf);
|
||||
|
||||
*result = hb_face_reference_blob(face->face);
|
||||
hb_subset_plan_destroy (plan);
|
||||
|
Loading…
Reference in New Issue
Block a user