- text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_text(), log, first)));
+ text.push_back (make_shared<TextDecoder>(this, content->only_text(), first));
+
+ auto fm = c->font_data();
+ for (auto const& i: fm) {
+ _fonts.push_back (FontData(i.first, i.second));
+ }
+
+ /* Add a default font for any LoadFont nodes in our file which we haven't yet found fonts for */
+ for (auto i: c->load_font_nodes()) {
+ if (fm.find(i->id) == fm.end()) {
+ _fonts.push_back (FontData(i->id, dcp::ArrayData(default_font_file())));
+ }
+ }