From dbfb852ea5b7169a80b701089bf0bc7e30c6e328 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 2 Sep 2023 18:44:03 +0200 Subject: Fix rendering of italic fonts during tests on Windows. --- src/lib/util.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/util.cc b/src/lib/util.cc index 4240279c6..13a062bc6 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -448,7 +448,13 @@ LIBDCP_ENABLE_WARNINGS #ifdef DCPOMATIC_WINDOWS putenv ("PANGOCAIRO_BACKEND=fontconfig"); - putenv (String::compose("FONTCONFIG_PATH=%1", resources_path().string()).c_str()); + if (boost::filesystem::exists(resources_path() / "fonts.conf")) { + /* The actual application after installation */ + putenv(String::compose("FONTCONFIG_PATH=%1", resources_path().string()).c_str()); + } else { + /* The place where fonts.conf is during tests */ + putenv("FONTCONFIG_PATH=build\\fonts"); + } #endif #ifdef DCPOMATIC_OSX -- cgit v1.2.3