X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftext_content.cc;h=901d38647c05bdd20504c8ce6e69e893c56fd1ad;hb=0877bf6d06de8e6f768534ec40c26bf629618a20;hp=9869974c5bf7a7a61452b5402f90ec799d0c0a98;hpb=5aa057f73c9b5d0f2a4a1479bd75dee849250265;p=dcpomatic.git diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc index 9869974c5..901d38647 100644 --- a/src/lib/text_content.cc +++ b/src/lib/text_content.cc @@ -39,6 +39,7 @@ using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::optional; using dcp::raw_convert; +using namespace dcpomatic; int const TextContentProperty::X_OFFSET = 500; int const TextContentProperty::Y_OFFSET = 501; @@ -67,7 +68,7 @@ TextContent::TextContent (Content* parent, TextType type, TextType original_type , _x_scale (1) , _y_scale (1) , _line_spacing (1) - , _outline_width (2) + , _outline_width (4) , _type (type) , _original_type (original_type) { @@ -121,7 +122,7 @@ TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version) , _x_scale (1) , _y_scale (1) , _line_spacing (node->optional_number_child("LineSpacing").get_value_or (1)) - , _outline_width (node->optional_number_child("OutlineWidth").get_value_or (2)) + , _outline_width (node->optional_number_child("OutlineWidth").get_value_or (4)) , _type (TEXT_OPEN_SUBTITLE) , _original_type (TEXT_OPEN_SUBTITLE) { @@ -399,15 +400,14 @@ TextContent::identifier () const + "_" + raw_convert (outline_width()) + "_" + raw_convert (colour().get_value_or(dcp::Colour(255, 255, 255)).to_argb_string()) + "_" + raw_convert (dcp::effect_to_string(effect().get_value_or(dcp::NONE))) - + "_" + raw_convert (effect_colour().get_value_or(dcp::Colour(0, 0, 0)).to_argb_string()); + + "_" + raw_convert (effect_colour().get_value_or(dcp::Colour(0, 0, 0)).to_argb_string()) + + "_" + raw_convert (_parent->video_frame_rate().get_value_or(0)); /* XXX: I suppose really _fonts shouldn't be in here, since not all types of subtitle content involve fonts. */ BOOST_FOREACH (shared_ptr f, _fonts) { - for (int i = 0; i < FontFiles::VARIANTS; ++i) { - s += "_" + f->file(static_cast(i)).get_value_or("Default").string(); - } + s += "_" + f->file().get_value_or("Default").string(); } /* The DCP track and language are for metadata only, and don't affect