Skip to content

Commit

Permalink
Merge pull request #799 from w3c/issue-0785-font-property-semantics-p
Browse files Browse the repository at this point in the history
Clarify use of font* properties in resolving default line height (#785).
  • Loading branch information
skynavga committed Jun 7, 2018
2 parents 4c5f1da + eb79460 commit b2e86bf
Showing 1 changed file with 32 additions and 12 deletions.
44 changes: 32 additions & 12 deletions spec/ttml2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9710,7 +9710,6 @@ by content flowed into a region.</p>
<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>
Expand All @@ -9736,6 +9735,10 @@ by content flowed into a region.</p>
<p>The initial value, <code>default</code>, is a generic font family name, and is
further described in <specref ref="style-value-generic-family-name"/> below.</p>
</note>
<p>In addition to applying to <loc href="#content-vocabulary-span"><el>span</el></loc>, the computed value of this property
on a <loc href="#content-vocabulary-span"><el>p</el></loc> element is used to resolve the <code>normal</code> value of the
style property associated with the <loc href="#style-attribute-lineHeight">tts:lineHeight</loc> attribute as specified in
<specref ref="style-attribute-lineHeight"/>.</p>
<p>If a computed value of the property associated with this attribute is not supported, then a
<loc href="#terms-presentation-processor">presentation processor</loc> must attempt to map the computed font family
to a supported font family that has similar typographic
Expand Down Expand Up @@ -9808,7 +9811,6 @@ determines whether font kerning is applied when positioning <loc href="#terms-gl
<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>
Expand Down Expand Up @@ -9985,7 +9987,6 @@ determines whether and how a shear transformation is applied to <loc href="#term
<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>
Expand All @@ -10007,6 +10008,9 @@ determines whether and how a shear transformation is applied to <loc href="#term
</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 value of this attribute is <code>0%</code>, then no shear transformation is applied; if the value is <code>100%</code>, then a 2D shear transformation
of 90 degrees is applied in the axis associated with the inline progression direction; if the value is <code>-100%</code>, then a shear transformation
of -90 degrees is applied. If the absolute value of the specified percentage is greater than 100%, then it must be interpreted as if 100% were specified with
Expand Down Expand Up @@ -10106,7 +10110,6 @@ generated by content flowed into a region.</p>
<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>
Expand Down Expand Up @@ -10189,6 +10192,10 @@ If the computed value of <code>tts:fontSize</code> on <code>P</code> is (18px,24
which resolves to (24px,24px). However, if <code>tts:fontSize="1em 1em"</code> is specified on <code>S</code>,
then this is equivalent to specifying <code>100% 100%</code> which resolves to (18px,24px).</p>
</note>
<p>In addition to applying to <loc href="#content-vocabulary-span"><el>span</el></loc>, the computed value of this property
on a <loc href="#content-vocabulary-span"><el>p</el></loc> element is used to resolve the <code>normal</code> value of the
style property associated with the <loc href="#style-attribute-lineHeight">tts:lineHeight</loc> attribute as specified in
<specref ref="style-attribute-lineHeight"/>.</p>
<p>If a computed value of the property associated with this attribute is not supported,
then a <loc href="#terms-presentation-processor">presentation processor</loc> must use the closest supported value.</p>
<note role="elaboration">
Expand Down Expand Up @@ -10292,7 +10299,6 @@ by this specification.</p>
<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>
Expand All @@ -10317,6 +10323,10 @@ by this specification.</p>
<p>Use of the value <code>oblique</code>
denotes a shear transformation (at an unspecified
angle) in the inline progression direction.</p>
<p>In addition to applying to <loc href="#content-vocabulary-span"><el>span</el></loc>, the computed value of this property
on a <loc href="#content-vocabulary-span"><el>p</el></loc> element is used to resolve the <code>normal</code> value of the
style property associated with the <loc href="#style-attribute-lineHeight">tts:lineHeight</loc> attribute as specified in
<specref ref="style-attribute-lineHeight"/>.</p>
<p>If a computed value of the property associated with this attribute is not supported,
then a <loc href="#terms-presentation-processor">presentation processor</loc> must use the value <code>normal</code>.</p>
<p>The <att>tts:fontStyle</att> style is illustrated by the following example.</p>
Expand Down Expand Up @@ -10376,7 +10386,6 @@ of typographic glyph variants.</p>
<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>
Expand All @@ -10398,6 +10407,10 @@ of typographic glyph variants.</p>
</tr>
</tbody>
</table>
<p>In addition to applying to <loc href="#content-vocabulary-span"><el>span</el></loc>, the computed value of this property
on a <loc href="#content-vocabulary-span"><el>p</el></loc> element is used to resolve the <code>normal</code> value of the
style property associated with the <loc href="#style-attribute-lineHeight">tts:lineHeight</loc> attribute as specified in
<specref ref="style-attribute-lineHeight"/>.</p>
<p>If a computed value of the property associated with this attribute is not supported,
then a <loc href="#terms-presentation-processor">presentation processor</loc> must use the value <code>normal</code>.</p>
<p>The <att>tts:fontVariant</att> style is illustrated by the following example.</p>
Expand Down Expand Up @@ -10460,7 +10473,6 @@ by this specification.</p>
<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>
Expand All @@ -10482,6 +10494,10 @@ by this specification.</p>
</tr>
</tbody>
</table>
<p>In addition to applying to <loc href="#content-vocabulary-span"><el>span</el></loc>, the computed value of this property
on a <loc href="#content-vocabulary-span"><el>p</el></loc> element is used to resolve the <code>normal</code> value of the
style property associated with the <loc href="#style-attribute-lineHeight">tts:lineHeight</loc> attribute as specified in
<specref ref="style-attribute-lineHeight"/>.</p>
<p>If a computed value of the property associated with this attribute is not supported,
then a <loc href="#terms-presentation-processor">presentation processor</loc> must use the value <code>normal</code>.</p>
<p>The <att>tts:fontWeight</att> style is illustrated by the following example.</p>
Expand Down Expand Up @@ -10761,18 +10777,22 @@ horizontal writing modes, but is the horizontal axis in vertical writing modes.<
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.
Let <emph>P</emph> be the <loc href="#content-vocabulary-p"><el>p</el></loc> 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>.
Let <emph>FF</emph> be the computed value of the <loc href="#style-attribute-fontFamily"><att>tts:fontFamily</att></loc>
style property of <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>.
Let <emph>FS</emph> be the computed value of the <loc href="#style-attribute-fontSize"><att>tts:fontSize</att></loc> style property of <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>.
where this set of available fonts is constrained as needed to satisfy the computed values of the
<loc href="#style-attribute-fontStyle"><att>tts:fontStyle</att></loc>,
<loc href="#style-attribute-fontWeight"><att>tts:fontWeight</att></loc>, and
<loc href="#style-attribute-fontVariant"><att>tts:fontVariant</att></loc>
style properties of <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>,
Expand Down

0 comments on commit b2e86bf

Please sign in to comment.