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

View file

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