Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rubyReserve rendering issue between 1 and 2-line events #180

Closed
jbaden opened this issue May 27, 2020 · 5 comments · Fixed by #181
Closed

rubyReserve rendering issue between 1 and 2-line events #180

jbaden opened this issue May 27, 2020 · 5 comments · Fixed by #181

Comments

@jbaden
Copy link

jbaden commented May 27, 2020

Hello,

I've noticed an issue in imsc1 renderer where the baseline shifts between 1 and 2-line events when tts:rubyReserve is employed. In my example below, (excerpted from the attached XML), I have used annotation-position: "outside".

		<layout>
			<!-- General Horiztonal Positioning with ebutts:multiRowAlign -->
			<region ebutts:multiRowAlign="start" tts:displayAlign="after" tts:extent="80.000% 80.000%" tts:origin="10.000% 10.000%" tts:rubyReserve="outside" tts:textAlign="center" xml:id="bottom-left-justified"/>
			
            <!-- Descriptive Region -->
			<region tts:displayAlign="before" tts:extent="80.000% 80.000%" tts:origin="10.000% 10.000%" tts:textAlign="center" xml:id="top-center-justified"/>
		</layout>
	</head>
	<body>
		<div>
		    <p begin="100000000t" dur="40000000t" region="top-center-justified">RubyReserve Test</p>
		    <!-- 2-line event with rubyReserve invoked-->
			<p begin="100000000t" dur="20000000t" region="bottom-left-justified">Humpty Dumpty sat on a wall<br/>Humpty Dumpty had a great fall</p>
		    <!-- 1-line event with rubyReserve invoked-->
		    <p begin="120000000t" dur="20000000t" region="bottom-left-justified">All the king's horses...</p>	

rbyReserveTEST.zip

The rendering appears fine between 2-line events, as illustrated in these tests. It seems this issue is introduced between 1 and 2-line events:

Event1
Event2

Note the jump between 1 and 2-line events when rubyReserve:outside is being employed, which, per the specification, shouldn't occur:

"If the position component is outside, then, if the current block area contains exactly one line area, the both position applies, otherwise the semantics of the before position applies to the first line area of the current block area and the semantics of the after position apply to all other line areas of the current block area."

correct_rendering

Thanks!

@palemieux
Copy link
Contributor

It looks like a bug at

if (context.rubyReserve[0] === "both") {
, which should also include the case context.rubyReserve[0] === "outside" && lineList.length == 1.

@palemieux
Copy link
Contributor

@jbaden See PR at #181. Looking forward to your review. I also encourage you to submit test content at https://github.com/w3c/imsc-tests .

@jbaden
Copy link
Author

jbaden commented Jun 2, 2020

Hi @palemieux,

Thanks for taking a look!

However, from what I can see, there is still relative movement along the y-axis between the baseline of the 1 and 2-line events.

Also, per your suggestion, I added this test file in imsc1_1/ttml/rubyReserve/rubyReserve004.ttml (commit)

@palemieux
Copy link
Contributor

@jbaden Which browser/OS are you using? I do not see a jump at http://sandflow.com/imsc1_1/index.html using Windows 10/Chrome.
Annotation 2020-06-01 180058
Annotation 2020-06-01 180058-2

@jbaden
Copy link
Author

jbaden commented Jun 2, 2020

My apologies, @palemieux. I was looking at http://sandflow.com/imsc1_1/ as opposed to http://sandflow.com/imsc1_1/index.html (not realizing the /index appendage was actually linking elsewhere). I didn't realize the PR was referencing a different site.

I took another look at the file and the issue definitely appears to be fixed now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants