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

rubyPosition and textEmphasis properties are ignored #172

Closed
MihailDraghici opened this issue Jan 10, 2020 · 3 comments · Fixed by #173
Closed

rubyPosition and textEmphasis properties are ignored #172

MihailDraghici opened this issue Jan 10, 2020 · 3 comments · Fixed by #173

Comments

@MihailDraghici
Copy link

Tested XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tt xml:lang="en" xmlns="http://www.w3.org/ns/ttml" ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" ttp:timeBase="media" ttp:frameRate="24" ttp:frameRateMultiplier="1000 1001" ttp:tickRate="1000" xmlns:ebutts="urn:ebu:tt:style" xmlns:itts="http://www.w3.org/ns/ttml/profile/imsc1#styling" xmlns:ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter" xmlns:ittm="http://www.w3.org/ns/ttml/profile/imsc1#metadata" ttp:displayAspectRatio="16 9">
	<head>
	</head>
	<body>
		<div>
			<!--Test1: Ruby position-->
			<p begin="0f" end="100f" style="default">test1<span tts:ruby="container" tts:rubyPosition="before" tts:rubyAlign="spaceAround"><span tts:ruby="base">base1</span><span tts:ruby="text">text1.1</span></span>text1.2</p>
			<p begin="0f" end="100f" style="default">test2<span tts:ruby="container" tts:rubyPosition="after" tts:rubyAlign="spaceAround"><span tts:ruby="base">base2</span><span tts:ruby="text">text2.1</span></span>text2.2</p>

			<!--Test2: Above and below glyphs-->
			<p begin="100f" end="200f" style="default"><span xml:lang="en"><span tts:textEmphasis="filled dot before">test3</span></span></p>
			<p begin="100f" end="200f" style="default"><span xml:lang="en"><span tts:textEmphasis="filled dot after">test4</span></span></p>
		</div>
	</body>
</tt>

Test 1 (frame 0)

  • Safari / Chrome
    • Both ruby texts are displayed before the base (the rubyPosition field is ignored.)

Screen Shot 2020-01-10 at 5 47 57 PM

  • Expected:
    • The first ruby text should be displayed before the base
    • The second ruby text be displayed after the base
  • If we manually set -webkit-ruby-position: after; for the second text:

FAIL_rubyPosition

Test2 (frame 100)

  • Chrome
    - The textEmphasis field is ignored

Chrome_FAIL_textEmphasis

  • Safari
    • The textEmphasis field is not ignored. If we inspect this element we can find the following fields:
      • For test3: webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: over left;
      • For test4: webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: under left;

Safari_OK_textEmphasis

@palemieux
Copy link
Contributor

palemieux commented Jan 10, 2020

Chrome does not support the rubyPosition and textEmphasis native CSS properties AFAIK.

It looks like Safari supports them using private extensions, which imscJS could support (@MihailDraghici, would that help?)

Both native CSS properties are supported by Firefox.

@MihailDraghici
Copy link
Author

You are right, it looks like Firefox supports both text-emphasis and ruby-position.
On Chrome / Safari both of them are displayed correctly if I manually set the fields using "webkit" prefix:
-webkit-text-emphasis for text-emphasis
-webkit-ruby-position for ruby-position
Could imscJS support them in Chrome / Safari using private extensions? ("-webkit-" prefix)

@palemieux
Copy link
Contributor

@MihailDraghici Please review #173

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