[ttml2] elaborate algorithm for resolving 'normal' value of tts:lineHeight
authorGlenn Adams <glenn@skynav.com>
Thu, 05 Dec 2013 15:38:51 -0700
changeset 584 4b056bc52a0d
parent 583 e17f7862b826
child 585 f146fb61885e
[ttml2] elaborate algorithm for resolving 'normal' value of tts:lineHeight
ttml2/spec/ttml2-changes.html
ttml2/spec/ttml2.xml
--- a/ttml2/spec/ttml2-changes.html	Thu Dec 05 13:33:11 2013 -0700
+++ b/ttml2/spec/ttml2-changes.html	Thu Dec 05 15:38:51 2013 -0700
@@ -76,8 +76,21 @@
 * In 8.2.1, add 'set' element to enumeration of element types to which 'style'
   attribute applies.
 
-* In 8.2.13, make use of 125% of largest applicable font size a normative
-  requirement for interpreting 'normal' value of tts:lineHeight.
+* In 8.2.9, add 'p' element to enumeration  of element types to which
+  tts:fontFamily applies.
+
+* In 8.2.10, add 'p' element to enumeration  of element types to which
+  tts:fontSize applies.
+
+* In 8.2.11, add 'p' element to enumeration  of element types to which
+  tts:fontStyle applies.
+
+* In 8.2.12, add 'p' element to enumeration  of element types to which
+  tts:fontWeight applies.
+
+* In 8.2.13, specify algorithm for resolving the 'normal' value of
+  tts:lineHeight that takes into account the use of per-font-metrics for
+  ascent, descent, and line gap, using 125% of font size as a fall back.
 
 * In 8.2.14, add content elements to enumeration of element types to which
   tts:opacity applies.
--- a/ttml2/spec/ttml2.xml	Thu Dec 05 13:33:11 2013 -0700
+++ b/ttml2/spec/ttml2.xml	Thu Dec 05 15:38:51 2013 -0700
@@ -4716,6 +4716,7 @@
 <tr>
 <td><emph>Applies to:</emph></td>
 <td>
+<loc href="#content-vocabulary-p"><el>p</el></loc>,
 <loc href="#content-vocabulary-span"><el>span</el></loc>
 </td>
 </tr>
@@ -4820,6 +4821,7 @@
 <tr>
 <td><emph>Applies to:</emph></td>
 <td>
+<loc href="#content-vocabulary-p"><el>p</el></loc>,
 <loc href="#content-vocabulary-span"><el>span</el></loc>
 </td>
 </tr>
@@ -4949,6 +4951,7 @@
 <tr>
 <td><emph>Applies to:</emph></td>
 <td>
+<loc href="#content-vocabulary-p"><el>p</el></loc>,
 <loc href="#content-vocabulary-span"><el>span</el></loc>
 </td>
 </tr>
@@ -5044,6 +5047,7 @@
 <tr>
 <td><emph>Applies to:</emph></td>
 <td>
+<loc href="#content-vocabulary-p"><el>p</el></loc>,
 <loc href="#content-vocabulary-span"><el>span</el></loc>
 </td>
 </tr>
@@ -5152,10 +5156,39 @@
 </tbody>
 </table>
 <p>If the value of this attribute is <code>normal</code>, then the
-computed value of the style property must be considered to be the same
-as 125% of the largest font size that applies to the element and its
-descendant elements in the intermediate synchronic document as determined by
-<specref ref="semantics-region-layout-step-1"/>.</p>
+computed value of this style property is determined as follows:</p>
+<olist>
+<item><p>
+Let <emph>P</emph> be the <el>p</el> element to which this style property applies.
+</p></item>
+<item><p>
+Let <emph>FF</emph> be the computed value of the <att>tts:fontFamily</att> style property that applies to <emph>P</emph>.
+</p></item>
+<item><p>
+Let <emph>FS</emph> be the computed value of the <att>tts:fontSize</att> style property that applies to <emph>P</emph>.
+</p></item>
+<item><p>
+Let <emph>F0</emph> be the first font obtained when sequentially mapping each font family in <emph>FF</emph> to a set of available fonts,
+where this set of available fonts is constrained as needed to satisfy the computed values of the <att>tts:fontStyle</att> and <att>tts:fontWeight</att>
+style properties that apply to <emph>P</emph>.
+</p></item>
+<item><p>
+If <emph>F0</emph> is associated with font metrics that specify altitude <emph>A</emph>, descent <emph>D</emph>, and line gap <emph>G</emph>,
+then set <emph>LH</emph> to the sum of scaled(<emph>A</emph>), scaled(<emph>D</emph>), and scaled(<emph>G</emph>),
+where scaled(<emph>X</emph>) denotes font metric <emph>X</emph> scaled according to font size <emph>FS</emph>.
+</p></item>
+<item><p>
+Otherwise, set <emph>LH</emph> to 125% of <emph>FS</emph>.
+</p></item>
+<item><p>
+Set the computed value of this style property to <emph>LH</emph>.
+</p></item>
+</olist>
+<note role="elaboration">
+<p>If a content author wishes to avoid the possibility of different interpretations of <code>normal</code>, for example, due to differences in
+the set of available fonts, then it is recommended that a 
+<loc href="#style-value-length">&lt;length&gt;</loc> value expression be used to explicitly specify line height value.</p>
+</note>
 <p>If specified as a <loc
 href="#style-value-length">&lt;length&gt;</loc>, then the length must
 be non-negative.</p>