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

Add background and foreground color on span tests #105

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions imsc1/ttml/backgroundColor/BackgroundColor011.ttml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<tt xml:lang="en"
xmlns:tt="http://www.w3.org/ns/ttml"
xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
xmlns="http://www.w3.org/ns/ttml"
xmlns:tts="http://www.w3.org/ns/ttml#styling"
xmlns:ttm="http://www.w3.org/ns/ttml#metadata"
xmlns:ebutts="urn:ebu:tt:style"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>
<metadata>
<ttm:title>Styling Test - BackgroundColor - 011</ttm:title>
<ttm:desc>Test tts:backgroundColor using different XML spacing.</ttm:desc>
<ttm:copyright>Copyright (C) 2022 W3C (MIT, ERCIM, Keio).</ttm:copyright>
</metadata>

<styling>
<style xml:id="r1"
tts:color="white"
tts:lineHeight="125%"
tts:textAlign="center"
tts:displayAlign="after"/>
<style xml:id="s1"
tts:backgroundColor="#00000080"
/>
<style xml:id="s2"
tts:backgroundColor="#80000080"
/>
</styling>
<layout>
<region
xml:id="r"
style="r1"
tts:extent="80% 80%"
tts:origin="10% 10%" />
</layout>
</head>

<body region="r">
<div>
<p begin="0s" end="1s">
<span style="s1">Ghost box change to </span>
<span style="s2">red</span>
<br/>
<span style="s1">Gap Expected change to</span>
<span style="s2"> red</span>
<br/>
<span style="s1">No Gap change to</span><span style="s2"> red</span>
</p>
</div>
</body>

</tt>
71 changes: 71 additions & 0 deletions imsc1/ttml/color/Color010.ttml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<tt xml:lang="en"
xmlns:tt="http://www.w3.org/ns/ttml"
xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
xmlns="http://www.w3.org/ns/ttml"
xmlns:tts="http://www.w3.org/ns/ttml#styling"
xmlns:ttm="http://www.w3.org/ns/ttml#metadata"
xmlns:ebutts="urn:ebu:tt:style"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>
<metadata>
<ttm:title>Styling Test - Color - 010</ttm:title>
<ttm:desc>Test tts:color using different XML spacing.</ttm:desc>
<ttm:copyright>Copyright (C) 2022 W3C (MIT, ERCIM, Keio).</ttm:copyright>
</metadata>

<styling>
<style xml:id="r1"
tts:color="white"
tts:lineHeight="125%"
tts:textAlign="center"
tts:displayAlign="after"
tts:textOutline="#000000 0.05em" />
<style xml:id="s1"
tts:backgroundColor="#00000080"
/>
<style xml:id="s2"
tts:backgroundColor="#80000080"
/>
<style xml:id="s_fg_black" tts:color="#000000"/>
<style xml:id="s_fg_red" tts:color="#FF0000"/>
<style xml:id="s_fg_yellow" tts:color="#FFFF00"/>
<style xml:id="s_fg_green" tts:color="#00FF00"/>
<style xml:id="s_fg_cyan" tts:color="#00FFFF"/>
<style xml:id="s_fg_blue" tts:color="#0000FF"/>
<style xml:id="s_fg_magenta" tts:color="#FF00FF"/>
</styling>

<layout>
<region
xml:id="r"
style="r1"
tts:extent="80% 80%"
tts:origin="10% 10%" />
</layout>

</head>

<body region="r">
<div>
<p begin="0s" end="1s"><span style="s_fg_red s1">red</span><span style="s_fg_yellow s1"> yellow </span><span style="s_fg_green s1">green</span><span style="s_fg_cyan s1"> cyan </span><span style="s_fg_blue s1">blue </span><span style="s_fg_magenta s1">magenta</span></p>
<p begin="0s" end="1s">
<span style="s_fg_red s1">red</span>
<span style="s_fg_yellow s1"> yellow </span>
<span style="s_fg_green s1">green</span>
<span style="s_fg_cyan s1"> cyan </span>
<span style="s_fg_blue s1">blue </span>
<span style="s_fg_magenta s1">magenta</span>
</p>
<p begin="0s" end="1s">
<span style="s_fg_red s1">red</span>
<span style="s_fg_yellow s1">yellow</span>
<span style="s_fg_green s1">green</span>
<span style="s_fg_cyan s1">cyan</span>
<span style="s_fg_blue s1">blue</span>
<span style="s_fg_magenta s1">magenta</span>
</p>
</div>
</body>

</tt>