[ttml2] add tts:textEmphasis style property (issue 356)
authorGlenn Adams <glenn@skynav.com>
Mon, 05 Jan 2015 21:21:37 -0700
changeset 811 06a4b95e14c2
parent 810 941b61b5bd8e
child 812 b1142b8d59b2
[ttml2] add tts:textEmphasis style property (issue 356)
ttml2/spec/rnc/ttml2-datatypes.rnc
ttml2/spec/rnc/ttml2-styling-attribs.rnc
ttml2/spec/ttml2-changes.html
ttml2/spec/ttml2.xml
ttml2/spec/xsd/ttml2-datatypes.xsd
ttml2/spec/xsd/ttml2-styling-attribs.xsd
--- a/ttml2/spec/rnc/ttml2-datatypes.rnc	Mon Jan 05 16:41:43 2015 -0700
+++ b/ttml2/spec/rnc/ttml2-datatypes.rnc	Mon Jan 05 21:21:37 2015 -0700
@@ -387,6 +387,9 @@
   "overline underline lineThrough" |
   "overline lineThrough underline"
 
+TTAF.TextEmphasis.datatype =
+  string
+
 TTAF.TextOrientation.datatype =
   "mixed" |
   "sideways" |
--- a/ttml2/spec/rnc/ttml2-styling-attribs.rnc	Mon Jan 05 16:41:43 2015 -0700
+++ b/ttml2/spec/rnc/ttml2-styling-attribs.rnc	Mon Jan 05 21:21:37 2015 -0700
@@ -70,6 +70,8 @@
   = attribute tts:textAlign { TTAF.TextAlign.datatype }?
 TTAF.textDecoration.attrib
   = attribute tts:textDecoration { TTAF.TextDecoration.datatype }?
+TTAF.textEmphasis.attrib
+  = attribute tts:textEmphasis { TTAF.TextEmphasis.datatype }?
 TTAF.textOrientation.attrib
   = attribute tts:textOrientation { TTAF.TextOrientation.datatype }?
 TTAF.textOutline.attrib
@@ -125,6 +127,7 @@
   TTAF.showBackground.attrib,
   TTAF.textAlign.attrib,
   TTAF.textDecoration.attrib,
+  TTAF.textEmphasis.attrib,
   TTAF.textOrientation.attrib,
   TTAF.textOutline.attrib,
   TTAF.unicodeBidi.attrib,
--- a/ttml2/spec/ttml2-changes.html	Mon Jan 05 16:41:43 2015 -0700
+++ b/ttml2/spec/ttml2-changes.html	Mon Jan 05 21:21:37 2015 -0700
@@ -88,6 +88,7 @@
   'tts:backgroundPosition',
   'tts:backgroundRepeat',
   'tts:border',
+  'tts:fontKerning,
   'tts:fontSelectionStrategy',
   'tts:fontVariantPosition',
   'tts:height,
@@ -97,6 +98,7 @@
   'tts:rubyAlign',
   'tts:rubyOffset',
   'tts:rubyPosition',
+  'tts:textEmphasis,
   'tts:textOrientation', and
   'tts:width'
   to Table 5-5.
@@ -232,6 +234,8 @@
 
 * In 10.2, add 'tts:border' styling attribute.
 
+* In 10.2, add 'tts:fontKerning styling attribute.
+
 * In 10.2, add 'tts:fontSelectionStrategy styling attribute.
 
 * In 10.2, add 'tts:fontVariantPosition' attribute.
@@ -250,6 +254,8 @@
 
 * In 10.2, add 'tts:rubyPosition styling attribute.
 
+* In 10.2, add 'tts:textEmphasis styling attribute.
+
 * In 10.2, add 'tts:textOrientation' styling attribute.
 
 * In 10.2, add 'tts:width styling attribute.
--- a/ttml2/spec/ttml2.xml	Mon Jan 05 16:41:43 2015 -0700
+++ b/ttml2/spec/ttml2.xml	Mon Jan 05 21:21:37 2015 -0700
@@ -3009,6 +3009,7 @@
 <loc href="#style-attribute-showBackground">tts:showBackground</loc>,
 <loc href="#style-attribute-textAlign">tts:textAlign</loc>,
 <loc href="#style-attribute-textDecoration">tts:textDecoration</loc>,
+<loc href="#style-attribute-textEmphasis">tts:textEmphasis</loc>,
 <loc href="#style-attribute-textOrientation">tts:textOrientation</loc>,
 <loc href="#style-attribute-textOutline">tts:textOutline</loc>,
 <loc href="#style-attribute-unicodeBidi">tts:unicodeBidi</loc>,
@@ -7229,6 +7230,7 @@
 <item><p><specref ref="style-attribute-showBackground"/></p></item>
 <item><p><specref ref="style-attribute-textAlign"/></p></item>
 <item><p><specref ref="style-attribute-textDecoration"/></p></item>
