css-fonts/Fonts.html

Mon, 26 Aug 2013 16:14:56 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Mon, 26 Aug 2013 16:14:56 +0900
changeset 8930
77d3edf17f8c
parent 8927
9c4ae1da9e9a
child 8957
b3ad55a4d7fc
permissions
-rw-r--r--

[css3-fonts] revise description of font-size-adjust to prevent confusion

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
     2 "http://www.w3.org/TR/html4/strict.dtd">
     4 <html lang=en>
     5  <head><meta content="text/html;charset=utf-8" http-equiv=Content-Type>
     7   <title>CSS Fonts Module Level 3</title>
     8   <!--
     9       FIXME when publishing: copy the current default.css and link to
    10       "default.css" rather than "../default.css"
    11    -->
    12   <link href="../default.css" rel=stylesheet type="text/css">
    13   <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
    14   <!-- I'm just experimenting here, don't get your bee in a bonnet -->
    15   <script src="http://use.typekit.com/xon2bky.js"
    16   type="text/javascript"></script>
    17   <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
    19   <style type="text/css">
    21   body, th, td, h1, h2, h3, h4, h5, h6 {
    22     font-family: "myriad-pro", sans-serif !important;
    23   }
    25   body {
    26     padding: 2em 70px 2em 70px;
    27   }
    29   p + p, p.mtb {
    30     margin-top: 0.8em;
    31     text-indent: 0px;
    32   }
    34   #bolderlighter {
    35     width: 40%;
    36   }
    38   #bolderlighter th {
    39     text-align: center;
    40   }
    42   #fontformats td, #eventhandlers td, #fontformats th, #eventhandlers th {
    43     padding-right: 2em;
    44     text-align: left;
    45   }
    47   dd {
    48     margin-bottom: 1em;
    49   }
    51   #authors dd {
    52     margin-bottom: 0;
    53   }
    55   #fontstylematchingalg {
    56     list-style-type: lower-alpha;
    57   }
    59   #fontmatchingalg ul, #fontmatchingalg ol {
    60     margin-top: 0.8em;
    61   }
    63   #fontmatchingalg li + li {
    64     margin-top: 0.8em;
    65   }
    67   div.example {
    68     padding: 1em;
    69     margin-top: 1em;
    70   }
    72   div.example + div.example {
    73     margin-top: 2em;
    74   }
    76   div.figure {
    77     page-break-inside: avoid;
    78   }
    80   pre.prod { white-space: pre-wrap; margin: 1em 0 1em 2em }
    82   div.featex {
    83     width: 700px;
    84   }
    86   div.featex img {
    87     margin: auto;
    88     display: block;
    89   }
    91   span.tag {
    92     font-family: monospace;
    93     font-size: 120%;
    94   }
    96   ol ol {
    97     list-style-type: lower-alpha;
    98   }
   100   .idl-code {
   101     font-weight: bold;
   102     color: #c50;
   103   }
   104   </style>
   105   <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
   106   type="text/css">
   107   <script defer=defer
   108   src="http://test.csswg.org/harness/annotate.js#CSS3-FONTS_DEV"
   109   type="text/javascript"></script>
   111  <body>
   112   <div class=head> <!--begin-logo-->
   113    <p><a href="http://www.w3.org/"><img alt=W3C height=48
   114     src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
   116    <h1>CSS Fonts Module Level 3</h1>
   118    <h2 class="no-num no-toc" id=editors-draft-26-august-2013>Editor's Draft
   119     26 August 2013</h2>
   121    <dl id=authors>
   122     <dt>This version:
   124     <dd><a
   125      href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
   126      <!-- <dd><a href="http://www.w3.org/TR/2013/ED-css-fonts-3-20130826/">http://www.w3.org/TR/2013/ED-css-fonts-3-20130826/</a>  -->
   129     <dt>Latest version:
   131     <dd><a
   132      href="http://www.w3.org/TR/css-fonts-3/">http://www.w3.org/TR/css-fonts-3/</a>
   134     <dt>Latest editor's draft:
   136     <dd><a
   137      href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
   138      (<a
   139      href="https://dvcs.w3.org/hg/csswg/log/tip/css-fonts/Fonts.html">change
   140      log</a>)
   142     <dt>Previous version:
   144     <dd><a
   145      href="http://www.w3.org/TR/2013/WD-css-fonts-3-20130711/">http://www.w3.org/TR/2013/WD-css-fonts-3-20130711/</a>
   147     <dt>Issues List:
   149     <dd><a href="http://www.w3.org/Style/CSS/Tracker/products/18">CSS3 Fonts
   150      issues in Tracker</a>
   152     <dd><a
   153      href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Fonts&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED">CSS3
   154      Fonts issues in Bugzilla</a>
   156     <dt>Discussion:
   158     <dd><a
   159      href="mailto:www-style@w3.org?subject=%5Bcss-fonts%5D%20feedback">www-style@w3.org</a>
   160      with subject line “<kbd>[css-fonts] <var>… message topic
   161      …</var></kbd>” (<a
   162      href="http://lists.w3.org/Archives/Public/www-style/"
   163      rel=discussion>archives</a>)
   165     <dt>Editor:
   167     <dd><a href="mailto:jdaggett@mozilla.com">John Daggett (Mozilla)</a>
   168    </dl>
   169    <!--begin-copyright-->
   170    <p class=copyright><a
   171     href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
   172     rel=license>Copyright</a> © 2013 <a href="http://www.w3.org/"><abbr
   173     title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
   174     href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of
   175     Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr
   176     title="European Research Consortium for Informatics and
   177     Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>,
   178     <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C
   179     <a
   180     href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
   181     <a
   182     href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
   183     and <a
   184     href="http://www.w3.org/Consortium/Legal/copyright-documents">document
   185     use</a> rules apply.</p>
   186    <!--end-copyright-->
   187    <hr title="Separator for header">
   188   </div>
   190   <h2 class="no-num no-toc" id=abstract>Abstract</h2>
   192   <p>This CSS3 module describes how font properties are specified and how
   193    font resources are loaded dynamically. The contents of this specification
   194    are a consolidation of content previously divided into <a
   195    href="http://www.w3.org/TR/2002/WD-css3-fonts-20020802/">CSS3 Fonts</a>
   196    and <a href="http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/">CSS3
   197    Web Fonts</a> modules. The description of font load events was moved into
   198    the <a href="http://dev.w3.org/csswg/css-font-load-events/">CSS3 Font Load
   199    Events</a> module.
   201   <h2 class="no-num no-toc" id=status>Status of this document</h2>
   202   <!--begin-status-->
   204   <p>This is a public copy of the editors' draft. It is provided for
   205    discussion only and may change at any moment. Its publication here does
   206    not imply endorsement of its contents by W3C. Don't cite this document
   207    other than as work in progress.
   209   <p>The (<a
   210    href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
   211    mailing list <a
   212    href="mailto:www-style@w3.org?Subject=%5Bcss3-fonts%5D%20PUT%20SUBJECT%20HERE">
   213    www-style@w3.org</a> (see <a
   214    href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
   215    discussion of this specification. When sending e-mail, please put the text
   216    “css3-fonts” in the subject, preferably like this:
   217    “[<!---->css3-fonts<!---->] <em>…summary of comment…</em>”
   219   <p>This document was produced by the <a
   220    href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
   221    the <a href="http://www.w3.org/Style/">Style Activity</a>).
   223   <p>This document was produced by a group operating under the <a
   224    href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
   225    2004 W3C Patent Policy</a>. W3C maintains a <a
   226    href="http://www.w3.org/2004/01/pp-impl/32061/status"
   227    rel=disclosure>public list of any patent disclosures</a> made in
   228    connection with the deliverables of the group; that page also includes
   229    instructions for disclosing a patent. An individual who has actual
   230    knowledge of a patent which the individual believes contains <a
   231    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   232    Claim(s)</a> must disclose the information in accordance with <a
   233    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   234    6 of the W3C Patent Policy</a>.</p>
   235   <!--end-status-->
   237   <h3 class="no-num no-toc" id=atrisk>Features at risk</h3>
   239   <p>The following features are at risk and may be removed when exiting CR:
   241   <ul>
   242    <li>fallback handling for text decoration in superscript/subscript variant
   243     glyphs (‘<a href="#propdef-font-variant-position"><code
   244     class=property>font-variant-position</code></a>’)
   246    <li>‘<a href="#propdef-font-language-override"><code
   247     class=property>font-language-override</code></a>’ property
   248   </ul>
   249   <!--
   250 <p>This draft is a <strong>Last Call Working Draft</strong>.
   251 Please send comments to the 
   252 <a href="http://lists.w3.org/Archives/Public/www-style/">www-style mailing list</a>
   253 as described above.  The <strong>deadline for comments</strong> 
   254 is six weeks after the date of publication in the header, 22 August 2013.</p>
   255 -->
   257   <h2 class="no-num no-toc" id=contents>Table of contents</h2>
   258   <!--begin-toc-->
   260   <ul class=toc>
   261    <li><a href="#introduction"><span class=secno>1 </span>Introduction</a>
   263    <li><a href="#typography-background"><span class=secno>2 </span>Typography
   264     Background</a>
   266    <li><a href="#basic-font-props"><span class=secno>3 </span>Basic Font
   267     Properties</a>
   268     <ul class=toc>
   269      <li><a href="#font-family-prop"><span class=secno>3.1 </span>Font
   270       family: the font-family property</a>
   271       <ul class=toc>
   272        <li><a href="#generic-font-families"><span class=secno>3.1.1
   273         </span>Generic font families</a>
   274       </ul>
   276      <li><a href="#font-weight-prop"><span class=secno>3.2 </span>Font
   277       weight: the font-weight property</a>
   279      <li><a href="#font-stretch-prop"><span class=secno>3.3 </span>Font
   280       width: the font-stretch property</a>
   282      <li><a href="#font-style-prop"><span class=secno>3.4 </span>Font style:
   283       the font-style property</a>
   285      <li><a href="#font-size-prop"><span class=secno>3.5 </span>Font size:
   286       the font-size property</a>
   288      <li><a href="#font-size-adjust-prop"><span class=secno>3.6
   289       </span>Relative sizing: the font-size-adjust property</a>
   291      <li><a href="#font-prop"><span class=secno>3.7 </span>Shorthand font
   292       property: the font property</a>
   294      <li><a href="#font-synthesis-prop"><span class=secno>3.8
   295       </span>Controlling synthetic faces: the font-synthesis property</a>
   296     </ul>
   298    <li><a href="#font-resources"><span class=secno>4 </span>Font
   299     Resources</a>
   300     <ul class=toc>
   301      <li><a href="#font-face-rule"><span class=secno>4.1 </span>The
   302       <code>@font-face</code> rule</a>
   304      <li><a href="#font-family-desc"><span class=secno>4.2 </span>Font
   305       family: the font-family descriptor</a>
   307      <li><a href="#src-desc"><span class=secno>4.3 </span>Font reference: the
   308       src descriptor</a>
   310      <li><a href="#font-prop-desc"><span class=secno>4.4 </span>Font property
   311       descriptors: the font-style, font-weight, font-stretch descriptors</a>
   313      <li><a href="#unicode-range-desc"><span class=secno>4.5 </span>Character
   314       range: the unicode-range descriptor</a>
   316      <li><a href="#composite-fonts"><span class=secno>4.6 </span>Using
   317       character ranges to define composite fonts</a>
   319      <li><a href="#font-rend-desc"><span class=secno>4.7 </span>Font
   320       features: the font-variant and font-feature-settings descriptors</a>
   322      <li><a href="#font-face-loading"><span class=secno>4.8 </span>Font
   323       loading guidelines</a>
   325      <li><a href="#font-fetching-requirements"><span class=secno>4.9
   326       </span>Font fetching requirements</a>
   327     </ul>
   329    <li><a href="#font-matching-algorithm"><span class=secno>5 </span>Font
   330     Matching Algorithm</a>
   331     <ul class=toc>
   332      <li><a href="#font-family-casing"><span class=secno>5.1 </span>Case
   333       sensitivity of font family names</a>
   335      <li><a href="#font-style-matching"><span class=secno>5.2 </span>Matching
   336       font styles</a>
   338      <li><a href="#cluster-matching"><span class=secno>5.3 </span>Cluster
   339       matching</a>
   341      <li><a href="#char-handling-issues"><span class=secno>5.4
   342       </span>Character handling issues</a>
   344      <li><a href="#font-matching-changes"><span class=secno>5.5 </span>Font
   345       matching changes since CSS 2.1</a>
   347      <li><a href="#font-matching-examples"><span class=secno>5.6 </span>Font
   348       matching examples</a>
   349     </ul>
   351    <li><a href="#font-rend-props"><span class=secno>6 </span>Font Feature
   352     Properties</a>
   353     <ul class=toc>
   354      <li><a href="#glyph-selection-positioning"><span class=secno>6.1
   355       </span>Glyph selection and positioning</a>
   357      <li><a href="#language-specific-support"><span class=secno>6.2
   358       </span>Language-specific display</a>
   360      <li><a href="#font-kerning-prop"><span class=secno>6.3 </span>Kerning:
   361       the font-kerning property</a>
   363      <li><a href="#font-variant-ligatures-prop"><span class=secno>6.4
   364       </span>Ligatures: the font-variant-ligatures property</a>
   366      <li><a href="#font-variant-position-prop"><span class=secno>6.5
   367       </span>Subscript and superscript forms: the font-variant-position
   368       property</a>
   370      <li><a href="#font-variant-caps-prop"><span class=secno>6.6
   371       </span>Capitalization: the font-variant-caps property</a>
   373      <li><a href="#font-variant-numeric-prop"><span class=secno>6.7
   374       </span>Numerical formatting: the font-variant-numeric property</a>
   376      <li><a href="#font-variant-alternates-prop"><span class=secno>6.8
   377       </span>Alternates and swashes: the font-variant-alternates property</a>
   380      <li><a href="#font-feature-values"><span class=secno>6.9 </span>Defining
   381       font specific alternates: the <code>@font-feature-values</code>
   382       rule</a>
   383       <ul class=toc>
   384        <li><a href="#basic-syntax"><span class=secno>6.9.1 </span>Basic
   385         syntax</a>
   387        <li><a href="#multi-valued-feature-value-definitions"><span
   388         class=secno>6.9.2 </span>Multi-valued feature value definitions</a>
   389       </ul>
   391      <li><a href="#font-variant-east-asian-prop"><span class=secno>6.10
   392       </span>East Asian text rendering: the font-variant-east-asian
   393       property</a>
   395      <li><a href="#font-variant-prop"><span class=secno>6.11 </span>Overall
   396       shorthand for font rendering: the font-variant property</a>
   398      <li><a href="#font-feature-settings-prop"><span class=secno>6.12
   399       </span>Low-level font feature settings control: the
   400       font-feature-settings property</a>
   402      <li><a href="#font-language-override-prop"><span class=secno>6.13
   403       </span>Font language override: the font-language-override property</a>
   404     </ul>
   406    <li><a href="#font-feature-resolution"><span class=secno>7 </span>Font
   407     Feature Resolution </a>
   408     <ul class=toc>
   409      <li><a href="#default-features"><span class=secno>7.1 </span>Default
   410       features</a>
   412      <li><a href="#feature-precedence"><span class=secno>7.2 </span>Feature
   413       precedence</a>
   415      <li><a href="#feature-precedence-examples"><span class=secno>7.3
   416       </span>Feature precedence examples</a>
   417     </ul>
   419    <li><a href="#object-model"><span class=secno>8 </span>Object Model</a>
   420     <ul class=toc>
   421      <li><a href="#om-fontface"><span class=secno>8.1 </span>The
   422       <code>CSSFontFaceRule</code> interface</a>
   424      <li><a href="#om-fontfeaturevalues"><span class=secno>8.2 </span>The
   425       <code>CSSFontFeatureValuesRule</code> interface</a>
   426     </ul>
   428    <li class=no-num><a href="#platform-props-to-css">Appendix A: Mapping
   429     platform font properties to CSS properties</a>
   431    <li class=no-num><a href="#ch-ch-ch-changes">Changes</a>
   432     <ul class=toc>
   433      <li class=no-num><a href="#recent-changes"> Changes from the July 2013
   434       CSS3 Fonts Last Call Working Draft</a>
   435     </ul>
   437    <li class=no-num><a href="#acknowledgments">Acknowledgments</a>
   439    <li class=no-num><a href="#conformance"> Conformance</a>
   440     <ul class=toc>
   441      <li class=no-num><a href="#conventions"> Document Conventions</a>
   443      <li class=no-num><a href="#conformance-classes"> Conformance Classes</a>
   446      <li class=no-num><a href="#partial"> Partial Implementations</a>
   448      <li class=no-num><a href="#experimental"> Experimental
   449       Implementations</a>
   451      <li class=no-num><a href="#testing"> Non-Experimental
   452       Implementations</a>
   453     </ul>
   455    <li class=no-num><a href="#references">References</a>
   456     <ul class=toc>
   457      <li class=no-num><a href="#normative-references">Normative
   458       References</a>
   460      <li class=no-num><a href="#other-references">Other References</a>
   461     </ul>
   463    <li class=no-num><a href="#index">Index</a>
   465    <li class=no-num><a href="#property-index">Property index</a>
   466   </ul>
   467   <!--end-toc-->
   469   <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
   471   <p>A font provides a resource containing the visual representation of
   472    characters. At the simplest level it contains information that maps
   473    character codes to shapes (called glyphs) that represent these characters.
   474    Fonts sharing a common design style are commonly grouped into font
   475    families classified by a set of standard font properties. Within a family,
   476    the shape displayed for a given character can vary by stroke weight, slant
   477    or relative width, among others. An individual font face is described by a
   478    unique combination of these properties. For a given range of text, CSS
   479    font properties are used to select a font family and a specific font face
   480    within that family to be used when rendering that text. As a simple
   481    example, to use the bold form of Helvetica one could use:
   483   <pre>body {
   484     font-family: Helvetica;
   485     font-weight: bold;
   486 }</pre>
   488   <p>Font resources may be installed locally on the system on which a user
   489    agent is running or downloadable. For local font resources descriptive
   490    information can be obtained directly from the font resource. For
   491    downloadable font resources (sometimes referred to as web fonts), the
   492    descriptive information is included with the reference to the font
   493    resource.
   495   <p>Families of fonts typically don't contain a single face for each
   496    possible variation of font properties. The CSS font selection mechanism
   497    describes how to match a given set of CSS font properties to a single font
   498    face.
   500   <h2 id=typography-background><span class=secno>2 </span>Typography
   501    Background</h2>
   503   <p><em>This section is non-normative.</em>
   505   <p> Typographic traditions vary across the globe, so there is no unique way
   506    to classify all fonts across languages and cultures. For even common Latin
   507    letters, wide variations are possible:
   509   <div class=figure><img alt="variations in glyphs for a single character"
   510    src=aaaaaa.png>
   511    <p class=caption>One character, many glyph variations
   512   </div>
   514   <p>Differences in the anatomy of letterforms is one way to distinguish
   515    fonts. For Latin fonts, flourishes at the ends of a character's main
   516    strokes, or serifs, can distinguish a font from those without. Similar
   517    comparisons exist in non-Latin fonts between fonts with tapered strokes
   518    and those using primarily uniform strokes:
   520   <div class=figure><img alt="serif vs. non-serifs" src=serifvssansserif.png>
   521    <p class=caption>Letterforms with and without serifs
   522   </div>
   524   <div class=figure><img alt="serif vs. non-serifs for japanese"
   525    src=minchovsgothic.png>
   526    <p class=caption>Similar groupings for Japanese typefaces
   527   </div>
   529   <p>Fonts contain letterforms and the data needed to map characters to these
   530    letterforms. Often this may be a simple one-to-one mapping, but more
   531    complex mappings are also possible. The use of combining diacritic marks
   532    creates many variations for an underlying letterform:
   534   <div class=figure><img alt="diacritic marks" src=aaaaaa-diacritics.png>
   535    <p class=caption>Variations with diacritic marks
   536   </div>
   538   <p>A sequence of characters can be represented by a single glyph known as a
   539    ligature:
   541   <div class=figure><img alt="example of a fi ligature"
   542    src=final-ligature.png>
   543    <p class=caption>Ligature example
   544   </div>
   546   <p>Visual transformations based on textual context are often stylistic
   547    option in European languages. They are required to correctly render
   548    languages like Arabic, the lam and alef characters below <em>must</em> be
   549    combined when they exist in sequence:
   551   <div class=figure><img alt="lam alef ligature" src=lamaleflig.png>
   552    <p class=caption>Required Arabic ligature
   553   </div>
   555   <p>The relative complexity of these shaping transformations requires
   556    additional data within the font.
   558   <p>Sets of font faces with various stylistic variations are often grouped
   559    together into font families. In the simplest case a regular face is
   560    supplemented with bold and italic faces, but much more extensive groupings
   561    are possible. Variations in the thickness of letterform strokes, the <dfn
   562    id=weight>weight</dfn>, and the overall proportions of the letterform, the
   563    <dfn id=width>width</dfn>, are most common. In the example below, each
   564    letter uses a different font face within the Univers font family. The
   565    width used increases from top to bottom and the weight increases from left
   566    to right:
   568   <div class=figure><img alt="various width and weight variations within a
   569    single family" src=weightwidthvariations.png>
   570    <p class=caption>Weight and width variations within a single font family
   571   </div>
   573   <p>Creating fonts that support multiple scripts is a difficult task;
   574    designers need to understand the cultural traditions surrounding the use
   575    of type in different scripts and come up with letterforms that somehow
   576    share a common theme. Many languages often share a common script and each
   577    of these languages may have noticeable stylistic differences. For example,
   578    the Arabic script is shared by Persian and Urdu and Cyrillic is used with
   579    many languages, not just Russian.
   581   <p>The <a href="#character-map"><em>character map</em></a> of a font
   582    defines the mapping of characters to glyphs for that font. If a document
   583    contains characters not supported by the <a href="#character-map"><em
   584    title="character map">character maps</em></a> of the fonts contained in a
   585    font family list, a user agent may use a <a
   586    href="#system-font-fallback"><em>system font fallback</em></a> procedure
   587    to locate an appropriate font that does. If no appropriate font can be
   588    found, some form of "missing glyph" character will be rendered by the user
   589    agent. System fallback can occur when the specified list of font families
   590    does not include a font that supports a given character.
   592   <p>Although the <a href="#character-map"><em>character map</em></a> of a
   593    font maps a given character to a glyph for that character, modern font
   594    technologies such as OpenType and AAT (Apple Advanced Typography) provide
   595    ways of mapping a character to different glyphs based upon feature
   596    settings. Fonts in these formats allow these features to be embedded in
   597    the font itself and controlled by applications. Common typographic
   598    features which can be specified this way include ligatures, swashes,
   599    contextual alternates, proportional and tabular figures, and automatic
   600    fractions, to list just a few. For a visual overview of OpenType features,
   601    see the <a href="#OPENTYPE-FONT-GUIDE"
   602    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
   604   <h2 id=basic-font-props><span class=secno>3 </span>Basic Font Properties</h2>
   606   <p>The particular font face used to render a character is determined by the
   607    font family and other font properties that apply to a given element. This
   608    structure allows settings to be varied independent of each other.</p>
   609   <!-- prop: font-family -->
   611   <h3 id=font-family-prop><span class=secno>3.1 </span>Font family: the <a
   612    href="#propdef-font-family">font-family</a> property</h3>
   614   <table class=propdef id=namefont-familyvalue-ltfamily-namegt-ltg>
   615    <tbody>
   616     <tr>
   617      <td>Name:
   619      <td><dfn id=propdef-font-family
   620       title="font-family!!property">font-family</dfn>
   622     <tr>
   623      <td>Value:
   625      <td>[ <a href="#family-name-value"><var>&lt;family-name&gt;</var></a> |
   626       <a href="#generic-family-value"><var>&lt;generic-family&gt;</var></a> ]
   627       #
   629     <tr>
   630      <td>Initial:
   632      <td>depends on user agent
   634     <tr>
   635      <td>Applies to:
   637      <td>all elements
   639     <tr>
   640      <td>Inherited:
   642      <td>yes
   644     <tr>
   645      <td>Percentages:
   647      <td>N/A
   649     <tr>
   650      <td>Media:
   652      <td>visual
   654     <tr>
   655      <td>Computed value:
   657      <td>as specified
   659     <tr>
   660      <td>Animatable:
   662      <td>no
   663   </table>
   665   <p>This property specifies a prioritized list of font family names or
   666    generic family names. A font family defines a set of faces that vary in
   667    weight, width or slope. CSS uses the combination of a family name with
   668    other style attributes to select an individual face. Using this selection
   669    mechanism, rather than selecting a face via the style name as is often
   670    done in design applications, allows some degree of regularity in textual
   671    display when fallback occurs.
   673   <p class=note>Designers should note that the CSS definition of font
   674    attributes used for selection are explicitly not intended to define a font
   675    taxonomy. A type designer's idea of a family may often extend to a set of
   676    faces that vary along axes other than just the standard axes of weight,
   677    width and slope. A family may extend to include both a set of serif faces
   678    and a set of sans-serif faces or vary along axes that are unique to that
   679    family. The CSS font selection mechanism merely provides a way to
   680    determine the “closest” substitute when substitution is necessary.
   682   <p>Unlike other CSS properties, component values are a comma-separated list
   683    indicating alternatives. A user agent iterates through the list of family
   684    names until it matches an available font that contains a glyph for the
   685    character to be rendered. This allows for differences in available fonts
   686    across platforms and for differences in the range of characters supported
   687    by individual fonts.
   689   <p>A font family name only specifies a name given to a set of font faces,
   690    it does not specify an individual face. For example, given the
   691    availability of the fonts below, Futura would match but Futura Medium
   692    would not:
   694   <div class=figure><img alt="family and face names"
   695    src=familyvsfacename.png>
   696    <p class=caption>Family and individual face names
   697   </div>
   699   <p>Consider the example below:
   701   <div class=example>
   702    <pre>body {
   703     font-family: Helvetica, Verdana, sans-serif;
   704 }</pre>
   706    <p>If Helvetica is available it will be used when rendering. If neither
   707     Helvetica nor Verdana is present, then the user-agent-defined sans serif
   708     font will be used.</p>
   709   </div>
   711   <p>There are two types of font family names:
   713   <dl>
   714    <dt><dfn id=family-name-value><var>&lt;family-name&gt;</var></dfn>
   716    <dd>The name of a font family of choice such as Helvetica or Verdana in
   717     the previous example.
   719    <dt><dfn id=generic-family-value><var>&lt;generic-family&gt;</var></dfn>
   721    <dd> The following generic family keywords are defined: ‘<a
   722     href="#serif"><code class=property>serif</code></a>’, ‘<a
   723     href="#sans-serif"><code class=property>sans-serif</code></a>’, ‘<a
   724     href="#cursive"><code class=property>cursive</code></a>’, ‘<a
   725     href="#fantasy"><code class=property>fantasy</code></a>’, and ‘<a
   726     href="#monospace"><code class=property>monospace</code></a>’. These
   727     keywords can be used as a general fallback mechanism when an author's
   728     desired font choices are not available. As keywords, they must not be
   729     quoted. Authors are encouraged to append a generic font family as a last
   730     alternative for improved robustness.
   731   </dl>
   733   <p>Font family names other than generic families must either be given
   734    quoted as <a
   735    href="http://www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or
   736    unquoted as a sequence of one or more <a
   737    href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
   738    This means most punctuation characters and digits at the start of each
   739    token must be escaped in unquoted font family names.
   741   <p>To illustrate this, the following declarations are invalid:
   743   <pre>
   744 font-family: Red/Black, sans-serif;
   745 font-family: "Lucida" Grande, sans-serif;
   746 font-family: Ahem!, sans-serif;
   747 font-family: test@foo, sans-serif;
   748 font-family: #POUND, sans-serif;
   749 font-family: Hawaii 5-0, sans-serif;
   750 </pre>
   752   <p>If a sequence of identifiers is given as a font family name, the
   753    computed value is the name converted to a string by joining all the
   754    identifiers in the sequence by single spaces.
   756   <p>To avoid mistakes in escaping, it is recommended to quote font family
   757    names that contain white space, digits, or punctuation characters other
   758    than hyphens:
   760   <pre>
   761 body { font-family: "New Century Schoolbook", serif }
   763 &lt;BODY STYLE="font-family: '21st Century', fantasy">
   764 </pre>
   766   <p>Font family <em>names</em> that happen to be the same as a keyword value
   767    (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
   768    class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
   769    class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
   770    class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
   771    class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
   772    class=property>cursive</code></a>’) must be quoted to prevent confusion
   773    with the keywords with the same names. The keywords ‘<code
   774    class=property>initial</code>’ and ‘<code
   775    class=property>default</code>’ are reserved for future use and must also
   776    be quoted when used as font names. UAs must not consider these keywords as
   777    matching the <a
   778    href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
   780   <p>The precise way a set of fonts are grouped into font families varies
   781    depending upon the platform font management API's. The Windows GDI API
   782    only allows four faces to be grouped into a family while the DirectWrite
   783    API and API's on OSX and other platforms support font families with a
   784    variety of weights, widths and slopes (see <a
   785    href="#platform-props-to-css">Appendix A</a> for more details).
   787   <p>Some font formats allow fonts to carry multiple localizations of the
   788    family name. User agents must recognize and correctly match all of these
   789    names independent of the underlying platform localization, system API used
   790    or document encoding:
   792   <div class=figure><img alt="examples of localized family names"
   793    src=localizedfamilynames.png>
   794    <p class=caption>Localized family names
   795   </div>
   797   <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
   798    families</h4>
   800   <p>All five generic font families are defined to exist in all CSS
   801    implementations (they need not necessarily map to five distinct actual
   802    fonts). User agents should provide reasonable default choices for the
   803    generic font families, which express the characteristics of each family as
   804    well as possible within the limits allowed by the underlying technology.
   805    User agents are encouraged to allow users to select alternative choices
   806    for the generic fonts.
   808   <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
   809    definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
   811   <p>Serif fonts represent the formal text style for a script. This often
   812    means but is not limited to glyphs that have finishing strokes, flared or
   813    tapering ends, or have actual serifed endings (including slab serifs).
   814    Serif fonts are typically proportionately-spaced. They often display a
   815    greater variation between thick and thin strokes than fonts from the ‘<a
   816    href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
   817    font family. CSS uses the term ‘<a href="#serif"><code
   818    class=property>serif</code></a>’ to apply to a font for any script,
   819    although other names may be more familiar for particular scripts, such as
   820    Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
   821    Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
   822    class=property>serif</code></a>’ more due to its typographic role rather
   823    than its actual design style. Any font that is so described may be used to
   824    represent the generic ‘<a href="#serif"><code
   825    class=property>serif</code></a>’ family.
   827   <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
   828    <p class=caption>Sample serif fonts
   829   </div>
   831   <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
   832    title="sans-serif, definition of"> <a name=sans-serif-def><dfn
   833    id=sans-serif>sans-serif</dfn></a></span></h5>
   835   <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
   836    low contrast (vertical and horizontal stems have the close to the same
   837    thickness) and have stroke endings that are plain -- without any flaring,
   838    cross stroke, or other ornamentation. Sans-serif fonts are typically
   839    proportionately-spaced. They often have little variation between thick and
   840    thin strokes, compared to fonts from the ‘<a href="#serif"><code
   841    class=property>serif</code></a>’ family. CSS uses the term ‘<a
   842    href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
   843    to a font for any script, although other names may be more familiar for
   844    particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
   845    (Korean). Any font that is so described may be used to represent the
   846    generic ‘<a href="#sans-serif"><code
   847    class=property>sans-serif</code></a>’ family.
   849   <div class=figure><img alt="sample sans-serif fonts"
   850    src=sansserifexamples.png>
   851    <p class=caption>Sample sans-serif fonts
   852   </div>
   854   <h5 class="no-num no-toc"> <span class=index-def id=cursive0
   855    title="cursive, definition of"> <a name=cursive-def><dfn
   856    id=cursive>cursive</dfn></a></span></h5>
   858   <p>Glyphs in cursive fonts generally use a more informal script style, and
   859    the result looks more like handwritten pen or brush writing than printed
   860    letterwork. CSS uses the term ‘<a href="#cursive"><code
   861    class=property>cursive</code></a>’ to apply to a font for any script,
   862    although other names such as Chancery, Brush, Swing and Script are also
   863    used in font names.
   865   <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
   866    <p class=caption>Sample cursive fonts
   867   </div>
   869   <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
   870    title="fantasy, definition of"> <a name=fantasy-def><dfn
   871    id=fantasy>fantasy</dfn></a></span></h5>
   873   <p>Fantasy fonts are primarily decorative or expressive fonts that contain
   874    playful representations of characters. These do not include Pi or Picture
   875    fonts which do not represent actual characters.
   877   <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
   878    <p class=caption>Sample fantasy fonts
   879   </div>
   881   <h5 class="no-num no-toc"> <span class=index-def id=monospace0
   882    title="monospace, definition of"> <a name=monospace-def><dfn
   883    id=monospace>monospace</dfn></a></span></h5>
   885   <p>The sole criterion of a monospace font is that all glyphs have the same
   886    fixed width. This is often used to render samples of computer code.
   888   <div class=figure><img alt="sample monospace fonts"
   889    src=monospaceexamples.png>
   890    <p class=caption>Sample monospace fonts
   891   </div>
   892   <!-- prop: font-weight -->
   894   <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
   895    href="#propdef-font-weight">font-weight</a> property</h3>
   897   <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
   898    <tbody>
   899     <tr>
   900      <td>Name:
   902      <td><dfn id=propdef-font-weight
   903       title="font-weight!!property">font-weight</dfn>
   905     <tr>
   906      <td>Value:
   908      <td><a href="#font-weight-normal-value"
   909       title="normal!!font-weight">normal</a> | <a href="#bold">bold</a> | <a
   910       href="#bolder">bolder</a> | <a href="#lighter">lighter</a> | <a
   911       href="#font-weight-numeric-values" title="100...900 weight
   912       values">100</a> | <a href="#font-weight-numeric-values"
   913       title="100...900 weight values">200</a> | <a
   914       href="#font-weight-numeric-values" title="100...900 weight
   915       values">300</a> | <a href="#font-weight-numeric-values"
   916       title="100...900 weight values">400</a> | <a
   917       href="#font-weight-numeric-values" title="100...900 weight
   918       values">500</a> | <a href="#font-weight-numeric-values"
   919       title="100...900 weight values">600</a> | <a
   920       href="#font-weight-numeric-values" title="100...900 weight
   921       values">700</a> | <a href="#font-weight-numeric-values"
   922       title="100...900 weight values">800</a> | <a
   923       href="#font-weight-numeric-values" title="100...900 weight
   924       values">900</a>
   926     <tr>
   927      <td>Initial:
   929      <td>normal
   931     <tr>
   932      <td>Applies to:
   934      <td>all elements
   936     <tr>
   937      <td>Inherited:
   939      <td>yes
   941     <tr>
   942      <td>Percentages:
   944      <td>N/A
   946     <tr>
   947      <td>Media:
   949      <td>visual
   951     <tr>
   952      <td>Computed value:
   954      <td>numeric weight value (see description)
   956     <tr>
   957      <td>Animatable:
   959      <td>as <a
   960       href="http://dev.w3.org/csswg/css3-transitions/#animtype-font-weight">font
   961       weight</a>
   962   </table>
   964   <p>The <a href="#propdef-font-weight"
   965    title="font-weight!!property">‘<code
   966    class=property>font-weight</code>’</a> property specifies the weight of
   967    glyphs in the font, their degree of blackness or stroke thickness.
   969   <p>Values have the following meanings:
   971   <dl>
   972    <dt><dfn id=font-weight-numeric-values title="100...900 weight values">100
   973     to 900</dfn>
   975    <dd>These values form an ordered sequence, where each number indicates a
   976     weight that is at least as dark as its predecessor. These roughly
   977     correspond to the commonly used weight names below:
   978   </dl>
   980   <ul>
   981    <li>100 - Thin
   983    <li>200 - Extra Light (Ultra Light)
   985    <li>300 - Light
   987    <li>400 - Normal
   989    <li>500 - Medium
   991    <li>600 - Semi Bold (Demi Bold)
   993    <li>700 - Bold
   995    <li>800 - Extra Bold (Ultra Bold)
   997    <li>900 - Black (Heavy)
   998   </ul>
  1000   <dl>
  1001    <dt><dfn id=font-weight-normal-value
  1002     title="normal!!font-weight">normal</dfn>
  1004    <dd>Same as ‘<code class=css>400</code>’.
  1006    <dt><dfn id=bold>bold</dfn>
  1008    <dd>Same as ‘<code class=css>700</code>’.
  1010    <dt><dfn id=bolder>bolder</dfn>
  1012    <dd>Specifies a bolder weight than the inherited value.
  1014    <dt><dfn id=lighter>lighter</dfn>
  1016    <dd>Specifies a lighter weight than the inherited value.
  1017   </dl>
  1019   <p>Font formats that use a scale other than a nine-step scale should map
  1020    their scale onto the CSS scale so that 400 roughly corresponds with a face
  1021    that would be labeled as Regular, Book, Roman and 700 roughly matches a
  1022    face that would be labeled as Bold. Or weights may be inferred from the
  1023    style names, ones that correspond roughly with the scale above. The scale
  1024    is relative, so a face with a larger weight value must never appear
  1025    lighter. If style names are used to infer weights, care should be taken to
  1026    handle variations in style names across locales.
  1028   <p>Quite often there are only a few weights available for a particular font
  1029    family. When a weight is specified for which no face exists, a face with a
  1030    nearby weight is used. In general, bold weights map to faces with heavier
  1031    weights and light weights map to faces with lighter weights (see the <a
  1032    href="#font-matching-algorithm">font matching section below</a> for a
  1033    precise definition). The examples here illustrate which face is used for
  1034    different weights, grey indicates a face for that weight does not exist so
  1035    a face with a nearby weight is used:
  1037   <div class=figure><img alt="weight mappings for a family with 400, 700 and
  1038    900 weights" src=optimaweights.png>
  1039    <p class=caption>Weight mappings for a font family with 400, 700 and 900
  1040     weight faces
  1041   </div>
  1043   <div class=figure><img alt="weight mappings for a family with 300, 600
  1044    weights" src=hiraginoweights.png>
  1045    <p class=caption>Weight mappings for a font family with 300 and 600 weight
  1046     faces
  1047   </div>
  1049   <p>Although the practice is not well-loved by typographers, bold faces are
  1050    often synthesized by user agents for faces that lack actual bold faces.
  1051    For the purposes of style matching, these faces must be treated as if they
  1052    exist within the family. Authors can explicitly avoid this behavior by
  1053    using the ‘<a href="#propdef-font-synthesis"><code
  1054    class=property>font-synthesis</code></a>’ property.
  1056   <p>Specified values of ‘<a href="#bolder"><code
  1057    class=property>bolder</code></a>’ and ‘<a href="#lighter"><code
  1058    class=property>lighter</code></a>’ indicate weights relative to the
  1059    weight of the parent element. The computed weight is calculated based on
  1060    the inherited <a href="#propdef-font-weight"
  1061    title="font-weight!!property">‘<code
  1062    class=property>font-weight</code>’</a> value using the chart below.
  1064   <table class=data id=bolderlighter summary="Bolder/lighter mappings">
  1065    <thead>
  1066     <tr>
  1067      <th>Inherited value
  1069      <th>bolder
  1071      <th>lighter
  1073    <tbody>
  1074     <tr>
  1075      <th>100
  1077      <td>400
  1079      <td>100
  1081     <tr>
  1082      <th>200
  1084      <td>400
  1086      <td>100
  1088     <tr>
  1089      <th>300
  1091      <td>400
  1093      <td>100
  1095     <tr>
  1096      <th>400
  1098      <td>700
  1100      <td>100
  1102     <tr>
  1103      <th>500
  1105      <td>700
  1107      <td>100
  1109     <tr>
  1110      <th>600
  1112      <td>900
  1114      <td>400
  1116     <tr>
  1117      <th>700
  1119      <td>900
  1121      <td>400
  1123     <tr>
  1124      <th>800
  1126      <td>900
  1128      <td>700
  1130     <tr>
  1131      <th>900
  1133      <td>900
  1135      <td>700
  1136   </table>
  1138   <p>The table above is equivalent to selecting the next relative bolder or
  1139    lighter face, given a font family containing normal and bold faces along
  1140    with a thin and a heavy face. Authors who desire finer control over the
  1141    exact weight values used for a given element may use numerical values
  1142    instead of relative weights.</p>
  1143   <!-- prop: font-stretch -->
  1145   <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
  1146    href="#propdef-font-stretch">font-stretch</a> property</h3>
  1148   <table class=propdef id=namefont-stretchvalue-normal-ultra-conde>
  1149    <tbody>
  1150     <tr>
  1151      <td>Name:
  1153      <td><dfn id=propdef-font-stretch
  1154       title="font-stretch!!property">font-stretch</dfn>
  1156     <tr>
  1157      <td>Value:
  1159      <td> <a href="#font-stretch-normal-value"
  1160       title="normal!!font-stretch">normal</a> | <a
  1161       href="#ultra-condensed">ultra-condensed</a> | <a
  1162       href="#extra-condensed">extra-condensed</a> | <a
  1163       href="#condensed">condensed</a> | <a
  1164       href="#semi-condensed-">semi-condensed</a> | <a
  1165       href="#semi-expanded">semi-expanded</a> | <a
  1166       href="#expanded">expanded</a> | <a
  1167       href="#extra-expanded">extra-expanded</a> | <a
  1168       href="#ultra-expanded">ultra-expanded</a>
  1170     <tr>
  1171      <td>Initial:
  1173      <td>normal
  1175     <tr>
  1176      <td>Applies to:
  1178      <td>all elements
  1180     <tr>
  1181      <td>Inherited:
  1183      <td>yes
  1185     <tr>
  1186      <td>Percentages:
  1188      <td>N/A
  1190     <tr>
  1191      <td>Media:
  1193      <td>visual
  1195     <tr>
  1196      <td>Computed value:
  1198      <td>as specified
  1200     <tr>
  1201      <td>Animatable:
  1203      <td>as <a href="#font-stretch-animation">font stretch</a>
  1204   </table>
  1206   <p>The <a href="#propdef-font-stretch"
  1207    title="font-stretch!!property">‘<code
  1208    class=property>font-stretch</code>’</a> property selects a normal,
  1209    condensed, or expanded face from a font family. Absolute keyword values
  1210    have the following ordering, from narrowest to widest:
  1212   <ul>
  1213    <li><dfn id=ultra-condensed>ultra-condensed</dfn>
  1215    <li><dfn id=extra-condensed>extra-condensed</dfn>
  1217    <li><dfn id=condensed>condensed</dfn>
  1219    <li><dfn id=semi-condensed->semi-condensed </dfn>
  1221    <li><dfn id=font-stretch-normal-value
  1222     title="normal!!font-stretch">normal</dfn>
  1224    <li><dfn id=semi-expanded>semi-expanded</dfn>
  1226    <li><dfn id=expanded>expanded</dfn>
  1228    <li><dfn id=extra-expanded>extra-expanded</dfn>
  1230    <li><dfn id=ultra-expanded>ultra-expanded</dfn>
  1231   </ul>
  1233   <p>When a face does not exist for a given width, normal or condensed values
  1234    map to a narrower face, otherwise a wider face. Conversely, expanded
  1235    values map to a wider face, otherwise a narrower face. The figure below
  1236    shows how the nine font-stretch property settings affect font selection
  1237    for font family containing a variety of widths, grey indicates a width for
  1238    which no face exists and a different width is substituted:
  1240   <div class=figure><img alt="width mappings for a family with condensed,
  1241    normal and expanded faces" src=universwidths.png>
  1242    <p class=caption>Width mappings for a font family with condensed, normal
  1243     and expanded width faces
  1244   </div>
  1246   <p id=font-stretch-animation>Animation of font stretch: Font stretch is
  1247    interpolated in discrete steps. The interpolation happens as though the
  1248    ordered values are equally spaced real numbers. The interpolation result
  1249    is rounded to the nearest value, with values exactly halfway between two
  1250    values rounded towards the later value in the list above.</p>
  1251   <!-- prop: font-style -->
  1253   <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
  1254    href="#propdef-font-style">font-style</a> property</h3>
  1256   <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
  1257    <tbody>
  1258     <tr>
  1259      <td>Name:
  1261      <td><dfn id=propdef-font-style
  1262       title="font-style!!property">font-style</dfn>
  1264     <tr>
  1265      <td>Value:
  1267      <td><a href="#font-style-normal-value"
  1268       title="normal!!font-style">normal</a> | <a href="#italic">italic</a> |
  1269       <a href="#oblique">oblique</a>
  1271     <tr>
  1272      <td>Initial:
  1274      <td>normal
  1276     <tr>
  1277      <td>Applies to:
  1279      <td>all elements
  1281     <tr>
  1282      <td>Inherited:
  1284      <td>yes
  1286     <tr>
  1287      <td>Percentages:
  1289      <td>N/A
  1291     <tr>
  1292      <td>Media:
  1294      <td>visual
  1296     <tr>
  1297      <td>Computed value:
  1299      <td>as specified
  1301     <tr>
  1302      <td>Animatable:
  1304      <td>no
  1305   </table>
  1307   <p>The <a href="#propdef-font-style" title="font-style!!property">‘<code
  1308    class=property>font-style</code>’</a> property allows italic or oblique
  1309    faces to be selected. Italic forms are generally cursive in nature while
  1310    oblique faces are typically sloped versions of the regular face. Oblique
  1311    faces can be simulated by artificially sloping the glyphs of the regular
  1312    face. Compare the artificially sloped renderings of Palatino ‘<code
  1313    class=property>a</code>’ and Baskerville ‘<code
  1314    class=property>N</code>’ in grey with the actual italic versions:
  1316   <div class=figure><img alt="artificial sloping vs. real italics"
  1317    src=realvsfakeitalics.png>
  1318    <p class=caption>Artificial sloping versus real italics
  1319   </div>
  1321   <p>Values have the following meanings:
  1323   <dl>
  1324    <dt><dfn id=font-style-normal-value
  1325     title="normal!!font-style">normal</dfn>
  1327    <dd>selects a face that is classified as a normal face, one that is
  1328     neither italic or obliqued
  1330    <dt><dfn id=italic>italic</dfn>
  1332    <dd>selects a font that is labeled as an italic face, or an oblique face
  1333     if one is not
  1335    <dt><dfn id=oblique>oblique</dfn>
  1337    <dd>selects a font that is labeled as an oblique face, or an italic face
  1338     if one is not
  1339   </dl>
  1341   <p>If no italic or oblique face is available, oblique faces can be
  1342    synthesized by rendering non-obliqued faces with an artificial obliquing
  1343    operation. The use of these artificially obliqued faces can be disabled
  1344    using the ‘<a href="#propdef-font-synthesis"><code
  1345    class=property>font-synthesis</code></a>’ property. The details of the
  1346    obliquing operation are not explicitly defined.</p>
  1347   <!-- resolution on the "undefined" nature of synthetics: http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
  1349   <p>Many scripts lack the tradition of mixing a cursive form within text
  1350    rendered with a normal face. Chinese, Japanese and Korean fonts almost
  1351    always lack italic or oblique faces. Fonts that support a mixture of
  1352    scripts will sometimes omit specific scripts such as Arabic from the set
  1353    of glyphs supported in the italic face. User agents should be careful
  1354    about making <a href="#character-map"><em>character map</em></a>
  1355    assumptions across faces when implementing support for <a
  1356    href="#system-font-fallback"><em>system font fallback</em></a>.</p>
  1357   <!-- prop: font-size -->
  1359   <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
  1360    href="#propdef-font-size">font-size</a> property</h3>
  1362   <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
  1363    <tbody>
  1364     <tr>
  1365      <td>Name:
  1367      <td><dfn id=propdef-font-size>font-size</dfn>
  1369     <tr>
  1370      <td>Value:
  1372      <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
  1373       | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
  1374       <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
  1375       href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
  1377     <tr>
  1378      <td>Initial:
  1380      <td>medium
  1382     <tr>
  1383      <td>Applies to:
  1385      <td>all elements
  1387     <tr>
  1388      <td>Inherited:
  1390      <td>yes
  1392     <tr>
  1393      <td>Percentages:
  1395      <td>refer to parent element's font size
  1397     <tr>
  1398      <td>Media:
  1400      <td>visual
  1402     <tr>
  1403      <td>Computed value:
  1405      <td>absolute length
  1407     <tr>
  1408      <td>Animatable:
  1410      <td>as <a
  1411       href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
  1412   </table>
  1414   <p>This property indicates the desired height of glyphs from the font. For
  1415    scalable fonts, the font-size is a scale factor applied to the EM unit of
  1416    the font. (Note that certain glyphs may bleed outside their EM box.) For
  1417    non-scalable fonts, the font-size is converted into absolute units and
  1418    matched against the declared font-size of the font, using the same
  1419    absolute coordinate space for both of the matched values. Values have the
  1420    following meanings:
  1422   <dl>
  1423    <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
  1425    <dd> An <a
  1426     href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
  1427     refers to an entry in a table of font sizes computed and kept by the user
  1428     agent. Possible values are:
  1429     <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
  1431    <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
  1433    <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
  1434     keyword is interpreted relative to the table of font sizes and the
  1435     computed ‘<a href="#propdef-font-size"><code
  1436     class=property>font-size</code></a>’ of the parent element. Possible
  1437     values are:
  1438     <p> [ larger | smaller ]
  1440     <p> For example, if the parent element has a font size of ‘<code
  1441      class=property>medium</code>’, a value of ‘<code
  1442      class=property>larger</code>’ will make the font size of the current
  1443      element be ‘<code class=property>large</code>’. If the parent
  1444      element's size is not close to a table entry, the user agent is free to
  1445      interpolate between table entries or round off to the closest one. The
  1446      user agent may have to extrapolate table values if the numerical value
  1447      goes beyond the keywords.
  1449    <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
  1451    <dd>A length value specifies an absolute font size (independent of the
  1452     user agent's font table). Negative lengths are illegal.
  1454    <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
  1456    <dd>A percentage value specifies an absolute font size relative to the
  1457     parent element's font size. Use of percentage values, or values in
  1458     ‘<code class=property>em</code>’s, leads to more robust and
  1459     cascadable style sheets.
  1460   </dl>
  1462   <p>The following table provides user agent guidelines for the absolute-size
  1463    scaling factor and their mapping to HTML heading and absolute font-sizes.
  1464    The ‘<code class=property>medium</code>’ value is used as the
  1465    reference middle value. The user agent may fine-tune these values for
  1466    different fonts or different types of display devices.
  1468   <table class=data>
  1469    <thead>
  1470     <tr>
  1471      <th>CSS absolute-size values
  1473      <th>xx-small
  1475      <th>x-small
  1477      <th>small
  1479      <th>medium
  1481      <th>large
  1483      <th>x-large
  1485      <th>xx-large
  1487      <th> 
  1489    <tbody>
  1490     <tr>
  1491      <th>scaling factor
  1493      <td>3/5
  1495      <td>3/4
  1497      <td>8/9
  1499      <td>1
  1501      <td>6/5
  1503      <td>3/2
  1505      <td>2/1
  1507      <td>3/1
  1509     <tr>
  1510      <th>HTML headings
  1512      <td>h6
  1514      <td> 
  1516      <td>h5
  1518      <td>h4
  1520      <td>h3
  1522      <td>h2
  1524      <td>h1
  1526      <td> 
  1528     <tr>
  1529      <th>HTML font sizes
  1531      <td>1
  1533      <td> 
  1535      <td>2
  1537      <td>3
  1539      <td>4
  1541      <td>5
  1543      <td>6
  1545      <td>7
  1546   </table>
  1548   <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
  1549    applying these guidelines should nevertheless avoid creating font-size
  1550    resulting in less than 9 device pixels per EM unit on a computer
  1551    display.</em>
  1553   <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
  1554    factor between adjacent indexes was 1.5 which user experience proved to be
  1555    too large. In CSS2, the suggested scaling factor for computer screen
  1556    between adjacent indexes was 1.2 which still created issues for the small
  1557    sizes. The new scaling factor varies between each index to provide a
  1558    better readability.</em>
  1560   <p>The actual value of this property may differ from the computed value due
  1561    a numerical value on ‘<a href="#propdef-font-size-adjust"><code
  1562    class=property>font-size-adjust</code></a>’ and the unavailability of
  1563    certain font sizes.
  1565   <p>Child elements inherit the computed <a class=noxref
  1566    href="#font-size-prop"> <span class=property>‘<code
  1567    class=property>font-size</code>’</span></a> value (otherwise, the effect
  1568    of <a class=noxref href="#font-size-adjust-prop"><span
  1569    class=property>‘<code
  1570    class=property>font-size-adjust</code>’</span></a> would compound).
  1572   <div class=example>
  1573    <p style="display:none">Example(s):</p>
  1575    <pre>p { font-size: 12pt; }
  1576 blockquote { font-size: larger }
  1577 em { font-size: 150% }
  1578 em { font-size: 1.5em }
  1579 </pre>
  1580   </div>
  1581   <!-- prop: font-size-adjust -->
  1583   <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
  1584    the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
  1586   <table class=propdef id=namefont-size-adjustvaluenone-auto-ltnum>
  1587    <tbody>
  1588     <tr>
  1589      <td>Name:
  1591      <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
  1593     <tr>
  1594      <td>Value:
  1596      <td><a href="#font-size-adjust-none-value"
  1597       title="none!!font-size-adjust">none</a> | <a
  1598       href="#font-size-adjust-auto-value"
  1599       title="auto!!font-size-adjust">auto</a> | <a
  1600       href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
  1602     <tr>
  1603      <td>Initial:
  1605      <td>none
  1607     <tr>
  1608      <td>Applies to:
  1610      <td>all elements
  1612     <tr>
  1613      <td>Inherited:
  1615      <td>yes
  1617     <tr>
  1618      <td>Percentages:
  1620      <td>N/A
  1622     <tr>
  1623      <td>Media:
  1625      <td>visual
  1627     <tr>
  1628      <td>Computed value:
  1630      <td>as specified
  1632     <tr>
  1633      <td>Animatable:
  1635      <td>as <a
  1636       href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a>
  1637   </table>
  1639   <p>For any given font size, the apparent size and legibility of text varies
  1640    across fonts. For scripts such as Latin or Cyrillic that distinguish
  1641    between upper and lowercase letters, the relative height of lowercase
  1642    letters compared to their uppercase counterparts is a determining factor
  1643    of legibility. This is commonly referred to as the <a class=index-def
  1644    href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
  1645    id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
  1646    the x-height of a font divided by the font size.
  1648   <p>In situations where font fallback occurs, fallback fonts may not share
  1649    the same aspect ratio as the desired font family and will thus appear less
  1650    readable. The font-size-adjust property is a way to preserve the
  1651    readability of text when font fallback occurs. It does this by adjusting
  1652    the font-size so that the x-height is the same regardless of the font
  1653    used.
  1655   <div class=example>
  1656    <p>The style defined below defines Verdana as the desired font family, but
  1657     if Verdana is not available Futura or Times will be used.</p>
  1659    <pre>p {
  1660     font-family: Verdana, Futura, Times;
  1663 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
  1664 </pre>
  1666    <p>Verdana has a relatively high aspect ratio, lowercase letters are
  1667     relatively tall compared to uppercase letters, so at small sizes text
  1668     appears legible. Times has a lower aspect ratio and so if fallback
  1669     occurs, the text will be less legible at small sizes than Verdana.</p>
  1670   </div>
  1672   <p>How text rendered in each of these fonts compares is shown below, the
  1673    columns show text rendered in Verdana, Futura and Times. The same
  1674    font-size value is used across cells within each row and red lines are
  1675    included to show the differences in x-height. In the upper half each row
  1676    is rendered in the same font-size value. The same is true for the lower
  1677    half but in this half the font-size-adjust property is also set so that
  1678    the actual font size is adjusted to preserve the x-height across each row.
  1679    Note how small text remains relatively legible across each row in the
  1680    lower half.
  1682   <div class=figure><img alt="text with and without font-size-adjust"
  1683    src=fontsizeadjust.png>
  1684    <p class=caption>Text with and without the use of font-size-adjust
  1685   </div>
  1687   <p>This property allows authors to specify an <a
  1688    href="#aspect-value"><i>aspect value</i></a> for an element that will
  1689    effectively preserve the x-height of the first choice font, whether it is
  1690    substituted or not. Values have the following meanings:
  1692   <dl>
  1693    <dt><dfn id=font-size-adjust-none-value
  1694     title="none!!font-size-adjust">none</dfn>
  1696    <dd>Do not preserve the font's x-height.
  1698    <dt><dfn id=font-size-adjust-auto-value
  1699     title="auto!!font-size-adjust">auto</dfn>
  1701    <dd>Behaves just like &lt;number>, except the number used is the <a
  1702     href="#aspect-value"><i>aspect value</i></a> calculated by user agents
  1703     for the first font in the list of fonts defined for the initial value of
  1704     the <a href="#propdef-font-family" title="font-family!!property">‘<code
  1705     class=property>font-family</code>’</a> property. Effectively this is
  1706     the default font used for basic Latin text when <a
  1707     href="#propdef-font-family" title="font-family!!property">‘<code
  1708     class=property>font-family</code>’</a> is not otherwise specified. It
  1709     does not vary based on document content and it is not calculated based on
  1710     the computed value of <a href="#propdef-font-family"
  1711     title="font-family!!property">‘<code
  1712     class=property>font-family</code>’</a> for a given element.
  1713     <p class=note>Authors can use this value to specify that font size should
  1714      be normalized across fonts based on the x-height without the need to
  1715      specify the aspect value explicitly.</p>
  1717    <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
  1719    <dd>Specifies the <a href="#aspect-value"><i>aspect value</i></a> used in
  1720     the calculation below to calculate the adjusted font size:
  1721     <pre>c  =  ( a / a' ) s
  1722 </pre>
  1724     <p>where:</p>
  1726     <pre>s  =  font-size value
  1727 a  =  <a href="#aspect-value"><i>aspect value</i></a> as specified by the font-size-adjust property
  1728 a' =  <a href="#aspect-value"><i>aspect value</i></a> of actual font
  1729 c  =  adjusted font-size to use
  1730 </pre>
  1732     <p>This value applies to any font that is selected but in typical usage
  1733      it should be based on the <a href="#aspect-value"><i>aspect
  1734      value</i></a> of the first font in the font-family list. If this is
  1735      specified accurately, the <tt>(a/a')</tt> term in the formula above is
  1736      effectively 1 for the first font and no adjustment occurs. If the value
  1737      is specified inaccurately, text rendered using the first font in the
  1738      family list will display differently in older user agents that don't
  1739      support font-size-adjust.</p>
  1740   </dl>
  1742   <p>The value of ‘<a href="#propdef-font-size-adjust"><code
  1743    class=property>font-size-adjust</code></a>’ affects the size of relative
  1744    units that are based on font metrics of the <a
  1745    href="#first-available-font"><i>first available font</i></a> such as
  1746    <code>ex</code> and <code>ch</code> but does not affect the size of
  1747    <code>em</code> units.
  1749   <p>Authors can calculate the <a href="#aspect-value"><i>aspect
  1750    value</i></a> for a given font by comparing spans with the same content
  1751    but different font-size-adjust properties. If the same font-size is used,
  1752    the spans will match when the font-size-adjust value is accurate for the
  1753    given font.
  1755   <div class=example>
  1756    <p>Two spans with borders are used to determine the <a
  1757     href="#aspect-value"><i>aspect value</i></a> of a font. The font-size is
  1758     the same for both spans but the font-size-adjust property is specified
  1759     only for the right span. Starting with a value of 0.5, the aspect value
  1760     can be adjusted until the borders around the two letters line up.</p>
  1762    <pre>p {
  1763     font-family: Futura;
  1764     font-size: 500px;
  1767 span {
  1768     border: solid 1px red;
  1771 .adjust {
  1772     font-size-adjust: 0.5;
  1775 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
  1776 </pre>
  1778    <div class=figure><img alt="Futura with an <i>aspect value</i> of 0.5"
  1779     src=beforefontsizeadjust.png>
  1780     <p class=caption>Futura with an <a href="#aspect-value"><i>aspect
  1781      value</i></a> of 0.5
  1782    </div>
  1784    <p>The box on the right is a bit bigger than the one on the left, so the
  1785     <a href="#aspect-value"><i>aspect value</i></a> of this font is something
  1786     less than 0.5. Adjust the value until the boxes align.</p>
  1787   </div>
  1788   <!-- prop: font -->
  1790   <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
  1791    <a href="#propdef-font">font</a> property</h3>
  1793   <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
  1794    <tbody>
  1795     <tr>
  1796      <td>Name:
  1798      <td><dfn id=propdef-font>font</dfn>
  1800     <tr>
  1801      <td>Value:
  1803      <td>[ [ <var>&lt;<a href="#propdef-font-style"
  1804       title="font-style!!property">‘<code
  1805       class=property>font-style</code>’</a>&gt;</var> || <a
  1806       href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
  1807       || <var>&lt;<a href="#propdef-font-weight"
  1808       title="font-weight!!property">‘<code
  1809       class=property>font-weight</code>’</a>&gt;</var> || <var>&lt;<a
  1810       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  1811       class=property>font-stretch</code>’</a></var> ]? <var>&lt;‘<a
  1812       href="#propdef-font-size"><code
  1813       class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
  1814       class=property>line-height</code>’&gt;</var> ]? <var>&lt;<a
  1815       href="#propdef-font-family" title="font-family!!property">‘<code
  1816       class=property>font-family</code>’</a>&gt;</var> ] | caption | icon |
  1817       menu | message-box | small-caption | status-bar
  1819     <tr>
  1820      <td>Initial:
  1822      <td>see individual properties
  1824     <tr>
  1825      <td>Applies to:
  1827      <td>all elements
  1829     <tr>
  1830      <td>Inherited:
  1832      <td>yes
  1834     <tr>
  1835      <td>Percentages:
  1837      <td>see individual properties
  1839     <tr>
  1840      <td>Media:
  1842      <td>visual
  1844     <tr>
  1845      <td>Computed value:
  1847      <td>see individual properties
  1849     <tr>
  1850      <td>Animatable:
  1852      <td>see individual properties
  1853   </table>
  1855   <p>The <span class=property>‘<a href="#propdef-font"><code
  1856    class=property>font</code></a>’</span> property is, except as described
  1857    below, a shorthand property for setting <a href="#propdef-font-style"
  1858    title="font-style!!property">‘<code
  1859    class=property>font-style</code>’</a>, <a href="#propdef-font-variant"
  1860    title="font-variant!!property">‘<code
  1861    class=property>font-variant</code>’</a>, <a href="#propdef-font-weight"
  1862    title="font-weight!!property">‘<code
  1863    class=property>font-weight</code>’</a>, <a href="#propdef-font-stretch"
  1864    title="font-stretch!!property">‘<code
  1865    class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1866    href="#propdef-font-size"><code
  1867    class=property>font-size</code></a>’</span>, <a class=property
  1868    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1869    class=property>line-height</code>’</a>, <a href="#propdef-font-family"
  1870    title="font-family!!property">‘<code
  1871    class=property>font-family</code>’</a> at the same place in the
  1872    stylesheet. Values for the <a href="#propdef-font-variant"
  1873    title="font-variant!!property">‘<code
  1874    class=property>font-variant</code>’</a> property may also be included
  1875    but only those supported in CSS 2.1, none of the <a
  1876    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1877    class=property>font-variant</code>’</a> values added in this
  1878    specification can be used in the <span class=property>‘<a
  1879    href="#propdef-font"><code class=property>font</code></a>’</span>
  1880    shorthand:
  1882   <pre
  1883    class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
  1885   <p>The syntax of this property is based on a traditional typographical
  1886    shorthand notation to set multiple properties related to fonts.
  1888   <p>All subproperties of the ‘<a href="#propdef-font"><code
  1889    class=property>font</code></a>’ property are first reset to their
  1890    initial values, including those listed above plus <span
  1891    class=property>‘<a href="#propdef-font-size-adjust"><code
  1892    class=property>font-size-adjust</code></a>’</span>, <span
  1893    class=property>‘<a href="#propdef-font-kerning"><code
  1894    class=property>font-kerning</code></a>’</span>, subproperties of <a
  1895    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1896    class=property>font-variant</code>’</a> and and <span>‘<a
  1897    href="#propdef-font-language-override"><code
  1898    class=property>font-language-override</code></a>’</span>. Then, those
  1899    properties that are given explicit values in the <span
  1900    class=property>‘<a href="#propdef-font"><code
  1901    class=property>font</code></a>’</span> shorthand are set to those
  1902    values. For a definition of allowed and initial values, see the previously
  1903    defined properties. For reasons of backwards compatibility, it is not
  1904    possible to set <span class=property>‘<a
  1905    href="#propdef-font-size-adjust"><code
  1906    class=property>font-size-adjust</code></a>’</span> to anything other
  1907    than its initial value using the <span class=property>‘<a
  1908    href="#propdef-font"><code class=property>font</code></a>’</span>
  1909    shorthand property; instead, use the individual property.
  1911   <div class=example>
  1912    <p style="display:none">Example(s):</p>
  1914    <pre>p { font: 12pt/14pt sans-serif }
  1915 p { font: 80% sans-serif }
  1916 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
  1917 p { font: bold italic large Palatino, serif }
  1918 p { font: normal small-caps 120%/120% fantasy }
  1919 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
  1920 </pre>
  1922    <p> In the second rule, the font size percentage value (‘<code
  1923     class=css>80%</code>’) refers to the computed ‘<a
  1924     href="#propdef-font-size"><code class=property>font-size</code></a>’ of
  1925     the parent element. In the third rule, the line height percentage
  1926     (‘<code class=css>110%</code>’) refers to the font size of the
  1927     element itself.
  1929    <p>The first three rules do not specify the <a
  1930     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1931     class=property>font-variant</code>’</a> and <a
  1932     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1933     class=property>font-weight</code>’</a> explicitly, so these properties
  1934     receive their initial values (<span title="normal value">‘<code
  1935     class=property>normal</code>’</span>). Notice that the font family name
  1936     "new century schoolbook", which contains spaces, is enclosed in quotes.
  1937     The fourth rule sets the <a href="#propdef-font-weight"
  1938     title="font-weight!!property">‘<code
  1939     class=property>font-weight</code>’</a> to ‘<a href="#bold"><code
  1940     class=property>bold</code></a>’, the <a href="#propdef-font-style"
  1941     title="font-style!!property">‘<code
  1942     class=property>font-style</code>’</a> to ‘<a href="#italic"><code
  1943     class=property>italic</code></a>’, and implicitly sets <a
  1944     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1945     class=property>font-variant</code>’</a> to <a
  1946     href="#font-variant-normal-value" title="normal!!font-variant">‘<code
  1947     class=property>normal</code>’</a>.
  1949    <p> The fifth rule sets the <a href="#propdef-font-variant"
  1950     title="font-variant!!property">‘<code
  1951     class=property>font-variant</code>’</a> (‘<a href="#small-caps"><code
  1952     class=property>small-caps</code></a>’), the <span class=property>‘<a
  1953     href="#propdef-font-size"><code
  1954     class=property>font-size</code></a>’</span> (120% of the parent's font
  1955     size), the <a class=property
  1956     href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1957     class=property>line-height</code>’</a> (120% of the font size) and the
  1958     <a href="#propdef-font-family" title="font-family!!property">‘<code
  1959     class=property>font-family</code>’</a> (‘<a href="#fantasy"><code
  1960     class=property>fantasy</code></a>’). It follows that the keyword <span
  1961     title="normal value">‘<code class=property>normal</code>’</span>
  1962     applies to the two remaining properties: <a href="#propdef-font-style"
  1963     title="font-style!!property">‘<code
  1964     class=property>font-style</code>’</a> and <a
  1965     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1966     class=property>font-weight</code>’</a>.
  1968    <p>The sixth rule sets the <a href="#propdef-font-style"
  1969     title="font-style!!property">‘<code
  1970     class=property>font-style</code>’</a>, <a href="#propdef-font-stretch"
  1971     title="font-stretch!!property">‘<code
  1972     class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1973     href="#propdef-font-size"><code
  1974     class=property>font-size</code></a>’</span>, and <a
  1975     href="#propdef-font-family" title="font-family!!property">‘<code
  1976     class=property>font-family</code>’</a>, the other font properties being
  1977     set to their initial values.
  1978   </div>
  1980   <p>Since the <a href="#propdef-font-stretch"
  1981    title="font-stretch!!property">‘<code
  1982    class=property>font-stretch</code>’</a> property was not defined in CSS
  1983    2.1, when using <a href="#propdef-font-stretch"
  1984    title="font-stretch!!property">‘<code
  1985    class=property>font-stretch</code>’</a> values within ‘<a
  1986    href="#propdef-font"><code class=property>font</code></a>’ rules,
  1987    authors should include a extra version compatible with older user agents:
  1989   <pre>p {
  1990   font: 80% sans-serif;   /* for older user agents */
  1991   font: condensed 80% sans-serif;
  1992 }</pre>
  1994   <p>The following values refer to system fonts:
  1996   <dl>
  1997    <dt><strong>caption</strong>
  1999    <dd>The font used for captioned controls (e.g., buttons, drop-downs,
  2000     etc.).
  2002    <dt><strong>icon</strong>
  2004    <dd>The font used to label icons.
  2006    <dt><strong>menu</strong>
  2008    <dd>The font used in menus (e.g., dropdown menus and menu lists).
  2010    <dt><strong>message-box</strong>
  2012    <dd>The font used in dialog boxes.
  2014    <dt><strong>small-caption</strong>
  2016    <dd>The font used for labeling small controls.
  2018    <dt><strong>status-bar</strong>
  2020    <dd>The font used in window status bars.
  2021   </dl>
  2023   <p>System fonts may only be set as a whole; that is, the font family, size,
  2024    weight, style, etc. are all set at the same time. These values may then be
  2025    altered individually if desired. If no font with the indicated
  2026    characteristics exists on a given platform, the user agent should either
  2027    intelligently substitute (e.g., a smaller version of the ‘<code
  2028    class=property>caption</code>’ font might be used for the ‘<code
  2029    class=property>small-caption</code>’ font), or substitute a user agent
  2030    default font. As for regular fonts, if, for a system font, any of the
  2031    individual properties are not part of the operating system's available
  2032    user preferences, those properties should be set to their initial values.
  2034   <p>That is why this property is "almost" a shorthand property: system fonts
  2035    can only be specified with this property, not with <a
  2036    href="#propdef-font-family" title="font-family!!property">‘<code
  2037    class=property>font-family</code>’</a> itself, so <span
  2038    class=property>‘<a href="#propdef-font"><code
  2039    class=property>font</code></a>’</span> allows authors to do more than
  2040    the sum of its subproperties. However, the individual properties such as
  2041    <a href="#propdef-font-weight" title="font-weight!!property">‘<code
  2042    class=property>font-weight</code>’</a> are still given values taken from
  2043    the system font, which can be independently varied.
  2045   <p>Note that the keywords used for the system fonts listed above are only
  2046    treated as keywords when they occur in the initial position, in other
  2047    positions the same string is treated as part of the font family name:
  2049   <pre>  font: menu;        /* use the font settings for system menus */
  2050   font: large menu;  /* use a font family named "menu" */</pre>
  2052   <div class=example>
  2053    <p style="display:none">Example(s):</p>
  2055    <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
  2056 button p { font: menu }
  2057 button p em { font-weight: bolder }
  2058 </pre>
  2060    <p>If the font used for dropdown menus on a particular system happened to
  2061     be, for example, 9-point Charcoal, with a weight of 600, then P elements
  2062     that were descendants of BUTTON would be displayed as if this rule were
  2063     in effect:
  2065    <pre>button p { font: 600 9pt Charcoal }
  2066 </pre>
  2068    <p>Because the <span class=property>‘<a href="#propdef-font"><code
  2069     class=property>font</code></a>’</span> shorthand resets to its initial
  2070     value any property not explicitly given a value, this has the same effect
  2071     as this declaration:
  2073    <pre>button p {
  2074   font-style: normal;
  2075   font-variant: normal;
  2076   font-weight: 600;
  2077   font-size: 9pt;
  2078   line-height: normal;
  2079   font-family: Charcoal
  2081 </pre>
  2082   </div>
  2083   <!-- prop: font-synthesis -->
  2085   <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
  2086    synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
  2087    property</h3>
  2089   <table class=propdef id=namefont-synthesisvaluenone-weight-style>
  2090    <tbody>
  2091     <tr>
  2092      <td>Name:
  2094      <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
  2096     <tr>
  2097      <td>Value:
  2099      <td>none | [ weight || style ]
  2101     <tr>
  2102      <td>Initial:
  2104      <td>weight style
  2106     <tr>
  2107      <td>Applies to:
  2109      <td>all elements
  2111     <tr>
  2112      <td>Inherited:
  2114      <td>yes
  2116     <tr>
  2117      <td>Percentages:
  2119      <td>N/A
  2121     <tr>
  2122      <td>Media:
  2124      <td>visual
  2126     <tr>
  2127      <td>Computed value:
  2129      <td>as specified
  2131     <tr>
  2132      <td>Animatable:
  2134      <td>no
  2135   </table>
  2137   <p>This property controls whether user agents are allowed to synthesize
  2138    bold or oblique font faces when a font family lacks bold or italic faces.
  2139    If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
  2140    specified, user agents must not synthesize bold faces and if ‘<code
  2141    class=property>style</code>’ is not specified user agents must not
  2142    synthesize italic faces. A value of ‘<code class=property>none</code>’
  2143    disallows all synthetic faces.
  2145   <div class=example>
  2146    <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
  2148    <pre>*:lang(ar) { font-synthesis: none; }
  2149 </pre>
  2150   </div>
  2152   <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
  2154   <h3 id=font-face-rule><span class=secno>4.1 </span>The <dfn
  2155    id=at-font-face-rule style="font-weight: inherit; font-style:
  2156    inherit"><code>@font-face</code></dfn> rule</h3>
  2158   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule allows
  2159    for linking to fonts that are automatically fetched and activated when
  2160    needed. This allows authors to select a font that closely matches the
  2161    design goals for a given page rather than limiting the font choice to a
  2162    set of fonts available on all platforms. A set of font descriptors define
  2163    the location of a font resource, either locally or externally, along with
  2164    the style characteristics of an individual face. Multiple <a
  2165    href="#at-font-face-rule"><code>@font-face</code></a> rules can be used to
  2166    construct font families with a variety of faces. Using CSS font matching
  2167    rules, a user agent can selectively download only those faces that are
  2168    needed for a given piece of text.
  2170   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2171    consists of the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2172    at-keyword followed by a block of descriptor declarations. In terms of the
  2173    grammar, this specification defines the following productions:
  2175   <pre><dfn id=fontfacerule>font_face_rule</dfn>
  2176   : <a href="#fontfacesym"><i>FONT_FACE_SYM</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* '{' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#descriptordeclaration"><i>descriptor_declaration</i></a>? [ ';' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#descriptordeclaration"><i>descriptor_declaration</i></a>? ]* '}' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  2179 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
  2180   : <a href="http://www.w3.org/TR/CSS21/grammar.html#grammar"><i>property</i></a> ':' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="http://www.w3.org/TR/CSS21/grammar.html#grammar"><i>expr</i></a>
  2181   ;</pre>
  2183   <p>The following new definitions are introduced:
  2185   <pre>-    -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
  2186 F    f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
  2188   <p>The following new token is introduced:
  2190   <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
  2192   <p>Each <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2193    specifies a value for every font descriptor, either implicitly or
  2194    explicitly. Those not given explicit values in the rule take the initial
  2195    value listed with each descriptor in this specification. These descriptors
  2196    apply solely within the context of the <a
  2197    href="#at-font-face-rule"><code>@font-face</code></a> rule in which they
  2198    are defined, and do not apply to document language elements. There is no
  2199    notion of which elements the descriptors apply to or whether the values
  2200    are inherited by child elements. When a given descriptor occurs multiple
  2201    times in a given <a href="#at-font-face-rule"><code>@font-face</code></a>
  2202    rule, only the last descriptor declaration is used and all prior
  2203    declarations for that descriptor are ignored.
  2205   <div class=example>
  2206    <p>To use a downloadable font called Gentium:</p>
  2208    <pre>
  2209 @font-face {
  2210   font-family: Gentium;
  2211   src: url(http://example.com/fonts/Gentium.woff);
  2214 p { font-family: Gentium, serif; }
  2215 </pre>
  2217    <p>The user agent will download Gentium and use it when rendering text
  2218     within paragraph elements. If for some reason the site serving the font
  2219     is unavailable, the default serif font will be used.</p>
  2220   </div>
  2222   <p>A given set of <a href="#at-font-face-rule"><code>@font-face</code></a>
  2223    rules define a set of fonts available for use within the documents that
  2224    contain these rules. When font matching is done, fonts defined using these
  2225    rules are considered before other available fonts on a system.
  2227   <p>Downloaded fonts are only available to documents that reference them.
  2228    The process of activating these fonts must not make them available to
  2229    other applications or to documents that don't directly link to the same
  2230    font. User agent implementers might consider it convenient to use
  2231    downloaded fonts when rendering characters in other documents for which no
  2232    other available font exists as part of the <a
  2233    href="#system-font-fallback"><em>system font fallback</em></a> procedure.
  2234    However, this would cause a security leak since the contents of one page
  2235    would be able to affect other pages, something an attacker could use as an
  2236    attack vector. These restrictions do not affect caching behavior, fonts
  2237    are cached the same way other web resources are cached.
  2239   <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
  2240    properties in a declaration block, declarations of any descriptors that
  2241    are not supported by the user agent must be ignored. <a
  2242    href="#at-font-face-rule"><code>@font-face</code></a> rules require a
  2243    font-family and src descriptor; if either of these are missing, the <a
  2244    href="#at-font-face-rule"><code>@font-face</code></a> rule is invalid and
  2245    must be ignored entirely.
  2247   <p>In cases where user agents have limited platform resources or implement
  2248    the ability to disable downloadable font resources, <a
  2249    href="#at-font-face-rule"><code>@font-face</code></a> rules must simply be
  2250    ignored; the behavior of individual descriptors as defined in this
  2251    specification should not be altered.
  2253   <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
  2254    href="#descdef-font-family">font-family</a> descriptor</h3>
  2256   <table class=descdef>
  2257    <tbody>
  2258     <tr>
  2259      <td>Name:
  2261      <td><dfn id=descdef-font-family
  2262       title="font-family!!descriptor">font-family</dfn>
  2264     <tr>
  2265      <td>Value:
  2267      <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
  2269     <tr>
  2270      <td><em>Initial:</em>
  2272      <td>N/A
  2273   </table>
  2275   <p>This descriptor defines the font family name that will be used in all
  2276    CSS font family name matching. It is required for the <a
  2277    href="#at-font-face-rule"><code>@font-face</code></a> rule to be valid. It
  2278    overrides the font family names contained in the underlying font data. If
  2279    the font family name is the same as a font family available in a given
  2280    user's environment, it effectively hides the underlying font for documents
  2281    that use the stylesheet. This permits a web author to freely choose
  2282    font-family names without worrying about conflicts with font family names
  2283    present in a given user's environment. Likewise, platform substitutions
  2284    for a given font family name must not be used.
  2286   <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
  2287    href="#descdef-src">src</a> descriptor</h3>
  2289   <table class=descdef>
  2290    <tbody>
  2291     <tr>
  2292      <td>Name:
  2294      <td><dfn id=descdef-src>src</dfn>
  2296     <tr>
  2297      <td>Value:
  2299      <td>[ &lt;url> [format(&lt;string> #)]? | <a
  2300       href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
  2302     <tr>
  2303      <td><em>Initial:</em>
  2305      <td>N/A
  2306   </table>
  2308   <p>This descriptor specifies the resource containing font data. It is
  2309    required for the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2310    rule to be valid. Its value is a prioritized, comma-separated list of
  2311    external references or locally-installed font face names. When a font is
  2312    needed the user agent iterates over the set of references listed, using
  2313    the first one it can successfully activate. Fonts containing invalid data
  2314    or local font faces that are not found are ignored and the user agent
  2315    loads the next font in the list.
  2317   <p>As with other URLs in CSS, the URL may be relative, in which case it is
  2318    resolved relative to the location of the style sheet containing the <a
  2319    href="#at-font-face-rule"><code>@font-face</code></a> rule. In the case of
  2320    SVG fonts, the URL points to an element within a document containing SVG
  2321    font definitions. If the element reference is omitted, a reference to the
  2322    first defined font is implied. Similarly, font container formats that can
  2323    contain more than one font must load one and only one of the fonts for a
  2324    given <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  2325    Fragment identifiers are used to indicate which font to load. If a
  2326    container format lacks a defined fragment identifier scheme,
  2327    implementations should use a simple 1-based indexing scheme (e.g.
  2328    "font-collection#1" for the first font, "font-collection#2" for the second
  2329    font).
  2331   <pre>
  2332 src: url(fonts/simple.woff);   /* load simple.woff relative to stylesheet location */
  2333 src: url(/fonts/simple.woff);  /* load simple.woff from absolute location */
  2334 src: url(fonts.svg#simple);    /* load SVG font with id 'simple' */
  2335 </pre>
  2337   <p>External references consist of a URL, followed by an optional hint
  2338    describing the format of the font resource referenced by that URL. The
  2339    format hint contains a comma-separated list of format strings that denote
  2340    well-known font formats. Conformant user agents must skip downloading a
  2341    font resource if the format hints indicate only unsupported or unknown
  2342    font formats. If no format hints are supplied, the user agent should
  2343    download the font resource.
  2345   <pre>
  2346 /* load WOFF font if possible, otherwise use OpenType font */
  2347 @font-face {
  2348   font-family: bodytext;
  2349   src: url(ideal-sans-serif.woff) format("woff"),
  2350        url(basic-sans-serif.ttf) format("opentype");
  2352 </pre>
  2354   <p>Format strings defined by this specification:
  2356   <table class=data id=fontformats>
  2357    <thead>
  2358     <tr>
  2359      <th>String
  2361      <th>Font Format
  2363      <th>Common extensions
  2365    <tbody>
  2366     <tr>
  2367      <th>"woff"
  2369      <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
  2371      <td>.woff
  2373     <tr>
  2374      <th>"truetype"
  2376      <td><a
  2377       href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
  2379      <td>.ttf
  2381     <tr>
  2382      <th>"opentype"
  2384      <td><a
  2385       href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
  2387      <td>.ttf, .otf
  2389     <tr>
  2390      <th>"embedded-opentype"
  2392      <td><a
  2393       href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
  2394       OpenType</a>
  2396      <td>.eot
  2398     <tr>
  2399      <th>"svg"
  2401      <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
  2403      <td>.svg, .svgz
  2404   </table>
  2406   <p>Given the overlap in common usage between TrueType and OpenType, the
  2407    format hints "truetype" and "opentype" must be considered as synonymous; a
  2408    format hint of "opentype" does not imply that the font contains Postscript
  2409    CFF style glyph data or that it contains OpenType layout information (see
  2410    <a href="#platform-props-to-css">Appendix A</a> for more background on
  2411    this).
  2413   <p>When authors would prefer to use a locally available copy of a given
  2414    font and download it if it's not, <code>local()</code> can be used. The
  2415    locally-installed <dfn
  2416    id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
  2417    to <code>local()</code> is a format-specific string that uniquely
  2418    identifies a single font face within a larger family. The syntax for a <a
  2419    href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
  2420    unique font face name enclosed by "local(" and ")". The name can
  2421    optionally be enclosed in quotes. If unquoted, the unquoted font family
  2422    name processing conventions apply; the name must be a sequence of
  2423    identifiers separated by whitespace which is converted to a string by
  2424    joining the identifiers together separated by a single space.
  2426   <pre>
  2427 /* regular face of Gentium */
  2428 @font-face {
  2429   font-family: MyGentium;
  2430   src: local(Gentium),    /* use locally available Gentium */
  2431        url(Gentium.woff); /* otherwise, download it */
  2433 </pre>
  2435   <p>For OpenType and TrueType fonts, this string is used to match only the
  2436    Postscript name or the full font name in the name table of locally
  2437    available fonts. Which type of name is used varies by platform and font,
  2438    so authors should include both of these names to assure proper matching
  2439    across platforms. Platform substitutions for a given font name must not be
  2440    used.
  2442   <pre>
  2443 /* bold face of Gentium */
  2444 @font-face {
  2445   font-family: MyGentium;
  2446   src: local(Gentium Bold),    /* full font name */
  2447        local(Gentium-Bold),    /* Postscript name */
  2448        url(GentiumBold.woff);  /* otherwise, download it */
  2449   font-weight: bold;
  2451 </pre>
  2453   <p>Just as a <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2454    specifies the characteristics of a single font within a family, the unique
  2455    name used with <code>local()</code> specifies a single font, not an entire
  2456    font family. Defined in terms of OpenType font data, the Postscript name
  2457    is found in the font's <a
  2458    href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
  2459    in the name record with nameID = 6 (see <a href="#OPENTYPE"
  2460    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
  2461    Postscript name is the commonly used key for all fonts on OSX and for
  2462    Postscript CFF fonts under Windows. The full font name (nameID = 4) is
  2463    used as a unique key for fonts with TrueType glyphs on Windows.
  2465   <p>For OpenType fonts with multiple localizations of the full font name,
  2466    the US English version is used (language ID = 0x409 for Windows and
  2467    language ID = 0 for Macintosh) or the first localization when a US English
  2468    full font name is not available (the OpenType specification recommends
  2469    that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
  2470    fonts minimally include US English names</a>). User agents that also match
  2471    other full font names, e.g. matching the Dutch name when the current
  2472    system locale is set to Dutch, are considered non-conformant. This is done
  2473    not to prefer English but to avoid matching inconsistencies across font
  2474    versions and OS localizations, since font style names (e.g. "Bold") are
  2475    frequently localized into many languages and the set of localizations
  2476    available varies widely across platform and font version. User agents that
  2477    match a concatenation of family name (nameID = 1) with style name (nameID
  2478    = 2) are considered non-conformant.
  2480   <p>This also allows for referencing faces that belong to larger families
  2481    that cannot otherwise be referenced.
  2483   <div class=example>
  2484    <p>Use a local font or reference an SVG font in another document:</p>
  2486    <pre>
  2487 @font-face {
  2488   font-family: Headline;
  2489   src: local(Futura-Medium),
  2490        url(fonts.svg#MyGeometricModern) format("svg");
  2492 </pre>
  2494    <p>Create an alias for local Japanese fonts on different platforms:</p>
  2496    <pre>
  2497 @font-face {
  2498   font-family: jpgothic;
  2499   src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
  2501 </pre>
  2503    <p>Reference a font face that cannot be matched within a larger family:</p>
  2505    <pre>
  2506 @font-face {
  2507   font-family: Hoefler Text Ornaments;
  2508   /* has the same font properties as Hoefler Text Regular */
  2509   src: local(HoeflerText-Ornaments);
  2511 </pre>
  2513    <p>Since localized fullnames never match, a document with the header style
  2514     rules below would always render using the default serif font, regardless
  2515     whether a particular system locale parameter is set to Finnish or not:</p>
  2517    <pre>
  2518 @font-face {
  2519   font-family: SectionHeader;
  2520   src: local("Arial Lihavoitu");  /* Finnish fullname for Arial Bold, should fail */
  2521   font-weight: bold;
  2524 h2 { font-family: SectionHeader, serif; }
  2525 </pre>
  2527    <p>A conformant user agent would never load the font ‘<code
  2528     class=css>gentium.eot</code>’ in the example below, since it is
  2529     included in the first definition of the ‘<a href="#descdef-src"><code
  2530     class=property>src</code></a>’ descriptor which is overridden by the
  2531     second definition in the same <a
  2532     href="#at-font-face-rule"><code>@font-face</code></a> rule:</p>
  2534    <pre>
  2535 @font-face {
  2536   font-family: MainText;
  2537   src: url(gentium.eot);                     /* for use with older user agents */
  2538   src: local("Gentium"), url(gentium.woff);  /* Overrides src definition */
  2540 </pre>
  2541   </div>
  2543   <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
  2544    descriptors: the <a href="#descdef-font-style">font-style</a>, <a
  2545    href="#descdef-font-weight">font-weight</a>, <a
  2546    href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
  2548   <table class=descdef>
  2549    <tbody>
  2550     <tr>
  2551      <td>Name:
  2553      <td><dfn id=descdef-font-style
  2554       title="font-style!!descriptor">font-style</dfn>
  2556     <tr>
  2557      <td>Value:
  2559      <td>normal | italic | oblique
  2561     <tr>
  2562      <td><em>Initial:</em>
  2564      <td>normal
  2565   </table>
  2567   <table class=descdef>
  2568    <tbody>
  2569     <tr>
  2570      <td>Name:
  2572      <td><dfn id=descdef-font-weight
  2573       title="font-weight!!descriptor">font-weight</dfn>
  2575     <tr>
  2576      <td>Value:
  2578      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  2580     <tr>
  2581      <td><em>Initial:</em>
  2583      <td>normal
  2584   </table>
  2586   <table class=descdef>
  2587    <tbody>
  2588     <tr>
  2589      <td>Name:
  2591      <td><dfn id=descdef-font-stretch
  2592       title="font-stretch!!descriptor">font-stretch</dfn>
  2594     <tr>
  2595      <td>Value:
  2597      <td>normal | ultra-condensed | extra-condensed | condensed |
  2598       semi-condensed | semi-expanded | expanded | extra-expanded |
  2599       ultra-expanded
  2601     <tr>
  2602      <td><em>Initial:</em>
  2604      <td>normal
  2605   </table>
  2607   <p>These descriptors define the characteristics of a font face and are used
  2608    in the process of matching styles to specific faces. For a font family
  2609    defined with several <a
  2610    href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  2611    can either download all faces in the family or use these descriptors to
  2612    selectively download font faces that match actual styles used in document.
  2613    The values for these descriptors are the same as those for the
  2614    corresponding font properties except that relative keywords are not
  2615    allowed, ‘<a href="#bolder"><code class=property>bolder</code></a>’
  2616    and ‘<a href="#lighter"><code class=property>lighter</code></a>’. If
  2617    these descriptors are omitted, initial values are assumed.
  2619   <p>The value for these font face style attributes is used in place of the
  2620    style implied by the underlying font data. This allows authors to combine
  2621    faces in flexible combinations, even in situations where the original font
  2622    data was arranged differently. User agents that implement synthetic
  2623    bolding and obliquing must only apply synthetic styling in cases where the
  2624    font descriptors imply this is needed, rather than based on the style
  2625    attributes implied by the font data.
  2627   <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
  2628    <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
  2630   <table class=descdef>
  2631    <tbody>
  2632     <tr>
  2633      <td>Name:
  2635      <td><dfn id=descdef-unicode-range>unicode-range</dfn>
  2637     <tr>
  2638      <td>Value:
  2640      <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
  2642     <tr>
  2643      <td><em>Initial:</em>
  2645      <td>U+0-10FFFF
  2646   </table>
  2648   <p>This descriptor defines the set of Unicode codepoints that may be
  2649    supported by the font face for which it is declared. The descriptor value
  2650    is a comma-delimited list of Unicode range (<a
  2651    href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
  2652    these ranges defines the set of codepoints that serves as a hint for user
  2653    agents when deciding whether or not to download a font resource for a
  2654    given text run.
  2656   <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
  2657    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2658    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
  2659    "U+" or "u+" prefix followed by a codepoint range in one of the three
  2660    forms listed below. Ranges that do not fit one of the these forms are
  2661    invalid and cause the declaration to be ignored.
  2663   <dl>
  2664    <dt>single codepoint (e.g. U+416)
  2666    <dd>a valid Unicode codepoint, represented as one to six hexadecimal
  2667     digits
  2669    <dt>interval range (e.g. U+400-4ff)
  2671    <dd>represented as two hyphen-separated valid Unicode codepoints
  2672     indicating the inclusive start and end codepoints of a range
  2674    <dt>wildcard range (e.g. U+4??)
  2676    <dd>defined by the set of codepoints implied when trailing ‘<code
  2677     class=css>?</code>’ characters signify any hexadeximal digit
  2678   </dl>
  2680   <p>Individual codepoints are written using hexadecimal values that
  2681    correspond to <a href="http://www.unicode.org/charts/">Unicode character
  2682    codepoints</a>. Valid Unicode codepoint values vary between 0 and 10FFFF
  2683    inclusive. Digit values of codepoints are ASCII case-insensitive. For
  2684    interval ranges, the start and end codepoints are valid Unicode values and
  2685    the end codepoint is greater than or equal to the start codepoint.
  2687   <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
  2688    "U+???") are valid and equivalent to a wildcard range with an initial zero
  2689    digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
  2690    the range of valid Unicode codepoints are invalid. Because of this, the
  2691    maximum number of trailing ‘<code class=css>?</code>’ wildcard
  2692    characters is five, even though the <a
  2693    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2694    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
  2696   <p>Within the comma-delimited list of Unicode ranges in a ‘<a
  2697    href="#descdef-unicode-range"><code
  2698    class=property>unicode-range</code></a>’ descriptor declaration, ranges
  2699    may overlap. The union of these ranges defines the set of codepoints for
  2700    which the corresponding font may be used. User agents must not download or
  2701    use the font for codepoints outside this set. User agents may normalize
  2702    the list of ranges into a list that is different but represents the same
  2703    set of codepoints.
  2705   <p>The associated font might not contain glyphs for the entire set of
  2706    codepoints defined by the ‘<a href="#descdef-unicode-range"><code
  2707    class=property>unicode-range</code></a>’ descriptor. When the font is
  2708    used, the <dfn id=effective-character-map>effective character map</dfn> is
  2709    the intersection of the codepoints defined by ‘<a
  2710    href="#descdef-unicode-range"><code
  2711    class=property>unicode-range</code></a>’ with the font's <a
  2712    href="#character-map"><em>character map</em></a>. This allows authors to
  2713    define supported ranges in terms of broad ranges without worrying about
  2714    the precise codepoint ranges supported by the underlying font.
  2716   <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
  2717    to define composite fonts</h3>
  2719   <p>Multiple <a href="#at-font-face-rule"><code>@font-face</code></a> rules
  2720    with different unicode ranges for the same family and style descriptor
  2721    values can be used to create composite fonts that mix the glyphs from
  2722    different fonts for different scripts. This can be used to combine fonts
  2723    that only contain glyphs for a single script (e.g. Latin, Greek, Cyrillic)
  2724    or it can be used by authors as a way of segmenting a font into fonts for
  2725    commonly used characters and less frequently used characters. Since the
  2726    user agent will only pull down the fonts it needs this helps reduce page
  2727    bandwidth.
  2729   <p>If the unicode ranges overlap for a set of <a
  2730    href="#at-font-face-rule"><code>@font-face</code></a> rules with the same
  2731    family and style descriptor values, the rules are ordered in the reverse
  2732    order they were defined; the last rule defined is the first to be checked
  2733    for a given character.
  2735   <p>Example ranges for specific languages or characters:
  2737   <dl>
  2738    <dt>unicode-range: U+A5;
  2740    <dd>a single code point, the yen/yuan symbol
  2742    <dt>unicode-range: U+0-7F;
  2744    <dd>code range for basic ASCII characters
  2746    <dt>unicode-range: U+590-5ff;
  2748    <dd>code range for Hebrew characters
  2750    <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
  2752    <dd>code range for Japanese kanji, hiragana and katakana characters plus
  2753     yen/yuan symbol
  2754   </dl>
  2756   <div class=example>
  2757    <p>The BBC provides news services in a wide variety of languages, many
  2758     that are not well supported across all platforms. Using an <a
  2759     href="#at-font-face-rule"><code>@font-face</code></a> rule, the BBC could
  2760     provide a font for any of these languages, as it already does via a
  2761     manual font download.</p>
  2763    <pre>
  2764 @font-face {
  2765   font-family: BBCBengali;
  2766   src: url(fonts/BBCBengali.woff) format("woff");
  2767   unicode-range: U+00-FF, U+980-9FF;
  2769 </pre>
  2770   </div>
  2772   <div class=example>
  2773    <p>Technical documents often require a wide range of symbols. The STIX
  2774     Fonts project is one project aimed at providing fonts to support a wide
  2775     range of technical typesetting in a standardized way. The example below
  2776     shows the use of a font that provides glyphs for many of the mathematical
  2777     and technical symbol ranges within Unicode:</p>
  2779    <pre>
  2780 @font-face {
  2781   font-family: STIXGeneral;
  2782   src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
  2783   unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
  2785 </pre>
  2786   </div>
  2788   <div class=example>
  2789    <p>This example shows how an author can override the glyphs used for Latin
  2790     characters in a Japanese font with glyphs from a different font. The
  2791     first rule specifies no range so it defaults to the entire range. The
  2792     range specified in the second rule overlaps but takes precedence because
  2793     it is defined later.</p>
  2795    <pre>
  2796 @font-face {
  2797   font-family: JapaneseWithGentium;
  2798   src: local(MSMincho);
  2799   /* no range specified, defaults to entire range */
  2802 @font-face {
  2803   font-family: JapaneseWithGentium;
  2804   src: url(../fonts/Gentium.woff);
  2805   unicode-range: U+0-2FF;
  2807 </pre>
  2808   </div>
  2810   <div class=example>
  2811    <p>Consider a family constructed to optimize bandwidth by separating out
  2812     Latin, Japanese and other characters into different font files:</p>
  2814    <pre>
  2815 /* fallback font - size: 4.5MB */
  2816 @font-face {
  2817   font-family: DroidSans;
  2818   src: url(DroidSansFallback.woff);
  2819   /* no range specified, defaults to entire range */
  2822 /* Japanese glyphs - size: 1.2MB */
  2823 @font-face {
  2824   font-family: DroidSans;
  2825   src: url(DroidSansJapanese.woff);
  2826   unicode-range: U+3000-9FFF, U+ff??;
  2829 /* Latin, Greek, Cyrillic along with some
  2830    punctuation and symbols - size: 190KB */
  2831 @font-face {
  2832   font-family: DroidSans;
  2833   src: url(DroidSans.woff);
  2834   unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
  2836 </pre>
  2838    <p>For simple Latin text, only the font for Latin characters is
  2839     downloaded:</p>
  2841    <pre>
  2842 body { font-family: DroidSans; }
  2844 &lt;p>This is that&lt;/p>
  2845 </pre>
  2847    <p>In this case the user agent first checks the unicode-range for the font
  2848     containing Latin characters (DroidSans.woff). Since all the characters
  2849     above are in the range U+0-5FF, the user agent downloads the font and
  2850     renders the text with that font.</p>
  2852    <p>Next, consider text that makes use of an arrow character (⇨):</p>
  2854    <pre>
  2855 &lt;p>This &amp;#x21e8; that&lt;p>
  2856 </pre>
  2858    <p>The user agent again first checks the unicode-range of the font
  2859     containing Latin characters. Since U+2000-2300 includes the arrow code
  2860     point (U+21E8), the user agent downloads the font. For this character
  2861     however the Latin font does not have a matching glyph, so the effective
  2862     unicode-range used for font matching excludes this code point. Next, the
  2863     user agent evaluates the Japanese font. The unicode-range for the
  2864     Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
  2865     user agent does not download the Japanese font. Next the fallback font is
  2866     considered. The <a href="#at-font-face-rule"><code>@font-face</code></a>
  2867     rule for the fallback font does not define unicode-range so its value
  2868     defaults to the range of all Unicode code points. The fallback font is
  2869     downloaded and used to render the arrow character.</p>
  2870   </div>
  2872   <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
  2873    href="#descdef-font-variant">font-variant</a> and <a
  2874    href="#descdef-font-feature-settings">font-feature-settings</a>
  2875    descriptors</h3>
  2877   <table class=descdef>
  2878    <tbody>
  2879     <tr>
  2880      <td>Name:
  2882      <td><dfn id=descdef-font-variant
  2883       title="font-variant!!descriptor">font-variant</dfn>
  2885     <tr>
  2886      <td>Value:
  2888      <td><a href="#font-variant-normal-value"
  2889       title="normal!!font-variant">normal</a> | <a
  2890       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  2891       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  2892       || <a
  2893       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  2894       || <a
  2895       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  2896       || <a
  2897       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  2898       || <a href="#stylistic"><var
  2899       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  2900       href="#historical-forms"><var>historical-forms</var></a> || <a
  2901       href="#styleset"><var
  2902       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  2903       href="#character-variant"><var
  2904       title=character-variant>character-variant(&lt;feature-value-name&gt;
  2905       #)</var></a> || <a href="#swash"><var
  2906       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  2907       href="#ornaments"><var
  2908       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  2909       href="#annotation"><var
  2910       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  2911       <a href="#small-caps"><i>small-caps</i></a> | <a
  2912       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  2913       href="#petite-caps"><i>petite-caps</i></a> | <a
  2914       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  2915       href="#unicase"><i>unicase</i></a> | <a
  2916       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  2917       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  2918       || <a
  2919       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  2920       || <a
  2921       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  2922       || <a href="#ordinal"><i>ordinal</i></a> || <a
  2923       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  2924       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  2925       || <a
  2926       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  2927       || <a href="#ruby"><i>ruby</i></a> ]
  2929     <tr>
  2930      <td><em>Initial:</em>
  2932      <td>normal
  2933   </table>
  2935   <table class=descdef>
  2936    <tbody>
  2937     <tr>
  2938      <td>Name:
  2940      <td><dfn id=descdef-font-feature-settings
  2941       title="font-feature-settings!!descriptor">font-feature-settings</dfn>
  2943     <tr>
  2944      <td>Value:
  2946      <td><a href="#font-feature-settings-normal-value"
  2947       title="normal!!font-feature-settings">normal</a> | <a
  2948       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  2950     <tr>
  2951      <td><em>Initial:</em>
  2953      <td>normal
  2954   </table>
  2956   <p>These descriptors define initial settings that apply when the font
  2957    defined by an <a href="#at-font-face-rule"><code>@font-face</code></a>
  2958    rule is rendered. They do not affect font selection. Values are identical
  2959    to those defined for the corresponding <a href="#propdef-font-variant"
  2960    title="font-variant!!property">‘<code
  2961    class=property>font-variant</code>’</a> and <a
  2962    href="#propdef-font-feature-settings"
  2963    title="font-feature-settings!!property">‘<code
  2964    class=property>font-feature-settings</code>’</a> properties defined
  2965    below except that the value ‘<code class=property>inherit</code>’ is
  2966    omitted. When multiple font feature descriptors or properties are used,
  2967    the cumulative effect on text rendering is detailed in the section <a
  2968    href="#font-feature-resolution">Font Feature Resolution</a> below. In
  2969    cases where specific values define synthesized fallback for certain <a
  2970    href="#propdef-font-variant" title="font-variant!!property">‘<code
  2971    class=property>font-variant</code>’</a> subproperties, the same
  2972    synthesized fallback applies when used within those values are used with
  2973    the <a href="#descdef-font-style" title="font-style!!descriptor">‘<code
  2974    class=property>font-variant</code>’</a> descriptor.
  2976   <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
  2977    guidelines</h3>
  2979   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule is
  2980    designed to allow lazy loading of font resources that are only downloaded
  2981    when used within a document. A stylesheet can include <a
  2982    href="#at-font-face-rule"><code>@font-face</code></a> rules for a library
  2983    of fonts of which only a select set are used; user agents must only
  2984    download those fonts that are referred to within the style rules
  2985    applicable to a given page. User agents that download all fonts defined in
  2986    <a href="#at-font-face-rule"><code>@font-face</code></a> rules without
  2987    considering whether those fonts are in fact used within a page are
  2988    considered non-conformant. In cases where a font might be downloaded in
  2989    character fallback cases, user agents may download a font if it's
  2990    contained within the computed value of <a href="#propdef-font-family"
  2991    title="font-family!!property">‘<code
  2992    class=property>font-family</code>’</a> for a given text run.
  2994   <pre>
  2995 @font-face {
  2996   font-family: GeometricModern;
  2997   src: url(font.woff);
  3000 p {
  3001   /* font will be downloaded for pages with p elements */
  3002   font-family: GeometricModern, sans-serif;
  3005 h2 {
  3006   /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
  3007   font-family: Futura, GeometricModern, sans-serif;
  3009 </pre>
  3011   <p>In cases where textual content is loaded before downloadable fonts are
  3012    available, user agents may render text as it would be rendered if
  3013    downloadable font resources are not available or they may render text
  3014    transparently with fallback fonts to avoid a flash of text using a
  3015    fallback font. In cases where the font download fails user agents must
  3016    display text, simply leaving transparent text is considered non-conformant
  3017    behavior. Authors are advised to use fallback fonts in their font lists
  3018    that closely match the metrics of the downloadable fonts to avoid large
  3019    page reflows where possible.
  3021   <p><a id=same-origin-restriction> </a><a
  3022    id=allowing-cross-origin-font-loading> </a>
  3024   <h3 id=font-fetching-requirements><span class=secno>4.9 </span>Font
  3025    fetching requirements</h3>
  3026   <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
  3027   http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
  3028   http://www.w3.org/2011/10/31-webapps-minutes.html#item02
  3029 -->
  3031   <p>For font loads, user agents must use the <a
  3032    href="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch">potentially
  3033    CORS-enabled fetch</a> method defined by the <a href="#HTML5"
  3034    rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification for URL's
  3035    defined within @font-face rules. When fetching, user agents must use
  3036    "Anonymous" mode, set the referrer source to the stylesheet's URL and set
  3037    the origin to the URL of the containing document.
  3039   <p class=note>The implications of this for authors are that fonts will
  3040    typically not be loaded cross-origin unless authors specifically takes
  3041    steps to permit cross-origin loads. Sites can explicitly allow cross-site
  3042    loading of font data using the <code>Access-Control-Allow-Origin</code>
  3043    HTTP header. For other schemes, no explicit mechanism to allow
  3044    cross-origin loading, beyond what is permitted by the <a
  3045    href="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch">potentially
  3046    CORS-enabled fetch</a> method, is defined or required.
  3048   <div class=example> For the examples given below, assume that a document is
  3049    located at <code>http://example.com/page.html</code> and all URL's link to
  3050    valid font resources supported by the user agent. Fonts defined with the
  3051    ‘<a href="#descdef-src"><code class=property>src</code></a>’
  3052    descriptor values below will be loaded:
  3053    <pre>/* same origin (i.e. domain, scheme, port match document) */
  3054 src: url(fonts/simple.woff);
  3055 src: url(//fonts/simple.woff);
  3057 /* data url's with no redirects are treated as same origin */
  3058 src: url("data:application/font-woff;base64,...");
  3060 /* cross origin, different domain */
  3061 /* Access-Control-Allow-Origin response header set to '*' */
  3062 src: url(http://another.example.com/fonts/simple.woff);
  3063 </pre>
  3064    Fonts defined with the ‘<a href="#descdef-src"><code
  3065    class=property>src</code></a>’ descriptor values below will fail to
  3066    load:
  3067    <pre>/* cross origin, different scheme */
  3068 /* no Access-Control-xxx headers in response */
  3069 src: url(https://example.com/fonts/simple.woff);
  3071 /* cross origin, different domain */
  3072 /* no Access-Control-xxx headers in response */
  3073 src: url(http://another.example.com/fonts/simple.woff);
  3074 </pre>
  3075   </div>
  3077   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
  3078    Algorithm</h2>
  3080   <p>The algorithm below describes how fonts are associated with individual
  3081    runs of text. For each character in the run a font family is chosen and a
  3082    particular font face is selected containing a glyph for that character.
  3084   <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
  3085    font family names</h3>
  3087   <p>As part of the font matching algorithm outlined below, user agents must
  3088    match font family names used in style rules with actual font family names
  3089    contained in fonts available in a given environment or with font family
  3090    names defined in <a href="#at-font-face-rule"><code>@font-face</code></a>
  3091    rules. User agents must match these names case insensitively, using the
  3092    "Default Caseless Matching" algorithm outlined in the Unicode
  3093    specification <a href="#UNICODE6"
  3094    rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>. This algorithm is
  3095    detailed in section 3.13 entitled "Default Case Algorithms". Specifically,
  3096    the algorithm must be applied without normalizing the strings involved and
  3097    without applying any language-specific tailorings. The case folding method
  3098    specified by this algorithm uses the case mappings with status field
  3099    ‘<code class=property>C</code>’ or ‘<code class=property>F</code>’
  3100    in the CaseFolding.txt file of the Unicode Character Database.
  3102   <p class=note> For authors this means that font family names are matched
  3103    case insensitively, whether those names exist in a platform font or in the
  3104    <a href="#at-font-face-rule"><code>@font-face</code></a> rules contained
  3105    in a stylesheet. Authors should take care to ensure that names use a
  3106    character sequence consistent with the actual font family name,
  3107    particularly when using combining characters such as diacritical marks.
  3108    For example, a family name that contains an uppercase A (U+0041) followed
  3109    by a combining ring (U+030A) will <strong>not</strong> match a name that
  3110    looks identical but which uses the precomposed lowercase a-ring character
  3111    (U+00E5) instead of the combining sequence.
  3113   <p class=note> Implementors should take care to verify that a given
  3114    caseless string comparison implementation uses this precise algorithm and
  3115    not assume that a given platform string matching routine follows it, as
  3116    many of these have locale-specific behavior or use some level of string
  3117    normalization.
  3119   <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
  3120    styles</h3>
  3122   <p>The procedure for choosing a font for a given character in a run of text
  3123    consists of iterating over the font families named by the <a
  3124    href="#propdef-font-family" title="font-family!!property">‘<code
  3125    class=property>font-family</code>’</a> property, selecting a font face
  3126    with the appropriate style based on other font properties and then
  3127    determining whether a glyph exists for the given character. This is done
  3128    using the <dfn id=character-map>character map</dfn> of the font, data
  3129    which maps characters to the default glyph for that character. A font is
  3130    considered to <dfn id=support>support</dfn> a given character if (1) the
  3131    character is contained in the font's <a
  3132    href="#character-map"><em>character map</em></a> and (2) if required by
  3133    the containing script, shaping information is available for that
  3134    character.
  3136   <p>Some legacy fonts may include a given character in the <a
  3137    href="#character-map"><em>character map</em></a> but lack the shaping
  3138    information (e.g. <a
  3139    href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
  3140    layout tables</a> or <a
  3141    href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
  3142    tables</a>) necessary for correctly rendering text runs containing that
  3143    character.
  3145   <p>Codepoint sequences consisting of a base character followed by a
  3146    sequence of combining characters are treated slightly differently, see the
  3147    section on <a href="#cluster-matching">cluster matching</a> below.
  3149   <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
  3150    given font family is defined to be the face that would be selected if all
  3151    font style properties were set to their initial value.
  3153   <ol id=fontmatchingalg>
  3154    <li>Using the computed font property values for a given element, the user
  3155     agent starts with the first family name specified by the <a
  3156     href="#propdef-font-family" title="font-family!!property">‘<code
  3157     class=property>font-family</code>’</a> property.
  3159    <li>If the family name is a generic family keyword, the user agent looks
  3160     up the appropriate font family name to be used. User agents may choose
  3161     the generic font family to use based on the language of the containing
  3162     element or the Unicode range of the character.
  3164    <li>For other family names, the user agent attempts to find the family
  3165     name among fonts defined via <a
  3166     href="#at-font-face-rule"><code>@font-face</code></a> rules and then
  3167     among available system fonts, matching names with a <a
  3168     href="#font-family-casing">case-insensitive comparison</a> as outlined in
  3169     the section above. On systems containing fonts with multiple localized
  3170     font family names, user agents must match any of these names independent
  3171     of the underlying system locale or platform API used. If the font
  3172     resources defined for a given face in an <a
  3173     href="#at-font-face-rule"><code>@font-face</code></a> rule are either not
  3174     available or contain invalid font data, then the face should be treated
  3175     as not present in the family. If no faces are present for a family
  3176     defined via <a href="#at-font-face-rule"><code>@font-face</code></a>
  3177     rules, the family should be treated as missing; matching a platform font
  3178     with the same name must not occur in this case.
  3180    <li>If a font family match occurs, the user agent assembles the set of
  3181     font faces in that family and then narrows the set to a single face using
  3182     other font properties in the order given below. A group of faces defined
  3183     via <a href="#at-font-face-rule"><code>@font-face</code></a> rules with
  3184     identical font descriptor values but differing ‘<a
  3185     href="#descdef-unicode-range"><code
  3186     class=property>unicode-range</code></a>’ values are considered to be a
  3187     single <dfn id=composite-face>composite face</dfn> for this step:
  3188     <ol id=fontstylematchingalg>
  3189      <li><a href="#propdef-font-stretch"
  3190       title="font-stretch!!property">‘<code
  3191       class=property>font-stretch</code>’</a> is tried first. If the
  3192       matching set contains faces with width values matching the <a
  3193       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  3194       class=property>font-stretch</code>’</a> value, faces with other width
  3195       values are removed from the matching set. If there is no face that
  3196       exactly matches the width value the nearest width is used instead. If
  3197       the value of <a href="#propdef-font-stretch"
  3198       title="font-stretch!!property">‘<code
  3199       class=property>font-stretch</code>’</a> is <a
  3200       href="#font-stretch-normal-value" title="normal!!font-stretch">‘<code
  3201       class=property>normal</code>’</a> or one of the condensed values,
  3202       narrower width values are checked first, then wider values. If the
  3203       value of <a href="#propdef-font-stretch"
  3204       title="font-stretch!!property">‘<code
  3205       class=property>font-stretch</code>’</a> is one of the expanded
  3206       values, wider values are checked first, followed by narrower values.
  3207       Once the closest matching width has been determined by this process,
  3208       faces with other widths are removed from the matching set.
  3210      <li><a href="#propdef-font-style" title="font-style!!property">‘<code
  3211       class=property>font-style</code>’</a> is tried next. If the value of
  3212       <a href="#propdef-font-style" title="font-style!!property">‘<code
  3213       class=property>font-style</code>’</a> is ‘<a href="#italic"><code
  3214       class=property>italic</code></a>’, italic faces are checked first,
  3215       then oblique, then normal faces. If the value is ‘<a
  3216       href="#oblique"><code class=property>oblique</code></a>’, oblique
  3217       faces are checked first, then italic faces and then normal faces. If
  3218       the value is <a href="#font-style-normal-value"
  3219       title="normal!!font-style">‘<code
  3220       class=property>normal</code>’</a>, normal faces are checked first,
  3221       then oblique faces, then italic faces. Faces with other style values
  3222       are excluded from the matching set. User agents are permitted to
  3223       distinguish between italic and oblique faces within platform font
  3224       families but this is not required, so all italic or oblique faces may
  3225       be treated as italic faces. However, within font families defined via
  3226       <a href="#at-font-face-rule"><code>@font-face</code></a> rules, italic
  3227       and oblique faces must be distinguished using the value of the <a
  3228       href="#descdef-font-style" title="font-style!!descriptor">‘<code
  3229       class=property>font-style</code>’</a> descriptor. For families that
  3230       lack any italic or oblique faces, users agents may create artificial
  3231       oblique faces, if this is permitted by the value of the ‘<a
  3232       href="#propdef-font-synthesis"><code
  3233       class=property>font-synthesis</code></a>’ property.
  3235      <li><a href="#propdef-font-weight"
  3236       title="font-weight!!property">‘<code
  3237       class=property>font-weight</code>’</a> is matched next, so it will
  3238       always reduce the matching set to a single font face. If bolder/lighter
  3239       relative weights are used, the effective weight is calculated based on
  3240       the inherited weight value, as described in the definition of the <a
  3241       href="#propdef-font-weight" title="font-weight!!property">‘<code
  3242       class=property>font-weight</code>’</a> property. Given the desired
  3243       weight and the weights of faces in the matching set after the steps
  3244       above, if the desired weight is available that face matches. Otherwise,
  3245       a weight is chosen using the rules below:
  3246       <ul>
  3247        <li>If the desired weight is less than 400, weights below the desired
  3248         weight are checked in descending order followed by weights above the
  3249         desired weight in ascending order until a match is found.
  3251        <li>If the desired weight is greater than 500, weights above the
  3252         desired weight are checked in ascending order followed by weights
  3253         below the desired weight in descending order until a match is found.
  3255        <li>If the desired weight is 400, 500 is checked first and then the
  3256         rule for desired weights less than 400 is used.
  3258        <li>If the desired weight is 500, 400 is checked first and then the
  3259         rule for desired weights less than 400 is used.
  3260       </ul>
  3262      <li><span class=property>‘<a href="#propdef-font-size"><code
  3263       class=property>font-size</code></a>’</span> must be matched within a
  3264       UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
  3265       are rounded to the nearest whole pixel, while the tolerance for
  3266       bitmapped fonts could be as large as 20%.) Further computations, e.g.,
  3267       by ‘<code class=property>em</code>’ values in other properties, are
  3268       based on the <span class=property>‘<a href="#propdef-font-size"><code
  3269       class=property>font-size</code></a>’</span> value that is used, not
  3270       the one that is specified.
  3271     </ol>
  3273    <li>
  3274     <p>If the matched face is defined via <a
  3275      href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  3276      must use the procedure below to select a single font:
  3278     <ol>
  3279      <li>If the font resource has not been loaded and the range of characters
  3280       defined by the ‘<a href="#descdef-unicode-range"><code
  3281       class=property>unicode-range</code></a>’ descriptor value includes
  3282       the character in question, load the font.
  3284      <li>After downloading, if the <a
  3285       href="#effective-character-map"><em>effective character map</em></a>
  3286       supports the character in question, select that font.
  3287     </ol>
  3289     <p>When the matched face is a <a href="#composite-face"><em>composite
  3290      face</em></a>, user agents must use the procedure above on each of the
  3291      faces in the <a href="#composite-face"><em>composite face</em></a> in
  3292      reverse order of <a
  3293      href="#at-font-face-rule"><code>@font-face</code></a> rule definition.</p>
  3295     <p>While the download occurs, user agents may either wait until the font
  3296      is downloaded or render once with substituted font metrics and render
  3297      again once the font is downloaded.</p>
  3299    <li>
  3300     <p>If no matching face exists or the matched face does not contain a
  3301      glyph for the character to be rendered, the next family name is selected
  3302      and the previous three steps repeated. Glyphs from other faces in the
  3303      family are not considered. The only exception is that user agents may
  3304      optionally substitute a synthetically obliqued version of the <a
  3305      href="#default-face"><em>default face</em></a> if that face supports a
  3306      given glyph and synthesis of these faces is permitted by the value of
  3307      the ‘<a href="#propdef-font-synthesis"><code
  3308      class=property>font-synthesis</code></a>’ property. For example, a
  3309      synthetic italic version of the regular face may be used if the italic
  3310      face doesn't support glyphs for Arabic.</p>
  3311     <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
  3314    <li>If there are no more font families to be evaluated and no matching
  3315     face has been found, then the user agent performs a <dfn
  3316     id=system-font-fallback>system font fallback</dfn> procedure to find the
  3317     best match for the character to be rendered. The result of this procedure
  3318     may vary across user agents.
  3320    <li>If a particular character cannot be displayed using any font, the user
  3321     agent should indicate by some means that a character is not being
  3322     displayed, displaying either a symbolic representation of the missing
  3323     glyph (e.g. using a <a
  3324     href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
  3325     Font</a>) or using the missing character glyph from a default font.
  3326   </ol>
  3328   <p>Optimizations of this process are allowed provided that an
  3329    implementation behaves as if the algorithm had been followed exactly.
  3330    Matching occurs in a well-defined order to insure that the results are as
  3331    consistent as possible across user agents, given an identical set of
  3332    available fonts and rendering technology.
  3334   <p>The <dfn id=first-available-font>first available font</dfn>, used in the
  3335    definition of <a
  3336    href="http://www.w3.org/TR/css3-values/#font-relative-lengths"><em>font-relative
  3337    lengths</em></a> such as ‘<code class=property>ex</code>’ and ‘<code
  3338    class=property>ch</code>’, is defined to be the first available font
  3339    that would match any character given font families in the ‘<code
  3340    class=property>font-family</code>’ list (or a user agent's default font
  3341    if none are available).
  3343   <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
  3345   <p>When text contains characters such as combining marks, ideally the base
  3346    character should be rendered using the same font as the mark, this assures
  3347    proper placement of the mark. For this reason, the font matching algorithm
  3348    for clusters is more specialized than the general case of matching a
  3349    single character by itself. For sequences containing variation selectors,
  3350    which indicate the precise glyph to be used for a given character, user
  3351    agents always attempt <a href="#system-font-fallback"><em>system font
  3352    fallback</em></a> to find the appropriate glyph before using the default
  3353    glyph of the base character.
  3355   <p>A sequence of codepoints containing combining mark or other modifiers is
  3356    termed a grapheme cluster (see <a href="#CSS3TEXT"
  3357    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
  3358    description). For a given cluster containing a base character, <em>b</em>
  3359    and a sequence of combining characters <em>c1, c2…</em>, the entire
  3360    cluster is matched using these steps:
  3362   <ol>
  3363    <li>For each family in the font list, a face is chosen using the style
  3364     selection rules defined in the previous section.
  3365     <ol>
  3366      <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
  3367       completely supported by the font, select this font for the sequence.
  3369      <li>If a sequence of multiple codepoints is canonically equivalent to a
  3370       single character and the font <a href="#support"><em
  3371       title=support>supports</em></a> that character, select this font for
  3372       the sequence.
  3373     </ol>
  3375    <li>If no font was found in the font list in step 1:
  3376     <ol>
  3377      <li>If <em>c1</em> is a variation selector, system fallback must be used
  3378       to find a font that <a href="#support"><em
  3379       title=support>supports</em></a> the full sequence of <em>b + c1</em>.
  3380       If no font on the system <a href="#support"><em
  3381       title=support>supports</em></a> the full sequence, match the single
  3382       character <em>b</em> using the normal procedure for matching single
  3383       characters and ignore the variation selector. Note: a sequence with
  3384       more than one variation selector must be treated as an encoding error
  3385       and the trailing selectors must be ignored. <a href="#UNICODE6"
  3386       rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>
  3388      <li>Otherwise, the user agent may optionally use system font fallback to
  3389       match a font that <a href="#support"><em
  3390       title=support>supports</em></a> the entire cluster.
  3391     </ol>
  3393    <li>If no font is found in step 2, use the matching sequence from step 1
  3394     to determine the longest sequence that is completely <a
  3395     href="#support"><em title=support>supported</em></a> by a font in the
  3396     font list and attempt to match the remaining combining characters
  3397     separately using the rules for single characters.
  3398   </ol>
  3400   <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
  3401    issues</h3>
  3403   <p>CSS font matching is always performed on text runs containing Unicode
  3404    characters, so documents using legacy encodings are assumed to have been
  3405    transcoded before matching fonts. For fonts containing <a
  3406    href="#character-map"><em title="character map">character maps</em></a>
  3407    for both legacy encodings and Unicode, the contents of the legacy encoding
  3408    <a href="#character-map"><em>character map</em></a> must have no effect on
  3409    the results of the font matching process.
  3411   <p>The font matching process does not assume that text runs are in either
  3412    normalized or denormalized form (see <a href="#CHARMOD-NORM"
  3413    rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
  3414    details). Fonts may only support precomposed forms and not the decomposed
  3415    sequence of base character plus combining marks. Authors should always
  3416    tailor their choice of fonts to their content, including whether that
  3417    content contains normalized or denormalized character streams.
  3419   <p>If a given character is a Private-Use Area Unicode codepoint, user
  3420    agents must only match font families named in the ‘<code
  3421    class=property>font-family</code>’ list that are not generic families.
  3422    If none of the families named in the ‘<code
  3423    class=property>font-family</code>’ list contain a glyph for that
  3424    codepoint, user agents must display some form of missing glyph symbol for
  3425    that character rather than attempting <a
  3426    href="#system-font-fallback"><em>system font fallback</em></a> for that
  3427    codepoint. When matching the replacement character U+FFFD, user agents may
  3428    skip the font matching process and immediately display some form of
  3429    missing glyph symbol, they are not required to display the glyph from the
  3430    font that would be selected by the font matching process.
  3432   <p>In general, the fonts for a given family will all have the same or
  3433    similar <a href="#character-map"><em title="character map">character
  3434    maps</em></a>. The process outlined here is designed to handle even font
  3435    families containing faces with widely variant <a href="#character-map"><em
  3436    title="character map">character maps</em></a>. However, authors are
  3437    cautioned that the use of such families can lead to unexpected results.
  3439   <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
  3440    changes since CSS 2.1</h3>
  3442   <p>The algorithm above is different from CSS 2.1 in a number of key places.
  3443    These changes were made to better reflect actual font matching behavior
  3444    across user agent implementations.
  3446   <p>Differences compared to the font matching algorithm in CSS 2.1:
  3448   <ul>
  3449    <li>The algorithm includes font-stretch matching.
  3451    <li>All possible font-style matching scenarios are delineated.
  3453    <li>Small-caps fonts are not matched as part of the font matching process,
  3454     they are now handled via font features.
  3456    <li>Unicode variation selector matching is required.
  3458    <li>Cluster sequences are matched as a unit.
  3459   </ul>
  3461   <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
  3462    examples</h3>
  3464   <div class=example>
  3465    <p>It's useful to note that the CSS selector syntax may be used to create
  3466     language-sensitive typography. For example, some Chinese and Japanese
  3467     characters are unified to have the same Unicode code point, although the
  3468     abstract glyphs are not the same in the two languages.
  3470    <pre>*:lang(ja-jp) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
  3471 *:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
  3472 </pre>
  3474    <p>This selects any element that has the given language — Japanese or
  3475     Traditional Chinese — and uses the appropriate font.
  3476   </div>
  3478   <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
  3480   <p>Modern font technologies support a variety of advanced typographic and
  3481    language-specific font features. Using these features, a single font can
  3482    provide glyphs for a wide range of ligatures, contextual and stylistic
  3483    alternates, tabular and old-style figures, small capitals, automatic
  3484    fractions, swashes, and alternates specific to a given language. To allow
  3485    authors control over these font capabilities, the ‘<code
  3486    class=property>font-variant</code>’ property has been expanded for CSS3.
  3487    It now functions as a shorthand for a set of properties that provide
  3488    control over stylistic font features.
  3490   <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
  3491    selection and positioning</h3>
  3493   <p>Simple fonts used for displaying Latin text use a very basic processing
  3494    model. Fonts contain a <a href="#character-map"><em>character map</em></a>
  3495    which maps each character to a glyph for that character. Glyphs for
  3496    subsequent characters are simply placed one after the other along a run of
  3497    text. Modern font formats such as OpenType and AAT (Apple Advanced
  3498    Typography) use a richer processing model. The glyph for a given character
  3499    can be chosen and positioned not just based on the codepoint of the
  3500    character itself, but also on adjacent characters as well as the language,
  3501    script, and features enabled for the text. Font features may be required
  3502    for specific scripts, or recommended as enabled by default or they might
  3503    be stylistic features meant to be used under author control.
  3505   <p>For a good visual overview of these features, see the <a
  3506    href="#OPENTYPE-FONT-GUIDE"
  3507    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
  3508    For a detailed description of glyph processing for OpenType fonts, see <a
  3509    href="#WINDOWS-GLYPH-PROC"
  3510    rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
  3512   <p>Stylistic font features can be classified into two broad categories:
  3513    ones that affect the harmonization of glyph shapes with the surrounding
  3514    context, such as kerning and ligature features, and ones such as the
  3515    small-caps, subscript/superscript and alternate features that affect shape
  3516    selection.
  3518   <p>The subproperties of <a href="#propdef-font-variant"
  3519    title="font-variant!!property">‘<code
  3520    class=property>font-variant</code>’</a> listed below are used to control
  3521    these stylistic font features. They do not control features that are
  3522    required for displaying certain scripts, such as the OpenType features
  3523    used when displaying Arabic or Indic language text. They affect glyph
  3524    selection and positioning, but do not affect font selection as described
  3525    in the font matching section (except in cases required for compatibility
  3526    with CSS 2.1).
  3528   <p>To assure consistent behavior across user agents, the equivalent
  3529    OpenType property settings are listed for individual properties and are
  3530    normative. When using other font formats these should be used as a
  3531    guideline to map CSS font feature property values to specific font
  3532    features.
  3534   <h3 id=language-specific-support><span class=secno>6.2
  3535    </span>Language-specific display</h3>
  3537   <p>OpenType also supports language-specific glyph selection and
  3538    positioning, so that text can be displayed correctly in cases where the
  3539    language dictates a specific display behavior. Many languages share a
  3540    common script, but the shape of certain letters can vary across those
  3541    languages. For example, certain Cyrillic letters have different shapes in
  3542    Russian text than in Bulgarian. In Latin text, it's common to render "fi"
  3543    with an explicit fi-ligature that lacks a dot on the "i". However, in
  3544    languages such as Turkish which uses both a dotted-i and a dotless-i, it's
  3545    important to not use this ligature or use a specialized version that
  3546    contains a dot over the "i". The example below shows language-specific
  3547    variations based on stylistic traditions found in Spanish, Italian and
  3548    French orthography:
  3550   <div class=featex><img alt="language specific forms, spanish"
  3551    src=locl-1.png></div>
  3553   <div class=featex><img alt="language specific forms, italian"
  3554    src=locl-2.png></div>
  3556   <div class=featex><img alt="language specific forms, french"
  3557    src=locl-3.png></div>
  3559   <p>If the content language of the element is known according to the rules
  3560    of the <a
  3561    href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
  3562    language</a>, user agents are required to infer the OpenType language
  3563    system from the content language and use that when selecting and
  3564    positioning glyphs using an OpenType font.
  3566   <p>For OpenType fonts, in some cases it may be necessary to explicitly
  3567    declare the OpenType language to be used, for example when displaying text
  3568    in a given language that uses the typographic conventions of another
  3569    language or when the font does not explicitly support a given language but
  3570    supports a language that shares common typographic conventions. The ‘<a
  3571    href="#propdef-font-language-override"><code
  3572    class=property>font-language-override</code></a>’ property is used for
  3573    this purpose.</p>
  3574   <!-- prop: font-kerning -->
  3576   <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
  3577    href="#propdef-font-kerning">font-kerning</a> property</h3>
  3579   <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
  3580    <tbody>
  3581     <tr>
  3582      <td>Name:
  3584      <td><dfn id=propdef-font-kerning>font-kerning</dfn>
  3586     <tr>
  3587      <td>Value:
  3589      <td><a href="#font-kerning-auto-value"
  3590       title="auto!!font-kerning">auto</a> | <a
  3591       href="#font-kerning-normal-value"
  3592       title="normal!!font-kerning">normal</a> | <a
  3593       href="#font-kerning-none-value" title="none!!font-kerning">none</a>
  3595     <tr>
  3596      <td>Initial:
  3598      <td>auto
  3600     <tr>
  3601      <td>Applies to:
  3603      <td>all elements
  3605     <tr>
  3606      <td>Inherited:
  3608      <td>yes
  3610     <tr>
  3611      <td>Percentages:
  3613      <td>N/A
  3615     <tr>
  3616      <td>Media:
  3618      <td>visual
  3620     <tr>
  3621      <td>Computed value:
  3623      <td>as specified
  3625     <tr>
  3626      <td>Animatable:
  3628      <td>no
  3629   </table>
  3631   <p>Kerning is the contextual adjustment of inter-glyph spacing. This
  3632    property controls metric kerning, kerning that utilizes adjustment data
  3633    contained in the font.
  3635   <dl>
  3636    <dt><dfn id=font-kerning-auto-value title="auto!!font-kerning">auto</dfn>
  3638    <dd>Specifies that kerning is applied at the discretion of the user agent
  3640    <dt><dfn id=font-kerning-normal-value
  3641     title="normal!!font-kerning">normal</dfn>
  3643    <dd>Specifies that kerning is applied
  3645    <dt><dfn id=font-kerning-none-value title="none!!font-kerning">none</dfn>
  3647    <dd>Specifies that kerning is not applied
  3648   </dl>
  3650   <p>For fonts that do not include kerning data this property will have no
  3651    visible effect. When rendering with OpenType fonts, the <a
  3652    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
  3653    specification suggests that kerning be enabled by default. When kerning is
  3654    enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
  3655    vertical text runs the <span class=tag>vkrn</span> feature is enabled
  3656    instead). User agents must also support fonts that only support kerning
  3657    via data contained in a <span class=tag>kern</span> font table, as
  3658    detailed in the OpenType specification. If the ‘<code
  3659    class=property>letter-spacing</code>’ property is defined, kerning
  3660    adjustments are considered part of the default spacing and letter spacing
  3661    adjustments are made after kerning has been applied.
  3663   <p>When set to ‘<code class=property>auto</code>’, user agents can
  3664    determine whether to apply kerning or not based on a number of factors:
  3665    text size, script, or other factors that influence text processing speed.
  3666    Authors who want proper kerning should use <a
  3667    href="#font-kerning-normal-value" title="normal!!font-kerning">‘<code
  3668    class=property>normal</code>’</a> to explicitly enable kerning.
  3669    Likewise, some authors may prefer to disable kerning in situations where
  3670    performance is more important than precise appearance. However, in
  3671    well-designed modern implementations the use of kerning generally does not
  3672    have a large impact on text rendering speed.</p>
  3673   <!-- prop: font-variant-ligatures -->
  3675   <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
  3676    the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  3677    property</h3>
  3679   <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
  3680    <tbody>
  3681     <tr>
  3682      <td>Name:
  3684      <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
  3686     <tr>
  3687      <td>Value:
  3689      <td><a href="#font-variant-ligatures-normal-value"
  3690       title="normal!!font-variant-ligatures">normal</a> | <a
  3691       href="#font-variant-ligatures-none-value"
  3692       title="none!!font-variant-ligatures">none</a> | [ <a
  3693       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  3694       <a
  3695       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  3696       || <a
  3697       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  3698       || <a
  3699       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  3702     <tr>
  3703      <td>Initial:
  3705      <td>normal
  3707     <tr>
  3708      <td>Applies to:
  3710      <td>all elements
  3712     <tr>
  3713      <td>Inherited:
  3715      <td>yes
  3717     <tr>
  3718      <td>Percentages:
  3720      <td>N/A
  3722     <tr>
  3723      <td>Media:
  3725      <td>visual
  3727     <tr>
  3728      <td>Computed value:
  3730      <td>as specified
  3732     <tr>
  3733      <td>Animatable:
  3735      <td>no
  3736   </table>
  3738   <p>Ligatures and contextual forms are ways of combining glyphs to produce
  3739    more harmonized forms.
  3741   <pre
  3742    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>
  3744   <pre
  3745    class=prod><dfn id=discretionary-lig-values><var>&lt;discretionary-lig-values&gt;</var></dfn> = [ <a href="#discretionary-ligatures">discretionary-ligatures</a> | <a href="#no-discretionary-ligatures">no-discretionary-ligatures</a> ]</pre>
  3747   <pre
  3748    class=prod><dfn id=historical-lig-values><var>&lt;historical-lig-values&gt;</var></dfn>    = [ <a href="#historical-ligatures">historical-ligatures</a> | <a href="#no-historical-ligatures">no-historical-ligatures</a> ]</pre>
  3750   <pre
  3751    class=prod><dfn id=contextual-alt-values><var>&lt;contextual-alt-values&gt;</var></dfn>    = [ <a href="#contextual">contextual</a> | <a href="#no-contextual">no-contextual</a> ]</pre>
  3753   <p>Individual values have the following meanings:
  3755   <dl>
  3756    <dt><dfn id=font-variant-ligatures-normal-value
  3757     title="normal!!font-variant-ligatures">normal</dfn>
  3759    <dd>A value of <a href="#font-variant-ligatures-normal-value"
  3760     title="normal!!font-variant-ligatures">‘<code
  3761     class=property>normal</code>’</a> specifies that common default
  3762     features are enabled, <a href="#font-feature-resolution">as described in
  3763     detail in the next section</a>. For OpenType fonts, common ligatures and
  3764     contextual forms are on by default, discretionary and historical
  3765     ligatures are not.
  3767    <dt><dfn id=font-variant-ligatures-none-value
  3768     title="none!!font-variant-ligatures">none</dfn>
  3770    <dd>Specifies that all types of ligatures and contextual forms covered by
  3771     this property are explicitly disabled. In situations where ligatures are
  3772     not considered necessary, this may improve the speed of text rendering.
  3774    <dt><dfn id=common-ligatures>common-ligatures</dfn>
  3776    <dd>Enables display of common ligatures (OpenType features: <span
  3777     class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
  3778     enabled by default.
  3779   </dl>
  3781   <div class=featex><img alt="common ligature example" src=liga.png></div>
  3783   <dl>
  3784    <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
  3786    <dd>Disables display of common ligatures (OpenType features: <span
  3787     class=tag>liga, clig</span>).
  3789    <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
  3791    <dd>Enables display of discretionary ligatures (OpenType feature: <span
  3792     class=tag>dlig</span>). Which ligatures are discretionary or optional is
  3793     decided by the type designer, so authors will need to refer to the
  3794     documentation of a given font to understand which ligatures are
  3795     considered discretionary.
  3796   </dl>
  3798   <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
  3800   <dl>
  3801    <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
  3803    <dd>Disables display of discretionary ligatures (OpenType feature: <span
  3804     class=tag>dlig</span>).
  3806    <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
  3808    <dd>Enables display of historical ligatures (OpenType feature: <span
  3809     class=tag>hlig</span>).
  3810   </dl>
  3812   <div class=featex><img alt="historical ligature example" src=hlig.png></div>
  3814   <dl>
  3815    <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
  3817    <dd>Disables display of historical ligatures (OpenType feature: <span
  3818     class=tag>hlig</span>).
  3820    <dt><dfn id=contextual>contextual</dfn>
  3822    <dd>Enables display of contextual alternates (OpenType feature: <span
  3823     class=tag>calt</span>). Although not strictly a ligature feature, like
  3824     ligatures this feature is commonly used to harmonize the shapes of glyphs
  3825     with the surrounding context. For OpenType fonts, this feature is on by
  3826     default.
  3827   </dl>
  3829   <div class=featex><img alt="contextual alternate example" src=calt.png></div>
  3831   <dl>
  3832    <dt><dfn id=no-contextual>no-contextual</dfn>
  3834    <dd>Disables display of contextual alternates (OpenType feature: <span
  3835     class=tag>calt</span>).
  3836   </dl>
  3838   <p>Required ligatures, needed for correctly rendering complex scripts, are
  3839    not affected by the settings above, including ‘<code
  3840    class=property>none</code>’ (OpenType feature: <span
  3841    class=tag>rlig</span>).</p>
  3842   <!-- prop: font-variant-position -->
  3844   <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
  3845    and superscript forms: the <a
  3846    href="#propdef-font-variant-position">font-variant-position</a> property</h3>
  3848   <table class=propdef id=namefont-variant-positionvaluenormal-sub>
  3849    <tbody>
  3850     <tr>
  3851      <td>Name:
  3853      <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
  3855     <tr>
  3856      <td>Value:
  3858      <td><a href="#font-variant-position-normal-value"
  3859       title="normal!!font-variant-position">normal</a> | <a
  3860       href="#sub">sub</a> | <a href="#super">super</a>
  3862     <tr>
  3863      <td>Initial:
  3865      <td>normal
  3867     <tr>
  3868      <td>Applies to:
  3870      <td>all elements
  3872     <tr>
  3873      <td>Inherited:
  3875      <td>yes
  3877     <tr>
  3878      <td>Percentages:
  3880      <td>N/A
  3882     <tr>
  3883      <td>Media:
  3885      <td>visual
  3887     <tr>
  3888      <td>Computed value:
  3890      <td>as specified
  3892     <tr>
  3893      <td>Animatable:
  3895      <td>no
  3896   </table>
  3898   <p>This property is used to enable typographic subscript and superscript
  3899    glyphs. These are alternate glyphs designed within the same em-box as
  3900    default glyphs and are intended to be laid out on the same baseline as the
  3901    default glyphs, with no resizing or repositioning of the baseline. They
  3902    are explicitly designed to match the surrounding text and to be more
  3903    readable without affecting the line height.
  3905   <div class=figure><img alt="comparison between real subscript glyphs and
  3906    synthesized ones" src=realsubscripts.png>
  3907    <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
  3908     (bottom)
  3909   </div>
  3911   <p>Individual values have the following meanings:
  3913   <dl>
  3914    <dt><dfn id=font-variant-position-normal-value
  3915     title="normal!!font-variant-position">normal</dfn>
  3917    <dd>None of the features listed below are enabled.
  3919    <dt><dfn id=sub>sub</dfn>
  3921    <dd>Enables display of subscript variants (OpenType feature: <span
  3922     class=tag>subs</span>).
  3924    <dt><dfn id=super>super</dfn>
  3926    <dd>Enables display of superscript variants (OpenType feature: <span
  3927     class=tag>sups</span>).
  3928   </dl>
  3930   <p>Because of the semantic nature of subscripts and superscripts, when the
  3931    value is either ‘<a href="#sub"><code class=property>sub</code></a>’
  3932    or ‘<a href="#super"><code class=property>super</code></a>’ for a
  3933    given contiguous run of text, if a variant glyph is not available for all
  3934    the characters in the run, simulated glyphs must be synthesized for all
  3935    characters using reduced forms of the glyphs that would be used without
  3936    this feature applied. This is done per run to avoid a mixture of variant
  3937    glyphs and synthesized ones that would not align correctly. In the case of
  3938    OpenType fonts that lack subscript or superscript glyphs for a given
  3939    character, user agents must use the appropriate subscript and superscript
  3940    metrics specified in the selected font's <a
  3941    href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
  3942    table</a> <a href="#OPENTYPE"
  3943    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
  3944    and offset of the synthesized substitutes.
  3946   <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
  3947    using superscript metrics" src=superscript-alt-synth.png>
  3948    <p class=caption>Superscript alternate glyph (left), synthesized
  3949     superscript glyphs (middle), and incorrect mixture of the two (right)
  3950   </div>
  3952   <p>In situations where text decorations are only applied to runs of text
  3953    containing superscript or subscript glyphs, the synthesized glyphs must be
  3954    used to avoid problems with the placement of decorations.
  3956   <p>In the past, user agents have used font-size and vertical-align to
  3957    simulate subscripts and superscripts for the <code title="HTML sub
  3958    element">sub</code> and <code title="HTML sup element">sup</code>
  3959    elements. To allow a backwards compatible way of defining subscripts and
  3960    superscripts, it is recommended that authors use conditional rules <a
  3961    href="#CSS3-CONDITIONAL"
  3962    rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
  3963    older user agents will still render subscripts and superscripts via the
  3964    older mechanism.
  3966   <p>Authors should note that fonts typically only provide subscript and
  3967    superscript glyphs for a subset of all characters supported by the font.
  3968    For example, while subscript and superscript glyphs are often available
  3969    for Latin numbers, glyphs for punctuation and letter characters are less
  3970    frequently provided. The synthetic fallback rules defined for this
  3971    property assure that subscripts and superscripts will always appear but
  3972    the appearance may not match author expectations if the font used does not
  3973    provide the appropriate alternate glyph for all characters contained in a
  3974    subscript or superscript.
  3976   <p>This property is not cumulative. Applying it to elements within a
  3977    subscript or superscript won't nest the placement of a subscript or
  3978    superscript glyph. Images contained within text runs where the value of
  3979    this property is ‘<a href="#sub"><code class=property>sub</code></a>’
  3980    or ‘<a href="#super"><code class=property>super</code></a>’ will be
  3981    drawn just as they would if the value was <a
  3982    href="#font-variant-position-normal-value"
  3983    title="normal!!font-variant-position">‘<code
  3984    class=property>normal</code>’</a>.</p>
  3985   <!-- due to lack of consensus, couldn't resolve on exact positioning of text decorations:
  3986 http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
  3988   <p>Because of these limitations, ‘<a
  3989    href="#propdef-font-variant-position"><code
  3990    class=property>font-variant-position</code></a>’ is not recommended for
  3991    use in user agent stylesheets. Authors should use it in cases where
  3992    subscripts or superscripts will only contain the narrow range of
  3993    characters supported by the fonts specified.
  3995   <p class=note>The variant glyphs use the same baseline as the default
  3996    glyphs would use. There is no shift in the placement along the baseline,
  3997    so the use of variant glyphs doesn't affect the height of the inline box
  3998    or alter the height of the linebox. This makes superscript and subscript
  3999    variants ideal for situations where it's important that leading remain
  4000    constant, such as in multi-column layout.
  4002   <div class=example>
  4003    <p>A typical user agent default style for the <a class=tag
  4004     href="#sub">sub</a> element:</p>
  4006    <pre>sub {
  4007   vertical-align: sub;
  4008   font-size: smaller;
  4009   line-height: normal;
  4011 </pre>
  4013    <p>Using font-variant-position to specify typographic subscripts in a way
  4014     that will still show subscripts in older user agents:</p>
  4016    <pre>@supports ( font-variant-position: sub ) {
  4018   sub {
  4019     vertical-align: baseline;
  4020     font-size: 100%;
  4021     line-height: inherit;
  4022     font-variant-position: sub;
  4026 </pre>
  4028    <p>User agents that support the ‘<a
  4029     href="#propdef-font-variant-position"><code
  4030     class=property>font-variant-position</code></a>’ property will select a
  4031     subscript variant glyph and render this without adjusting the baseline or
  4032     font-size. Older user agents will ignore the ‘<a
  4033     href="#propdef-font-variant-position"><code
  4034     class=property>font-variant-position</code></a>’ property definition
  4035     and use the standard defaults for subscripts.</p>
  4036   </div>
  4037   <!-- prop: font-variant-caps -->
  4039   <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
  4040    the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
  4042   <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
  4043    <tbody>
  4044     <tr>
  4045      <td>Name:
  4047      <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
  4049     <tr>
  4050      <td>Value:
  4052      <td><a href="#font-variant-caps-normal-value"
  4053       title="normal!!font-variant-caps">normal</a> | <a
  4054       href="#small-caps">small-caps</a> | <a
  4055       href="#all-small-caps">all-small-caps</a> | <a
  4056       href="#petite-caps">petite-caps</a> | <a
  4057       href="#all-petite-caps">all-petite-caps</a> | <a
  4058       href="#unicase">unicase</a> | <a href="#titling-caps">titling-caps</a>
  4060     <tr>
  4061      <td>Initial:
  4063      <td>normal
  4065     <tr>
  4066      <td>Applies to:
  4068      <td>all elements
  4070     <tr>
  4071      <td>Inherited:
  4073      <td>yes
  4075     <tr>
  4076      <td>Percentages:
  4078      <td>N/A
  4080     <tr>
  4081      <td>Media:
  4083      <td>visual
  4085     <tr>
  4086      <td>Computed value:
  4088      <td>as specified
  4090     <tr>
  4091      <td>Animatable:
  4093      <td>no
  4094   </table>
  4096   <p>This property allows the selection of alternate glyphs used for small or
  4097    petite capitals or for titling. These glyphs are specifically designed to
  4098    blend well with the surrounding normal glyphs, to maintain the weight and
  4099    readability which suffers when text is simply resized to fit this purpose.
  4101   <p>Individual values have the following meanings:
  4103   <dl>
  4104    <dt><dfn id=font-variant-caps-normal-value
  4105     title="normal!!font-variant-caps">normal</dfn>
  4107    <dd>None of the features listed below are enabled.
  4109    <dt><dfn id=small-caps>small-caps</dfn>
  4111    <dd>Enables display of small capitals (OpenType feature: <span
  4112     class=tag>smcp</span>). Small-caps glyphs typically use the form of
  4113     uppercase letters but are reduced to the size of lowercase letters.
  4114   </dl>
  4116   <div class=featex><img alt="small-caps example" src=smcp.png></div>
  4118   <dl>
  4119    <dt><dfn id=all-small-caps>all-small-caps</dfn>
  4121    <dd>Enables display of small capitals for both upper and lowercase letters
  4122     (OpenType features: <span class=tag>c2sc, smcp</span>).
  4124    <dt><dfn id=petite-caps>petite-caps</dfn>
  4126    <dd>Enables display of petite capitals (OpenType feature: <span
  4127     class=tag>pcap</span>).
  4129    <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
  4131    <dd>Enables display of petite capitals for both upper and lowercase
  4132     letters (OpenType features: <span class=tag>c2pc, pcap</span>).
  4134    <dt><dfn id=unicase>unicase</dfn>
  4136    <dd>Enables display of mixture of small capitals for uppercase letters
  4137     with normal lowercase letters (OpenType feature: <span
  4138     class=tag>unic</span>).
  4140    <dt><dfn id=titling-caps>titling-caps</dfn>
  4142    <dd>Enables display of titling capitals (OpenType feature: <span
  4143     class=tag>titl</span>). Uppercase letter glyphs are often designed for
  4144     use with lowercase letters. When used in all uppercase titling sequences
  4145     they can appear too strong. Titling capitals are designed specifically
  4146     for this situation.
  4147   </dl>
  4149   <p>The availability of these glyphs is based on whether a given feature is
  4150    defined or not in the feature list of the font. User agents can optionally
  4151    decide this on a per-script basis but should explicitly not decide this on
  4152    a per-character basis.
  4154   <p>Some fonts may only support a subset or none of the features described
  4155    for this property. For backwards compatibility with CSS 2.1, if ‘<a
  4156    href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
  4157    href="#all-small-caps"><code class=property>all-small-caps</code></a>’
  4158    is specified but small-caps glyphs are not available for a given font,
  4159    user agents should simulate a small-caps font, for example by taking a
  4160    normal font and replacing the glyphs for lowercase letters with scaled
  4161    versions of the glyphs for uppercase characters (replacing the glyphs for
  4162    both upper and lowercase letters in the case of ‘<a
  4163    href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
  4165   <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
  4166    real small-caps" class=hires src=synthetic-vs-real-small-caps.png
  4167    width=512>
  4168    <p class=caption>Synthetic vs. real small-caps
  4169   </div>
  4171   <p>To match the surrounding text, a font may provide alternate glyphs for
  4172    caseless characters when these features are enabled but when a user agent
  4173    simulates small capitals, it must not attempt to simulate alternates for
  4174    codepoints which are considered caseless.
  4176   <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
  4177    characters with small-caps, all-small-caps enabled" class=hires
  4178    src=small-capitals-variations.png width=418>
  4179    <p class=caption>Caseless characters with small-caps, all-small-caps
  4180     enabled
  4181   </div>
  4183   <p>If either ‘<a href="#petite-caps"><code
  4184    class=property>petite-caps</code></a>’ or ‘<a
  4185    href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
  4186    is specified for a font that doesn't support these features, the property
  4187    behaves as if ‘<a href="#small-caps"><code
  4188    class=property>small-caps</code></a>’ or ‘<a
  4189    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4190    respectively, had been specified. If ‘<a href="#unicase"><code
  4191    class=property>unicase</code></a>’ is specified for a font that doesn't
  4192    support that feature, the property behaves as if ‘<a
  4193    href="#small-caps"><code class=property>small-caps</code></a>’ was
  4194    applied only to lowercased uppercase letters. If ‘<a
  4195    href="#titling-caps"><code class=property>titling-caps</code></a>’ is
  4196    specified with a font that does not support this feature, this property
  4197    has no visible effect. When simulated small capital glyphs are used, for
  4198    scripts that lack uppercase and lowercase letters, ‘<a
  4199    href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
  4200    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4201    ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
  4202    ‘<a href="#all-petite-caps"><code
  4203    class=property>all-petite-caps</code></a>’ and ‘<a
  4204    href="#unicase"><code class=property>unicase</code></a>’ have no visible
  4205    effect.
  4207   <p>When casing transforms are used to simulate small capitals, the casing
  4208    transformations must match those used for the <span
  4209    class=property>‘<code class=property>text-transform</code>’</span>
  4210    property.
  4212   <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
  4213    replace glyphs in a small-caps font so that the text appears in all
  4214    uppercase letters.
  4216   <div class=figure style="padding: 0; margin: auto;"><img alt="using
  4217    all-small-caps in acronym-laden text" class=hires
  4218    src=acronym-laden-text.png width=596>
  4219    <p class=caption>Using small capitals to improve readability in
  4220     acronym-laden text
  4221   </div>
  4223   <div class=example>
  4224    <p>Quotes rendered italicised, with small-caps on the first line:</p>
  4226    <pre>blockquote            { font-style: italic; }
  4227 blockquote:first-line { font-variant: small-caps; }
  4229 &lt;blockquote><a href="http://lists.w3.org/Archives/Public/www-style/2009Dec/0036.html" style="text-decoration: none; border: none;">I'll be honor-bound to slap them like a haddock.</a>&lt;/blockquote>
  4230 </pre>
  4231   </div>
  4232   <!-- prop: font-variant-numeric -->
  4234   <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
  4235    formatting: the <a
  4236    href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
  4238   <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
  4239    <tbody>
  4240     <tr>
  4241      <td>Name:
  4243      <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
  4245     <tr>
  4246      <td>Value:
  4248      <td><a href="#font-variant-numeric-normal-value"
  4249       title="normal!!font-variant-numeric">normal</a> | [ <a
  4250       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4251       || <a
  4252       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4253       || <a
  4254       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4255       || <a href="#ordinal">ordinal</a> || <a
  4256       href="#slashed-zero">slashed-zero</a> ]
  4258     <tr>
  4259      <td>Initial:
  4261      <td>normal
  4263     <tr>
  4264      <td>Applies to:
  4266      <td>all elements
  4268     <tr>
  4269      <td>Inherited:
  4271      <td>yes
  4273     <tr>
  4274      <td>Percentages:
  4276      <td>N/A
  4278     <tr>
  4279      <td>Media:
  4281      <td>visual
  4283     <tr>
  4284      <td>Computed value:
  4286      <td>as specified
  4288     <tr>
  4289      <td>Animatable:
  4291      <td>no
  4292   </table>
  4294   <p>Specifies control over numerical forms. The example below shows how some
  4295    of these values can be combined to influence the rendering of tabular data
  4296    with fonts that support these features. Within normal paragraph text,
  4297    proportional numbers are used while tabular numbers are used so that
  4298    columns of numbers line up properly:
  4300   <div class=figure style="padding: 0; margin: auto;"><img alt="combining
  4301    number styles" src=numberstyles.png>
  4302    <p class=caption>Using number styles
  4303   </div>
  4305   <p>Possible combinations:
  4307   <pre
  4308    class=prod><dfn id=numeric-figure-values><var>&lt;numeric-figure-values&gt;</var></dfn>   = [ <a href="#lining-nums">lining-nums</a> | <a href="#oldstyle-nums">oldstyle-nums</a> ]</pre>
  4310   <pre
  4311    class=prod><dfn id=numeric-spacing-values><var>&lt;numeric-spacing-values&gt;</var></dfn>  = [ <a href="#proportional-nums">proportional-nums</a> | <a href="#tabular-nums">tabular-nums</a> ]</pre>
  4313   <pre
  4314    class=prod><dfn id=numeric-fraction-values><var>&lt;numeric-fraction-values&gt;</var></dfn> = [ <a href="#diagonal-fractions">diagonal-fractions</a> | <a href="#stacked-fractions">stacked-fractions</a> ]</pre>
  4316   <p>Individual values have the following meanings:
  4318   <dl>
  4319    <dt><dfn id=font-variant-numeric-normal-value
  4320     title="normal!!font-variant-numeric">normal</dfn>
  4322    <dd>None of the features listed below are enabled.
  4324    <dt><dfn id=lining-nums>lining-nums</dfn>
  4326    <dd>Enables display of lining numerals (OpenType feature: <span
  4327     class=tag>lnum</span>).
  4329    <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
  4331    <dd>Enables display of old-style numerals (OpenType feature: <span
  4332     class=tag>onum</span>).
  4334    <dt><dfn id=proportional-nums>proportional-nums</dfn>
  4336    <dd>Enables display of proportional numerals (OpenType feature: <span
  4337     class=tag>pnum</span>).
  4339    <dt><dfn id=tabular-nums>tabular-nums</dfn>
  4341    <dd>Enables display of tabular numerals (OpenType feature: <span
  4342     class=tag>tnum</span>).
  4344    <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
  4346    <dd>Enables display of lining diagonal fractions (OpenType feature: <span
  4347     class=tag>frac</span>).
  4348   </dl>
  4350   <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
  4352   <dl>
  4353    <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
  4355    <dd>Enables display of lining stacked fractions (OpenType feature: <span
  4356     class=tag>afrc</span>).
  4357   </dl>
  4359   <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
  4361   <dl>
  4362    <dt><dfn id=ordinal>ordinal</dfn>
  4364    <dd>Enables display of forms used with ordinal numbers (OpenType feature:
  4365     <span class=tag>ordn</span>).
  4367    <dt><dfn id=slashed-zero>slashed-zero</dfn>
  4369    <dd>Enables display of slashed zeros (OpenType feature: <span
  4370     class=tag>zero</span>).
  4371   </dl>
  4373   <div class=featex><img alt="slashed zero example" src=zero.png></div>
  4375   <div class=example id=steak-marinade>
  4376    <p>A simple flank steak marinade recipe, rendered with automatic fractions
  4377     and old-style numerals:</p>
  4379    <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
  4381 &lt;h4>Steak marinade:&lt;/h4>
  4382 &lt;ul>
  4383   &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
  4384   &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
  4385   &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
  4386   &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
  4387   &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
  4388   &lt;li>Salt &amp;amp; pepper&lt;/li>
  4389 &lt;/ul>
  4391 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
  4392 for a few hours or overnight.&lt;/p>
  4393 </pre>
  4395    <p>Note that the fraction feature is only applied to values not the entire
  4396     paragraph. Fonts often implement this feature using contextual rules
  4397     based on the use of the slash (‘<code class=css>/</code>’) character.
  4398     As such, it's not suitable for use as a paragraph-level style.</p>
  4399   </div>
  4400   <!-- prop: font-variant-alternates -->
  4402   <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
  4403    and swashes: the <a
  4404    href="#propdef-font-variant-alternates">font-variant-alternates</a>
  4405    property</h3>
  4407   <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
  4408    <tbody>
  4409     <tr>
  4410      <td>Name:
  4412      <td><dfn
  4413       id=propdef-font-variant-alternates>font-variant-alternates</dfn>
  4415     <tr>
  4416      <td>Value:
  4418      <td>normal | [ <a href="#stylistic"
  4419       title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
  4420       href="#historical-forms">historical-forms</a> || <a href="#styleset"
  4421       title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
  4422       href="#character-variant"
  4423       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4424       #)</a> || <a href="#swash"
  4425       title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
  4426       href="#ornaments"
  4427       title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
  4428       href="#annotation"
  4429       title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
  4431     <tr>
  4432      <td>Initial:
  4434      <td>normal
  4436     <tr>
  4437      <td>Applies to:
  4439      <td>all elements
  4441     <tr>
  4442      <td>Inherited:
  4444      <td>yes
  4446     <tr>
  4447      <td>Percentages:
  4449      <td>N/A
  4451     <tr>
  4452      <td>Media:
  4454      <td>visual
  4456     <tr>
  4457      <td>Computed value:
  4459      <td>as specified
  4461     <tr>
  4462      <td>Animatable:
  4464      <td>no
  4465   </table>
  4467   <p>For any given character, fonts can provide a variety of alternate glyphs
  4468    in addition to the default glyph for that character. This property
  4469    provides control over the selection of these alternate glyphs.
  4471   <p>For many of the property values listed below, several different
  4472    alternate glyphs are available. How many alternates are available and what
  4473    they represent is font-specific, so these are each marked <dfn
  4474    id=font-specific>font specific</dfn> in the value definitions below.
  4475    Because the nature of these alternates is font-specific, the <a
  4476    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4477    rule is used to define values for a specific font family or set of
  4478    families that associate a font-specific numeric
  4479    <code>&lt;feature-index&gt;</code> with a custom
  4480    <code>&lt;feature-value-name&gt;</code>, which is then used in this
  4481    property to select specific alternates:
  4483   <pre>@font-feature-values Noble Script { @swash { swishy: 1; flowing: 2; } }
  4485 p {
  4486   font-family: Noble Script;
  4487   font-variant-alternates: swash(flowing); /* use swash alternate #2 */
  4488 }</pre>
  4490   <p>When a particular <code>&lt;feature-value-name&gt;</code> has not been
  4491    defined for a given family or for a particular feature type, the computed
  4492    value must be the same as if it had been defined. However, property values
  4493    that contain these undefined <code>&lt;feature-value-name&gt;</code>
  4494    identifiers must be ignored when choosing glyphs.
  4496   <pre>/* these two style rules are effectively the same */
  4497 p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
  4498 p { font-variant-alternates: normal; }
  4499 </pre>
  4501   <p>This allows values to be defined and used for a given set of font
  4502    families but ignored if fallback occurs, since the font family name would
  4503    be different. If a given value is outside the range supported by a given
  4504    font, the value is ignored. These values never apply to generic font
  4505    families.
  4507   <p>Individual values have the following meanings:
  4509   <dl>
  4510    <dt><dfn id=font-variant-alternates-normal-value
  4511     title="normal!!font-variant-alternates">normal</dfn>
  4513    <dd>None of the features listed below are enabled.
  4515    <dt><dfn id=historical-forms>historical-forms</dfn>
  4517    <dd>Enables display of historical forms (OpenType feature: <span
  4518     class=tag>hist</span>).
  4519   </dl>
  4521   <div class=featex><img alt="historical form example" src=hist.png></div>
  4523   <dl>
  4524    <dt><dfn id=stylistic
  4525     title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
  4527    <dd>Enables display of stylistic alternates (<a
  4528     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4529     class=tag>salt &lt;feature-index&gt;</span>).
  4530   </dl>
  4532   <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
  4534   <dl>
  4535    <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
  4536     #)</dfn>
  4538    <dd>Enables display with stylistic sets (<a href="#font-specific"><em>font
  4539     specific</em></a>, OpenType feature: <span
  4540     class=tag>ss&lt;feature-index&gt;</span> OpenType currently defines <span
  4541     class=tag>ss01</span> through <span class=tag>ss20</span>).
  4542   </dl>
  4544   <div class=featex><img alt="styleset example" src=ssnn.png></div>
  4546   <dl>
  4547    <dt><dfn id=character-variant
  4548     title=character-variant>character-variant(&lt;feature-value-name&gt;
  4549     #)</dfn>
  4551    <dd>Enables display of specific character variants (<a
  4552     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4553     class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
  4554     class=tag>cv01</span> through <span class=tag>cv99</span>).
  4556    <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
  4558    <dd>Enables display of swash glyphs (<a href="#font-specific"><em>font
  4559     specific</em></a>, OpenType feature: <span class=tag>swsh
  4560     &lt;feature-index&gt;, cswh &lt;feature-index&gt;</span>).
  4561   </dl>
  4563   <div class=featex><img alt="swash example" src=swsh.png></div>
  4565   <dl>
  4566    <dt><dfn id=ornaments
  4567     title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
  4569    <dd>Enables replacement of default glyphs with ornaments, if provided in
  4570     the font (<a href="#font-specific"><em>font specific</em></a>, OpenType
  4571     feature: <span class=tag>ornm &lt;feature-index&gt;</span>). Some fonts
  4572     may offer ornament glyphs as alternates for a wide collection of
  4573     characters; however, displaying arbitrary characters (e.g.,
  4574     alphanumerics) as ornaments is poor practice as it distorts the semantics
  4575     of the data. Font designers are encouraged to encode all ornaments
  4576     (except those explicitly encoded in the Unicode Dingbats blocks, etc.) as
  4577     alternates for the bullet character (U+2022) to allow authors to select
  4578     the desired glyph using ‘<a href="#ornaments"><code
  4579     class=property>ornaments</code></a>’.
  4580   </dl>
  4582   <div class=featex><img alt="ornaments example" src=ornm.png></div>
  4584   <dl>
  4585    <dt><dfn id=annotation
  4586     title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
  4588    <dd>Enables display of alternate annotation forms (<a
  4589     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4590     class=tag>nalt &lt;feature-index&gt;</span>).
  4591   </dl>
  4593   <div class=featex><img alt="alternate annotation form example"
  4594    src=nalt.png></div>
  4596   <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
  4597    specific alternates: the <dfn id=at-font-feature-values-rule
  4598    style="font-weight: inherit; font-style:
  4599    inherit"><code>@font-feature-values</code></dfn> rule</h3>
  4601   <p>Several of the possible values of ‘<a
  4602    href="#propdef-font-variant-alternates"><code
  4603    class=property>font-variant-alternates</code></a>’ listed above are
  4604    labeled as <a href="#font-specific"><em>font specific</em></a>. For these
  4605    features fonts may define not just a single glyph but a set of alternate
  4606    glyphs with an index to select a given alternate. Since these are font
  4607    family specific, the <a
  4608    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4609    rule is used to define named values for these indices for a given family.
  4611   <p class=note>See the <a href="#om-fontfeaturevalues">object model
  4612    reference section</a> for a description of the interfaces used to modify
  4613    these rules via the CSS Object Model.
  4615   <div class=example>
  4616    <p>In the case of the swash Q in the example shown above, the swash could
  4617     be specified using these style rules:</p>
  4619    <pre>
  4621 @font-feature-values Jupiter Sans {
  4622   @swash {
  4623     delicate: 1;
  4624     flowing: 2;
  4628 h2 { font-family: Jupiter Sans, sans-serif; }
  4630 /* show the second swash variant in h2 headings */
  4631 h2:first-letter { font-variant-alternates: swash(flowing); }
  4633 &lt;h2>Quick&lt;/h2></pre>
  4635    <p>When Jupiter Sans is present, the second alternate swash alternate will
  4636     be displayed. When not present, no swash character will be shown, since
  4637     the specific named value "flowing" is only defined for the Jupiter Sans
  4638     family. The @-mark indicates the name of the property value for which a
  4639     named value can be used. The name "flowing" is chosen by the author. The
  4640     index that represents each alternate is defined within a given font's
  4641     data.</p>
  4642   </div>
  4644   <h4 id=basic-syntax><span class=secno>6.9.1 </span>Basic syntax</h4>
  4646   <p>An <a
  4647    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4648    rule is composed of a list of font families followed by a block containing
  4649    individual <a href="#featurevalueblock"><i
  4650    title="feature_value_block">feature value blocks</i></a> that take the
  4651    form of @-rules. Each block defines a set of named values for a specific
  4652    font feature when a given set of font families is used. Effectively, they
  4653    define a mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
  4654    ⟨values⟩ are the numeric indices used for specific features defined
  4655    for a given font.
  4657   <p>In terms of the grammar, this specification defines the following
  4658    productions:
  4660   <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
  4661   : <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>*
  4662     '{' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#featurevalueblock"><i>feature_value_block</i></a>? [ <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#featurevalueblock"><i>feature_value_block</i></a>? ]* '}' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4665 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
  4666   : <a href="#fontfamilyname"><i>font_family_name</i></a> [ <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* ',' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#fontfamilyname"><i>font_family_name</i></a> ]*
  4669 <dfn id=fontfamilyname>font_family_name</dfn>
  4670   : <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>STRING</i></a> | [ <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>IDENT</i></a> [ <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>IDENT</i></a> ]* ]
  4673 <dfn id=featurevalueblock>feature_value_block</dfn>
  4674   : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4675     '{' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#featurevaluedefinition"><i>feature_value_definition</i></a>? [ <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* ';' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#featurevaluedefinition"><i>feature_value_definition</i></a>? ]* '}' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4678 <dfn id=featuretype>feature_type</dfn>:
  4679   <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
  4682 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
  4683   : <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>IDENT</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* ':' <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>NUMBER</i></a> [ <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>NUMBER</i></a> ]*
  4685 </pre>
  4687   <p>The following new token is introduced:
  4689   <pre>@{F}{O}{N}{T}{-}{F}{E}{A}{T}{U}{R}{E}{-}{V}{A}{L}{U}{E}{S}   {return <dfn id=fontfeaturevaluessym>FONT_FEATURE_VALUES_SYM</dfn>;}
  4690 </pre>
  4692   <p><a href="#featurevalueblock"><i title="feature_value_block">Feature
  4693    value blocks</i></a> are handled as <a
  4694    href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">at-rules</a>, they
  4695    consist of everything up to the next block or semi-colon, whichever comes
  4696    first.
  4698   <p>The <a href="#fontfamilynamelist"><i title="font_family_name_list">font
  4699    family list</i></a> is a comma-delimited list of <a
  4700    href="#fontfamilyname"><i title="font_family_name">font family
  4701    names</i></a> that match the definition of <a
  4702    href="#family-name-value"><var>&lt;family-name&gt;</var></a> for the <a
  4703    href="#propdef-font-family" title="font-family!!property">‘<code
  4704    class=property>font-family</code>’</a> property. This means that only
  4705    named font families are allowed, rules that include generic or system
  4706    fonts in the list of font families are syntax errors. However, if a user
  4707    agent defines a generic font to be a specific named font (e.g. Helvetica),
  4708    the settings associated with that family name will be used. If syntax
  4709    errors occur within the font family list, the entire rule must be ignored.
  4711   <p>Within <a href="#featurevalueblock"><i
  4712    title="feature_value_block">feature value blocks</i></a>, the <a
  4713    href="#featuretype"><i title="feature_type">feature type</i></a> is
  4714    ‘<code class=css>@</code>’ followed by the name of one of the <a
  4715    href="#font-specific"><em>font specific</em></a> property values of ‘<a
  4716    href="#propdef-font-variant-alternates"><code
  4717    class=property>font-variant-alternates</code></a>’ (e.g. <a
  4718    href="#swash"><code>@swash</code></a>). The identifiers used within
  4719    feature value definitions follow the rules of CSS user identifiers and are
  4720    case-sensitive. They are unique only for a given set of font families and
  4721    <a href="#featuretype"><i title="feature_type">feature type</i></a>. The
  4722    same identifier used with a different <a href="#featuretype"><i
  4723    title="feature_type">feature type</i></a> is treated as a separate and
  4724    distinct value. If the same identifier is defined mulitple times for a
  4725    given <a href="#featuretype"><i title="feature_type">feature type</i></a>
  4726    and font family, the last defined value is used. Values associated with a
  4727    given identifier are limited to integer values 0 or greater.
  4729   <p>When syntax errors occur within a <a href="#featurevaluedefinition"><i
  4730    title="feature_value_definition">feature value definition</i></a>, such as
  4731    invalid identifiers or values, the entire <a
  4732    href="#featurevaluedefinition"><i title="feature_value_definition">feature
  4733    value definition</i></a> must be omitted, just as syntax errors in style
  4734    declarations are handled. When the <a href="#featuretype"><i
  4735    title="feature_type">feature type</i></a> is invalid, the entire
  4736    associated <a href="#featurevalueblock"><i
  4737    title="feature_value_block">feature value block</i></a> must be ignored.
  4739   <div class=example>
  4740    <p>Rules that are equivalent given syntax error handling:</p>
  4742    <pre>@font-feature-values Bongo {
  4743   @swash { ornate: 1; }
  4744   annotation { boxed: 4; } /* should be @annotation! */
  4745   @swash { double-loops: 1; flowing: -1; } /* negative value */
  4746   @ornaments ; /* incomplete definition */
  4747   @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
  4748   <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none; border: none;">redrum</a>  /* random editing mistake */
  4749 }</pre>
  4751    <p>The example above is equivalent to:</p>
  4753    <pre>@font-feature-values Bongo {
  4754   @swash { ornate: 1; }
  4755   @swash { double-loops: 1; }
  4756   @styleset { double-W: 14; sharp-terminals: 16 1; }
  4757 }</pre>
  4758   </div>
  4760   <p>If multiple <a
  4761    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4762    rules are defined for a given family, the resulting values definitions are
  4763    the union of the definitions contained within these rules. This allows a
  4764    set of named values to be defined for a given font family globally for a
  4765    site and specific additions made per-page.
  4767   <div class=example>
  4768    <p>Using both site-wide and per-page feature values:</p>
  4770    <pre>
  4771 site.css:
  4773   @font-feature-values Mercury Serif {
  4774     @styleset {
  4775       stacked-g: 3; /* "two-storey" versions of g, a */
  4776       stacked-a: 4;
  4780 page.css:
  4782   @font-feature-values Mercury Serif {
  4783     @styleset {
  4784       geometric-m: 7; /* alternate version of m */
  4788   body {
  4789     font-family: Mercury Serif, serif;
  4791     /* enable both the use of stacked g and alternate m */
  4792     font-variant-alternates: styleset(stacked-g, geometric-m);
  4793   }</pre>
  4794   </div>
  4796   <div class=example>
  4797    <p>Using a commonly named value allows authors to use a single style rule
  4798     to cover a set of fonts for which the underlying selector is different
  4799     for each font. If either font in the example below is found, a circled
  4800     number glyph will be used:</p>
  4802    <pre>@font-feature-values Taisho Gothic {
  4803   @annotation { boxed: 1; circled: 4; }
  4806 @font-feature-values Otaru Kisa {
  4807   @annotation { circled: 1; black-boxed: 3; }
  4810 h3.title {
  4811   /* circled form defined for both fonts */
  4812   font-family: Taisho Gothic, Otaru Kisa;
  4813   font-variant: annotation(circled);
  4814 }</pre>
  4815   </div>
  4817   <h4 id=multi-valued-feature-value-definitions><span class=secno>6.9.2
  4818    </span>Multi-valued feature value definitions</h4>
  4820   <p>Most <a href="#font-specific"><em>font specific</em></a> ‘<a
  4821    href="#propdef-font-variant-alternates"><code
  4822    class=property>font-variant-alternates</code></a>’ property values take
  4823    a single value (e.g. ‘<a href="#swash"><code
  4824    class=property>swash</code></a>’). The ‘<a
  4825    href="#character-variant"><code
  4826    class=property>character-variant</code></a>’ property value allows two
  4827    values and ‘<a href="#styleset"><code
  4828    class=property>styleset</code></a>’ allows an unlimited number.
  4830   <p>For the styleset property value, multiple values indicate the style sets
  4831    to be enabled. Values between 1 and 99 enable OpenType features <span
  4832    class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
  4833    OpenType standard only officially defines <span class=tag>ss01</span>
  4834    through <span class=tag>ss20</span>. For OpenType fonts, values greater
  4835    than 99 or equal to 0 do not generate a syntax error when parsed but
  4836    enable no OpenType features.
  4838   <pre>@font-feature-values Mars Serif {
  4839   @styleset {
  4840     alt-g: 1;        /* implies ss01 = 1 */
  4841     curly-quotes: 3; /* implies ss03 = 1 */
  4842     code: 4 5;       /* implies ss04 = 1, ss05 = 1 */
  4845   @styleset {
  4846     dumb: 125;        /* &gt;99, ignored */
  4849   @swash {
  4850     swishy: 3 5;     /* more than 1 value for swash, syntax error */
  4854 p.codeblock {
  4855   /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
  4856   font-variant-alternates: styleset(curly-quotes, code);
  4857 }</pre>
  4859   <p>For character-variant, a single value between 1 and 99 indicates the
  4860    enabling of OpenType feature <span class=tag>cv01</span> through <span
  4861    class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
  4862    to 0 are ignored but do not generate a syntax error when parsed but enable
  4863    no OpenType features. When two values are listed, the first value
  4864    indicates the feature used and the second the value passed for that
  4865    feature. If more than two values are assigned to a given name, a syntax
  4866    error occurs and the entire <a href="#featurevaluedefinition"><i
  4867    title="feature_value_definition">feature value definition</i></a> is
  4868    ignored.
  4870   <pre>@font-feature-values MM Greek {
  4871   @character-variant { alpha-2: 1 2; }   /* implies cv01 = 2 */
  4872   @character-variant { beta-3: 2 3; }    /* implies cv02 = 3 */
  4873   @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, definition ignored */
  4874   @character-variant { gamma: 12; }      /* implies cv12 = 1 */
  4875   @character-variant { zeta:   20 3; }   /* implies cv20 = 3 */
  4876   @character-variant { zeta-2: 20 2; }   /* implies cv20 = 2 */
  4877   @character-variant { silly: 105; }     /* &gt;99, ignored */
  4878   @character-variant { dumb: 323 3; }    /* &gt;99, ignored */
  4881 #title {
  4882   /* use the third alternate beta, first alternate gamma */
  4883   font-variant-alternates: character-variant(beta-3, gamma);
  4886 p {
  4887   /* zeta-2 follows zeta, implies cv20 = 2  */
  4888   font-variant-alternates: character-variant(zeta, zeta-2);
  4891 .special {
  4892   /* zeta follows zeta-2, implies cv20 = 3  */
  4893   font-variant-alternates: character-variant(zeta-2, zeta);
  4894 }</pre>
  4896   <div class=figure><img alt="Matching text on Byzantine seals using
  4897    character variants" src=byzantineseal.png>
  4898    <p class=caption>Byzantine seal text displayed with character variants
  4899   </div>
  4901   <div class=example>
  4902    <p>In the figure above, the text in red is rendered using a font
  4903     containing character variants that mimic the character forms found on a
  4904     Byzantine seal from the 8th century A.D. Two lines below is the same text
  4905     displayed in a font without variants. Note the two variants for U and N
  4906     used on the seal.</p>
  4908    <pre>@font-feature-values Athena Ruby {
  4909   @character-variant {
  4910     leo-B: 2 1;
  4911     leo-M: 13 3;
  4912     leo-alt-N: 14 1;
  4913     leo-N: 14 2;
  4914     leo-T: 20 1;
  4915     leo-U: 21 2;
  4916     leo-alt-U: 21 4;
  4920 p {
  4921   font-variant: discretionary-ligatures,
  4922                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
  4925 span.alt-N {
  4926   font-variant-alternates: character-variant(leo-alt-N);
  4929 span.alt-U {
  4930   font-variant-alternates: character-variant(leo-alt-U);
  4933 &lt;p>ENO....UP͞RSTU&lt;span class="alt-U">U&lt;/span>͞&lt;span class="alt-U">U&lt;/span>ΚΑΙTỤẠG̣IUPNS&lt;/p>
  4935 &lt;p>LEON|ΚΑΙCONSTA|NTI&lt;span class="alt-N">N&lt;/span>OS..|STOIBAṢ.|LIṢROM|AIO&lt;span class="alt-N">N&lt;/span>&lt;/p>
  4936 </pre>
  4937   </div>
  4939   <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
  4940    Asian text rendering: the <a
  4941    href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  4942    property</h3>
  4944   <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
  4945    <tbody>
  4946     <tr>
  4947      <td>Name:
  4949      <td><dfn
  4950       id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
  4952     <tr>
  4953      <td>Value:
  4955      <td><a href="#font-variant-east-asian-normal-value"
  4956       title="normal!!font-variant-east-asian">normal</a> | [ <a
  4957       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4958       || <a
  4959       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4960       || <a href="#ruby">ruby</a> ]
  4962     <tr>
  4963      <td>Initial:
  4965      <td>normal
  4967     <tr>
  4968      <td>Applies to:
  4970      <td>all elements
  4972     <tr>
  4973      <td>Inherited:
  4975      <td>yes
  4977     <tr>
  4978      <td>Percentages:
  4980      <td>N/A
  4982     <tr>
  4983      <td>Media:
  4985      <td>visual
  4987     <tr>
  4988      <td>Computed value:
  4990      <td>as specified
  4992     <tr>
  4993      <td>Animatable:
  4995      <td>no
  4996   </table>
  4998   <p>Allows control of glyph substitution and sizing in East Asian text.
  5000   <pre
  5001    class=prod><dfn id=east-asian-variant-values><var>&lt;east-asian-variant-values&gt;</var></dfn> = [ <a href="#jis78">jis78</a> | <a href="#jis83">jis83</a> | <a href="#jis90">jis90</a> | <a href="#jis04">jis04</a> | <a href="#simplified">simplified</a> | <a href="#traditional">traditional</a> ]</pre>
  5003   <pre
  5004    class=prod><dfn id=east-asian-width-values><var>&lt;east-asian-width-values&gt;</var></dfn>   = [ <a href="#full-width">full-width</a> | <a href="#proportional-width">proportional-width</a> ]</pre>
  5006   <p>Individual values have the following meanings:
  5008   <dl>
  5009    <dt><dfn id=font-variant-east-asian-normal-value
  5010     title="normal!!font-variant-east-asian">normal</dfn>
  5012    <dd>None of the features listed below are enabled.
  5014    <dt><dfn id=jis78>jis78</dfn>
  5016    <dd>Enables rendering of JIS78 forms (OpenType feature: <span
  5017     class=tag>jp78</span>).
  5018   </dl>
  5020   <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
  5022   <dl>
  5023    <dt><dfn id=jis83>jis83</dfn>
  5025    <dd>Enables rendering of JIS83 forms (OpenType feature: <span
  5026     class=tag>jp83</span>).
  5028    <dt><dfn id=jis90>jis90</dfn>
  5030    <dd>Enables rendering of JIS90 forms (OpenType feature: <span
  5031     class=tag>jp90</span>).
  5033    <dt><dfn id=jis04>jis04</dfn>
  5035    <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
  5036     class=tag>jp04</span>).
  5037     <p>The various JIS variants reflect the glyph forms defined in different
  5038      Japanese national standards. Fonts generally include glyphs defined by
  5039      the most recent national standard but it's sometimes necessary to use
  5040      older variants, to match signage for example.</p>
  5042    <dt><dfn id=simplified>simplified</dfn>
  5044    <dd>Enables rendering of simplified forms (OpenType feature: <span
  5045     class=tag>smpl</span>).
  5047    <dt><dfn id=traditional>traditional</dfn>
  5049    <dd>Enables rendering of traditional forms (OpenType feature: <span
  5050     class=tag>trad</span>).
  5051   </dl>
  5053   <p>The ‘<a href="#simplified"><code
  5054    class=property>simplified</code></a>’ and ‘<a
  5055    href="#traditional"><code class=property>traditional</code></a>’ values
  5056    allow control over the glyph forms for characters which have been
  5057    simplified over time but for which the older, traditional form is still
  5058    used in some contexts. The exact set of characters and glyph forms will
  5059    vary to some degree by context for which a given font was designed.
  5061   <div class=featex><img alt="tradtional form example" src=trad.png></div>
  5063   <dl>
  5064    <dt><dfn id=full-width>full-width</dfn>
  5066    <dd>Enables rendering of full-width variants (OpenType feature: <span
  5067     class=tag>fwid</span>).
  5069    <dt><dfn id=proportional-width>proportional-width</dfn>
  5071    <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
  5072     <span class=tag>pwid</span>).
  5073   </dl>
  5075   <div class=featex><img alt="proportionally spaced Japanese example"
  5076    src=pwid.png></div>
  5078   <dl>
  5079    <dt><dfn id=ruby>ruby</dfn>
  5081    <dd>Enables display of ruby variant glyphs (OpenType feature: <span
  5082     class=tag>ruby</span>). Since ruby text is generally smaller than the
  5083     associated body text, font designers can design special glyphs for use
  5084     with ruby that are more readable than scaled down versions of the default
  5085     glyphs. Only glyph selection is affected, there is no associated font
  5086     scaling or other change that affects line layout. The red ruby text below
  5087     is shown with default glyphs (top) and with ruby variant glyphs (bottom).
  5088     Note the slight difference in stroke thickness.
  5089   </dl>
  5091   <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
  5093   <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
  5094    for font rendering: the <a href="#propdef-font-variant">font-variant</a>
  5095    property</h3>
  5097   <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
  5098    <tbody>
  5099     <tr>
  5100      <td>Name:
  5102      <td><dfn id=propdef-font-variant
  5103       title="font-variant!!property">font-variant</dfn>
  5105     <tr>
  5106      <td>Value:
  5108      <td><a href="#font-variant-normal-value"
  5109       title="normal!!font-variant">normal</a> | <a
  5110       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  5111       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  5112       || <a
  5113       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  5114       || <a
  5115       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  5116       || <a
  5117       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  5118       || <a href="#stylistic"><var
  5119       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  5120       href="#historical-forms"><var>historical-forms</var></a> || <a
  5121       href="#styleset"><var
  5122       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  5123       href="#character-variant"><var
  5124       title=character-variant>character-variant(&lt;feature-value-name&gt;
  5125       #)</var></a> || <a href="#swash"><var
  5126       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  5127       href="#ornaments"><var
  5128       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  5129       href="#annotation"><var
  5130       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  5131       <a href="#small-caps"><i>small-caps</i></a> | <a
  5132       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  5133       href="#petite-caps"><i>petite-caps</i></a> | <a
  5134       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  5135       href="#unicase"><i>unicase</i></a> | <a
  5136       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  5137       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  5138       || <a
  5139       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  5140       || <a
  5141       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  5142       || <a href="#ordinal"><i>ordinal</i></a> || <a
  5143       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  5144       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  5145       || <a
  5146       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  5147       || <a href="#ruby"><i>ruby</i></a> ]
  5149     <tr>
  5150      <td>Initial:
  5152      <td>normal
  5154     <tr>
  5155      <td>Applies to:
  5157      <td>all elements
  5159     <tr>
  5160      <td>Inherited:
  5162      <td>yes
  5164     <tr>
  5165      <td>Percentages:
  5167      <td>see individual properties
  5169     <tr>
  5170      <td>Media:
  5172      <td>visual
  5174     <tr>
  5175      <td>Computed value:
  5177      <td>see individual properties
  5179     <tr>
  5180      <td>Animatable:
  5182      <td>see individual properties
  5183   </table>
  5185   <p>The <a href="#propdef-font-variant"
  5186    title="font-variant!!property">‘<code
  5187    class=property>font-variant</code>’</a> property is a shorthand for all
  5188    font-variant subproperties. The value <dfn id=font-variant-normal-value
  5189    title="normal!!font-variant">‘<code
  5190    class=property>normal</code>’</dfn> resets all subproperties of <a
  5191    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5192    class=property>font-variant</code>’</a> to their inital value. The <dfn
  5193    id=font-variant-none-value title="none!!font-variant">‘<code
  5194    class=property>none</code>’</dfn> value sets ‘<a
  5195    href="#propdef-font-variant-ligatures"><code
  5196    class=property>font-variant-ligatures</code></a>’ to ‘<code
  5197    class=property>none</code>’ and resets all other font feature properties
  5198    to their initial value. Like other shorthands, using <a
  5199    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5200    class=property>font-variant</code>’</a> resets unspecified <a
  5201    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5202    class=property>font-variant</code>’</a> subproperties to their initial
  5203    values. It does not reset the values of either ‘<a
  5204    href="#propdef-font-language-override"><code
  5205    class=property>font-language-override</code></a>’ or <a
  5206    href="#propdef-font-feature-settings"
  5207    title="font-feature-settings!!property">‘<code
  5208    class=property>font-feature-settings</code>’</a>.
  5210   <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
  5211    font feature settings control: the <a
  5212    href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
  5214   <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
  5215    <tbody>
  5216     <tr>
  5217      <td>Name:
  5219      <td><dfn id=propdef-font-feature-settings
  5220       title="font-feature-settings!!property">font-feature-settings</dfn>
  5222     <tr>
  5223      <td>Value:
  5225      <td><a href="#font-feature-settings-normal-value"
  5226       title="normal!!font-feature-settings">normal</a> | <a
  5227       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  5229     <tr>
  5230      <td>Initial:
  5232      <td>normal
  5234     <tr>
  5235      <td>Applies to:
  5237      <td>all elements
  5239     <tr>
  5240      <td>Inherited:
  5242      <td>yes
  5244     <tr>
  5245      <td>Percentages:
  5247      <td>N/A
  5249     <tr>
  5250      <td>Media:
  5252      <td>visual
  5254     <tr>
  5255      <td>Computed value:
  5257      <td>as specified
  5259     <tr>
  5260      <td>Animatable:
  5262      <td>no
  5263   </table>
  5265   <p>This property provides low-level control over OpenType font features. It
  5266    is intended as a way of providing access to font features that are not
  5267    widely used but are needed for a particular use case.
  5269   <p>Authors should generally use <a href="#propdef-font-variant"
  5270    title="font-variant!!property">‘<code
  5271    class=property>font-variant</code>’</a> and its related subproperties
  5272    whenever possible and only use this property for special cases where its
  5273    use is the only way of accessing a particular infrequently used font
  5274    feature.
  5276   <pre>/* enable small caps and use second swash alternate */
  5277 font-feature-settings: "smcp", "swsh" 2;</pre>
  5279   <p>A value of <dfn id=font-feature-settings-normal-value
  5280    title="normal!!font-feature-settings">‘<code
  5281    class=property>normal</code>’</dfn> means that no change in glyph
  5282    selection or positioning occurs due to this property.
  5284   <p>Feature tag values have the following syntax:
  5286   <pre
  5287    class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
  5289   <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
  5290    specified in the OpenType specification, feature tags contain four ASCII
  5291    characters. Tag strings longer or shorter than four characters, or
  5292    containing characters outside the U+20–7E codepoint range are invalid.
  5293    Feature tags need only match a feature tag defined in the font, so they
  5294    are not limited to explicitly registered OpenType features. Fonts defining
  5295    custom feature tags should follow the <a
  5296    href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
  5297    rules</a> defined in the OpenType specification <a
  5298    href="#OPENTYPE-FEATURES"
  5299    rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
  5301   <p>Feature tags not present in the font are ignored; a user agent must not
  5302    attempt to synthesize fallback behavior based on these feature tags. The
  5303    one exception is that user agents may synthetically support the <span
  5304    class=tag>kern</span> feature with fonts that contain kerning data in the
  5305    form of a ‘<code class=property>kern</code>’ table but lack <span
  5306    class=tag>kern</span> feature support in the ‘<code
  5307    class=property>GPOS</code>’ table.
  5309   <p class=note>In general, authors should use the ‘<a
  5310    href="#propdef-font-kerning"><code
  5311    class=property>font-kerning</code></a>’ property to explicitly enable or
  5312    disable kerning since this property always affects fonts with either type
  5313    of kerning data.
  5315   <p>If present, a value indicates an index used for glyph selection. An
  5316    &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
  5317    the feature is disabled. For boolean features, a value of 1 enables the
  5318    feature. For non-boolean features, a value of 1 or greater enables the
  5319    feature and indicates the feature selection index. A value of ‘<code
  5320    class=property>on</code>’ is synonymous with 1 and ‘<code
  5321    class=property>off</code>’ is synonymous with 0. If the value is
  5322    omitted, a value of 1 is assumed.
  5324   <pre>
  5325 font-feature-settings: "dlig" 1;       /* dlig=1 enable discretionary ligatures */
  5326 font-feature-settings: "smcp" on;      /* smcp=1 enable small caps */
  5327 font-feature-settings: 'c2sc';         /* c2sc=1 enable caps to small caps */
  5328 font-feature-settings: "liga" off;     /* liga=0 no common ligatures */
  5329 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
  5330 font-feature-settings: "tnum" "hist";  /* invalid, need a comma-delimited list */
  5331 font-feature-settings: "silly" off;    /* invalid, tag too long */
  5332 font-feature-settings: "PKRN";         /* PKRN=1 enable custom feature */
  5333 font-feature-settings: dlig;           /* invalid, tag must be a string */
  5334 </pre>
  5336   <p>When values greater than the range supported by the font are specified,
  5337    the behavior is explicitly undefined. For boolean features, in general
  5338    these will enable the feature. For non-boolean features, out of range
  5339    values will in general be equivalent to a 0 value. However, in both cases
  5340    the exact behavior will depend upon the way the font is designed
  5341    (specifically, which type of lookup is used to define the feature).
  5343   <p>Although specifically defined for OpenType feature tags, feature tags
  5344    for other modern font formats that support font features may be added in
  5345    the future. Where possible, features defined for other font formats should
  5346    attempt to follow the pattern of registered OpenType tags.
  5348   <div class=example>
  5349    <p>The Japanese text below will be rendered with half-width kana
  5350     characters:</p>
  5352    <pre lang=ja>
  5353 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
  5355 &lt;p>毎日<a href="http://images.google.com/images?q=%E3%82%AB%E3%83%AC%E3%83%BC" style="text-decoration: none;">カレー</a>食べてるのに、飽きない&lt;/p>
  5356 </pre>
  5357   </div>
  5359   <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
  5360    language override: the <a
  5361    href="#propdef-font-language-override">font-language-override</a> property</h3>
  5363   <table class=propdef id=namefont-language-overridevaluenormal-lt>
  5364    <tbody>
  5365     <tr>
  5366      <td>Name:
  5368      <td><dfn id=propdef-font-language-override>font-language-override</dfn>
  5370     <tr>
  5371      <td>Value:
  5373      <td><a href="#font-language-override-normal-value"
  5374       title="normal!!font-language-override">normal</a> | <a
  5375       href="#font-language-override-string-value"><var>&lt;string&gt;</var></a>
  5377     <tr>
  5378      <td>Initial:
  5380      <td><a href="#font-language-override-normal-value"
  5381       title="normal!!font-language-override">normal</a>
  5383     <tr>
  5384      <td>Applies to:
  5386      <td>all elements
  5388     <tr>
  5389      <td>Inherited:
  5391      <td>yes
  5393     <tr>
  5394      <td>Percentages:
  5396      <td>N/A
  5398     <tr>
  5399      <td>Media:
  5401      <td>visual
  5403     <tr>
  5404      <td>Computed value:
  5406      <td>as specified
  5408     <tr>
  5409      <td>Animatable:
  5411      <td>no
  5412   </table>
  5414   <p>Normally, authors can control the use of language-specific glyph
  5415    substitutions and positioning by setting the content language of an
  5416    element, as <a href="#language-specific-support">described above</a>:
  5418   <pre>&lt;!-- Display text using S'gaw Karen specific features -->
  5419 &lt;p lang="ksw">...&lt;/p></pre>
  5421   <p>In some cases, authors may need to specify a language system that
  5422    differs from the content language, for example due to the need to mimic
  5423    another language's typographic traditions. The ‘<a
  5424    href="#propdef-font-language-override"><code
  5425    class=property>font-language-override</code></a>’ property allows
  5426    authors to explicitly specify the language system of the font, overriding
  5427    the language system implied by the content language.
  5429   <p>Values have the following meanings:
  5431   <dl>
  5432    <dt><dfn id=font-language-override-normal-value
  5433     title="normal!!font-language-override">normal</dfn>
  5435    <dd>specifies that when rendering with OpenType fonts, the content
  5436     language of the element is used to infer the OpenType language system
  5438    <dt><dfn
  5439     id=font-language-override-string-value><var>&lt;string&gt;</var></dfn>
  5441    <dd>single three-letter case-sensitive OpenType <a
  5442     href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
  5443     system tag</a>, specifies the OpenType language system to be used instead
  5444     of the language system implied by the language of the element
  5445   </dl>
  5446   <!-- For this level, string represents a single language code, there's no concept of "fallback" 
  5447 http://www.w3.org/2013/06/07-css-minutes.html#item04 -->
  5449   <p>Use of invalid OpenType language system tags must not generate a parse
  5450    error but must be ignored when doing glyph selection and placement.
  5452   <div class=example>
  5453    <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
  5454     Declaration of Human Rights</a> has been translated into a wide variety
  5455     of languages. In Turkish, Article 9 of this document might be marked up
  5456     as below:</p>
  5458    <pre lang=tr>&lt;body lang="tr">
  5460 &lt;h4>Madde 9&lt;/h4>
  5461 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
  5462 </pre>
  5464    <p>Here the user agent uses the value of the ‘<code
  5465     class=property>lang</code>’ attribute when rendering text and
  5466     appropriately renders this text without ‘<code
  5467     class=property>fi</code>’ ligatures. There is no need to use the ‘<a
  5468     href="#propdef-font-language-override"><code
  5469     class=property>font-language-override</code></a>’ property.</p>
  5471    <p>However, a given font may lack support for a specific language. In this
  5472     situation authors may need to use the typographic conventions of a
  5473     related language that are supported by that font:</p>
  5475    <pre lang=mk>&lt;body lang="mk">     &lt;!-- Macedonian lang code --&gt;
  5477 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
  5479 &lt;h4>Члeн 9&lt;/h4>
  5480 &lt;p>Никoj чoвeк нeмa дa бидe пoдлoжeн нa прoизвoлнo aпсeњe, притвoр или прoгoнувaњe.&lt;/p>
  5482 </pre>
  5484    <p>The Macedonian text here will be rendered using Serbian typographic
  5485     conventions, with the assumption that the font specified supports
  5486     Serbian.</p>
  5487   </div>
  5489   <p><a id=rendering-considerations></a>
  5491   <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
  5492    Resolution</h2>
  5494   <p>As described in the previous section, font features can be enabled in a
  5495    variety of ways, either via the use of <a href="#propdef-font-variant"
  5496    title="font-variant!!property">‘<code
  5497    class=property>font-variant</code>’</a> or <a
  5498    href="#propdef-font-feature-settings"
  5499    title="font-feature-settings!!property">‘<code
  5500    class=property>font-feature-settings</code>’</a> in a style rule or
  5501    within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5502    The resolution order for the union of these settings is defined below.
  5503    Features defined via CSS properties are applied on top of layout engine
  5504    default features.
  5506   <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
  5508   <p>For OpenType fonts, user agents must enable the default features defined
  5509    in the OpenType documentation for a given script and writing mode.
  5510    Required ligatures, common ligatures and contextual forms must be enabled
  5511    by default (OpenType features: <span class=tag>rlig, liga, clig,
  5512    calt</span>), along with localized forms (OpenType feature: <span
  5513    class=tag>locl</span>), and features required for proper display of
  5514    composed characters and marks (OpenType features: <span class=tag>ccmp,
  5515    mark, mkmk</span>). These features must always be enabled, even when the
  5516    value of the <a href="#propdef-font-variant"
  5517    title="font-variant!!property">‘<code
  5518    class=property>font-variant</code>’</a> and <a
  5519    href="#propdef-font-feature-settings"
  5520    title="font-feature-settings!!property">‘<code
  5521    class=property>font-feature-settings</code>’</a> properties is <span
  5522    title="normal value">‘<code class=property>normal</code>’</span>.
  5523    Individual features are only disabled when explicitly overridden by the
  5524    author, as when ‘<a href="#propdef-font-variant-ligatures"><code
  5525    class=property>font-variant-ligatures</code></a>’ is set to ‘<a
  5526    href="#no-common-ligatures"><code
  5527    class=property>no-common-ligatures</code></a>’. For handling complex
  5528    scripts such as <a
  5529    href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
  5530    <a
  5531    href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
  5532    or <a
  5533    href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
  5534    additional features are required. For upright text within vertical text
  5535    runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
  5536    must be enabled.
  5538   <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
  5540   <p>General and <a href="#font-specific"><em>font specific</em></a> font
  5541    feature property settings are resolved in the order below, in ascending
  5542    order of precedence. This ordering is used to construct a combined list of
  5543    font features that affect a given text run.
  5545   <ol>
  5546    <li>Font features enabled by default, including features required for a
  5547     given script.
  5549    <li>If the font is defined via an <a
  5550     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5551     features implied by the font-variant descriptor in the <a
  5552     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5554    <li>If the font is defined via an <a
  5555     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5556     features implied by the font-feature-settings descriptor in the <a
  5557     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5559    <li>Font features implied by the value of the <a
  5560     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5561     class=property>font-variant</code>’</a> property, the related <a
  5562     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5563     class=property>font-variant</code>’</a> subproperties and any other CSS
  5564     property that uses OpenType features (e.g. the ‘<a
  5565     href="#propdef-font-kerning"><code
  5566     class=property>font-kerning</code></a>’ property).</li>
  5567    <!-- other CSS props override 'font-variant' but not 'font-feature-settings' -->
  5568    <!-- http://lists.w3.org/Archives/Public/www-style/2013Aug/0110.html -->
  5570    <li>Feature settings determined by properties other than <a
  5571     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5572     class=property>font-variant</code>’</a> or <a
  5573     href="#propdef-font-feature-settings"
  5574     title="font-feature-settings!!property">‘<code
  5575     class=property>font-feature-settings</code>’</a>. For example, setting
  5576     a non-default value for the ‘<code
  5577     class=property>letter-spacing</code>’ property disables common
  5578     ligatures.
  5580    <li>Font features implied by the value of <a
  5581     href="#propdef-font-feature-settings"
  5582     title="font-feature-settings!!property">‘<code
  5583     class=property>font-feature-settings</code>’</a> property.
  5584   </ol>
  5586   <p>This ordering allows authors to set up a general set of defaults for
  5587    fonts within their <a
  5588    href="#at-font-face-rule"><code>@font-face</code></a> rules, then override
  5589    them with property settings for specific elements. General property
  5590    settings override the settings in <a
  5591    href="#at-font-face-rule"><code>@font-face</code></a> rules and low-level
  5592    font feature settings override <a href="#propdef-font-variant"
  5593    title="font-variant!!property">‘<code
  5594    class=property>font-variant</code>’</a> property settings.
  5596   <p>For situations where the combined list of font feature settings contains
  5597    more than one value for the same feature, the last value is used. When a
  5598    font lacks support for a given underlying font feature, text is simply
  5599    rendered as if that font feature was not enabled; font fallback does not
  5600    occur and no attempt is made to synthesize the feature except where
  5601    explicitly defined for specific properties.
  5603   <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
  5604    precedence examples</h3>
  5606   <div class=example>
  5607    <p>With the styles below, numbers are rendered proportionally when used
  5608     within a paragraph but are shown in tabular form within tables of prices:</p>
  5610    <pre>body {
  5611   font-variant-numeric: proportional-nums;
  5614 table.prices td {
  5615   font-variant-numeric: tabular-nums;
  5617 </pre>
  5618   </div>
  5620   <div class=example>
  5621    <p>When the <a href="#descdef-font-variant"
  5622     title="font-variant!!descriptor">font-variant</a> descriptor is used
  5623     within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule,
  5624     it only applies to the font defined by that rule.</p>
  5626    <pre>@font-face {
  5627   font-family: MainText;
  5628   src: url(http://example.com/font.woff);
  5629   font-variant: oldstyle-nums proportional-nums styleset(1,3);
  5632 body {
  5633   font-family: MainText, Helvetica;
  5636 table.prices td {
  5637   font-variant-numeric: tabular-nums;
  5639 </pre>
  5641    <p>In this case, old-style numerals will be used throughout but only where
  5642     the font "MainText" is used. Just as in the previous example, tabular
  5643     values will be used in price tables since ‘<a
  5644     href="#tabular-nums"><code class=property>tabular-nums</code></a>’
  5645     appears in a general style rule and its use is mutually exclusive with
  5646     ‘<a href="#proportional-nums"><code
  5647     class=property>proportional-nums</code></a>’. Stylistic alternate sets
  5648     will only be used where MainText is used.</p>
  5649   </div>
  5651   <div class=example>
  5652    <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule can
  5653     also be used to access font features in locally available fonts via the
  5654     use of <code>local()</code> in the ‘<a href="#descdef-src"><code
  5655     class=property>src</code></a>’ descriptor of the <a
  5656     href="#at-font-face-rule"><code>@font-face</code></a> definition:</p>
  5658    <pre>@font-face {
  5659   font-family: BodyText;
  5660   src: local("HiraMaruPro-W4");
  5661   font-variant: proportional-width;
  5662   font-feature-settings: "ital"; /* Latin italics within CJK text feature */
  5665 body { font-family: BodyText, serif; }
  5666 </pre>
  5668    <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
  5669     text rendering occurs, Japanese kana will be proportionally spaced and
  5670     Latin text will be italicised. Text rendered with the fallback serif font
  5671     will use default rendering properties.</p>
  5672   </div>
  5674   <div class=example>
  5675    <p>In the example below, discretionary ligatures are enabled only for a
  5676     downloadable font but are disabled within spans of class "special":</p>
  5678    <pre>@font-face {
  5679   font-family: main;
  5680   src: url(fonts/ffmeta.woff) format("woff");
  5681   font-variant: discretionary-ligatures;
  5684 body         { font-family: main, Helvetica; }
  5685 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5686 </pre>
  5688    <p>Suppose one adds a rule using ‘<code
  5689     class=property>font-feature-settings</code>’ to enable discretionary
  5690     ligatures:</p>
  5692    <pre>body         { font-family: main, Helvetica; }
  5693 span         { font-feature-settings: "dlig"; }
  5694 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5695 </pre>
  5697    <p>In this case, discretionary ligatures <em>will</em> be rendered within
  5698     spans of class "special". This is because both the <a
  5699     href="#propdef-font-feature-settings"
  5700     title="font-feature-settings!!property">‘<code
  5701     class=property>font-feature-settings</code>’</a> and ‘<a
  5702     href="#propdef-font-variant-ligatures"><code
  5703     class=property>font-variant-ligatures</code></a>’ properties apply to
  5704     these spans. Although the ‘<code class=css>no-discretionary
  5705     ligatures</code>’ setting of ‘<a
  5706     href="#propdef-font-variant-ligatures"><code
  5707     class=property>font-variant-ligatures</code></a>’ effectively disables
  5708     the OpenType <span class=tag>dlig</span> feature, because the <a
  5709     href="#propdef-font-feature-settings"
  5710     title="font-feature-settings!!property">‘<code
  5711     class=property>font-feature-settings</code>’</a> is resolved after
  5712     that, the ‘<code class=property>dlig</code>’ value reenables
  5713     discretionary ligatures.</p>
  5714   </div>
  5716   <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
  5718   <p>The contents of <a href="#at-font-face-rule"><code>@font-face</code></a>
  5719    and <a
  5720    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5721    rules can be accessed via the following extensions to the CSS Object
  5722    Model.
  5724   <h3 id=om-fontface><span class=secno>8.1 </span>The <a
  5725    href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
  5727   <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
  5728    <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5730   <pre class=idl>
  5731 interface CSSFontFaceRule : CSSRule {
  5732   attribute DOMString family;
  5733   attribute DOMString src;
  5734   attribute DOMString style;
  5735   attribute DOMString weight;
  5736   attribute DOMString stretch;
  5737   attribute DOMString unicodeRange;
  5738   attribute DOMString variant;
  5739   attribute DOMString featureSettings;
  5740 }</pre>
  5742   <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
  5743    rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
  5744    defined a different variant of this rule. This definition supercedes that
  5745    one.
  5747   <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
  5748    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5749    interface</h3>
  5751   <p>The <code>CSSRule</code> interface is extended as follows:
  5753   <pre class=idl>partial interface CSSRule {
  5754   const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  5755 }</pre>
  5757   <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
  5758    interface represents a <a
  5759    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5760    rule.
  5762   <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
  5763   attribute DOMString fontFamily;
  5764   readonly attribute CSSFontFeatureValuesMap annotation;
  5765   readonly attribute CSSFontFeatureValuesMap ornaments;
  5766   readonly attribute CSSFontFeatureValuesMap stylistic;
  5767   readonly attribute CSSFontFeatureValuesMap swash;
  5768   readonly attribute CSSFontFeatureValuesMap characterVariant;
  5769   readonly attribute CSSFontFeatureValuesMap styleset;
  5772 [MapClass(DOMString, sequence&lt;unsigned long&gt;)]
  5773 interface CSSFontFeatureValuesMap {
  5774   void set(DOMString featureValueName,
  5775            (unsigned long or sequence&lt;unsigned long&gt;) values);
  5776 }</pre>
  5778   <dl class=idl-attributes>
  5779    <dt><var>fontFamily</var> of type <code>DOMString</code>
  5781    <dd>The list of one or more font families for which a given set of feature
  5782     values is defined.
  5784    <dt>value maps of type <code>CSSFontFeatureValuesMap</code>, readonly
  5786    <dd>Maps of feature values associated with feature value names for a given
  5787     ‘<a href="#propdef-font-variant-alternates"><code
  5788     class=property>font-variant-alternates</code></a>’ value type
  5789   </dl>
  5791   <p>Each value map attribute of <a
  5792    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5793    reflects the values defined via a corresponding <a
  5794    href="#featurevalueblock"><i title="feature_value_block">feature value
  5795    block</i></a>. Thus, the <var title="annotation
  5796    attribute">annotation</var> attribute contains the values contained within
  5797    a <code title="@annotation">@annotation</code> <a
  5798    href="#featurevalueblock"><i title="feature_value_block">feature value
  5799    block</i></a>, the <var title="ornaments attribute">ornaments</var>
  5800    attribute contains the values contained with a <code
  5801    title="@ornaments">@ornaments</code> <a href="#featurevalueblock"><i
  5802    title="feature_value_block">feature value block</i></a> and so forth.
  5804   <p>The <code>CSSFontFeatureValuesMap</code> interface uses the <a
  5805    href="http://dev.w3.org/2006/webapi/WebIDL/#es-map-members">default map
  5806    class methods</a> but the <code>set</code> method has different behavior.
  5807    It takes a sequence of unsigned integers and associates it with a given
  5808    <code>featureValueName</code>. The method behaves the same as the default
  5809    map class method except that a single unsigned long value is treated as a
  5810    sequence of a single value. The method throws an exception if an invalid
  5811    number of values is passed in. If the associated <a
  5812    href="#featurevalueblock"><i title="feature_value_block">feature value
  5813    block</i></a> only allows a limited number of values, the <code>set</code>
  5814    method throws an <code>InvalidAccessError</code> exception when the input
  5815    sequence to <code>set</code> contains more than the limited number of
  5816    values. See the description of <a
  5817    href="#multi-valued-feature-value-definitions">multi-valued feature value
  5818    definitions</a> for details on the maximum number of values allowed for a
  5819    given type of <a href="#featurevalueblock"><i
  5820    title="feature_value_block">feature value block</i></a>. The
  5821    <code>get</code> method always returns a sequence of values, even if the
  5822    sequence only contains a single value.
  5824   <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
  5825    properties to CSS properties</h2>
  5827   <p><em>This appendix is included as background for some of the problems and
  5828    situations that are described in other sections. It should be viewed as
  5829    informative only.</em>
  5831   <p>Font properties in CSS are designed to be independent of the underlying
  5832    font formats used; they can be used to specify bitmap fonts, Type1 fonts,
  5833    SVG fonts in addition to the common TrueType and OpenType fonts. But there
  5834    are facets of the TrueType and OpenType formats that often cause confusion
  5835    for authors and present challenges to implementers on different platforms.
  5837   <p>Originally developed at Apple, TrueType was designed as an outline font
  5838    format for both screen and print. Microsoft joined Apple in developing the
  5839    TrueType format and both platforms have supported TrueType fonts since
  5840    then. Font data in the TrueType format consists of a set of tables
  5841    distinguished with common four-letter tag names, each containing a
  5842    specific type of data. For example, naming information, including
  5843    copyright and license information, is stored in the ‘<code
  5844    class=property>name</code>’ table. The <a
  5845    href="#character-map"><em>character map</em></a> (‘<code
  5846    class=property>cmap</code>’) table contains a mapping of character
  5847    encodings to glyphs. Apple later added additional tables for supporting
  5848    enhanced typographic functionality; these are now called Apple Advanced
  5849    Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
  5850    tables for advanced typography and called their format OpenType <a
  5851    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
  5853   <p>In many cases the font data used under Microsoft Windows or Linux is
  5854    slightly different from the data used under Apple's Mac OS X because the
  5855    TrueType format allowed for explicit variation across platforms. This
  5856    includes font metrics, names and <a href="#character-map"><em>character
  5857    map</em></a> data.
  5859   <p>Specifically, font family name data is handled differently across
  5860    platforms. For TrueType and OpenType fonts these names are contained in
  5861    the ‘<code class=property>name</code>’ table, in name records with
  5862    name ID 1. Mulitple names can be stored for different locales, but
  5863    Microsoft recommends fonts always include at least a US English version of
  5864    the name. On Windows, Microsoft made the decision for backwards
  5865    compatibility to limit this family name to a maximum of four faces; for
  5866    larger groupings the "preferred family" (name ID 16) or "WWS family" (name
  5867    ID 21) can be used. Other platforms such as OSX don't have this
  5868    limitation, so the family name is used to define all possible groupings.
  5870   <p>Other name table data provides names used to uniquely identify a
  5871    specific face within a family. The full font name (name ID 4) and the
  5872    Postscript name (name ID 6) describe a single face uniquely. For example,
  5873    the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
  5874    and a Postscript name of "GillSans-Bold". There can be multiple localized
  5875    versions of the fullname for a given face, but the Postscript name is
  5876    always a unique name made from a limited set of ASCII characters.
  5878   <p>On various platforms, different names are used to search for a font. For
  5879    example, with the Windows GDI CreateIndirectFont API, either a family or
  5880    fullname can be used to lookup a face, while on Mac OS X the
  5881    CTFontCreateWithName API call is used to lookup a given face using the
  5882    fullname and Postscript name. Under Linux, the fontconfig API allows fonts
  5883    to be searched using any of these names. In situations where platform
  5884    API's automatically substitute other font choices, it may be necessary to
  5885    verify a returned font matches a given name.
  5887   <p>The weight of a given face can be determined via the usWeightClass field
  5888    of the OS/2 table or inferred from the style name (name ID 2). Likewise,
  5889    the width can be determined via the usWidthClass of the OS/2 table or
  5890    inferred from the style name. For historical reasons related to synthetic
  5891    bolding at weights 200 or lower with the Windows GDI API, font designers
  5892    have sometimes skewed values in the OS/2 table to avoid these weights.
  5894   <p>Rendering complex scripts that use contextual shaping such as Thai,
  5895    Arabic and Devanagari requires features present only in OpenType or AAT
  5896    fonts. Currently, complex script rendering is supported on Windows and
  5897    Linux using OpenType font features while both OpenType and AAT font
  5898    features are used under Mac OS X.
  5900   <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
  5902   <h3 class=no-num id=recent-changes> Changes from the <a
  5903    href="http://www.w3.org/TR/2013/WD-css-fonts-3-20130711/">July 2013 CSS3
  5904    Fonts Last Call Working Draft</a></h3>
  5906   <p>Major changes include:
  5908   <ul>
  5909    <li>reorder feature precedence such that features implied by other CSS
  5910     properties override ‘<code class=property>font-variant</code>’
  5911     settings
  5913    <li>switched examples to use .woff files
  5915    <li>revised wording of font fetching algorithm
  5917    <li>clarify meaning of <a href="#font-size-adjust-auto-value"
  5918     title="auto!!font-size-adjust">‘<code class=property>auto</code>’</a>
  5919     value for ‘<a href="#propdef-font-size-adjust"><code
  5920     class=property>font-size-adjust</code></a>’
  5922    <li>allow user agents to synthesize OpenType <span class=tag>kern</span>
  5923     feature
  5925    <li>minor editorial cleanups
  5926   </ul>
  5928   <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
  5930   <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
  5931    their help and feedback. John Hudson was kind enough to take the time to
  5932    explain the subtleties of OpenType language tags and provided the example
  5933    of character variant usage for displaying text on Byzantine seals. Ken
  5934    Lunde and Eric Muller provided valuable feedback on CJK OpenType features
  5935    and Unicode variation selectors. The idea for supporting font features by
  5936    using <a href="#propdef-font-variant"
  5937    title="font-variant!!property">‘<code
  5938    class=property>font-variant</code>’</a> subproperties originated with
  5939    Håkon Wium Lie, Adam Twardoch and Tal Leming. Elika Etemad supplied some
  5940    of the initial design ideas for the <a
  5941    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5942    rule. Thanks also to House Industries for allowing the use of Ed Interlock
  5943    in the discretionary ligatures example.
  5945   <p>A special thanks to Robert Bringhurst for the sublime mind expansion
  5946    that is <em>The Elements of Typographic Style</em>.
  5948   <h2 class=no-num id=conformance> Conformance</h2>
  5950   <h3 class=no-num id=conventions> Document Conventions</h3>
  5952   <p>Conformance requirements are expressed with a combination of descriptive
  5953    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  5954    NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  5955    “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  5956    normative parts of this document are to be interpreted as described in RFC
  5957    2119. However, for readability, these words do not appear in all uppercase
  5958    letters in this specification.
  5960   <p>All of the text of this specification is normative except sections
  5961    explicitly marked as non-normative, examples, and notes. <a
  5962    href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  5964   <p>Examples in this specification are introduced with the words “for
  5965    example” or are set apart from the normative text with
  5966    <code>class="example"</code>, like this:
  5968   <div class=example>
  5969    <p>This is an example of an informative example.
  5970   </div>
  5972   <p>Informative notes begin with the word “Note” and are set apart from
  5973    the normative text with <code>class="note"</code>, like this:
  5975   <p class=note>Note, this is an informative note.
  5977   <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
  5979   <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
  5980    classes:
  5982   <dl>
  5983    <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  5984     sheet</dfn>
  5986    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  5987     style sheet</a>.
  5989    <dt><dfn id=renderer>renderer</dfn>
  5991    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5992     that interprets the semantics of a style sheet and renders documents that
  5993     use them.
  5995    <dt><dfn id=authoring-tool>authoring tool</dfn>
  5997    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5998     that writes a style sheet.
  5999   </dl>
  6001   <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
  6002    declarations that use properties defined in this module have values that
  6003    are valid according to the generic CSS grammar and the individual grammars
  6004    of each property as given in this module.
  6006   <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
  6007    interpreting the style sheet as defined by the appropriate specifications,
  6008    it supports all the features defined by CSS Fonts Level 3 Module by
  6009    parsing them correctly and rendering the document accordingly. However,
  6010    the inability of a UA to correctly render a document due to limitations of
  6011    the device does not make the UA non-conformant. (For example, a UA is not
  6012    required to render color on a monochrome monitor.)
  6014   <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
  6015    style sheets that are syntactically correct according to the generic CSS
  6016    grammar and the individual grammars of each feature in this module, and
  6017    meet all other conformance requirements of style sheets as described in
  6018    this module.
  6020   <h3 class=no-num id=partial> Partial Implementations</h3>
  6022   <p>So that authors can exploit the forward-compatible parsing rules to
  6023    assign fallback values, CSS renderers <strong>must</strong> treat as
  6024    invalid (and <a
  6025    href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  6026    appropriate</a>) any at-rules, properties, property values, keywords, and
  6027    other syntactic constructs for which they have no usable level of support.
  6028    In particular, user agents <strong>must not</strong> selectively ignore
  6029    unsupported component values and honor supported values in a single
  6030    multi-value property declaration: if any value is considered invalid (as
  6031    unsupported values must be), CSS requires that the entire declaration be
  6032    ignored.
  6034   <h3 class=no-num id=experimental> Experimental Implementations</h3>
  6036   <p>To avoid clashes with future CSS features, the CSS2.1 specification
  6037    reserves a <a
  6038    href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  6039    syntax</a> for proprietary and experimental extensions to CSS.
  6041   <p>Prior to a specification reaching the Candidate Recommendation stage in
  6042    the W3C process, all implementations of a CSS feature are considered
  6043    experimental. The CSS Working Group recommends that implementations use a
  6044    vendor-prefixed syntax for such features, including those in W3C Working
  6045    Drafts. This avoids incompatibilities with future changes in the draft.
  6047   <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
  6049   <p>Once a specification reaches the Candidate Recommendation stage,
  6050    non-experimental implementations are possible, and implementors should
  6051    release an unprefixed implementation of any CR-level feature they can
  6052    demonstrate to be correctly implemented according to spec.
  6054   <p>To establish and maintain the interoperability of CSS across
  6055    implementations, the CSS Working Group requests that non-experimental CSS
  6056    renderers submit an implementation report (and, if necessary, the
  6057    testcases used for that implementation report) to the W3C before releasing
  6058    an unprefixed implementation of any CSS features. Testcases submitted to
  6059    W3C are subject to review and correction by the CSS Working Group.
  6061   <p>Further information on submitting testcases and implementation reports
  6062    can be found from on the CSS Working Group's website at <a
  6063    href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  6064    Questions should be directed to the <a
  6065    href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  6066    mailing list.
  6068   <h2 class=no-num id=references>References</h2>
  6070   <h3 class=no-num id=normative-references>Normative References</h3>
  6071   <!--begin-normative-->
  6072   <!-- Sorted by label -->
  6074   <dl class=bibliography>
  6075    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6076     <!---->
  6078    <dt id=CHARMOD>[CHARMOD]
  6080    <dd>Martin J. Dürst; et al. <a
  6081     href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
  6082     Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
  6083     2005. W3C Recommendation. URL: <a
  6084     href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
  6085     </dd>
  6086    <!---->
  6088    <dt id=CORS>[CORS]
  6090    <dd>Anne van Kesteren. <a
  6091     href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
  6092     Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
  6093     Recommendation. (Work in progress.) URL: <a
  6094     href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
  6095     </dd>
  6096    <!---->
  6098    <dt id=CSS21>[CSS21]
  6100    <dd>Bert Bos; et al. <a
  6101     href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  6102     Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  6103     2011. W3C Recommendation. URL: <a
  6104     href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  6105     </dd>
  6106    <!---->
  6108    <dt id=CSS3VAL>[CSS3VAL]
  6110    <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  6111     href="http://www.w3.org/TR/2013/CR-css3-values-20130404/"><cite>CSS
  6112     Values and Units Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  6113     Recommendation. (Work in progress.) URL: <a
  6114     href="http://www.w3.org/TR/2013/CR-css3-values-20130404/">http://www.w3.org/TR/2013/CR-css3-values-20130404/</a>
  6115     </dd>
  6116    <!---->
  6118    <dt id=HTML5>[HTML5]
  6120    <dd>Ian Hickson. <a
  6121     href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
  6122     17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
  6123     <a
  6124     href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
  6125     </dd>
  6126    <!---->
  6128    <dt id=OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
  6130    <dd><a
  6131     href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=52136"><cite>Information
  6132     technology — Coding of audio-visual objects — Part 22: Open Font
  6133     Format.</cite></a> International Organization for Standardization.
  6134     ISO/IEC 14496-22:2009. URL: <a
  6135     href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=52136">http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=52136</a>
  6136     </dd>
  6137    <!---->
  6139    <dt id=OPENTYPE>[OPENTYPE]
  6141    <dd><a
  6142     href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
  6143     specification.</cite></a> Microsoft. URL: <a
  6144     href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
  6145     </dd>
  6146    <!---->
  6148    <dt id=OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
  6150    <dd><a
  6151     href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
  6152     feature registry.</cite></a> Microsoft. URL: <a
  6153     href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
  6154     </dd>
  6155    <!---->
  6157    <dt id=RFC2119>[RFC2119]
  6159    <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  6160     words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  6161     RFC 2119. URL: <a
  6162     href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  6163     </dd>
  6164    <!---->
  6166    <dt id=UAX15>[UAX15]
  6168    <dd>Mark Davis; Ken Whistler. <a
  6169     href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
  6170     Forms.</cite></a> 31 August 2012. Unicode Standard Annex #15. URL: <a
  6171     href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
  6172     </dd>
  6173    <!---->
  6175    <dt id=UAX29>[UAX29]
  6177    <dd>Mark Davis. <a
  6178     href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
  6179     Segmentation.</cite></a> 12 September 2012. Unicode Standard Annex #29.
  6180     URL: <a
  6181     href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
  6182     </dd>
  6183    <!---->
  6185    <dt id=UNICODE6>[UNICODE6]
  6187    <dd>The Unicode Consortium. <a
  6188     href="http://www.unicode.org/versions/Unicode6.2.0/"><cite>The Unicode
  6189     Standard, Version 6.2.0.</cite></a> Defined by: The Unicode Standard,
  6190     Version 6.2.0 URL: <a
  6191     href="http://www.unicode.org/versions/Unicode6.2.0/">http://www.unicode.org/versions/Unicode6.2.0/</a>
  6192     </dd>
  6193    <!---->
  6194   </dl>
  6195   <!--end-normative-->
  6196   <!--{{!CSS21}}-->
  6197   <!--{{!CSS3VAL}}-->
  6198   <!--{{!OPENTYPE}}-->
  6199   <!--{{!OPENTYPE-FEATURES}}-->
  6200   <!--{{!OPEN-FONT-FORMAT}}-->
  6201   <!--{{!UNICODE6}}-->
  6202   <!--{{!UAX15}}-->
  6203   <!--{{!UAX29}}-->
  6204   <!--{{!CORS}}-->
  6205   <!--{{!HTML5}}-->
  6206   <!--{{!CHARMOD}}-->
  6208   <h3 class=no-num id=other-references>Other References</h3>
  6209   <!--begin-informative-->
  6210   <!-- Sorted by label -->
  6212   <dl class=bibliography>
  6213    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6214     <!---->
  6216    <dt id=AAT-FEATURES>[AAT-FEATURES]
  6218    <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
  6219     Advanced Typography font feature registry.</cite></a> Apple. URL: <a
  6220     href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
  6221     </dd>
  6222    <!---->
  6224    <dt id=ARABIC-TYPO>[ARABIC-TYPO]
  6226    <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
  6227     Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
  6228    <!---->
  6230    <dt id=CHARMOD-NORM>[CHARMOD-NORM]
  6232    <dd>François Yergeau; et al. <a
  6233     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
  6234     Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
  6235     W3C Working Draft. (Work in progress.) URL: <a
  6236     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
  6237     </dd>
  6238    <!---->
  6240    <dt id=CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
  6242    <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
  6243     O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
  6244    <!---->
  6246    <dt id=CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
  6248    <dd>L. David Baron. <a
  6249     href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/"><cite>CSS
  6250     Conditional Rules Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  6251     Recommendation. (Work in progress.) URL: <a
  6252     href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/">http://www.w3.org/TR/2013/CR-css3-conditional-20130404/</a>
  6253     </dd>
  6254    <!---->
  6256    <dt id=CSS3TEXT>[CSS3TEXT]
  6258    <dd>Elika J. Etemad; Koji Ishii. <a
  6259     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
  6260     Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
  6261     progress.) URL: <a
  6262     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
  6263     </dd>
  6264    <!---->
  6266    <dt id=DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
  6268    <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
  6269     and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
  6270     ISBN 0-201-17633-5.</dd>
  6271    <!---->
  6273    <dt id=DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
  6275    <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
  6276     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
  6277     Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
  6278     2000. W3C Recommendation. URL: <a
  6279     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/">http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/</a>
  6280     </dd>
  6281    <!---->
  6283    <dt id=ELEMTYPO>[ELEMTYPO]
  6285    <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
  6286     4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
  6287    <!---->
  6289    <dt id=LANGCULTTYPE>[LANGCULTTYPE]
  6291    <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
  6292     ISBN 1-932026-01-0.</dd>
  6293    <!---->
  6295    <dt id=OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
  6297    <dd><a
  6298     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
  6299     User Guide.</cite></a> FontShop International. URL: <a
  6300     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
  6301     </dd>
  6302    <!---->
  6304    <dt id=RASTER-TRAGEDY>[RASTER-TRAGEDY]
  6306    <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
  6307     Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
  6308     href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
  6309    <!---->
  6311    <dt id=WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
  6313    <dd>John Hudson. <a
  6314     href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
  6315     Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
  6316     href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
  6317     </dd>
  6318    <!---->
  6319   </dl>
  6320   <!--end-informative-->
  6321   <!--{{ARABIC-TYPO}}-->
  6322   <!--{{CJKV-INFO-PROCESSING}}-->
  6323   <!--{{DIGITAL-TYPOGRAPHY}}-->
  6324   <!--{{DOM-LEVEL-2-STYLE}}-->
  6325   <!--{{ELEMTYPO}}-->
  6326   <!--{{LANGCULTTYPE}}-->
  6327   <!--{{OPENTYPE-FONT-GUIDE}}-->
  6328   <!--{{RASTER-TRAGEDY}}-->
  6329   <!--{{WINDOWS-GLYPH-PROC}}-->
  6330   <!--{{CHARMOD-NORM}}-->
  6331   <!--{{AAT-FEATURES}}-->
  6332   <!--{{CSS3-CONDITIONAL}}-->
  6333   <!--{{CSS3TEXT}}-->
  6335   <h2 class=no-num id=index>Index</h2>
  6336   <!--begin-index-->
  6338   <ul class=indexlist>
  6339    <li>100...900 weight values, <a href="#font-weight-numeric-values"
  6340     title="100...900 weight values"><strong>3.2</strong></a>
  6342    <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
  6343     title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
  6345    <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
  6346     title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
  6348    <li><var>&lt;contextual-alt-values&gt;</var>, <a
  6349     href="#contextual-alt-values"
  6350     title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
  6352    <li><var>&lt;discretionary-lig-values&gt;</var>, <a
  6353     href="#discretionary-lig-values"
  6354     title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
  6356    <li><var>&lt;east-asian-variant-values&gt;</var>, <a
  6357     href="#east-asian-variant-values"
  6358     title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
  6360    <li><var>&lt;east-asian-width-values&gt;</var>, <a
  6361     href="#east-asian-width-values"
  6362     title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
  6364    <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
  6365     title="&lt;family-name&gt;"><strong>3.1</strong></a>
  6367    <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
  6368     title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
  6370    <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
  6371     title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
  6373    <li><var>&lt;font-variant-css21&gt;</var>, <a
  6374     href="#font-variant-css21-values"
  6375     title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
  6377    <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
  6378     title="&lt;generic-family&gt;"><strong>3.1</strong></a>
  6380    <li><var>&lt;historical-lig-values&gt;</var>, <a
  6381     href="#historical-lig-values"
  6382     title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
  6384    <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
  6385     title="&lt;length&gt;"><strong>3.5</strong></a>
  6387    <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
  6388     title="&lt;number&gt;"><strong>3.6</strong></a>
  6390    <li><var>&lt;numeric-figure-values&gt;</var>, <a
  6391     href="#numeric-figure-values"
  6392     title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
  6394    <li><var>&lt;numeric-fraction-values&gt;</var>, <a
  6395     href="#numeric-fraction-values"
  6396     title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
  6398    <li><var>&lt;numeric-spacing-values&gt;</var>, <a
  6399     href="#numeric-spacing-values"
  6400     title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
  6402    <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
  6403     title="&lt;percentage&gt;"><strong>3.5</strong></a>
  6405    <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
  6406     title="&lt;relative-size&gt;"><strong>3.5</strong></a>
  6408    <li><var>&lt;string&gt;</var>, <a
  6409     href="#font-language-override-string-value"
  6410     title="&lt;string&gt;"><strong>6.13</strong></a>
  6412    <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
  6413     title="&lt;urange&gt;"><strong>4.5</strong></a>
  6415    <li><code>@font-face</code>, <a href="#at-font-face-rule"
  6416     title="@font-face"><strong>4.1</strong></a>
  6418    <li><code>@font-feature-values</code>, <a
  6419     href="#at-font-feature-values-rule"
  6420     title="@font-feature-values"><strong>6.9</strong></a>
  6422    <li>all-petite-caps, <a href="#all-petite-caps"
  6423     title=all-petite-caps><strong>6.6</strong></a>
  6425    <li>all-small-caps, <a href="#all-small-caps"
  6426     title=all-small-caps><strong>6.6</strong></a>
  6428    <li>annotation, <a href="#annotation"
  6429     title=annotation><strong>6.8</strong></a>
  6431    <li>aspect value, <a href="#aspect-value0" title="aspect
  6432     value"><strong>3.6</strong></a>
  6434    <li>authoring tool, <a href="#authoring-tool" title="authoring
  6435     tool"><strong>#</strong></a>
  6437    <li>auto
  6438     <ul>
  6439      <li>font-kerning, <a href="#font-kerning-auto-value" title="auto,
  6440       font-kerning"><strong>6.3</strong></a>
  6442      <li>font-size-adjust, <a href="#font-size-adjust-auto-value"
  6443       title="auto, font-size-adjust"><strong>3.6</strong></a>
  6444     </ul>
  6446    <li>bold, <a href="#bold" title=bold><strong>3.2</strong></a>
  6448    <li>bolder, <a href="#bolder" title=bolder><strong>3.2</strong></a>
  6450    <li>character map, <a href="#character-map" title="character
  6451     map"><strong>5.2</strong></a>
  6453    <li>character-variant, <a href="#character-variant"
  6454     title=character-variant><strong>6.8</strong></a>
  6456    <li>common-ligatures, <a href="#common-ligatures"
  6457     title=common-ligatures><strong>6.4</strong></a>
  6459    <li>composite face, <a href="#composite-face" title="composite
  6460     face"><strong>5.2</strong></a>
  6462    <li>condensed, <a href="#condensed"
  6463     title=condensed><strong>3.3</strong></a>
  6465    <li>contextual, <a href="#contextual"
  6466     title=contextual><strong>6.4</strong></a>
  6468    <li>CSSFontFaceRule, <a href="#cssfontfacerule"
  6469     title=CSSFontFaceRule><strong>8.1</strong></a>
  6471    <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
  6472     title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
  6474    <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
  6475     of"><strong>#</strong></a>
  6477    <li>default face, <a href="#default-face" title="default
  6478     face"><strong>5.2</strong></a>
  6480    <li>descriptor_declaration, <a href="#descriptordeclaration"
  6481     title="descriptor_declaration"><strong>4.1</strong></a>
  6483    <li>diagonal-fractions, <a href="#diagonal-fractions"
  6484     title=diagonal-fractions><strong>6.7</strong></a>
  6486    <li>discretionary-ligatures, <a href="#discretionary-ligatures"
  6487     title=discretionary-ligatures><strong>6.4</strong></a>
  6489    <li>effective character map, <a href="#effective-character-map"
  6490     title="effective character map"><strong>4.5</strong></a>
  6492    <li>expanded, <a href="#expanded" title=expanded><strong>3.3</strong></a>
  6494    <li>extra-condensed, <a href="#extra-condensed"
  6495     title=extra-condensed><strong>3.3</strong></a>
  6497    <li>extra-expanded, <a href="#extra-expanded"
  6498     title=extra-expanded><strong>3.3</strong></a>
  6500    <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
  6501     of"><strong>#</strong></a>
  6503    <li>feature_type, <a href="#featuretype"
  6504     title="feature_type"><strong>6.9.1</strong></a>
  6506    <li>feature_value_block, <a href="#featurevalueblock"
  6507     title="feature_value_block"><strong>6.9.1</strong></a>
  6509    <li>feature_value_definition, <a href="#featurevaluedefinition"
  6510     title="feature_value_definition"><strong>6.9.1</strong></a>
  6512    <li>first available font, <a href="#first-available-font" title="first
  6513     available font"><strong>5.2</strong></a>
  6515    <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
  6517    <li>font specific, <a href="#font-specific" title="font
  6518     specific"><strong>6.8</strong></a>
  6520    <li>font-family
  6521     <ul>
  6522      <li>descriptor, <a href="#descdef-font-family" title="font-family,
  6523       descriptor"><strong>4.2</strong></a>
  6525      <li>property, <a href="#propdef-font-family" title="font-family,
  6526       property"><strong>3.1</strong></a>
  6527     </ul>
  6529    <li>font-feature-settings
  6530     <ul>
  6531      <li>descriptor, <a href="#descdef-font-feature-settings"
  6532       title="font-feature-settings, descriptor"><strong>4.7</strong></a>
  6534      <li>property, <a href="#propdef-font-feature-settings"
  6535       title="font-feature-settings, property"><strong>6.12</strong></a>
  6536     </ul>
  6538    <li>font-kerning, <a href="#propdef-font-kerning"
  6539     title=font-kerning><strong>6.3</strong></a>
  6541    <li>font-language-override, <a href="#propdef-font-language-override"
  6542     title=font-language-override><strong>6.13</strong></a>
  6544    <li>font-size, <a href="#propdef-font-size"
  6545     title=font-size><strong>3.5</strong></a>
  6547    <li>font-size-adjust, <a href="#propdef-font-size-adjust"
  6548     title=font-size-adjust><strong>3.6</strong></a>
  6550    <li>font-stretch
  6551     <ul>
  6552      <li>descriptor, <a href="#descdef-font-stretch" title="font-stretch,
  6553       descriptor"><strong>4.4</strong></a>
  6555      <li>property, <a href="#propdef-font-stretch" title="font-stretch,
  6556       property"><strong>3.3</strong></a>
  6557     </ul>
  6559    <li>font-style
  6560     <ul>
  6561      <li>descriptor, <a href="#descdef-font-style" title="font-style,
  6562       descriptor"><strong>4.4</strong></a>
  6564      <li>property, <a href="#propdef-font-style" title="font-style,
  6565       property"><strong>3.4</strong></a>
  6566     </ul>
  6568    <li>font-synthesis, <a href="#propdef-font-synthesis"
  6569     title=font-synthesis><strong>3.8</strong></a>
  6571    <li>font-variant
  6572     <ul>
  6573      <li>descriptor, <a href="#descdef-font-variant" title="font-variant,
  6574       descriptor"><strong>4.7</strong></a>
  6576      <li>property, <a href="#propdef-font-variant" title="font-variant,
  6577       property"><strong>6.11</strong></a>
  6578     </ul>
  6580    <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
  6581     title=font-variant-alternates><strong>6.8</strong></a>
  6583    <li>font-variant-caps, <a href="#propdef-font-variant-caps"
  6584     title=font-variant-caps><strong>6.6</strong></a>
  6586    <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
  6587     title=font-variant-east-asian><strong>6.10</strong></a>
  6589    <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
  6590     title=font-variant-ligatures><strong>6.4</strong></a>
  6592    <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
  6593     title=font-variant-numeric><strong>6.7</strong></a>
  6595    <li>font-variant-position, <a href="#propdef-font-variant-position"
  6596     title=font-variant-position><strong>6.5</strong></a>
  6598    <li>font-weight
  6599     <ul>
  6600      <li>descriptor, <a href="#descdef-font-weight" title="font-weight,
  6601       descriptor"><strong>4.4</strong></a>
  6603      <li>property, <a href="#propdef-font-weight" title="font-weight,
  6604       property"><strong>3.2</strong></a>
  6605     </ul>
  6607    <li>font_face_rule, <a href="#fontfacerule"
  6608     title="font_face_rule"><strong>4.1</strong></a>
  6610    <li>FONT_FACE_SYM, <a href="#fontfacesym"
  6611     title="FONT_FACE_SYM"><strong>4.1</strong></a>
  6613    <li>font_family_name, <a href="#fontfamilyname"
  6614     title="font_family_name"><strong>6.9.1</strong></a>
  6616    <li>font_family_name_list, <a href="#fontfamilynamelist"
  6617     title="font_family_name_list"><strong>6.9.1</strong></a>
  6619    <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
  6620     title="font_feature_values_rule"><strong>6.9.1</strong></a>
  6622    <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
  6623     title="FONT_FEATURE_VALUES_SYM"><strong>6.9.1</strong></a>
  6625    <li>full-width, <a href="#full-width"
  6626     title=full-width><strong>6.10</strong></a>
  6628    <li>historical-forms, <a href="#historical-forms"
  6629     title=historical-forms><strong>6.8</strong></a>
  6631    <li>historical-ligatures, <a href="#historical-ligatures"
  6632     title=historical-ligatures><strong>6.4</strong></a>
  6634    <li>italic, <a href="#italic" title=italic><strong>3.4</strong></a>
  6636    <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
  6638    <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
  6640    <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
  6642    <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
  6644    <li>lighter, <a href="#lighter" title=lighter><strong>3.2</strong></a>
  6646    <li>lining-nums, <a href="#lining-nums"
  6647     title=lining-nums><strong>6.7</strong></a>
  6649    <li>monospace, definition of, <a href="#monospace0" title="monospace,
  6650     definition of"><strong>#</strong></a>
  6652    <li>no-common-ligatures, <a href="#no-common-ligatures"
  6653     title=no-common-ligatures><strong>6.4</strong></a>
  6655    <li>no-contextual, <a href="#no-contextual"
  6656     title=no-contextual><strong>6.4</strong></a>
  6658    <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
  6659     title=no-discretionary-ligatures><strong>6.4</strong></a>
  6661    <li>no-historical-ligatures, <a href="#no-historical-ligatures"
  6662     title=no-historical-ligatures><strong>6.4</strong></a>
  6664    <li>none
  6665     <ul>
  6666      <li>font-kerning, <a href="#font-kerning-none-value" title="none,
  6667       font-kerning"><strong>6.3</strong></a>
  6669      <li>font-size-adjust, <a href="#font-size-adjust-none-value"
  6670       title="none, font-size-adjust"><strong>3.6</strong></a>
  6672      <li>font-variant, <a href="#font-variant-none-value" title="none,
  6673       font-variant"><strong>6.11</strong></a>
  6675      <li>font-variant-ligatures, <a href="#font-variant-ligatures-none-value"
  6676       title="none, font-variant-ligatures"><strong>6.4</strong></a>
  6677     </ul>
  6679    <li>normal
  6680     <ul>
  6681      <li>font-feature-settings, <a href="#font-feature-settings-normal-value"
  6682       title="normal, font-feature-settings"><strong>6.12</strong></a>
  6684      <li>font-kerning, <a href="#font-kerning-normal-value" title="normal,
  6685       font-kerning"><strong>6.3</strong></a>
  6687      <li>font-language-override, <a
  6688       href="#font-language-override-normal-value" title="normal,
  6689       font-language-override"><strong>6.13</strong></a>
  6691      <li>font-stretch, <a href="#font-stretch-normal-value" title="normal,
  6692       font-stretch"><strong>3.3</strong></a>
  6694      <li>font-style, <a href="#font-style-normal-value" title="normal,
  6695       font-style"><strong>3.4</strong></a>
  6697      <li>font-variant, <a href="#font-variant-normal-value" title="normal,
  6698       font-variant"><strong>6.11</strong></a>
  6700      <li>font-variant-alternates, <a
  6701       href="#font-variant-alternates-normal-value" title="normal,
  6702       font-variant-alternates"><strong>6.8</strong></a>
  6704      <li>font-variant-caps, <a href="#font-variant-caps-normal-value"
  6705       title="normal, font-variant-caps"><strong>6.6</strong></a>
  6707      <li>font-variant-east-asian, <a
  6708       href="#font-variant-east-asian-normal-value" title="normal,
  6709       font-variant-east-asian"><strong>6.10</strong></a>
  6711      <li>font-variant-ligatures, <a
  6712       href="#font-variant-ligatures-normal-value" title="normal,
  6713       font-variant-ligatures"><strong>6.4</strong></a>
  6715      <li>font-variant-numeric, <a href="#font-variant-numeric-normal-value"
  6716       title="normal, font-variant-numeric"><strong>6.7</strong></a>
  6718      <li>font-variant-position, <a href="#font-variant-position-normal-value"
  6719       title="normal, font-variant-position"><strong>6.5</strong></a>
  6721      <li>font-weight, <a href="#font-weight-normal-value" title="normal,
  6722       font-weight"><strong>3.2</strong></a>
  6723     </ul>
  6725    <li>oblique, <a href="#oblique" title=oblique><strong>3.4</strong></a>
  6727    <li>oldstyle-nums, <a href="#oldstyle-nums"
  6728     title=oldstyle-nums><strong>6.7</strong></a>
  6730    <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
  6732    <li>ornaments, <a href="#ornaments"
  6733     title=ornaments><strong>6.8</strong></a>
  6735    <li>petite-caps, <a href="#petite-caps"
  6736     title=petite-caps><strong>6.6</strong></a>
  6738    <li>proportional-nums, <a href="#proportional-nums"
  6739     title=proportional-nums><strong>6.7</strong></a>
  6741    <li>proportional-width, <a href="#proportional-width"
  6742     title=proportional-width><strong>6.10</strong></a>
  6744    <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
  6746    <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
  6748    <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
  6749     definition of"><strong>#</strong></a>
  6751    <li>semi-condensed, <a href="#semi-condensed-"
  6752     title=semi-condensed><strong>3.3</strong></a>
  6754    <li>semi-expanded, <a href="#semi-expanded"
  6755     title=semi-expanded><strong>3.3</strong></a>
  6757    <li>serif, definition of, <a href="#serif0" title="serif, definition
  6758     of"><strong>#</strong></a>
  6760    <li>simplified, <a href="#simplified"
  6761     title=simplified><strong>6.10</strong></a>
  6763    <li>slashed-zero, <a href="#slashed-zero"
  6764     title=slashed-zero><strong>6.7</strong></a>
  6766    <li>small-caps, <a href="#small-caps"
  6767     title=small-caps><strong>6.6</strong></a>
  6769    <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
  6771    <li>stacked-fractions, <a href="#stacked-fractions"
  6772     title=stacked-fractions><strong>6.7</strong></a>
  6774    <li>style sheet
  6775     <ul>
  6776      <li>as conformance class, <a href="#style-sheet" title="style sheet, as
  6777       conformance class"><strong>#</strong></a>
  6778     </ul>
  6780    <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
  6782    <li>stylistic, <a href="#stylistic"
  6783     title=stylistic><strong>6.8</strong></a>
  6785    <li>sub, <a href="#sub" title=sub><strong>6.5</strong></a>
  6787    <li>super, <a href="#super" title=super><strong>6.5</strong></a>
  6789    <li>support, <a href="#support" title=support><strong>5.2</strong></a>
  6791    <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
  6793    <li>system font fallback, <a href="#system-font-fallback" title="system
  6794     font fallback"><strong>5.2</strong></a>
  6796    <li>tabular-nums, <a href="#tabular-nums"
  6797     title=tabular-nums><strong>6.7</strong></a>
  6799    <li>titling-caps, <a href="#titling-caps"
  6800     title=titling-caps><strong>6.6</strong></a>
  6802    <li>traditional, <a href="#traditional"
  6803     title=traditional><strong>6.10</strong></a>
  6805    <li>ultra-condensed, <a href="#ultra-condensed"
  6806     title=ultra-condensed><strong>3.3</strong></a>
  6808    <li>ultra-expanded, <a href="#ultra-expanded"
  6809     title=ultra-expanded><strong>3.3</strong></a>
  6811    <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
  6813    <li>unicode-range, <a href="#descdef-unicode-range"
  6814     title=unicode-range><strong>4.5</strong></a>
  6816    <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
  6818    <li>width, <a href="#width" title=width><strong>2</strong></a>
  6819   </ul>
  6820   <!--end-index-->
  6822   <h2 class=no-num id=property-index>Property index</h2>
  6823   <!--begin-properties-->
  6825   <table class=proptable>
  6826    <thead>
  6827     <tr>
  6828      <th>Property
  6830      <th>Values
  6832      <th>Initial
  6834      <th>Applies to
  6836      <th>Inh.
  6838      <th>Percentages
  6840      <th>Media
  6842    <tbody>
  6843     <tr>
  6844      <th><a class=property href="#propdef-font">font</a>
  6846      <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
  6847       &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
  6848       &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
  6849       &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
  6850       small-caption | status-bar
  6852      <td>see individual properties
  6854      <td>all elements
  6856      <td>yes
  6858      <td>see individual properties
  6860      <td>visual
  6862     <tr>
  6863      <th><span class=property>font-family</span>
  6865      <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
  6867      <td>depends on user agent
  6869      <td>all elements
  6871      <td>yes
  6873      <td>N/A
  6875      <td>visual
  6877     <tr>
  6878      <th><span class=property>font-feature-settings</span>
  6880      <td>normal | &lt;feature-tag-value&gt; #
  6882      <td>normal
  6884      <td>all elements
  6886      <td>yes
  6888      <td>N/A
  6890      <td>visual
  6892     <tr>
  6893      <th><a class=property href="#propdef-font-kerning">font-kerning</a>
  6895      <td>auto | normal | none
  6897      <td>auto
  6899      <td>all elements
  6901      <td>yes
  6903      <td>N/A
  6905      <td>visual
  6907     <tr>
  6908      <th><a class=property
  6909       href="#propdef-font-language-override">font-language-override</a>
  6911      <td>normal | &lt;string&gt;
  6913      <td>normal
  6915      <td>all elements
  6917      <td>yes
  6919      <td>N/A
  6921      <td>visual
  6923     <tr>
  6924      <th><a class=property href="#propdef-font-size">font-size</a>
  6926      <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
  6927       &lt;percentage&gt;
  6929      <td>medium
  6931      <td>all elements
  6933      <td>yes
  6935      <td>refer to parent element's font size
  6937      <td>visual
  6939     <tr>
  6940      <th><a class=property
  6941       href="#propdef-font-size-adjust">font-size-adjust</a>
  6943      <td>none | auto | &lt;number&gt;
  6945      <td>none
  6947      <td>all elements
  6949      <td>yes
  6951      <td>N/A
  6953      <td>visual
  6955     <tr>
  6956      <th><span class=property>font-stretch</span>
  6958      <td>normal | ultra-condensed | extra-condensed | condensed |
  6959       semi-condensed | semi-expanded | expanded | extra-expanded |
  6960       ultra-expanded
  6962      <td>normal
  6964      <td>all elements
  6966      <td>yes
  6968      <td>N/A
  6970      <td>visual
  6972     <tr>
  6973      <th><span class=property>font-style</span>
  6975      <td>normal | italic | oblique
  6977      <td>normal
  6979      <td>all elements
  6981      <td>yes
  6983      <td>N/A
  6985      <td>visual
  6987     <tr>
  6988      <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
  6990      <td>none | [ weight || style ]
  6992      <td>weight style
  6994      <td>all elements
  6996      <td>yes
  6998      <td>N/A
  7000      <td>visual
  7002     <tr>
  7003      <th><span class=property>font-variant</span>
  7005      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7006       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7007       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  7008       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  7009       character-variant(&lt;feature-value-name&gt; #) ||
  7010       swash(&lt;feature-value-name&gt;) ||
  7011       ornaments(&lt;feature-value-name&gt;) ||
  7012       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  7013       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  7014       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  7015       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  7016       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  7017       ruby ]
  7019      <td>normal
  7021      <td>all elements
  7023      <td>yes
  7025      <td>see individual properties
  7027      <td>visual
  7029     <tr>
  7030      <th><a class=property
  7031       href="#propdef-font-variant-alternates">font-variant-alternates</a>
  7033      <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
  7034       || styleset(&lt;feature-value-name&gt; #) ||
  7035       character-variant(&lt;feature-value-name&gt; #) ||
  7036       swash(&lt;feature-value-name&gt;) ||
  7037       ornaments(&lt;feature-value-name&gt;) ||
  7038       annotation(&lt;feature-value-name&gt;) ]
  7040      <td>normal
  7042      <td>all elements
  7044      <td>yes
  7046      <td>N/A
  7048      <td>visual
  7050     <tr>
  7051      <th><a class=property
  7052       href="#propdef-font-variant-caps">font-variant-caps</a>
  7054      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  7055       | unicase | titling-caps
  7057      <td>normal
  7059      <td>all elements
  7061      <td>yes
  7063      <td>N/A
  7065      <td>visual
  7067     <tr>
  7068      <th><a class=property
  7069       href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  7071      <td>normal | [ &lt;east-asian-variant-values&gt; ||
  7072       &lt;east-asian-width-values&gt; || ruby ]
  7074      <td>normal
  7076      <td>all elements
  7078      <td>yes
  7080      <td>N/A
  7082      <td>visual
  7084     <tr>
  7085      <th><a class=property
  7086       href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  7088      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7089       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7090       &lt;contextual-alt-values&gt; ]
  7092      <td>normal
  7094      <td>all elements
  7096      <td>yes
  7098      <td>N/A
  7100      <td>visual
  7102     <tr>
  7103      <th><a class=property
  7104       href="#propdef-font-variant-numeric">font-variant-numeric</a>
  7106      <td>normal | [ &lt;numeric-figure-values&gt; ||
  7107       &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
  7108       ordinal || slashed-zero ]
  7110      <td>normal
  7112      <td>all elements
  7114      <td>yes
  7116      <td>N/A
  7118      <td>visual
  7120     <tr>
  7121      <th><a class=property
  7122       href="#propdef-font-variant-position">font-variant-position</a>
  7124      <td>normal | sub | super
  7126      <td>normal
  7128      <td>all elements
  7130      <td>yes
  7132      <td>N/A
  7134      <td>visual
  7136     <tr>
  7137      <th><span class=property>font-weight</span>
  7139      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
  7140       | 700 | 800 | 900
  7142      <td>normal
  7144      <td>all elements
  7146      <td>yes
  7148      <td>N/A
  7150      <td>visual
  7151   </table>
  7152   <!--end-properties-->
  7153   <!--begin-descriptors-->
  7155   <table class=proptable>
  7156    <thead>
  7157     <tr>
  7158      <th>Descriptor
  7160      <th>Value
  7162      <th>Initial
  7164      <th>Percentages
  7166      <th>Media
  7168    <tbody>
  7169     <tr>
  7170      <th><span class=property>font-family</span>
  7172      <td>&lt;family-name&gt;
  7174      <td>N/A
  7176     <tr>
  7177      <th><span class=property>font-feature-settings</span>
  7179      <td>normal | &lt;feature-tag-value&gt; #
  7181      <td>normal
  7183     <tr>
  7184      <th><span class=property>font-stretch</span>
  7186      <td>normal | ultra-condensed | extra-condensed | condensed |
  7187       semi-condensed | semi-expanded | expanded | extra-expanded |
  7188       ultra-expanded
  7190      <td>normal
  7192     <tr>
  7193      <th><span class=property>font-style</span>
  7195      <td>normal | italic | oblique
  7197      <td>normal
  7199     <tr>
  7200      <th><span class=property>font-variant</span>
  7202      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7203       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7204       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  7205       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  7206       character-variant(&lt;feature-value-name&gt; #) ||
  7207       swash(&lt;feature-value-name&gt;) ||
  7208       ornaments(&lt;feature-value-name&gt;) ||
  7209       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  7210       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  7211       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  7212       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  7213       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  7214       ruby ]
  7216      <td>normal
  7218     <tr>
  7219      <th><span class=property>font-weight</span>
  7221      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  7223      <td>normal
  7225     <tr>
  7226      <th><a class=property href="#descdef-src">src</a>
  7228      <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
  7230      <td>N/A
  7232     <tr>
  7233      <th><a class=property href="#descdef-unicode-range">unicode-range</a>
  7235      <td>&lt;urange&gt; #
  7237      <td>U+0-10FFFF
  7238   </table>
  7239   <!--end-descriptors-->
  7240   <script type="text/javascript">
  7241 window.onload = function () {
  7242   if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
  7243   var i, hiresElements = document.getElementsByClassName("hires");
  7244   for (i = 0; i < hiresElements.length; i++) {
  7245     var h = hiresElements[i];
  7246     if (h.tagName != "IMG") continue;
  7247     var src = h.getAttribute("src");
  7248     var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
  7249     h.src = src2x;
  7252 </script>
  7253 </html>
  7254 <!-- Keep this comment at the end of the file
  7255 Local variables:
  7256 mode: sgml
  7257 sgml-declaration:"~/SGML/HTML4.decl"
  7258 sgml-default-doctype-name:"html"
  7259 sgml-minimize-attributes:t
  7260 sgml-nofill-elements:("pre" "style" "br")
  7261 sgml-live-element-indicator:t
  7262 sgml-omittag:nil
  7263 sgml-shorttag:nil
  7264 sgml-namecase-general:t
  7265 sgml-general-insert-case:lower
  7266 sgml-always-quote-attributes:t
  7267 sgml-indent-step:nil
  7268 sgml-indent-data:t
  7269 sgml-parent-document:nil
  7270 sgml-exposed-tags:nil
  7271 sgml-local-catalogs:nil
  7272 sgml-local-ecat-files:nil
  7273 End:
  7274 -->
  7275 <!--
  7277 to do:
  7279 - wording of OpenType family name handling
  7280 - handling combining sequences in the font matching algorithm
  7281 - fix-up fi ligature example
  7283 -->

mercurial