#include <cairomm/cairomm.h>
#include <pangomm.h>
#include <boost/foreach.hpp>
+#include <iostream>
using std::list;
using std::cout;
/* ...and add a bit more for luck */
height += target.height / 11;
- shared_ptr<Image> image (new Image (PIX_FMT_RGBA, dcp::Size (target.width, height), false));
+ shared_ptr<Image> image (new Image (AV_PIX_FMT_RGBA, dcp::Size (target.width, height), false));
image->make_black ();
Cairo::RefPtr<Cairo::ImageSurface> surface = Cairo::ImageSurface::create (
fc_config = FcConfigCreate ();
}
- boost::filesystem::path font_file = shared_path () / "LiberationSans-Regular.ttf";
+ boost::filesystem::path font_file;
+ try {
+ font_file = shared_path () / "LiberationSans-Regular.ttf";
+ } catch (boost::filesystem::filesystem_error& e) {
+ /* Hack: try the debian/ubuntu location if getting the shared path failed */
+ font_file = "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf";
+ }
+
BOOST_FOREACH (shared_ptr<Font> i, fonts) {
if (i->id() == subtitle.font() && i->file ()) {
font_file = i->file().get ();