Arnavion / libjass

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

Line-specific styles do not override style definitions #110

Open DoomTay opened 6 years ago

DoomTay commented 6 years ago

With a file like this

[Script Info]
; Script generated by Aegisub 3.2.2
; http://www.aegisub.org/
Title: English
ScriptType: v4.00+
WrapStyle: 2
PlayResX: 640
PlayResY: 360
Language: English (US)

[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: Default,Trebuchet MS,24,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,1,2,0,1,20,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:04.98,Default,Paul,200,0,0,,Just a little to the right...

Aegisub renders the line as 200px to the right, but libjass renders it in the middle

Now if the style's MarginL was, say, 250, then the line is offset by 500px

Arnavion commented 6 years ago

Yes, the only properties parsed for Events are Style, Start, End, Layer and Text. So MarginL, MarginR and MarginV (and other style properties in general) are ignored.

The only workaround is that you have to make a separate style for each Dialogue that needs style overrides.

Yay295 commented 6 years ago

or use the \pos() override