summaryrefslogtreecommitdiff
path: root/src/font_node.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-29 19:33:09 +0000
committerCarl Hetherington <cth@carlh.net>2015-10-29 19:33:09 +0000
commit914bd98baa57c6f2c117e33b21a9ee3d25d0fdc2 (patch)
tree1a1c540c723566d5c009c4df210195e32e1d833f /src/font_node.cc
parent6dc0cdbd5be3f8f60bd50523501a0bd85666ebda (diff)
Pick up SMPTE subtitle font IDs correctly.
Diffstat (limited to 'src/font_node.cc')
-rw-r--r--src/font_node.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/font_node.cc b/src/font_node.cc
index 5461d6ae..5d857bc1 100644
--- a/src/font_node.cc
+++ b/src/font_node.cc
@@ -31,11 +31,11 @@ using boost::shared_ptr;
using boost::optional;
using namespace dcp;
-FontNode::FontNode (cxml::ConstNodePtr node, int tcr)
+FontNode::FontNode (cxml::ConstNodePtr node, int tcr, string font_id_attribute)
{
text = node->content ();
- id = node->optional_string_attribute ("Id");
+ id = node->optional_string_attribute (font_id_attribute);
size = node->optional_number_attribute<int64_t> ("Size").get_value_or (0);
aspect_adjust = node->optional_number_attribute<float> ("AspectAdjust");
italic = node->optional_bool_attribute ("Italic");
@@ -54,17 +54,17 @@ FontNode::FontNode (cxml::ConstNodePtr node, int tcr)
list<cxml::NodePtr> s = node->node_children ("Subtitle");
BOOST_FOREACH (cxml::NodePtr& i, s) {
- subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, tcr)));
+ subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, tcr, font_id_attribute)));
}
list<cxml::NodePtr> f = node->node_children ("Font");
BOOST_FOREACH (cxml::NodePtr& i, f) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr)));
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr, font_id_attribute)));
}
list<cxml::NodePtr> t = node->node_children ("Text");
BOOST_FOREACH (cxml::NodePtr& i, t) {
- text_nodes.push_back (shared_ptr<TextNode> (new TextNode (i, tcr)));
+ text_nodes.push_back (shared_ptr<TextNode> (new TextNode (i, tcr, font_id_attribute)));
}
}