+<item><p><specref ref="style-attribute-textEmphasis"/></p></item>
 <item><p><specref ref="style-attribute-textOrientation"/></p></item>
 <item><p><specref ref="style-attribute-textOutline"/></p></item>
 <item><p><specref ref="style-attribute-unicodeBidi"/></p></item>
@@ -7690,7 +7692,6 @@
 that defined by <bibref ref="xsl11"/>, &sect; 7.8.4.</p>
 </note>
 </div3>
-
 <div3 id="style-attribute-border">
 <head>tts:border</head>
 <p>The <att>tts:border</att> attribute is used to specify a style property that
@@ -10668,6 +10669,73 @@
 &sect; 7.17.4.</p>
 </note>
 </div3>
+<div3 id="style-attribute-textEmphasis">
+<head>tts:textEmphasis</head>
+<p>The <att>tts:textEmphasis</att> attribute is used to specify a style property that
+determines whether and how text emphasis marks are presented on affected content.</p>
+<p>This attribute may be specified by any
+element type
+that permits use of attributes in the TT Style Namespace; however, this attribute applies
+as a style property only to those element types indicated in the following table.</p>
+<table id="style-property-details-textEmphasis" role="common">
+<col width="25%"/>
+<col/>
+<tbody>
+<tr>
+<td><emph>Values:</emph></td>
+<td>
+[
+<loc href="#style-value-emphasisStyle">&lt;emphasisStyle&gt;</loc> ||
+<loc href="#style-value-emphasisColor">&lt;emphasisColor&gt;</loc> ||
+<loc href="#style-value-emphasisPosition">&lt;emphasisPosition&gt;</loc>
+]
+</td>
+</tr>
+<tr>
+<td><emph>Initial:</emph></td>
+<td><code>none</code></td>
+</tr>
+<tr>
+<td><emph>Applies to:</emph></td>
+<td>
+<loc href="#content-vocabulary-span"><el>span</el></loc>
+</td>
+</tr>
+<tr>
+<td><emph>Inherited:</emph></td>
+<td>yes</td>
+</tr>
+<tr>
+<td><emph>Percentages:</emph></td>
+<td>N/A</td>
+</tr>
+<tr>
+<td><emph>Animatable:</emph></td>
+<td>discrete, continuous (color only)</td>
+</tr>
+</tbody>
+</table>
+<p>For the purpose of determining applicability of this style property,
+each character child of a <el>p</el> element is considered to be enclosed in an anonymous
+span.</p>
+<p>If the specified value of this attribute is <code>auto</code>, then it must be interpreted as if
+<code>auto</code> were specified for both emphasis style and emphasis position components.</p>
+<p>If no emphasis style is specified,
+then the emphasis style must be interpreted as if a style of <code>auto</code> were specified.
+If no emphasis color is specified,
+then the emphasis color must be interpreted as if a color of <code>current</code> were specified.
+If no emphasis position is specified,
+then the emphasis position must be interpreted as if a position of <code>auto</code> were specified.</p>
+<ednote>
+<name>Text Emphasis Example</name>
+<date>2015-01-05</date>
+<edtext>Insert example fragment and image of tts:textEmphasis.</edtext>
+</ednote>
+<note role="derivation">
+<p>The semantics of the style property represented by this attribute are based upon 
+that defined by <bibref ref="css3-decoration"/>, &sect; 3.</p>
+</note>
+</div3>
 <div3 id="style-attribute-textOrientation">
 <head>tts:textOrientation</head>
 <p>The <att>tts:textOrientation</att> attribute is used to specify a style property that
@@ -11503,6 +11571,9 @@
 <item><p><specref ref="style-value-borderWidth"/></p></item>
 <item><p><specref ref="style-value-color"/></p></item>
 <item><p><specref ref="style-value-digit"/></p></item>
+<item><p><specref ref="style-value-emphasisColor"/></p></item>
+<item><p><specref ref="style-value-emphasisStyle"/></p></item>
+<item><p><specref ref="style-value-emphasisPosition"/></p></item>
 <item><p><specref ref="style-value-familyName"/></p></item>
 <item><p><specref ref="style-value-genericFamilyName"/></p></item>
 <item><p><specref ref="style-value-hexDigit"/></p></item>
@@ -11592,8 +11663,8 @@
 <p>The interpretation of <code>dotted</code>, <code>dashed</code>, and <code>double</code> are considered
 to be implementation dependent.</p>
 <p>If an implementation does not recognize or otherwise distinguish one of these border style values, then
-it must be interpreted as if a style of <code>solid</code> were specified; however, an implementation that
-supports borders must minimally support the <code>none</code> and <code>solid</code> values.</p>
+it must be interpreted as if a style of <code>solid</code> were specified; as such, an implementation that
+supports borders must minimally support the <code>solid</code> value.</p>
 </div3>
 <div3 id="style-value-borderWidth">
 <head>&lt;borderWidth&gt;</head>
