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,13 +78,15 @@ 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 (overriden) if (text.empty() || (text.size() >= 2 && text.StartsWith("{") && text.EndsWith("}")))
used_styles[style].lines.insert(index); continue;
std::set<wxUniChar>& chars = used_styles[style].chars;
for (size_t i = 0; i < text.size(); ++i) if (overriden)
chars.insert(text[i]); 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 // Do nothing with drawing blocks
} }