summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--run/tests.bat1
-rw-r--r--src/lib/util.cc8
2 files changed, 8 insertions, 1 deletions
diff --git a/run/tests.bat b/run/tests.bat
index 598338f17..a9d921788 100644
--- a/run/tests.bat
+++ b/run/tests.bat
@@ -4,4 +4,5 @@ xcopy ..\libdcp\tags build\tags\
copy ..\libdcp\ratings build\
copy ..\openssl\apps\openssl.exe build\test\
xcopy fonts build\fonts\
+move build\fonts\fonts.conf.windows build\fonts\fonts.conf
build\test\unit-tests.exe --log_level=test_suite %1 %2
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