Try to fix fallback font locations.
authorCarl Hetherington <cth@carlh.net>
Wed, 4 Nov 2015 00:53:02 +0000 (00:53 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 4 Nov 2015 00:53:02 +0000 (00:53 +0000)
src/lib/reel_writer.cc

index 803c2a8ed42ae266518aea5ca05edca905f7a39d..a7e3097f367187437c50cb55a894e49798c8ee4e 100644 (file)
@@ -368,10 +368,12 @@ ReelWriter::create_reel (list<ReferencedReelAsset> const & refs, list<shared_ptr
                try {
                        liberation_normal = shared_path () / "LiberationSans-Regular.ttf";
                } catch (boost::filesystem::filesystem_error& e) {
-                       /* Hack: try the debian/ubuntu location if getting the shared path failed */
-                       liberation_normal = "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf";
+
                }
 
+               if (!boost::filesystem::exists(liberation_normal)) {
+                       liberation_normal = "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf";
+               }
 
                /* Add all the fonts to the subtitle content */
                BOOST_FOREACH (shared_ptr<Font> j, fonts) {