More on ebu stl font...

This commit is contained in:
niksedk 2023-02-22 19:37:08 +01:00
parent b2411e84d6
commit 9c01aeab20

View File

@ -631,12 +631,24 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
}
else if (newStart.StartsWith("</font>", StringComparison.OrdinalIgnoreCase))
{
if (displayStandardCode != "0")
{
sb.Append(encoding.GetString(new byte[] { 0x07 })); // white
}
i += "</font>".Length;
if (displayStandardCode != "0" && line.Length > i + 1)
{
var part = line.Substring(i);
if (part.StartsWith(" <font "))
{
i++;
}
else if (part.StartsWith("<font "))
{
// do nothing
}
else
{
sb.Append(encoding.GetString(new byte[] { 0x07 })); // white
}
}
}
else
{