[subset] only preprocess in benchmark when experimental api is enabled.

This commit is contained in:
Garret Rieger 2022-10-17 20:14:02 +00:00
parent db22bfb3cc
commit d1bf6c0c26
1 changed files with 4 additions and 0 deletions

View File

@ -101,9 +101,13 @@ void AddGlyphs(unsigned num_glyphs_in_font,
// the subsetting operations.
static hb_face_t* preprocess_face(hb_face_t* face)
{
#ifdef HB_EXPERIMENTAL_API
hb_face_t* new_face = hb_subset_preprocess(face);
hb_face_destroy(face);
return new_face;
#else
return face;
#endif
}
/* benchmark for subsetting a font */