diff --git a/src/font_file_lister.cpp b/src/font_file_lister.cpp index 813e2ca96..a98c58264 100644 --- a/src/font_file_lister.cpp +++ b/src/font_file_lister.cpp @@ -139,6 +139,8 @@ void FontCollector::ProcessDialogueLine(const AssDialogue *line, int index) { break; } case AssBlockType::DRAWING: + used_styles[style].drawing = true; + break; case AssBlockType::COMMENT: break; } @@ -146,7 +148,11 @@ void FontCollector::ProcessDialogueLine(const AssDialogue *line, int index) { } void FontCollector::ProcessChunk(std::pair const& style) { - if (style.second.chars.empty()) return; + if (style.second.chars.empty() && !style.second.drawing) return; + + if (style.second.chars.empty() && style.second.drawing) { + status_callback(fmt_tl("Font '%s' is used in a drawing, but not in any text.\n", style.first.facename), 3); + } auto res = lister.GetFontPaths(style.first.facename, style.first.bold, style.first.italic, style.second.chars); diff --git a/src/font_file_lister.h b/src/font_file_lister.h index 9c7cd51ad..82f02cca9 100644 --- a/src/font_file_lister.h +++ b/src/font_file_lister.h @@ -127,6 +127,7 @@ class FontCollector { /// Data about where each style is used struct UsageData { std::vector chars; ///< Characters used in this style which glyphs will be needed for + bool drawing = false; ///< Whether this style is used for a drawing std::vector lines; ///< Lines on which this style is used via overrides std::vector styles; ///< ASS styles which use this style };