Closed EmilJunker closed 3 years ago
Thanks for reporting this issue. It is a good find. The html processing is done by Qt label's rich text functionality, and it makes sense that once the text is identified as html, it ignores line breaks. So I agree with your suggestion about adding
for line breaks in subtitle files mixing html and line breaks.
@carsonip, err… is this already done?
It is now fixed. Please wait for the next release.
In principle, the Penguin Subtitle Player seems to support HTML formatted text, e.g. subtiles with
<i>
and</i>
tags are rendered italic:However, I have found that if there are two lines of text and only the second line contains HTML tags, then the tags are ignored and show up literally:
If the first line of text also contains HTML tags, then the formatting works, but the line break itself gets ignored:
The cause of these issues appears to be the line break. If a
<br>
tag is used instead of a real line break, then it works fine:In fact, even if the
<br>
tag is then followed by a real line break, it still works:By the way, I took these screenshots on Windows 10 version 2004. I haven't tested this on other operating systems.
My suggestion to fix these issues would be as follows: While parsing the .srt file, whenever you encounter a line break (inside a subtitle text block) that isn't already preceded by a
<br>
tag, simply insert a<br>
tag right before it. What do you think? Would that be possible?