Pass through <Ruby> tags in subtitles (#2635) (GH#23).
authorCarl Hetherington <cth@carlh.net>
Wed, 15 Nov 2023 22:07:42 +0000 (23:07 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 16 Nov 2023 23:15:18 +0000 (00:15 +0100)
cscript
src/lib/reel_writer.cc
src/lib/text_decoder.cc
src/lib/util.cc
test/render_subtitles_test.cc

diff --git a/cscript b/cscript
index a70f73571eb6d3a926c5f06017fcb96ff3a09fb5..795507e18fe9a1f7056dc80f8ae70fd1443f8f0a 100644 (file)
--- a/cscript
+++ b/cscript
@@ -508,7 +508,7 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', '687e46f8770ee946ce149e2b893f3626052b6881'))
+    deps.append(('libdcp', 'e3fa86ef35f212b14b593dd36dbff66e845d37e4'))
     deps.append(('libsub', 'v1.6.44'))
     deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
     deps.append(('rtaudio', 'f619b76'))
index 78e504697cf9d37ca492a68099ddeb64f9ae9fa6..ca4a2dbb192f3838fda5679372c0572bdabf0e7e 100644 (file)
@@ -873,7 +873,8 @@ ReelWriter::empty_text_asset (TextType type, optional<DCPTextTrack> track, bool
                                dcp::Colour(),
                                dcp::Time(),
                                dcp::Time(),
-                               0
+                               0,
+                               std::vector<dcp::Ruby>()
                                )
                       );
 
index aca6946b7a63b4fda8a81132f291e78a402fc33f..75fa33605b0f2f3188f1fc47141a0d609cebd632 100644 (file)
@@ -301,7 +301,8 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & sub_subti
                                */
                                dcp::Time (),
                                dcp::Time (),
-                               0
+                               0,
+                               std::vector<dcp::Ruby>()
                                );
 
                        auto font = content()->get_font(block.font.get_value_or(""));
index 71aee88fea6330f4187103bae99c7c88370cb652..d23989afaadff0556842b8ba5fe6f01e86b96efd 100644 (file)
@@ -470,7 +470,7 @@ LIBDCP_ENABLE_WARNINGS
        vector<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, 0, dcp::Direction::LTR,
-               "Hello dolly", dcp::Effect::NONE, dcp::Colour(), dcp::Time(), dcp::Time(), 0
+               "Hello dolly", dcp::Effect::NONE, dcp::Colour(), dcp::Time(), dcp::Time(), 0, std::vector<dcp::Ruby>()
                );
        subs.push_back(StringText(ss, 0, make_shared<dcpomatic::Font>("foo"), dcp::SubtitleStandard::SMPTE_2014));
        render_text (subs, dcp::Size(640, 480), DCPTime(), 24);
index 5672230da44a17b1b1aea81ca729715b8f16a565..e3034def01f209d7bab87914163bbe653d20eed4 100644 (file)
@@ -64,7 +64,8 @@ add(std::vector<StringText>& s, std::string text, bool italic, bool bold, bool u
                                dcp::Colour (0, 0, 0),
                                dcp::Time (),
                                dcp::Time (),
-                               0
+                               0,
+                               std::vector<dcp::Ruby>()
                                ),
                        2,
                        std::shared_ptr<dcpomatic::Font>(),
@@ -135,7 +136,8 @@ BOOST_AUTO_TEST_CASE(render_text_with_newline_test)
                        "Hello                     world",
                        dcp::Effect::NONE, dcp::Colour(0, 0, 0),
                        {}, {},
-                       0
+                       0,
+                       std::vector<dcp::Ruby>()
                },
                {
                        {}, true, false, false, dcp::Colour(255, 255, 255), 42, 1.0,
@@ -147,7 +149,8 @@ BOOST_AUTO_TEST_CASE(render_text_with_newline_test)
                        "\n",
                        dcp::Effect::NONE, dcp::Colour(0, 0, 0),
                        {}, {},
-                       0
+                       0,
+                       std::vector<dcp::Ruby>()
                }
        };