libjass icon indicating copy to clipboard operation
libjass copied to clipboard

Line-specific styles do not override style definitions

Open DoomTay opened this issue 7 years ago • 2 comments
trafficstars

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

DoomTay avatar Jun 23 '18 21:06 DoomTay

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.

Arnavion avatar Jun 23 '18 21:06 Arnavion

or use the \pos() override

Yay295 avatar Jun 23 '18 23:06 Yay295