examine_font_nodes (xml, (*j)->font_nodes, parse_state);
parse_state.subtitle_nodes.pop_back ();
}
-
+
examine_font_nodes (xml, (*i)->font_nodes, parse_state);
examine_text_nodes (xml, (*i)->text_nodes, parse_state);
-
+
parse_state.font_nodes.pop_back ();
}
}
if (empty_or_white_space (text)) {
return;
}
-
+
if (parse_state.text_nodes.empty() || parse_state.subtitle_nodes.empty ()) {
return;
}
DCP_ASSERT (!parse_state.text_nodes.empty ());
DCP_ASSERT (!parse_state.subtitle_nodes.empty ());
-
+
dcp::FontNode effective_font (parse_state.font_nodes);
dcp::TextNode effective_text (*parse_state.text_nodes.back ());
dcp::SubtitleNode effective_subtitle (*parse_state.subtitle_nodes.back ());
if (!Asset::equals (other_asset, options, note)) {
return false;
}
-
+
shared_ptr<const SubtitleAsset> other = dynamic_pointer_cast<const SubtitleAsset> (other_asset);
if (!other) {
return false;
if (i->h_position() > ALIGN_EPSILON) {
text->set_attribute ("HPosition", raw_convert<string> (i->h_position() * 100, 6));
}
- text->set_attribute ("VAlign", valign_to_string (i->v_align()));
+ text->set_attribute ("VAlign", valign_to_string (i->v_align()));
text->set_attribute ("VPosition", raw_convert<string> (i->v_position() * 100, 6));
text->add_child_text (i->text());
}
shared_array<uint8_t> data (new uint8_t[size]);
size_t const read = fread (data.get(), 1, size, f);
fclose (f);
-
+
if (read != size) {
throw FileError ("could not read font file", file, -1);
}