From 754d364efd479b7982d5881454a300ef48f48eab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 10 Jan 2024 07:56:11 -0500 Subject: [PATCH] gsk: Allow custom fonts in tests The commit adds a custom fontconfig configuration in testsuite/gsk/fonts/fonts.conf and sets the FONTCONFIG_FILE environment variable for the gsk compare tests to point at it. To use a custom font in tests, just drop it into the testsuite/gsk/fonts/ directory. The font configuration includes the system configuration, so existing tests should not be affected. --- testsuite/gsk/fonts/fonts.conf | 7 +++++++ testsuite/gsk/meson.build | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 testsuite/gsk/fonts/fonts.conf diff --git a/testsuite/gsk/fonts/fonts.conf b/testsuite/gsk/fonts/fonts.conf new file mode 100644 index 0000000000..26d218edd9 --- /dev/null +++ b/testsuite/gsk/fonts/fonts.conf @@ -0,0 +1,7 @@ + + + + /tmp/cache + . + /etc/fonts/fonts.conf + diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 8891379cdb..398962ca7f 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -196,7 +196,8 @@ foreach renderer : renderers 'GSK_RENDERER=' + renderer_name, 'GTK_A11Y=test', 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), - 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()) + 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), + 'FONTCONFIG_FILE=@0@/fonts/fonts.conf'.format(meson.current_source_dir()) ] if ((not testname.contains(exclude_term)) and