[perf] Measure freetype face loading as well

This commit is contained in:
Behdad Esfahbod committed 2023-07-30 12:22:55 -06:00
1 parent 202888ec3e
commit ebdfa9838b
1 file changed
+13
+13
View File
@@ -203,6 +203,19 @@ static void BM_Font (benchmark::State &state,
hb_font_t *font = hb_font_create (face);
hb_face_destroy (face);
switch (backend)
{
case HARFBUZZ:
hb_ot_font_set_funcs (font);
break;
case FREETYPE:
#ifdef HAVE_FREETYPE
hb_ft_font_set_funcs (font);
#endif
break;
}
hb_buffer_t *buffer = hb_buffer_create ();
hb_buffer_add_utf8 (buffer, " ", -1, 0, -1);
hb_buffer_guess_segment_properties (buffer);