css-fonts/Fonts.html

changeset 8312
4fb97110e8dc
parent 8311
35cf30e4d0ec
child 8313
f7084873c602
     1.1 --- a/css-fonts/Fonts.html	Fri May 31 13:36:29 2013 +0900
     1.2 +++ b/css-fonts/Fonts.html	Fri May 31 14:54:16 2013 +0900
     1.3 @@ -4408,11 +4408,22 @@
     1.4    font-variant-alternates: swash(flowing); /* use swash alternate #2 */
     1.5  }</pre>
     1.6  
     1.7 -  <p>When a particular value has not been defined for a given family, the
     1.8 -   named value is treated as if the feature had been omitted from the style
     1.9 -   rule. If a given value is outside the range supported by a given font, the
    1.10 -   value is ignored. These values never apply to generic font families, nor
    1.11 -   to families selected as part of system font fallback.
    1.12 +  <p>When a particular <code>&lt;feature-value-name&gt;</code> has not been
    1.13 +   defined for a given family or for a particular feature type, the computed
    1.14 +   value must be the same as if it had been defined. However, property values
    1.15 +   that contain these undefined <code>&lt;feature-value-name&gt;</code>
    1.16 +   identifiers must be ignored when choosing glyphs.
    1.17 +
    1.18 +  <pre>/* these two style rules are effectively the same */
    1.19 +p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
    1.20 +p { font-variant-alternates: normal; }
    1.21 +</pre>
    1.22 +
    1.23 +  <p>This allows values to be defined and used for a given set of font
    1.24 +   families but ignored if fallback occurs, since the font family name would
    1.25 +   be different. If a given value is outside the range supported by a given
    1.26 +   font, the value is ignored. These values never apply to generic font
    1.27 +   families.
    1.28  
    1.29    <p>Individual values have the following meanings:
    1.30  
    1.31 @@ -4541,44 +4552,7 @@
    1.32     values specified within a given font's data.
    1.33  
    1.34    <p>In terms of the grammar, this specification defines the following
    1.35 -   productions:</p>
    1.36 -  <!--
    1.37 -<pre><dfn>supports_rule</dfn>
    1.38 -  : <i>SUPPORTS_SYM</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <i>supports_condition</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <i>group_rule_body</i>
    1.39 -  ;
    1.40 -
    1.41 -<dfn>supports_condition</dfn>
    1.42 -  : <i>supports_negation</i> | <i>supports_conjunction</i> | <i>supports_disjunction</i> |
    1.43 -    <i>supports_condition_in_parens</i>
    1.44 -  ;
    1.45 -
    1.46 -<dfn>supports_condition_in_parens</dfn>
    1.47 -  : ( '(' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <i>supports_condition</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* ')' ) | <i>supports_declaration_condition</i> |
    1.48 -    <i>general_enclosed</i>
    1.49 -  ;
    1.50 -
    1.51 -<dfn>supports_negation</dfn>
    1.52 -  : <a href="http://www.w3.org/TR/css3-mediaqueries/#syntax"><i>NOT</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>supports_condition_in_parens</i>
    1.53 -  ;
    1.54 -
    1.55 -<dfn>supports_conjunction</dfn>
    1.56 -  : <i>supports_condition_in_parens</i> ( <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a href="http://www.w3.org/TR/css3-mediaqueries/#syntax"><i>AND</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>supports_condition_in_parens</i> )+
    1.57 -  ;
    1.58 -
    1.59 -<dfn>supports_disjunction</dfn>
    1.60 -  : <i>supports_condition_in_parens</i> ( <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>OR</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>supports_condition_in_parens</i> )+
    1.61 -  ;
    1.62 -
    1.63 -<dfn>supports_declaration_condition</dfn>
    1.64 -  : '(' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>declaration</i></a> ')'
    1.65 -  ;
    1.66 -
    1.67 -<dfn>general_enclosed</dfn>
    1.68 -  : ( <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>FUNCTION</i></a> | '(' ) ( <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>any</i></a> | <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>unused</i></a> )* ')'
    1.69 -  ;
    1.70 -</pre>
    1.71 -
    1.72 --->
    1.73 +   productions:
    1.74  
    1.75    <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
    1.76    : <a href="#fontfeaturevaluessym"><i>FONT_FEATURE_VALUES_SYM</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#fontfamilynamelist"><i>font_family_name_list</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
    1.77 @@ -4952,13 +4926,6 @@
    1.78  
    1.79     <dd>Enables rendering of simplified forms (OpenType feature: <span
    1.80      class=tag>smpl</span>).
    1.81 -    <p>The ‘<a href="#simplified"><code
    1.82 -     class=property>simplified</code></a>’ and ‘<a
    1.83 -     href="#traditional"><code class=property>traditional</code></a>’
    1.84 -     values allow control over the glyph forms for characters which have been
    1.85 -     simplified over time but for which the older, traditional form is still
    1.86 -     used in some contexts. The exact set of characters and glyph forms will
    1.87 -     vary to some degree by context for which a given font was designed.</p>
    1.88  
    1.89     <dt><dfn id=traditional>traditional</dfn>
    1.90  
    1.91 @@ -4966,6 +4933,14 @@
    1.92      class=tag>trad</span>).
    1.93    </dl>
    1.94  
    1.95 +  <p>The ‘<a href="#simplified"><code
    1.96 +   class=property>simplified</code></a>’ and ‘<a
    1.97 +   href="#traditional"><code class=property>traditional</code></a>’ values
    1.98 +   allow control over the glyph forms for characters which have been
    1.99 +   simplified over time but for which the older, traditional form is still
   1.100 +   used in some contexts. The exact set of characters and glyph forms will
   1.101 +   vary to some degree by context for which a given font was designed.
   1.102 +
   1.103    <div class=featex><img alt="tradtional form example" src=trad.png></div>
   1.104  
   1.105    <dl>
   1.106 @@ -5090,10 +5065,11 @@
   1.107       <td>see individual properties
   1.108    </table>
   1.109  
   1.110 -  <p>The value <dfn id=font-variant-normal-value
   1.111 -   title="normal!!font-variant">‘<code
   1.112 -   class=property>normal</code>’</dfn> resets all other font feature
   1.113 -   properties to their inital value. The <dfn id=font-variant-none-value
   1.114 +  <p>The ‘<code class=property>font-variant</code>’ property is a
   1.115 +   shorthand for all font-variant subproperties. The value <dfn
   1.116 +   id=font-variant-normal-value title="normal!!font-variant">‘<code
   1.117 +   class=property>normal</code>’</dfn> resets all subproperties of
   1.118 +   font-variant to their inital value. The <dfn id=font-variant-none-value
   1.119     title="none!!font-variant">‘<code class=property>none</code>’</dfn>
   1.120     value sets ‘<a href="#propdef-font-variant-ligatures"><code
   1.121     class=property>font-variant-ligatures</code></a>’ to ‘<code
   1.122 @@ -5165,17 +5141,23 @@
   1.123  
   1.124    <p>This property provides low-level control over OpenType font features. It
   1.125     is intended as a way of providing access to font features that are not
   1.126 -   widely used but are needed for a particular use case. A value of <dfn
   1.127 -   id=font-feature-settings-normal-value
   1.128 +   widely used but are needed for a particular use case.
   1.129 +
   1.130 +  <p>Authors should generally use <a href="#propdef-font-variant"
   1.131 +   title="font-variant!!property">‘<code
   1.132 +   class=property>font-variant</code>’</a> and its related subproperties
   1.133 +   whenever possible and only use this property for special cases where its
   1.134 +   use is the only way of accessing a particular infrequently used font
   1.135 +   feature.
   1.136 +
   1.137 +  <pre>/* enable small caps and use second swash alternate */
   1.138 +font-feature-settings: "smcp", "swsh" 2;</pre>
   1.139 +
   1.140 +  <p>A value of <dfn id=font-feature-settings-normal-value
   1.141     title="normal!!font-feature-settings">‘<code
   1.142     class=property>normal</code>’</dfn> means that no change in glyph
   1.143     selection or positioning occurs due to this property.
   1.144  
   1.145 -  <p>
   1.146 -
   1.147 -  <pre>/* enable small caps and use second swash alternate */
   1.148 -font-feature-settings: "smcp", "swsh" 2;</pre>
   1.149 -
   1.150    <p>Feature tag values have the following syntax:
   1.151  
   1.152    <pre
   1.153 @@ -5185,10 +5167,9 @@
   1.154     specified in the OpenType specification, feature tags contain four ASCII
   1.155     characters. Tag strings longer or shorter than four characters, or
   1.156     containing characters outside the U+20–7E codepoint range are invalid.
   1.157 -   User agents must not use a feature tag created by truncating or padding
   1.158 -   the string to four characters. Feature tags need only match a feature tag
   1.159 -   defined in the font, they are not limited to explicitly registered
   1.160 -   OpenType features. Fonts defining custom feature tags should follow the <a
   1.161 +   Feature tags need only match a feature tag defined in the font, so they
   1.162 +   are not limited to explicitly registered OpenType features. Fonts defining
   1.163 +   custom feature tags should follow the <a
   1.164     href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
   1.165     rules</a> defined in the OpenType specification <a
   1.166     href="#OPENTYPE-FEATURES"
   1.167 @@ -5233,13 +5214,6 @@
   1.168     the exact behavior will depend upon the way the font is designed
   1.169     (specifically, which type of lookup is used to define the feature).
   1.170  
   1.171 -  <p>Authors should generally use <a href="#propdef-font-variant"
   1.172 -   title="font-variant!!property">‘<code
   1.173 -   class=property>font-variant</code>’</a> and its related subproperties
   1.174 -   whenever possible and only use this property for special cases where its
   1.175 -   use is the only way of accessing a particular infrequently used font
   1.176 -   feature.
   1.177 -
   1.178    <p>Although specifically defined for OpenType feature tags, feature tags
   1.179     for other modern font formats that support font features may be added in
   1.180     the future. Where possible, features defined for other font formats should
   1.181 @@ -5344,6 +5318,9 @@
   1.182      of the language system implied by the language of the element
   1.183    </dl>
   1.184  
   1.185 +  <p>Use of invalid OpenType language system tags must not generate a parse
   1.186 +   error but must be ignored when doing glyph selection and placement.
   1.187 +
   1.188    <div class=example>
   1.189     <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
   1.190      Declaration of Human Rights</a> has been translated into a wide variety

mercurial