[css-fonts] minor edits of font-variant subproperties

Thu, 30 May 2013 17:21:45 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Thu, 30 May 2013 17:21:45 +0900
changeset 8280
1792b2222114
parent 8279
a548c37dce4c
child 8281
eacefdd383ce

[css-fonts] minor edits of font-variant subproperties

css-fonts/Fonts.html file | annotate | diff | comparison | revisions
     1.1 --- a/css-fonts/Fonts.html	Thu May 30 16:51:03 2013 +0900
     1.2 +++ b/css-fonts/Fonts.html	Thu May 30 17:21:45 2013 +0900
     1.3 @@ -3845,17 +3845,22 @@
     1.4     given contiguous run of text, if a variant glyph is not available for all
     1.5     the characters in the run, simulated glyphs must be synthesized for all
     1.6     characters using reduced forms of the glyphs that would be used without
     1.7 -   this feature applied. This is done to avoid a mixture of variant glyphs
     1.8 -   and synthesized ones that would not align correctly.
     1.9 -
    1.10 -  <p>In the case of OpenType fonts that lack subscript or superscript glyphs
    1.11 -   for a given character, user agents must use the appropriate subscript and
    1.12 -   superscript metrics specified in the selected font's <a
    1.13 +   this feature applied. This is done per run to avoid a mixture of variant
    1.14 +   glyphs and synthesized ones that would not align correctly. In the case of
    1.15 +   OpenType fonts that lack subscript or superscript glyphs for a given
    1.16 +   character, user agents must use the appropriate subscript and superscript
    1.17 +   metrics specified in the selected font's <a
    1.18     href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
    1.19     table</a> <a href="#OPENTYPE"
    1.20     rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
    1.21     and offset of the synthesized substitutes.
    1.22  
    1.23 +  <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
    1.24 +   using superscript metrics" src=superscript-alt-synth.png>
    1.25 +   <p class=caption>Superscript alternate glyph (left), synthesized
    1.26 +    superscript glyphs (middle), and incorrect mixture of the two (right)
    1.27 +  </div>
    1.28 +
    1.29    <p>In the past, user agents have used font-size and vertical-align to
    1.30     simulate subscripts and superscripts for the <a class=tag
    1.31     href="#sub">sub</a> and <span class=tag>sup</span> elements. To allow a
    1.32 @@ -3867,21 +3872,15 @@
    1.33  
    1.34    <p>Authors should note that fonts typically only provide subscript and
    1.35     superscript glyphs for a subset of all characters supported by the font.
    1.36 -   While subscript and superscript glyphs are often available for Latin
    1.37 -   numbers, glyphs for punctuation and letter characters are less frequently
    1.38 -   provided. The synthetic fallback rules defined for this property assure
    1.39 -   that subscripts and superscripts will always appear but the appearance may
    1.40 -   not match author expectations if the font used does not provide the
    1.41 -   appropriate alternate glyph for all characters contained in a subscript or
    1.42 -   superscript.
    1.43 -
    1.44 -  <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
    1.45 -   using superscript metrics" src=superscript-alt-synth.png>
    1.46 -   <p class=caption>Superscript alternate glyph (left), synthesized
    1.47 -    superscript glyphs (middle), and incorrect mixture of the two (right)
    1.48 -  </div>
    1.49 -
    1.50 -  <p>This property is not cumulative, applying it to subelements within a
    1.51 +   For example, while subscript and superscript glyphs are often available
    1.52 +   for Latin numbers, glyphs for punctuation and letter characters are less
    1.53 +   frequently provided. The synthetic fallback rules defined for this
    1.54 +   property assure that subscripts and superscripts will always appear but
    1.55 +   the appearance may not match author expectations if the font used does not
    1.56 +   provide the appropriate alternate glyph for all characters contained in a
    1.57 +   subscript or superscript.
    1.58 +
    1.59 +  <p>This property is not cumulative. Applying it to elements within a
    1.60     subscript or superscript won't nest the placement of a subscript or
    1.61     superscript glyph. Images contained within text runs where the value of
    1.62     this property is ‘<a href="#sub"><code class=property>sub</code></a>’
    1.63 @@ -3892,8 +3891,14 @@
    1.64     would for the default glyphs, since this property does not affect the
    1.65     baseline position.
    1.66  
    1.67 -  <p>Because of these limitations, font-variant-position is not recommended
    1.68 -   for use in user agent stylesheets. Authors should use it in cases where
    1.69 +  <p class=issue>Some have suggested that text decorations should apply to
    1.70 +   the visual baseline of the variant glyphs, rather than the baseline
    1.71 +   defined by the font.
    1.72 +
    1.73 +  <p>Because of these limitations, ‘<a
    1.74 +   href="#propdef-font-variant-position"><code
    1.75 +   class=property>font-variant-position</code></a>’ is not recommended for
    1.76 +   use in user agent stylesheets. Authors should use it in cases where
    1.77     subscripts or superscripts will only contain the narrow range of
    1.78     characters supported by the fonts specified.
    1.79  
    1.80 @@ -3914,7 +3919,7 @@
    1.81     <pre>@supports ( font-variant-position: sub ) {
    1.82  
    1.83    sub {
    1.84 -    vertical-align: inherit;
    1.85 +    vertical-align: baseline;
    1.86      font-size: 100%;
    1.87      line-height: inherit;
    1.88      font-variant-position: sub;
    1.89 @@ -3991,7 +3996,10 @@
    1.90       <td>no
    1.91    </table>
    1.92  
    1.93 -  <p>Specifies control over capitalized forms.
    1.94 +  <p>This property allows the selection of alternate glyphs used for small or
    1.95 +   petite capitals or for titling. These glyphs are specifically designed to
    1.96 +   blend well with the surrounding normal glyphs, to maintain the weight and
    1.97 +   readability which suffers when text is simply resized to fit this purpose.
    1.98  
    1.99    <p>Individual values have the following meanings:
   1.100  
   1.101 @@ -4041,11 +4049,6 @@
   1.102      for this situation.
   1.103    </dl>
   1.104  
   1.105 -  <p>This property allows the selection of alternate glyphs used for small or
   1.106 -   petite capitals or for titling. These glyphs are specifically designed to
   1.107 -   blend well with the surrounding normal glyphs, to maintain the weight and
   1.108 -   readability which suffers when text is simply resized to fit this purpose.
   1.109 -
   1.110    <p>The availability of these glyphs is based on whether a given feature is
   1.111     defined or not in the feature list of the font. User agents can optionally
   1.112     decide this on a per-script basis but should explicitly not decide this on
   1.113 @@ -4105,7 +4108,7 @@
   1.114     effect.
   1.115  
   1.116    <p>When casing transforms are used to simulate small capitals, the casing
   1.117 -   transformations should match those used for the <span
   1.118 +   transformations must match those used for the <span
   1.119     class=property>‘<code class=property>text-transform</code>’</span>
   1.120     property.
   1.121  

mercurial