@@ -11700,6 +11771,180 @@
 </tbody>
 </table>
 </div3>
+
+<div3 id="style-value-emphasisColor">
+<head>&lt;emphasisColor&gt;</head>
+<p>An &lt;emphasisColor&gt; expression is used to express the color of text
+emphasis marks.</p>
+<table id="emphasisColor-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;emphasisColor&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;emphasisColor&gt;
+  : current
+  | <loc href="#style-value-color">&lt;color&gt;</loc>
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+<glist>
+<gitem>
+<label><code>current</code></label>
+<def>
+<p>Equivalent to the computed value of <loc href="#style-attribute-color"><att>tts:color</att></loc> of the affected text.</p>
+</def>
+</gitem>
+<gitem>
+<label><loc href="#style-value-color">&lt;color&gt;</loc></label>
+<def>
+<p>The specified color.</p>
+</def>
+</gitem>
+</glist>
+<p>If an implementation does not recognize or otherwise distinguish emphasis color value, then
+it must be interpreted as if a style of <code>current</code> were specified; as such, an implementation that
+supports text emphasis marks must minimally support the <code>current</code> value.</p>
+</div3>
+<div3 id="style-value-emphasisStyle">
+<head>&lt;emphasisStyle&gt;</head>
+<p>An &lt;emphasisStyle&gt; expression is used to express the style of text
+emphasis marks.</p>
+<table id="emphasisStyle-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;emphasisStyle&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;emphasisStyle&gt;
+  : none
+  | auto 
+  | [ filled | open ] || [ circle | dot | sesame ]
+  | <loc href="#content-value-quoted-string">&lt;quoted-string&gt;</loc>
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+<p>The semantics of text emphasis style values are defined as follows:</p>
+<glist>
+<gitem>
+<label><code>none</code></label>
+<def>
+<p>No text emphasis mark.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>auto</code></label>
+<def>
+<p>If a vertical writing mode applies, then equivalent to <code>filled sesame</code>; otherwise,
+equivalent to <code>filled circle</code>.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>filled</code></label>
+<def>
+<p>Emphasis mark is filled with emphasis color.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>open</code></label>
+<def>
+<p>Emphasis mark is not filled, i.e., its outline is stroked with the emphasis color, but it is not filled.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>circle</code></label>
+<def>
+<p>Emphasis mark is a circle. If filled, then equivalent to U+25CF '&#x25CF;'; if open, then equivalent to U+25CB '&#x25CB;'</p>
+</def>
+</gitem>
+<gitem>
+<label><code>dot</code></label>
+<def>
+<p>Emphasis mark is a dot. If filled, then equivalent to U+2022 '&#x2022;'; if open, then equivalent to U+25E6 '&#x25E6;'</p>
+</def>
+</gitem>
+<gitem>
+<label><code>sesame</code></label>
+<def>
+<p>Emphasis mark is a sesame. If filled, then equivalent to U+FE45 '&#xFE45;'; if open, then equivalent to U+FE46 '&#xFE46;'</p>
+</def>
+</gitem>
+<gitem>
+<label><loc href="#content-value-quoted-string">&lt;quoted-string&gt;</loc></label>
+<def>
+<p>Emphasis mark is the first grapheme cluster of string, with remainder of string ignored.</p>
+</def>
+</gitem>
+</glist>
+<p>If only <code>filled</code> or <code>open</code> is specified, then it is equivalent to <code>filled circle</code> and <code>open circle</code>, respectively.</p>
+<p>If only <code>circle</code>, <code>dot</code>, or <code>sesame</code> is specified, then it is equivalent to <code>filled circle</code>, <code>filled dot</code>, and
+<code>filled sesame</code>, respectively.</p>
+<p>If an implementation does not recognize or otherwise distinguish an emphasis style value, then
+it must be interpreted as if a style of <code>auto</code> were specified; as such, an implementation that
+supports text emphasis marks must minimally support the <code>auto</code> value.</p>
+</div3>
+<div3 id="style-value-emphasisPosition">
+<head>&lt;emphasisPosition&gt;</head>
+<p>An &lt;emphasisPosition&gt; expression is used to express the position of text
+emphasis marks.</p>
+<table id="emphasisPosition-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;emphasisPosition&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;emphasisPosition&gt;
+  : auto
+  | before
+  | after
+  | outside
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+<glist>
+<gitem>
+<label><code>auto</code></label>
+<def>
+<p>If the containing block area consists of exactly two line areas, then equivalent to <code>outside</code>; otherwise,
+equivalent to <code>before</code>.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>before</code></label>
+<def>
+<p>Towards the before edge of the affected glyph areas. If a horizontal writing mode applies, then this is towards the
+top of the glyph areas. If a vertical writing mode applies, then this is either towards the right or left of the glyph
+areas, according to whether <loc href="#style-attribute-writingMode"><att>tts:writingMode</att></loc> resolves to
+<code>tbrl</code> or <code>tblr</code>, respectively.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>after</code></label>
+<def>
+<p>Towards the after edge of the affected glyph areas. If a horizontal writing mode applies, then this is towards the
+bottom of the glyph areas. If a vertical writing mode applies, then this is either towards the left or right of the glyph
+areas, according to whether <loc href="#style-attribute-writingMode"><att>tts:writingMode</att></loc> resolves to
+<code>tbrl</code> or <code>tblr</code>, respectively.</p>
+</def>
+</gitem>
+<gitem>
+<label><code>outside</code></label>
+<def>
+<p>Equivalent to <code>before</code> for all but the last affected line area; otherwise, equivalent to <code>after</code>
+for the last affected line area.</p>
+</def>
+</gitem>
+</glist>
+<p>If an implementation does not recognize or otherwise distinguish an emphasis position value, then
+it must be interpreted as if a position of <code>auto</code> were specified; as such, an implementation that
+supports text emphasis marks must minimally support the <code>auto</code> value.</p>
+</div3>
 <div3 id="style-value-familyName">
 <head>&lt;familyName&gt;</head>
 <p>A &lt;familyName&gt; expression specifies a font family name.</p>
