X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fload_font.cc;h=b46569c8ea5701593b336e0ccb3e210cf14f85ff;hb=595d4fbfee788edfad7f9f8dfe7e76ee634c1a94;hp=707f4a0b54b07357dc54bab234334d63c54e0d4c;hpb=ac265d3d008328b9bdaf00c39ebcd86f263605c7;p=libdcp.git diff --git a/src/load_font.cc b/src/load_font.cc index 707f4a0b..b46569c8 100644 --- a/src/load_font.cc +++ b/src/load_font.cc @@ -20,11 +20,18 @@ #include "load_font.h" #include +using std::string; using boost::shared_ptr; +using boost::optional; using namespace dcp; LoadFont::LoadFont (boost::shared_ptr node) { - id = node->string_attribute ("Id"); - uri = node->string_attribute ("URI"); + optional x = node->optional_string_attribute ("Id"); + if (!x) { + x = node->optional_string_attribute ("ID"); + } + id = x.get_value_or (""); + + uri = node->optional_string_attribute ("URI"); }