[test-buffer-serialize] Allow no font

This commit is contained in:
Behdad Esfahbod 2022-11-14 16:24:25 -07:00
parent f6076890c5
commit dee26de76f
1 changed files with 3 additions and 5 deletions

View File

@ -43,10 +43,8 @@ main (int argc, char **argv)
#ifndef HB_NO_BUFFER_SERIALIZE
if (argc != 2) {
fprintf (stderr, "usage: %s font-file\n", argv[0]);
exit (1);
}
if (argc < 2)
argv[1] = (char *) "/dev/null";
hb_blob_t *blob = hb_blob_create_from_file_or_fail (argv[1]);
assert (blob);
@ -58,7 +56,7 @@ main (int argc, char **argv)
hb_font_t *font = hb_font_create (face);
hb_face_destroy (face);
hb_font_set_scale (font, upem, upem);
hb_ot_font_set_funcs (font);
//hb_ot_font_set_funcs (font);
#ifdef HAVE_FREETYPE
//hb_ft_font_set_funcs (font);
#endif