#include "render_text.h"
#include "types.h"
#include "util.h"
-#include "warnings.h"
#include <dcp/raw_convert.h>
+#include <dcp/warnings.h>
#include <fontconfig/fontconfig.h>
#include <cairomm/cairomm.h>
-DCPOMATIC_DISABLE_WARNINGS
+LIBDCP_DISABLE_WARNINGS
#include <pangomm.h>
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
#include <pango/pangocairo.h>
#include <boost/algorithm/string.hpp>
#include <iostream>
if (subtitle.underline()) {
span += "underline=\"single\" ";
}
- span += "size=\"" + dcp::raw_convert<string>(subtitle.size_in_pixels(target_height) * pixels_to_1024ths_point) + "\" ";
+ span += "size=\"" + dcp::raw_convert<string>(lrintf(subtitle.size_in_pixels(target_height) * pixels_to_1024ths_point)) + "\" ";
/* Between 1-65535 inclusive, apparently... */
span += "alpha=\"" + dcp::raw_convert<string>(int(floor(fade_factor * 65534)) + 1) + "\" ";
span += "color=\"#" + subtitle.colour().to_rgb_string() + "\"";