@@ -19040,6 +19285,10 @@
 <titleref href="http://dev.w3.org/csswg/css-text-3/">CSS Text Module Level 3</titleref>, W3C Editor's Draft. (See
 <xspecref href="http://dev.w3.org/csswg/css-text-3/">http://dev.w3.org/csswg/css-text-3/</xspecref>.)
 </bibl>
+<bibl id="css3-decoration" key="CSS Text Decoration">Elika Etamad (aka fantasai) and Koji Ishii,
+<titleref href="http://dev.w3.org/csswg/css-text-decor-3/">CSS Text Decoration Module Level 3</titleref>, W3C Editor's Draft. (See
+<xspecref href="http://dev.w3.org/csswg/css-text-decor-3/">http://dev.w3.org/csswg/css-text-decor-3/</xspecref>.)
+</bibl>
 <bibl id="css3-wm" key="CSS Writing Modes">Elika Etamad and Koji Ishii,
 <titleref href="http://dev.w3.org/csswg/css-writing-modes-3/">CSS Writing Modes Level 3</titleref>, W3C Editor's Draft. (See
 <xspecref href="http://dev.w3.org/csswg/css-writing-modes-3/">http://dev.w3.org/csswg/css-writing-modes-3/</xspecref>.)
--- a/ttml2/spec/xsd/ttml2-datatypes.xsd	Mon Jan 05 16:41:43 2015 -0700
+++ b/ttml2/spec/xsd/ttml2-datatypes.xsd	Mon Jan 05 21:21:37 2015 -0700
@@ -620,6 +620,12 @@
       <xs:enumeration value="overline lineThrough underline"/>
     </xs:restriction>
   </xs:simpleType>
+  <xs:simpleType name="textEmphasis">
+    <xs:annotation>
+      <xs:documentation>[ emphasisStyle || emphasisColor || emphasisPosition ]</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string"/>
+  </xs:simpleType>
   <xs:simpleType name="textOrientation">
     <xs:restriction base="xs:token">
       <xs:enumeration value="mixed"/>
--- a/ttml2/spec/xsd/ttml2-styling-attribs.xsd	Mon Jan 05 16:41:43 2015 -0700
+++ b/ttml2/spec/xsd/ttml2-styling-attribs.xsd	Mon Jan 05 21:21:37 2015 -0700
@@ -36,6 +36,7 @@
   <xs:attribute name="showBackground" type="ttd:showBackground"/>
   <xs:attribute name="textAlign" type="ttd:textAlign"/>
   <xs:attribute name="textDecoration" type="ttd:textDecoration"/>
+  <xs:attribute name="textEmphasis" type="ttd:textEmphasis"/>
   <xs:attribute name="textOrientation" type="ttd:textOrientation"/>
   <xs:attribute name="textOutline" type="ttd:textOutline"/>
   <xs:attribute name="unicodeBidi" type="ttd:unicodeBidi"/>
@@ -76,6 +77,7 @@
     <xs:attribute ref="tts:rubyPosition"/>
     <xs:attribute ref="tts:textAlign"/>
     <xs:attribute ref="tts:textDecoration"/>
+    <xs:attribute ref="tts:textEmphasis"/>
     <xs:attribute ref="tts:textOrientation"/>
     <xs:attribute ref="tts:textOutline"/>
     <xs:attribute ref="tts:unicodeBidi"/>