[test-buffer-serialize] Allow no font
This commit is contained in:
parent
f6076890c5
commit
dee26de76f
|
@ -43,10 +43,8 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
#ifndef HB_NO_BUFFER_SERIALIZE
|
#ifndef HB_NO_BUFFER_SERIALIZE
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc < 2)
|
||||||
fprintf (stderr, "usage: %s font-file\n", argv[0]);
|
argv[1] = (char *) "/dev/null";
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
hb_blob_t *blob = hb_blob_create_from_file_or_fail (argv[1]);
|
hb_blob_t *blob = hb_blob_create_from_file_or_fail (argv[1]);
|
||||||
assert (blob);
|
assert (blob);
|
||||||
|
@ -58,7 +56,7 @@ main (int argc, char **argv)
|
||||||
hb_font_t *font = hb_font_create (face);
|
hb_font_t *font = hb_font_create (face);
|
||||||
hb_face_destroy (face);
|
hb_face_destroy (face);
|
||||||
hb_font_set_scale (font, upem, upem);
|
hb_font_set_scale (font, upem, upem);
|
||||||
hb_ot_font_set_funcs (font);
|
//hb_ot_font_set_funcs (font);
|
||||||
#ifdef HAVE_FREETYPE
|
#ifdef HAVE_FREETYPE
|
||||||
//hb_ft_font_set_funcs (font);
|
//hb_ft_font_set_funcs (font);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue