From b03f2277a205ff7e7cdaa12c6e52322ea474a7af Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 30 Dec 2024 15:43:14 +0100 Subject: Bump libdcp for raw_convert changes. raw_convert is gone, so here we use fmt::{to_string,format} instead. Other raw_converts now use fast_float. --- src/lib/render_text.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/render_text.cc') diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc index 3c3d4eed7..80161c940 100644 --- a/src/lib/render_text.cc +++ b/src/lib/render_text.cc @@ -26,7 +26,6 @@ #include "image.h" #include "render_text.h" #include "util.h" -#include #include #include LIBDCP_DISABLE_WARNINGS @@ -34,6 +33,7 @@ LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS #include +#include #include #include @@ -116,9 +116,9 @@ marked_up(vector subtitles, int target_height, float fade_factor, st if (subtitle.underline()) { span += "underline=\"single\" "; } - span += "size=\"" + dcp::raw_convert(lrintf(subtitle.size_in_pixels(target_height) * pixels_to_1024ths_point)) + "\" "; + span += "size=\"" + fmt::to_string(lrintf(subtitle.size_in_pixels(target_height) * pixels_to_1024ths_point)) + "\" "; /* Between 1-65535 inclusive, apparently... */ - span += "alpha=\"" + dcp::raw_convert(int(floor(fade_factor * 65534)) + 1) + "\" "; + span += "alpha=\"" + fmt::to_string(int(floor(fade_factor * 65534)) + 1) + "\" "; span += "color=\"#" + subtitle.colour().to_rgb_string() + "\""; if (!extra_attribute.empty()) { span += " " + extra_attribute; @@ -148,7 +148,7 @@ marked_up(vector subtitles, int target_height, float fade_factor, st int dummy; layout->get_pixel_size(space_width, dummy); auto spacing = ((i.space_before() * i.size_in_pixels(target_height) - space_width) / 2) * pixels_to_1024ths_point; - out += make_span(i, " ", "letter_spacing=\"" + dcp::raw_convert(std::round(spacing)) + "\""); + out += make_span(i, " ", "letter_spacing=\"" + fmt::to_string(std::round(spacing)) + "\""); } out += make_span(i, i.text(), {}); -- cgit v1.2.3