Arnavion / libjass

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

Line height is incorrect in rotated text. Also \p1 is not renderred. #75

Closed pushrbx closed 8 years ago

pushrbx commented 8 years ago

The ass code on Layer 1: {\an4\frz270\c&HF8F3F4&\3c&H585453&\alpha&H44&\bord1\blur0.333\fs21\b1\fscx90\fscy100\pos(701,130)}Satou felfedte a tervezett\Nbűntetteit az interneten, Ass code on Layer 0: {\p1\c&HDBD8D8&\1a&H6B&\fscx102\fscy100\blur0.333\frz89.85\pos(700,221)}m 0 0 l 195 0 l 195 60 l 0 60 l 0 0, Both of them are at the same frame number. (Start = 0:00:36.05 in the attached ass file.)

It looks like this: Image1

And it should look like this: Image2

I've shot the second image while using ass.js.org (Github)

I know that \an4 is a known issue, but the rectangle should be there somehow.

I'm using: Firefox 46, Windows 10 Video: Ajin - 09.mp4 Ass: Link

Arnavion commented 8 years ago

(\an4 is not supposed to be broken for for absolutely-positioned subs. Since your lines have \pos they're supposed to work.)

Arnavion commented 8 years ago

The bug for the two text lines is that the transform-origin on the two lines is set to 50% 50%. It should be set to 0% 50%

BTW the SVG drawing renders fine for me on the test page.

image

pushrbx commented 8 years ago

I've tested it again. Around that area in time where this transformed text takes place it stops displaying any other dialogues, also it doesn't show the background. I think it's because of the layers. Same video, same ass file. I was using the demo site.

Arnavion commented 8 years ago

Yes, something broken with FF. Chrome is fine.

svg.viewBox.baseVal.x = bboxMinX;

>TypeError: svg.viewBox.baseVal is null

https://bugzilla.mozilla.org/show_bug.cgi?id=785606

https://bugzilla.mozilla.org/show_bug.cgi?id=888307

Arnavion commented 8 years ago

Will fix in #77