[ttml2] add tts:textCombine style attribute (issue 229)
authorGlenn Adams <glenn@skynav.com>
Wed, 07 Jan 2015 23:59:50 -0700
changeset 818 722bda663839
parent 815 d452132b39c5
child 819 47ca45a2c8c3
[ttml2] add tts:textCombine style attribute (issue 229)
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	Wed Jan 07 18:49:13 2015 -0700
+++ b/ttml2/spec/rnc/ttml2-datatypes.rnc	Wed Jan 07 23:59:50 2015 -0700
@@ -317,6 +317,9 @@
   "start" |
   "end"
 
+TTAF.TextCombine.datatype =
+  string
+
 TTAF.TextDecoration.datatype =
   "none" |
   "underline" |
--- a/ttml2/spec/rnc/ttml2-styling-attribs.rnc	Wed Jan 07 18:49:13 2015 -0700
+++ b/ttml2/spec/rnc/ttml2-styling-attribs.rnc	Wed Jan 07 23:59:50 2015 -0700
@@ -70,6 +70,8 @@
   = attribute tts:showBackground { TTAF.ShowBackground.datatype }?
 TTAF.textAlign.attrib
   = attribute tts:textAlign { TTAF.TextAlign.datatype }?
+TTAF.textCombine.attrib
+  = attribute tts:textCombine { TTAF.TextCombine.datatype }?
 TTAF.textDecoration.attrib
   = attribute tts:textDecoration { TTAF.TextDecoration.datatype }?
 TTAF.textEmphasis.attrib
@@ -129,6 +131,7 @@
   TTAF.rubyPosition.attrib,
   TTAF.showBackground.attrib,
   TTAF.textAlign.attrib,
+  TTAF.textCombine.attrib,
   TTAF.textDecoration.attrib,
   TTAF.textEmphasis.attrib,
   TTAF.textOrientation.attrib,
--- a/ttml2/spec/ttml2-changes.html	Wed Jan 07 18:49:13 2015 -0700
+++ b/ttml2/spec/ttml2-changes.html	Wed Jan 07 23:59:50 2015 -0700
@@ -99,6 +99,7 @@
   'tts:rubyAlign',
   'tts:rubyOffset',
   'tts:rubyPosition',
+  'tts:textCombine,
   'tts:textEmphasis,
   'tts:textOrientation', and
   'tts:width'
@@ -257,6 +258,8 @@
 
 * In 10.2, add 'tts:rubyPosition styling attribute.
 
+* In 10.2, add 'tts:textCombine styling attribute.
+
 * In 10.2, add 'tts:textEmphasis styling attribute.
 
 * In 10.2, add 'tts:textOrientation' styling attribute.
@@ -304,7 +307,18 @@
 * In 10.2.33, add 'span' to enumeration of element types to which
   tts:textAlign applies.
 
-* In 10.3, add &lt;border-color&gt;, &lt;border-style&gt;, and &lt;border-width&gt;
+* In 10.3, add
+  &lt;border-color&gt;,
+  &lt;border-style&gt;,
+  &lt;border-width&gt;,
+  &lt;emphasis-color&gt;,
+  &lt;emphasis-position&gt;,
+  &lt;emphasis-style&gt;,
+  &lt;measure&gt;,
+  &lt;non-negative-integer&gt;,
+  &lt;number&gt;,
+  &lt;percentage&gt;, and
+  &lt;position&gt;
   value expressions.
 
 * Add section 10.4.2.3 defining root style inheritance.
--- a/ttml2/spec/ttml2.xml	Wed Jan 07 18:49:13 2015 -0700
+++ b/ttml2/spec/ttml2.xml	Wed Jan 07 23:59:50 2015 -0700
@@ -3008,6 +3008,7 @@
 <loc href="#style-attribute-rubyPosition">tts:rubyPosition</loc>,
 <loc href="#style-attribute-showBackground">tts:showBackground</loc>,
 <loc href="#style-attribute-textAlign">tts:textAlign</loc>,
+<loc href="#style-attribute-textCombine">tts:textCombine</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>,
@@ -7209,6 +7210,7 @@
 <item><p><specref ref="style-attribute-rubyPosition"/></p></item>
 <item><p><specref ref="style-attribute-showBackground"/></p></item>
 <item><p><specref ref="style-attribute-textAlign"/></p></item>
+<item><p><specref ref="style-attribute-textCombine"/></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>
@@ -10603,6 +10605,76 @@
 &sect; 7.16.9.</p>
 </note>
 </div3>
+
+<div3 id="style-attribute-textCombine">
+<head>tts:textCombine</head>
+<p>When a vertical writing mode applies, the <att>tts:textCombine</att> attribute is used to specify a style property that
+determines whether and how multiple nominally non-combining characters are combined so that their glyph areas
+consume the nominal bounding box of a single em square. If a horizontal writing mode applies, then this property is ignored
+for the purpose of presentation processing.</p>
+<p>Combination processing may make use of one or more techniques to obtain the goal of visual combination into an em square. For
+example, half-width variant forms may be selected, a ligature may be selected, a smaller font size may be applied, etc. At a minimum, an
+implementation that supports this style property must be able to select half-width variant forms if available.</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-textCombine" role="common">
+<col width="25%"/>
+<col/>
+<tbody>
+<tr>
+<td><emph>Values:</emph></td>
+<td>
+<code>none</code> |
+<code>all</code> |
+[ <code>digits</code> <loc href="#style-value-non-negative-integer">&lt;non-negative-integer&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</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>none</code>, then no combination processing applies.
+If the specified value of this attribute is <code>all</code>, then all affected characters should be combined.
+If the specified value of this attribute is <code>digits</code>, then all affected characters should be combined if they are a sequence of a digits which length is
+equal to or less than a specified count, or two (2) if no count is specified.</p>
+<p>Combination must not cross an element boundary, a bidirectional boundary, or a non-glyph area boundary.</p>
+<p>This attribute has no impact on or interaction with the nominal layout of glyph areas that constitute a Unicode combining character sequence.</p>
+<ednote>
+<name>Text Combine Example</name>
+<date>2015-01-05</date>
+<edtext>Insert example fragment and image of tts:textCombine.</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-wm"/>, &sect; 9.1.</p>
+</note>
+</div3>
+
 <div3 id="style-attribute-textDecoration">
 <head>tts:textDecoration</head>
 <p>The <att>tts:textDecoration</att> attribute is used to specify a style property that
@@ -11625,6 +11697,7 @@
 <item><p><specref ref="style-value-length"/></p></item>
 <item><p><specref ref="style-value-measure"/></p></item>
 <item><p><specref ref="style-value-namedColor"/></p></item>
+<item><p><specref ref="style-value-non-negative-integer"/></p></item>
 <item><p><specref ref="style-value-number"/></p></item>
 <item><p><specref ref="style-value-percentage"/></p></item>
 <item><p><specref ref="style-value-position"/></p></item>
@@ -12143,7 +12216,7 @@
 <td>
 <eg xml:space="preserve">
 &lt;integer&gt;
-  : ( "+" | "-" )? <loc href="#style-value-digit">&lt;digit&gt;</loc>+
+  : ( "+" | "-" )? <loc href="#style-value-non-negative-integer">&lt;non-negative-integer&gt;</loc>
 </eg>
 </td>
 </tr>
@@ -12330,6 +12403,23 @@
 subset of the set of named colors specified by <bibref ref="svg11"/>, &sect; 4.2.</p>
 </note>
 </div3>
+<div3 id="style-value-non-negative-integer">
+<head>&lt;non-negative-integer&gt;</head>
+<p>A &lt;non-negative-integer&gt; expression is used to express an arbitrary, non-negative integral value.</p>
+<table id="non-negative-integer-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;non-negative-integer&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;non-negative-integer&gt;
+  : <loc href="#style-value-digit">&lt;digit&gt;</loc>+
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+</div3>
 <div3 id="style-value-number">
 <head>&lt;number&gt;</head>
 <p>An &lt;number&gt; expression is used to express an arbitrary, signed integer or real valued number.</p>
@@ -12348,12 +12438,9 @@
 number
 
 non-negative-number
-  : non-negative-integer
+  : <loc href="#style-value-non-negative-integer">&lt;non-negative-integer&gt;</loc>
   | non-negative-real
 
-non-negative-integer
-  : <loc href="#style-value-digit">&lt;digit&gt;</loc>+
-
 non-negative-real
   : <loc href="#style-value-digit">&lt;digit&gt;</loc>* "." <loc href="#style-value-digit">&lt;digit&gt;</loc>+
 </eg>
--- a/ttml2/spec/xsd/ttml2-datatypes.xsd	Wed Jan 07 18:49:13 2015 -0700
+++ b/ttml2/spec/xsd/ttml2-datatypes.xsd	Wed Jan 07 23:59:50 2015 -0700
@@ -548,6 +548,12 @@
       <xs:enumeration value="end"/>
     </xs:restriction>
   </xs:simpleType>
+  <xs:simpleType name="textCombine">
+    <xs:annotation>
+      <xs:documentation>none | all | [ digits xsd:nonNegativeInteger? ]</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string"/>
+  </xs:simpleType>
   <xs:simpleType name="textDecoration">
     <xs:annotation>
       <xs:documentation>none | [ [ underline | noUnderline ] || [ lineThrough | noLineThrough ] || [ overline | noOverline ] ]</xs:documentation>
--- a/ttml2/spec/xsd/ttml2-styling-attribs.xsd	Wed Jan 07 18:49:13 2015 -0700
+++ b/ttml2/spec/xsd/ttml2-styling-attribs.xsd	Wed Jan 07 23:59:50 2015 -0700
@@ -36,6 +36,7 @@
   <xs:attribute name="rubyPosition" type="ttd:rubyPosition"/>
   <xs:attribute name="showBackground" type="ttd:showBackground"/>
   <xs:attribute name="textAlign" type="ttd:textAlign"/>
+  <xs:attribute name="textCombine" type="ttd:textCombine"/>
   <xs:attribute name="textDecoration" type="ttd:textDecoration"/>
   <xs:attribute name="textEmphasis" type="ttd:textEmphasis"/>
   <xs:attribute name="textOrientation" type="ttd:textOrientation"/>
@@ -78,6 +79,7 @@
     <xs:attribute ref="tts:rubyOffset"/>
     <xs:attribute ref="tts:rubyPosition"/>
     <xs:attribute ref="tts:textAlign"/>
+    <xs:attribute ref="tts:textCombine"/>
     <xs:attribute ref="tts:textDecoration"/>
     <xs:attribute ref="tts:textEmphasis"/>
     <xs:attribute ref="tts:textOrientation"/>