diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-11-04 00:53:02 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-11-04 00:53:02 +0000 |
| commit | 2175471d37831108a25e3e74b956192c64e68e39 (patch) | |
| tree | 1b22d86fcff6289fbdc0330ae6f84346486282fc /src/lib | |
| parent | b5317f407471b04b3c3a6d9e23c81efcd32d0a1a (diff) | |
Try to fix fallback font locations.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/reel_writer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index 803c2a8ed..a7e3097f3 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -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) { |
