[subset] Minor

This commit is contained in:
Behdad Esfahbod 2018-02-04 20:08:50 -05:00
parent 257022b178
commit eac20e4595
3 changed files with 7 additions and 7 deletions

View File

@ -46,7 +46,7 @@ endif # HAVE_FREETYPE
hb_shape_SOURCES = $(HB_SHAPE_sources) hb_shape_SOURCES = $(HB_SHAPE_sources)
bin_PROGRAMS += hb-shape bin_PROGRAMS += hb-shape
hb_subset_SOURCES = $(HB_SUBSET_CLI_sources) hb_subset_SOURCES = $(HB_SUBSET_sources)
bin_PROGRAMS += hb-subset bin_PROGRAMS += hb-subset
if HAVE_OT if HAVE_OT

View File

@ -29,7 +29,7 @@ HB_OT_SHAPE_CLOSURE_sources = \
main-font-text.hh \ main-font-text.hh \
$(NULL) $(NULL)
HB_SUBSET_CLI_sources = \ HB_SUBSET_sources = \
hb-subset.cc \ hb-subset.cc \
options.cc \ options.cc \
options.hh \ options.hh \

View File

@ -52,8 +52,8 @@ struct subset_consumer_t
{ {
} }
hb_bool_t hb_bool_t
write_file (const char *output_file, hb_blob_t *blob) { write_file (const char *output_file, hb_blob_t *blob) {
unsigned int data_length; unsigned int data_length;
const char* data = hb_blob_get_data (blob, &data_length); const char* data = hb_blob_get_data (blob, &data_length);
@ -68,10 +68,10 @@ struct subset_consumer_t
return false; return false;
} }
if (bytes_written != data_length) { if (bytes_written != data_length) {
fprintf(stderr, "Expected %u bytes written, got %ld\n", data_length, fprintf(stderr, "Expected %u bytes written, got %ld\n", data_length,
bytes_written); bytes_written);
return false; return false;
} }
return true; return true;
} }
@ -80,7 +80,7 @@ struct subset_consumer_t
// TODO(Q1) check for errors from creates and such // TODO(Q1) check for errors from creates and such
hb_subset_profile_t *subset_profile = hb_subset_profile_create(); hb_subset_profile_t *subset_profile = hb_subset_profile_create();
hb_subset_input_t *subset_input = hb_subset_input_create(); hb_subset_input_t *subset_input = hb_subset_input_create();
hb_face_t *face = hb_font_get_face (font); hb_face_t *face = hb_font_get_face (font);
hb_subset_face_t *subset_face = hb_subset_face_create(face); hb_subset_face_t *subset_face = hb_subset_face_create(face);
hb_blob_t *result = nullptr; hb_blob_t *result = nullptr;