Skip inline comments when gathering things to collect fonts for

Originally committed to SVN as r6435.
This commit is contained in:
Thomas Goyne 2012-02-02 19:31:27 +00:00
parent 6652ef40e9
commit da61e75f75
1 changed files with 9 additions and 7 deletions

View File

@ -78,13 +78,15 @@ void FontCollector::ProcessDialogueLine(AssDialogue *line, int index) {
}
else if (AssDialogueBlockPlain *txt = dynamic_cast<AssDialogueBlockPlain *>(line->Blocks[i])) {
wxString text = txt->GetText();
if (text.size()) {
if (overriden)
used_styles[style].lines.insert(index);
std::set<wxUniChar>& chars = used_styles[style].chars;
for (size_t i = 0; i < text.size(); ++i)
chars.insert(text[i]);
}
if (text.empty() || (text.size() >= 2 && text.StartsWith("{") && text.EndsWith("}")))
continue;
if (overriden)
used_styles[style].lines.insert(index);
std::set<wxUniChar>& chars = used_styles[style].chars;
for (size_t i = 0; i < text.size(); ++i)
chars.insert(text[i]);
}
// Do nothing with drawing blocks
}