mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
[perf] Measure freetype face loading as well
This commit is contained in:
1 parent
202888ec3e
commit
ebdfa9838b
1 file changed
+13
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user