Arnavion / libjass

Renders ASS subs in the browser.
Apache License 2.0
174 stars 29 forks source link

\n being rendered in plain text, wrapping style 2 #103

Closed nickfujita closed 6 years ago

nickfujita commented 6 years ago

It appears that even when in wrapping style 2 (No word wrapping, wide lines will extend beyound the edges of the screen. Both \n and \N force line breaks.), soft line breaks (\n) are being rendered as plain text rather than as a style.

Sample file:

[Script Info]
ScriptType: v4.00+
Collisions: Normal
WrapStyle: 2
PlayResX: 640
PlayResY: 360

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, Strikeout, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: one,Ariel,18,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,0,0,2,0278,0226,0130,1

[Events]
Format: Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text
Dialogue: 0,0:00:00.00,0:00:03.00,one,First,0000,0000,0000,,Hello\n
Dialogue: 0,0:00:03.01,0:00:10.00,one,Second,0000,0000,0000,,Good Bye\N

Expected: image

Actual: image

Arnavion commented 6 years ago

Yes. #91 was opened with the fix but the author closed it for some reason. Feel free to open a new PR with that fix (plus what I said in the comment).

nickfujita commented 6 years ago

@Arnavion PR ready for review: https://github.com/Arnavion/libjass/pull/104