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 1 commit
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
73 changes: 73 additions & 0 deletions imsc1_1/ttml/color/color001.ttml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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:ebutts="urn:ebu:tt:style"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>

<styling>


<style xml:id="r1"
tts:color="white"
tts:lineHeight="125%"
tts:textAlign="center"
tts:displayAlign="after"
ebutts:linePadding="0.25c"
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" style="p1"><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" style="p1">
<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" style="p1">
<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>
54 changes: 54 additions & 0 deletions imsc1_1/ttml/color/color002.ttml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?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:ebutts="urn:ebu:tt:style"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>

<styling>


<style xml:id="r1"
tts:color="white"
tts:lineHeight="125%"
tts:textAlign="center"
tts:displayAlign="after"
ebutts:linePadding="0.25c"/>

<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" style="p1">
<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>
</p>
</div>
</body>

</tt>
48 changes: 48 additions & 0 deletions imsc1_1/ttml/color/color003.ttml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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:ebutts="urn:ebu:tt:style"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>

<styling>


<style xml:id="r1"
tts:color="white"
tts:lineHeight="125%"
tts:textAlign="center"
tts:displayAlign="after"
ebutts:linePadding="0.25c"/>

<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" style="p1"><span style="s1">Ghost box 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>
49 changes: 49 additions & 0 deletions imsc1_1/ttml/color/color004.ttml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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:ebutts="urn:ebu:tt:style"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>

<styling>


<style xml:id="r1"
tts:color="white"
tts:lineHeight="125%"
tts:textAlign="center"
tts:displayAlign="after"
ebutts:linePadding="0.25c"/>

<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" style="p1"><span style="s1">Span box change to </span><span style="s2">red</span></p>
<p begin="0s" end="1s" style="p1 s1"><span>P box change to </span><span style="s2">red</span></p>
</div>
</body>

</tt>