diff --git a/util/hb-subset.cc b/util/hb-subset.cc index 624bb1f75..b65bf3154 100644 --- a/util/hb-subset.cc +++ b/util/hb-subset.cc @@ -128,6 +128,8 @@ struct subset_main_t : option_parser_t, face_options_t, output_options_t write_file (output_file, result); hb_blob_destroy (result); } + else if (hb_face_get_glyph_count (orig_face) == 0) + fail (false, "Invalid font file."); hb_face_destroy (new_face); if (preprocess)