From dee26de76fc3fdfa2dbfc780c62120206229f1f2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 14 Nov 2022 16:24:25 -0700 Subject: [PATCH] [test-buffer-serialize] Allow no font --- src/test-buffer-serialize.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test-buffer-serialize.cc b/src/test-buffer-serialize.cc index bbebcbe7a..8a887922b 100644 --- a/src/test-buffer-serialize.cc +++ b/src/test-buffer-serialize.cc @@ -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