diff options
Diffstat (limited to 'src/font_node.cc')
| -rw-r--r-- | src/font_node.cc | 10 |
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))); } } |
