Skip to content

Commit

Permalink
afs,core: not check empty dialogue lines’ styles
Browse files Browse the repository at this point in the history
  • Loading branch information
MIRIMIRIM committed Aug 5, 2024
1 parent 5160aea commit 0402bd2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions AssFontSubset.Core/src/AssFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ public static Dictionary<AssFontInfo, List<Rune>> GetAssFonts(string file, out A
var undefinedStyles = new HashSet<string>();
foreach (var und in undefinedStylesTemp)
{
var usedUndStylesEvents = ass.Events.Collection.Where(e => e.Style == und);
var notUsed = true;
foreach (var evt in usedUndStylesEvents)
{
if (evt.Text.Count == 0) continue;
foreach (var blk in evt.Text)
{
if (!AssTagParse.IsOverrideBlock(blk))
{
notUsed = false;
}
}
}
if (notUsed) continue;

if (ass.Styles.Names.Contains(und.TrimStart('*')))
{
// vsfilter ingore starting asterisk
Expand Down

0 comments on commit 0402bd2

Please sign in to comment.