#include "crypto.h"
#include "compose.hpp"
#include "audio_buffers.h"
+#include "string_text.h"
+#include "font.h"
+#include "render_text.h"
#include <dcp/locale_convert.h>
#include <dcp/util.h>
#include <dcp/raw_convert.h>
putenv (String::compose("FONTCONFIG_PATH=%1", shared_path().string()).c_str());
#endif
+#ifdef DCPOMATIC_OSX
+ setenv ("PANGOCAIRO_BACKEND", "fontconfig", 1);
+ setenv ("FONTCONFIG_PATH", shared_path().string().c_str(), 1);
+#endif
+
Pango::init ();
dcp::init ();
+#ifdef DCPOMATIC_WINDOWS
+ /* Render something to fontconfig to create its cache */
+ list<StringText> subs;
+ dcp::SubtitleString ss(
+ optional<string>(), false, false, false, dcp::Colour(), 42, 1, dcp::Time(), dcp::Time(), 0, dcp::HALIGN_CENTER, 0, dcp::VALIGN_CENTER, dcp::DIRECTION_LTR,
+ "Hello dolly", dcp::NONE, dcp::Colour(), dcp::Time(), dcp::Time()
+ );
+ subs.push_back (StringText(ss, 0));
+ render_text (subs, list<shared_ptr<Font> >(), dcp::Size(640, 480), DCPTime(), 24);
+#endif
+
Ratio::setup_ratios ();
PresetColourConversion::setup_colour_conversion_presets ();
VideoContentScale::setup_scales ();
try {
boost::algorithm::replace_all (s, ",", ".");
return lexical_cast<float> (s);
- } catch (bad_lexical_cast) {
+ } catch (bad_lexical_cast &) {
boost::algorithm::replace_all (s, ".", ",");
return lexical_cast<float> (s);
}