summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-09-02 18:44:03 +0200
committerCarl Hetherington <cth@carlh.net>2023-09-03 20:42:57 +0200
commitdbfb852ea5b7169a80b701089bf0bc7e30c6e328 (patch)
tree45d3a2f035b11fc02353418ce631bb6c960be17e /src/lib
parent6d5f1a9dd0f3968d44638939aad038ccb20ac9e8 (diff)
Fix rendering of italic fonts during tests on Windows.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util.cc8
1 files changed, 7 insertions, 1 deletions
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