提交 70b06cc6 编写于 作者: B Behdad Esfahbod

More fixes

上级 6c1848b1
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
struct subset_consumer_t struct subset_consumer_t
{ {
subset_consumer_t (option_parser_t *parser) subset_consumer_t (option_parser_t *parser)
: failed (false), options(parser) {} : failed (false), options (parser), font (nullptr), codepoints (nullptr) {}
void init (hb_buffer_t *buffer_, void init (hb_buffer_t *buffer_,
const font_options_t *font_opts) const font_options_t *font_opts)
...@@ -74,6 +74,8 @@ struct subset_consumer_t ...@@ -74,6 +74,8 @@ struct subset_consumer_t
} }
int bytes_written = fwrite(data, 1, data_length, fp_out); int bytes_written = fwrite(data, 1, data_length, fp_out);
fclose (fp_out);
if (bytes_written == -1) { if (bytes_written == -1) {
fprintf(stderr, "Unable to write output file\n"); fprintf(stderr, "Unable to write output file\n");
return false; return false;
...@@ -93,8 +95,6 @@ struct subset_consumer_t ...@@ -93,8 +95,6 @@ struct subset_consumer_t
hb_subset_input_t *subset_input = hb_subset_input_create (codepoints); hb_subset_input_t *subset_input = hb_subset_input_create (codepoints);
hb_face_t *face = hb_font_get_face (font); hb_face_t *face = hb_font_get_face (font);
hb_face_t *new_face = hb_subset(face, subset_profile, subset_input); hb_face_t *new_face = hb_subset(face, subset_profile, subset_input);
hb_blob_t *result = hb_face_reference_blob (new_face); hb_blob_t *result = hb_face_reference_blob (new_face);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册