Try to hack around font finding during unit tests.
authorCarl Hetherington <cth@carlh.net>
Wed, 4 Nov 2015 09:28:50 +0000 (09:28 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 4 Nov 2015 09:28:50 +0000 (09:28 +0000)
src/lib/reel_writer.cc

index a7e3097f367187437c50cb55a894e49798c8ee4e..c8d848933a566e040afaa4d611efab346995e8ad 100644 (file)
@@ -366,7 +366,11 @@ ReelWriter::create_reel (list<ReferencedReelAsset> const & refs, list<shared_ptr
 
                boost::filesystem::path liberation_normal;
                try {
-                       liberation_normal = shared_path () / "LiberationSans-Regular.ttf";
+                       liberation_normal = shared_path() / "LiberationSans-Regular.ttf";
+                       if (!boost::filesystem::exists (liberation_normal)) {
+                               /* Hack for unit tests */
+                               liberation_normal = shared_path() / "fonts" / "LiberationSans-Regular.ttf";
+                       }
                } catch (boost::filesystem::filesystem_error& e) {
 
                }