diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-08-26 10:31:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-08-26 10:31:05 +0100 |
| commit | 093fe75629801ca667ab95496757ad5d7c6430e4 (patch) | |
| tree | f6a1731d1625a15ad45aced7b890fade32903ef8 /src/lib | |
| parent | 5aefef2c8916db5ad10811739ab672ec6d716cf3 (diff) | |
Add Ubuntu font hack.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/writer.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index b7c85c2ae..2571ce3cb 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -557,7 +557,13 @@ Writer::finish () } if (_subtitle_asset) { - boost::filesystem::path const liberation = shared_path () / "LiberationSans-Regular.ttf"; + boost::filesystem::path liberation; + try { + liberation = shared_path () / "LiberationSans-Regular.ttf"; + } catch (boost::filesystem::filesystem_error& e) { + /* Hack: try the debian/ubuntu location if getting the shared path failed */ + liberation = "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf"; + } /* Add all the fonts to the subtitle content */ BOOST_FOREACH (shared_ptr<Font> i, _fonts) { |
