Basic pass-through of font information when using DCP subtitles.
[dcpomatic.git] / src / lib / font.cc
index bf7a79a3dfcd91aca9e167bf70463d8589d3cdc0..ecf7aabf0146ae6c707ebf4218db19427d0d6a53 100644 (file)
 
 Font::Font (cxml::NodePtr node)
 {
-       id = node->optional_string_child ("Id");
+       id = node->string_child ("Id");
        file = node->optional_string_child ("File");
 }
 
 void
 Font::as_xml (xmlpp::Node* node)
 {
-       if (id) {
-               node->add_child("Id")->add_child_text (id.get ());
-       }
-
+       node->add_child("Id")->add_child_text (id);
        if (file) {
                node->add_child("File")->add_child_text (file.get().string ());
        }