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
|
* Google Author(s): Garret Rieger
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "hb-ot-glyf-table.hh"
|
||||||
#include "hb-subset-glyf.hh"
|
#include "hb-subset-glyf.hh"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,10 +37,16 @@
|
|||||||
**/
|
**/
|
||||||
bool
|
bool
|
||||||
hb_subset_glyf (hb_subset_plan_t *plan,
|
hb_subset_glyf (hb_subset_plan_t *plan,
|
||||||
hb_blob_t *glyf,
|
hb_face_t *face,
|
||||||
hb_blob_t **glyf_prime /* OUT */)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
hb_subset_glyf (hb_subset_plan_t *plan,
|
hb_subset_glyf (hb_subset_plan_t *plan,
|
||||||
hb_blob_t *glyf,
|
hb_face_t *face,
|
||||||
hb_blob_t **glyf_prime /* OUT */);
|
hb_blob_t **glyf_prime /* OUT */);
|
||||||
|
|
||||||
#endif /* HB_SUBSET_GLYF_HH */
|
#endif /* HB_SUBSET_GLYF_HH */
|
||||||
|
@ -160,15 +160,13 @@ hb_subset (hb_subset_profile_t *profile,
|
|||||||
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
hb_blob_t *glyf = hb_face_reference_table (face->face, HB_OT_TAG_glyf);
|
|
||||||
hb_blob_t *glyf_prime = nullptr;
|
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.
|
// TODO: write new glyf to new face.
|
||||||
} else {
|
} else {
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
hb_blob_destroy (glyf_prime);
|
hb_blob_destroy (glyf_prime);
|
||||||
hb_blob_destroy (glyf);
|
|
||||||
|
|
||||||
*result = hb_face_reference_blob(face->face);
|
*result = hb_face_reference_blob(face->face);
|
||||||
hb_subset_plan_destroy (plan);
|
hb_subset_plan_destroy (plan);
|
||||||
|
Loading…
Reference in New Issue
Block a user