[css-fonts] rework font-kerning description

Thu, 30 May 2013 11:39:14 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Thu, 30 May 2013 11:39:14 +0900
changeset 8276
bf52664a49ae
parent 8275
a660aaa61034
child 8277
a09de2f3e565

[css-fonts] rework font-kerning description

css-fonts/Fonts.html file | annotate | diff | comparison | revisions
     1.1 --- a/css-fonts/Fonts.html	Wed May 29 13:36:16 2013 -0700
     1.2 +++ b/css-fonts/Fonts.html	Thu May 30 11:39:14 2013 +0900
     1.3 @@ -1630,7 +1630,8 @@
     1.4     whether it is substituted or not. Values have the following meanings:
     1.5  
     1.6    <dl>
     1.7 -   <dt><strong>none</strong>
     1.8 +   <dt><a href="#font-variant-ligatures-none-value"><strong>none</strong></a>
     1.9 +    
    1.10  
    1.11     <dd>Do not preserve the font's x-height.
    1.12  
    1.13 @@ -2058,8 +2059,9 @@
    1.14     If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
    1.15     specified, user agents must not synthesize bold faces and if ‘<code
    1.16     class=property>style</code>’ is not specified user agents must not
    1.17 -   synthesize italic faces. A value of ‘<code class=property>none</code>’
    1.18 -   disallows all synthetic faces.
    1.19 +   synthesize italic faces. A value of ‘<a
    1.20 +   href="#font-variant-ligatures-none-value"><code
    1.21 +   class=property>none</code></a>’ disallows all synthetic faces.
    1.22  
    1.23    <div class=example>
    1.24     <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
    1.25 @@ -3474,28 +3476,44 @@
    1.26  
    1.27    <p>Kerning is the contextual adjustment of inter-glyph spacing. This
    1.28     property controls metric kerning, kerning that utilizes adjustment data
    1.29 -   contained in the font. The value ‘<a href="#normal2"><code
    1.30 -   class=property>normal</code></a>’ implies that kerning is applied while
    1.31 -   the value ‘<code class=property>none</code>’ implies that kerning is
    1.32 -   not applied when rendering text. If the value is ‘<code
    1.33 -   class=property>auto</code>’, a user agent is free to choose whether
    1.34 -   kerning is enabled or not by default and to vary that default based on the
    1.35 -   underlying text script.
    1.36 +   contained in the font.
    1.37 +
    1.38 +  <dl>
    1.39 +   <dt>auto
    1.40 +
    1.41 +   <dd>Specifies that kerning is applied at the discretion of the user agent
    1.42 +
    1.43 +   <dt>normal
    1.44 +
    1.45 +   <dd>Specifies that kerning is applied
    1.46 +
    1.47 +   <dt>none
    1.48 +
    1.49 +   <dd>Specifies that kerning is not applied
    1.50 +  </dl>
    1.51  
    1.52    <p>For fonts that do not include kerning data this property will have no
    1.53     visible effect. When rendering with OpenType fonts, the <a
    1.54     href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
    1.55     specification suggests that kerning be enabled by default. When kerning is
    1.56     enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
    1.57 -   vertical text runs the <span class=tag>vkrn</span> feature is enabled).
    1.58 -   User agents must also support fonts that only support kerning via data
    1.59 -   contained in a ‘<code class=property>kern</code>’ font table, as
    1.60 -   detailed in the OpenType specification. Authors may prefer to disable
    1.61 -   kerning in situations where performance is more important than precise
    1.62 -   appearance. If the ‘<code class=property>letter-spacing</code>’
    1.63 -   property is defined, kerning adjustments are considered part of the
    1.64 -   default spacing, letter spacing adjustments are made after kerning has
    1.65 -   been applied.</p>
    1.66 +   vertical text runs the <span class=tag>vkrn</span> feature is enabled
    1.67 +   instead). User agents must also support fonts that only support kerning
    1.68 +   via data contained in a <span class=tag>kern</span> font table, as
    1.69 +   detailed in the OpenType specification. If the ‘<code
    1.70 +   class=property>letter-spacing</code>’ property is defined, kerning
    1.71 +   adjustments are considered part of the default spacing and letter spacing
    1.72 +   adjustments are made after kerning has been applied.
    1.73 +
    1.74 +  <p>When set to ‘<code class=property>auto</code>’, user agents can
    1.75 +   determine whether to apply kerning or not based on a number of factors:
    1.76 +   text size, script, or other factors that influence text processing speed.
    1.77 +   Authors who want proper kerning should use ‘<a href="#normal2"><code
    1.78 +   class=property>normal</code></a>’ to explicitly enable kerning.
    1.79 +   Likewise, some authors may prefer to disable kerning in situations where
    1.80 +   performance is more important than precise appearance. However, in
    1.81 +   well-designed modern implementations the use of kerning generally does not
    1.82 +   have a large impact on text rendering speed.</p>
    1.83    <!-- prop: font-variant-ligatures -->
    1.84  
    1.85    <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
    1.86 @@ -3559,15 +3577,7 @@
    1.87    </table>
    1.88  
    1.89    <p>Ligatures and contextual forms are ways of combining glyphs to produce
    1.90 -   more harmonized forms. A value of ‘<a href="#normal2"><code
    1.91 -   class=property>normal</code></a>’ implies that common default features
    1.92 -   are enabled, <a href="#font-feature-resolution">as described in detail in
    1.93 -   the next section</a>. For OpenType fonts, common ligatures and contextual
    1.94 -   forms are on by default, discretionary and historical ligatures are not. A
    1.95 -   value of ‘<code class=property>none</code>’ implies that all types of
    1.96 -   ligatures and contextual forms covered by this property are explicitly
    1.97 -   disabled. In situations where ligatures are not considered necessary, this
    1.98 -   may improve the speed of text rendering.
    1.99 +   more harmonized forms.
   1.100  
   1.101    <pre
   1.102     class=prod><dfn id=common-lig-values><var>&lt;common-lig-values&gt;</var></dfn>        = [ <a href="#common-ligatures">common-ligatures</a> | <a href="#no-common-ligatures">no-common-ligatures</a> ]</pre>
   1.103 @@ -3584,6 +3594,22 @@
   1.104    <p>Individual values have the following meanings:
   1.105  
   1.106    <dl>
   1.107 +   <dt><dfn id=font-variant-ligatures-normal-value
   1.108 +    title="font-variant-ligatures normal value">normal</dfn>
   1.109 +
   1.110 +   <dd>A value of ‘<a href="#normal2"><code
   1.111 +    class=property>normal</code></a>’ specifies that common default
   1.112 +    features are enabled, <a href="#font-feature-resolution">as described in
   1.113 +    detail in the next section</a>. For OpenType fonts, common ligatures and
   1.114 +    contextual forms are on by default, discretionary and historical
   1.115 +    ligatures are not.
   1.116 +
   1.117 +   <dt><dfn id=font-variant-ligatures-none-value>none</dfn>
   1.118 +
   1.119 +   <dd>Specifies that all types of ligatures and contextual forms covered by
   1.120 +    this property are explicitly disabled. In situations where ligatures are
   1.121 +    not considered necessary, this may improve the speed of text rendering.
   1.122 +
   1.123     <dt><dfn id=common-ligatures>common-ligatures</dfn>
   1.124  
   1.125     <dd>Enables display of common ligatures (OpenType features: <span
   1.126 @@ -3649,8 +3675,9 @@
   1.127    </dl>
   1.128  
   1.129    <p>Required ligatures, needed for correctly rendering complex scripts, are
   1.130 -   not affected by the settings above, including ‘<code
   1.131 -   class=property>none</code>’ (OpenType feature: <span
   1.132 +   not affected by the settings above, including ‘<a
   1.133 +   href="#font-variant-ligatures-none-value"><code
   1.134 +   class=property>none</code></a>’ (OpenType feature: <span
   1.135     class=tag>rlig</span>).</p>
   1.136    <!-- prop: font-variant-position -->
   1.137  
   1.138 @@ -3723,7 +3750,7 @@
   1.139     class=property>super</code>’ imply the appropriate variant glyph is
   1.140     displayed when available in the font (OpenType features: <span
   1.141     class=tag>subs, sups</span>). A value of ‘<a href="#normal2"><code
   1.142 -   class=property>normal</code></a>’ implies neither of these alternate
   1.143 +   class=property>normal</code></a>’ specifies neither of these alternate
   1.144     glyphs are substituted.
   1.145  
   1.146    <p>Because of the semantic nature of subscripts and superscripts, when the
   1.147 @@ -4923,12 +4950,14 @@
   1.148  
   1.149    <p>The value ‘<a href="#normal2"><code
   1.150     class=property>normal</code></a>’ resets all other font feature
   1.151 -   properties to their inital value. The ‘<code
   1.152 -   class=property>none</code>’ value sets ‘<a
   1.153 +   properties to their inital value. The ‘<a
   1.154 +   href="#font-variant-ligatures-none-value"><code
   1.155 +   class=property>none</code></a>’ value sets ‘<a
   1.156     href="#propdef-font-variant-ligatures"><code
   1.157 -   class=property>font-variant-ligatures</code></a>’ to ‘<code
   1.158 -   class=property>none</code>’ and resets all other font feature properties
   1.159 -   to their initial value. Like other shorthands, using ‘<a
   1.160 +   class=property>font-variant-ligatures</code></a>’ to ‘<a
   1.161 +   href="#font-variant-ligatures-none-value"><code
   1.162 +   class=property>none</code></a>’ and resets all other font feature
   1.163 +   properties to their initial value. Like other shorthands, using ‘<a
   1.164     href="#propdef-font-variant"><code
   1.165     class=property>font-variant</code></a>’ resets unspecified font-variant
   1.166     subproperties to their initial values. It does not reset the values of
   1.167 @@ -5133,13 +5162,14 @@
   1.168    </table>
   1.169  
   1.170    <p>The value of ‘<a href="#normal2"><code
   1.171 -   class=property>normal</code></a>’ implies that when rendering with
   1.172 -   OpenType fonts the language of the document is used to infer the OpenType
   1.173 -   language system, used to select language specific features when rendering.
   1.174 -   The value of the &lt;string&gt; is a single three-letter OpenType <a
   1.175 +   class=property>normal</code></a>’ specifies that when rendering with
   1.176 +   OpenType fonts the content language of the element is used to infer the
   1.177 +   OpenType language system. The value of the &lt;string&gt; is a single
   1.178 +   three-letter OpenType <a
   1.179     href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
   1.180     system tag</a>, defined in the layout tag registry of the OpenType
   1.181 -   specification.
   1.182 +   specification. It indicates the OpenType language system to be used
   1.183 +   instead of the language system implied by the language of the element.
   1.184  
   1.185    <div class=example>
   1.186     <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
   1.187 @@ -5479,25 +5509,25 @@
   1.188    <p>Specifically, font family name data is handled differently across
   1.189     platforms. For TrueType and OpenType fonts these names are contained in
   1.190     the ‘<code class=property>name</code>’ table, in name records with
   1.191 -   name ID 1. Mulitple names can be stored for different locales but
   1.192 +   name ID 1. Mulitple names can be stored for different locales, but
   1.193     Microsoft recommends fonts always include at least a US English version of
   1.194     the name. On Windows, Microsoft made the decision for backwards
   1.195     compatibility to limit this family name to a maximum of four faces; for
   1.196     larger groupings the "preferred family" (name ID 16) or "WWS family" (name
   1.197     ID 21) can be used. Other platforms such as OSX don't have this
   1.198 -   limitation, the family name is used to define all possible groupings.
   1.199 +   limitation, so the family name is used to define all possible groupings.
   1.200  
   1.201    <p>Other name table data provides names used to uniquely identify a
   1.202     specific face within a family. The full font name (name ID 4) and the
   1.203 -   Postscript name (name ID 6) describe a single face uniquely. The bold face
   1.204 -   of the Gill Sans family has a fullname of "Gill Sans Bold" and a
   1.205 -   Postscript name of "GillSans-Bold". There can be multiple localized
   1.206 -   versions of the fullname for a given face but the Postscript name is
   1.207 +   Postscript name (name ID 6) describe a single face uniquely. For example,
   1.208 +   the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
   1.209 +   and a Postscript name of "GillSans-Bold". There can be multiple localized
   1.210 +   versions of the fullname for a given face, but the Postscript name is
   1.211     always a unique name made from a limited set of ASCII characters.
   1.212  
   1.213    <p>On various platforms, different names are used to search for a font. For
   1.214     example, with the Windows GDI CreateIndirectFont API, either a family or
   1.215 -   fullname can be used to lookup a face while on Mac OS X the
   1.216 +   fullname can be used to lookup a face, while on Mac OS X the
   1.217     CTFontCreateWithName API call is used to lookup a given face using the
   1.218     fullname and Postscript name. Under Linux, the fontconfig API allows fonts
   1.219     to be searched using any of these names. In situations where platform
   1.220 @@ -6139,6 +6169,10 @@
   1.221     <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
   1.222      title=font-variant-ligatures><strong>6.4</strong></a>
   1.223  
   1.224 +   <li>font-variant-ligatures normal value, <a
   1.225 +    href="#font-variant-ligatures-normal-value" title="font-variant-ligatures
   1.226 +    normal value"><strong>6.4</strong></a>
   1.227 +
   1.228     <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
   1.229      title=font-variant-numeric><strong>6.7</strong></a>
   1.230  
   1.231 @@ -6204,6 +6238,9 @@
   1.232     <li>no-historical-ligatures, <a href="#no-historical-ligatures"
   1.233      title=no-historical-ligatures><strong>6.4</strong></a>
   1.234  
   1.235 +   <li>none, <a href="#font-variant-ligatures-none-value"
   1.236 +    title=none><strong>6.4</strong></a>
   1.237 +
   1.238     <li>normal, <a href="#normal" title=normal><strong>6.6</strong></a>, <a
   1.239      href="#normal0" title=normal><strong>6.7</strong></a>, <a href="#normal1"
   1.240      title=normal><strong>6.8</strong></a>, <a href="#normal2"

mercurial