From: Benjamin Otte Date: Thu, 13 Jul 2023 10:56:17 +0000 (+0200) Subject: tests: Reduce number of random fonts X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~60^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ece4e59e994fd3748acd309551d0d420d0717392;p=gtk4.git tests: Reduce number of random fonts We were clowing through all the Pango caches for no benefit. It made the test generation stuck in fontconfig loops instead of quickly generating tests. So don't do that and limit the different fonts to some reasonable list of options. --- diff --git a/tests/rendernode-create-tests.c b/tests/rendernode-create-tests.c index 2bd7a3876b..e2028b39b2 100644 --- a/tests/rendernode-create-tests.c +++ b/tests/rendernode-create-tests.c @@ -407,8 +407,8 @@ text (guint n) else pango_font_description_set_style (desc, PANGO_STYLE_NORMAL); - pango_font_description_set_weight (desc, 100 * g_random_int_range (1, 10)); - pango_font_description_set_size (desc, PANGO_SCALE * g_random_int_range (8,32)); + pango_font_description_set_weight (desc, 200 * g_random_int_range (1, 5)); + pango_font_description_set_size (desc, PANGO_SCALE * 4 * g_random_int_range (2,8)); font = pango_context_load_font (context, desc); pango_layout_set_font_description (layout, desc);