css-fonts/Fonts.html

Wed, 26 Feb 2014 13:10:40 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Wed, 26 Feb 2014 13:10:40 +0900
changeset 10069
538559084d14
parent 9209
0fd8e74f0ab3
child 14709
0530ba8002d7
permissions
-rw-r--r--

[css3-fonts] add an example of font descriptor matching

     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-february-2014>Editor's Draft
   119     26 February 2014</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/2014/ED-css-fonts-3-20140226/">http://www.w3.org/TR/2014/ED-css-fonts-3-20140226/</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>Test Suite:
   167     <dd><a
   168      href="http://test.csswg.org/suites/css3-fonts/nightly-unstable/">http://test.csswg.org/suites/css3-fonts/nightly-unstable/</a>
   171     <dt>Editor:
   173     <dd><a href="mailto:jdaggett@mozilla.com">John Daggett (Mozilla)</a>
   174    </dl>
   175    <!--begin-copyright-->
   176    <p class=copyright><a
   177     href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
   178     rel=license>Copyright</a> © 2014 <a href="http://www.w3.org/"><abbr
   179     title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
   180     href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of
   181     Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr
   182     title="European Research Consortium for Informatics and
   183     Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>,
   184     <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C
   185     <a
   186     href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
   187     <a
   188     href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
   189     and <a
   190     href="http://www.w3.org/Consortium/Legal/copyright-documents">document
   191     use</a> rules apply.</p>
   192    <!--end-copyright-->
   193    <hr title="Separator for header">
   194   </div>
   196   <h2 class="no-num no-toc" id=abstract>Abstract</h2>
   198   <p>This CSS3 module describes how font properties are specified and how
   199    font resources are loaded dynamically. The contents of this specification
   200    are a consolidation of content previously divided into <a
   201    href="http://www.w3.org/TR/2002/WD-css3-fonts-20020802/">CSS3 Fonts</a>
   202    and <a href="http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/">CSS3
   203    Web Fonts</a> modules. The description of font load events was moved into
   204    the <a href="http://dev.w3.org/csswg/css-font-load-events/">CSS3 Font Load
   205    Events</a> module.
   207   <h2 class="no-num no-toc" id=status>Status of this document</h2>
   208   <!--begin-status-->
   210   <p>This is a public copy of the editors' draft. It is provided for
   211    discussion only and may change at any moment. Its publication here does
   212    not imply endorsement of its contents by W3C. Don't cite this document
   213    other than as work in progress.
   215   <p>The (<a
   216    href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
   217    mailing list <a
   218    href="mailto:www-style@w3.org?Subject=%5Bcss3-fonts%5D%20PUT%20SUBJECT%20HERE">
   219    www-style@w3.org</a> (see <a
   220    href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
   221    discussion of this specification. When sending e-mail, please put the text
   222    “css3-fonts” in the subject, preferably like this:
   223    “[<!---->css3-fonts<!---->] <em>…summary of comment…</em>”
   225   <p>This document was produced by the <a
   226    href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
   227    the <a href="http://www.w3.org/Style/">Style Activity</a>).
   229   <p>This document was produced by a group operating under the <a
   230    href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
   231    2004 W3C Patent Policy</a>. W3C maintains a <a
   232    href="http://www.w3.org/2004/01/pp-impl/32061/status"
   233    rel=disclosure>public list of any patent disclosures</a> made in
   234    connection with the deliverables of the group; that page also includes
   235    instructions for disclosing a patent. An individual who has actual
   236    knowledge of a patent which the individual believes contains <a
   237    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   238    Claim(s)</a> must disclose the information in accordance with <a
   239    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   240    6 of the W3C Patent Policy</a>.</p>
   241   <!--end-status-->
   243   <p>See the section <a href="#cr-exit-criteria">CR Exit Criteria</a> for
   244    details on advancing this specification to W3C Recommendation. The
   245    specification will remain Candidate Recommendation at least until 3 April
   246    2014. A <a
   247    href="http://test.csswg.org/suites/css3-fonts/nightly-unstable/report/">test
   248    suite and implementation report</a> are under development.
   250   <h3 class="no-num no-toc" id=atrisk>Features at risk</h3>
   252   <p>The following features are at risk; if interoperable implementations are
   253    not found, they may be removed to advance the other features in this
   254    specification to Proposed Recommendation:
   256   <ul>
   257    <li>fallback handling for text decoration in superscript/subscript variant
   258     glyphs (‘<a href="#propdef-font-variant-position"><code
   259     class=property>font-variant-position</code></a>’)
   261    <li>‘<a href="#propdef-font-language-override"><code
   262     class=property>font-language-override</code></a>’ property
   263   </ul>
   265   <h2 class="no-num no-toc" id=contents>Table of contents</h2>
   266   <!--begin-toc-->
   268   <ul class=toc>
   269    <li><a href="#introduction"><span class=secno>1 </span>Introduction</a>
   271    <li><a href="#typography-background"><span class=secno>2 </span>Typography
   272     Background</a>
   274    <li><a href="#basic-font-props"><span class=secno>3 </span>Basic Font
   275     Properties</a>
   276     <ul class=toc>
   277      <li><a href="#font-family-prop"><span class=secno>3.1 </span>Font
   278       family: the font-family property</a>
   279       <ul class=toc>
   280        <li><a href="#generic-font-families"><span class=secno>3.1.1
   281         </span>Generic font families</a>
   282       </ul>
   284      <li><a href="#font-weight-prop"><span class=secno>3.2 </span>Font
   285       weight: the font-weight property</a>
   287      <li><a href="#font-stretch-prop"><span class=secno>3.3 </span>Font
   288       width: the font-stretch property</a>
   290      <li><a href="#font-style-prop"><span class=secno>3.4 </span>Font style:
   291       the font-style property</a>
   293      <li><a href="#font-size-prop"><span class=secno>3.5 </span>Font size:
   294       the font-size property</a>
   296      <li><a href="#font-size-adjust-prop"><span class=secno>3.6
   297       </span>Relative sizing: the font-size-adjust property</a>
   299      <li><a href="#font-prop"><span class=secno>3.7 </span>Shorthand font
   300       property: the font property</a>
   302      <li><a href="#font-synthesis-prop"><span class=secno>3.8
   303       </span>Controlling synthetic faces: the font-synthesis property</a>
   304     </ul>
   306    <li><a href="#font-resources"><span class=secno>4 </span>Font
   307     Resources</a>
   308     <ul class=toc>
   309      <li><a href="#font-face-rule"><span class=secno>4.1 </span>The
   310       <code>@font-face</code> rule</a>
   312      <li><a href="#font-family-desc"><span class=secno>4.2 </span>Font
   313       family: the font-family descriptor</a>
   315      <li><a href="#src-desc"><span class=secno>4.3 </span>Font reference: the
   316       src descriptor</a>
   318      <li><a href="#font-prop-desc"><span class=secno>4.4 </span>Font property
   319       descriptors: the font-style, font-weight, font-stretch descriptors</a>
   321      <li><a href="#unicode-range-desc"><span class=secno>4.5 </span>Character
   322       range: the unicode-range descriptor</a>
   324      <li><a href="#composite-fonts"><span class=secno>4.6 </span>Using
   325       character ranges to define composite fonts</a>
   327      <li><a href="#font-rend-desc"><span class=secno>4.7 </span>Font
   328       features: the font-variant and font-feature-settings descriptors</a>
   330      <li><a href="#font-face-loading"><span class=secno>4.8 </span>Font
   331       loading guidelines</a>
   333      <li><a href="#font-fetching-requirements"><span class=secno>4.9
   334       </span>Font fetching requirements</a>
   335     </ul>
   337    <li><a href="#font-matching-algorithm"><span class=secno>5 </span>Font
   338     Matching Algorithm</a>
   339     <ul class=toc>
   340      <li><a href="#font-family-casing"><span class=secno>5.1 </span>Case
   341       sensitivity of font family names</a>
   343      <li><a href="#font-style-matching"><span class=secno>5.2 </span>Matching
   344       font styles</a>
   346      <li><a href="#cluster-matching"><span class=secno>5.3 </span>Cluster
   347       matching</a>
   349      <li><a href="#char-handling-issues"><span class=secno>5.4
   350       </span>Character handling issues</a>
   352      <li><a href="#font-matching-changes"><span class=secno>5.5 </span>Font
   353       matching changes since CSS 2.1</a>
   355      <li><a href="#font-matching-examples"><span class=secno>5.6 </span>Font
   356       matching examples</a>
   357     </ul>
   359    <li><a href="#font-rend-props"><span class=secno>6 </span>Font Feature
   360     Properties</a>
   361     <ul class=toc>
   362      <li><a href="#glyph-selection-positioning"><span class=secno>6.1
   363       </span>Glyph selection and positioning</a>
   365      <li><a href="#language-specific-support"><span class=secno>6.2
   366       </span>Language-specific display</a>
   368      <li><a href="#font-kerning-prop"><span class=secno>6.3 </span>Kerning:
   369       the font-kerning property</a>
   371      <li><a href="#font-variant-ligatures-prop"><span class=secno>6.4
   372       </span>Ligatures: the font-variant-ligatures property</a>
   374      <li><a href="#font-variant-position-prop"><span class=secno>6.5
   375       </span>Subscript and superscript forms: the font-variant-position
   376       property</a>
   378      <li><a href="#font-variant-caps-prop"><span class=secno>6.6
   379       </span>Capitalization: the font-variant-caps property</a>
   381      <li><a href="#font-variant-numeric-prop"><span class=secno>6.7
   382       </span>Numerical formatting: the font-variant-numeric property</a>
   384      <li><a href="#font-variant-alternates-prop"><span class=secno>6.8
   385       </span>Alternates and swashes: the font-variant-alternates property</a>
   388      <li><a href="#font-feature-values"><span class=secno>6.9 </span>Defining
   389       font specific alternates: the <code>@font-feature-values</code>
   390       rule</a>
   391       <ul class=toc>
   392        <li><a href="#basic-syntax"><span class=secno>6.9.1 </span>Basic
   393         syntax</a>
   395        <li><a href="#multi-valued-feature-value-definitions"><span
   396         class=secno>6.9.2 </span>Multi-valued feature value definitions</a>
   397       </ul>
   399      <li><a href="#font-variant-east-asian-prop"><span class=secno>6.10
   400       </span>East Asian text rendering: the font-variant-east-asian
   401       property</a>
   403      <li><a href="#font-variant-prop"><span class=secno>6.11 </span>Overall
   404       shorthand for font rendering: the font-variant property</a>
   406      <li><a href="#font-feature-settings-prop"><span class=secno>6.12
   407       </span>Low-level font feature settings control: the
   408       font-feature-settings property</a>
   410      <li><a href="#font-language-override-prop"><span class=secno>6.13
   411       </span>Font language override: the font-language-override property</a>
   412     </ul>
   414    <li><a href="#font-feature-resolution"><span class=secno>7 </span>Font
   415     Feature Resolution </a>
   416     <ul class=toc>
   417      <li><a href="#default-features"><span class=secno>7.1 </span>Default
   418       features</a>
   420      <li><a href="#feature-precedence"><span class=secno>7.2 </span>Feature
   421       precedence</a>
   423      <li><a href="#feature-precedence-examples"><span class=secno>7.3
   424       </span>Feature precedence examples</a>
   425     </ul>
   427    <li><a href="#object-model"><span class=secno>8 </span>Object Model</a>
   428     <ul class=toc>
   429      <li><a href="#om-fontface"><span class=secno>8.1 </span>The
   430       <code>CSSFontFaceRule</code> interface</a>
   432      <li><a href="#om-fontfeaturevalues"><span class=secno>8.2 </span>The
   433       <code>CSSFontFeatureValuesRule</code> interface</a>
   434     </ul>
   436    <li class=no-num><a href="#platform-props-to-css">Appendix A: Mapping
   437     platform font properties to CSS properties</a>
   439    <li class=no-num><a href="#ch-ch-ch-changes">Changes</a>
   440     <ul class=toc>
   441      <li class=no-num><a href="#recent-changes"> Changes from the July 2013
   442       CSS3 Fonts Last Call Working Draft</a>
   443     </ul>
   445    <li class=no-num><a href="#acknowledgments">Acknowledgments</a>
   447    <li class=no-num><a href="#conformance"> Conformance</a>
   448     <ul class=toc>
   449      <li class=no-num><a href="#conventions"> Document Conventions</a>
   451      <li class=no-num><a href="#conformance-classes"> Conformance Classes</a>
   454      <li class=no-num><a href="#partial"> Partial Implementations</a>
   456      <li class=no-num><a href="#experimental"> Experimental
   457       Implementations</a>
   459      <li class=no-num><a href="#testing"> Non-Experimental
   460       Implementations</a>
   462      <li class=no-num><a href="#cr-exit-criteria">CR Exit Criteria</a>
   463     </ul>
   465    <li class=no-num><a href="#references">References</a>
   466     <ul class=toc>
   467      <li class=no-num><a href="#normative-references">Normative
   468       References</a>
   470      <li class=no-num><a href="#other-references">Other References</a>
   471     </ul>
   473    <li class=no-num><a href="#index">Index</a>
   475    <li class=no-num><a href="#property-index">Property index</a>
   476   </ul>
   477   <!--end-toc-->
   479   <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
   481   <p>A font provides a resource containing the visual representation of
   482    characters. At the simplest level it contains information that maps
   483    character codes to shapes (called glyphs) that represent these characters.
   484    Fonts sharing a common design style are commonly grouped into font
   485    families classified by a set of standard font properties. Within a family,
   486    the shape displayed for a given character can vary by stroke weight, slant
   487    or relative width, among others. An individual font face is described by a
   488    unique combination of these properties. For a given range of text, CSS
   489    font properties are used to select a font family and a specific font face
   490    within that family to be used when rendering that text. As a simple
   491    example, to use the bold form of Helvetica one could use:
   493   <pre>body {
   494     font-family: Helvetica;
   495     font-weight: bold;
   496 }</pre>
   498   <p>Font resources may be installed locally on the system on which a user
   499    agent is running or downloadable. For local font resources descriptive
   500    information can be obtained directly from the font resource. For
   501    downloadable font resources (sometimes referred to as web fonts), the
   502    descriptive information is included with the reference to the font
   503    resource.
   505   <p>Families of fonts typically don't contain a single face for each
   506    possible variation of font properties. The CSS font selection mechanism
   507    describes how to match a given set of CSS font properties to a single font
   508    face.
   510   <h2 id=typography-background><span class=secno>2 </span>Typography
   511    Background</h2>
   513   <p><em>This section is non-normative.</em>
   515   <p> Typographic traditions vary across the globe, so there is no unique way
   516    to classify all fonts across languages and cultures. For even common Latin
   517    letters, wide variations are possible:
   519   <div class=figure><img alt="variations in glyphs for a single character"
   520    src=aaaaaa.png>
   521    <p class=caption>One character, many glyph variations
   522   </div>
   524   <p>Differences in the anatomy of letterforms is one way to distinguish
   525    fonts. For Latin fonts, flourishes at the ends of a character's main
   526    strokes, or serifs, can distinguish a font from those without. Similar
   527    comparisons exist in non-Latin fonts between fonts with tapered strokes
   528    and those using primarily uniform strokes:
   530   <div class=figure><img alt="serif vs. non-serifs" src=serifvssansserif.png>
   531    <p class=caption>Letterforms with and without serifs
   532   </div>
   534   <div class=figure><img alt="serif vs. non-serifs for japanese"
   535    src=minchovsgothic.png>
   536    <p class=caption>Similar groupings for Japanese typefaces
   537   </div>
   539   <p>Fonts contain letterforms and the data needed to map characters to these
   540    letterforms. Often this may be a simple one-to-one mapping, but more
   541    complex mappings are also possible. The use of combining diacritic marks
   542    creates many variations for an underlying letterform:
   544   <div class=figure><img alt="diacritic marks" src=aaaaaa-diacritics.png>
   545    <p class=caption>Variations with diacritic marks
   546   </div>
   548   <p>A sequence of characters can be represented by a single glyph known as a
   549    ligature:
   551   <div class=figure><img alt="example of a fi ligature"
   552    src=final-ligature.png>
   553    <p class=caption>Ligature example
   554   </div>
   556   <p>Visual transformations based on textual context are often stylistic
   557    option in European languages. They are required to correctly render
   558    languages like Arabic, the lam and alef characters below <em>must</em> be
   559    combined when they exist in sequence:
   561   <div class=figure><img alt="lam alef ligature" src=lamaleflig.png>
   562    <p class=caption>Required Arabic ligature
   563   </div>
   565   <p>The relative complexity of these shaping transformations requires
   566    additional data within the font.
   568   <p>Sets of font faces with various stylistic variations are often grouped
   569    together into font families. In the simplest case a regular face is
   570    supplemented with bold and italic faces, but much more extensive groupings
   571    are possible. Variations in the thickness of letterform strokes, the <dfn
   572    id=weight>weight</dfn>, and the overall proportions of the letterform, the
   573    <dfn id=width>width</dfn>, are most common. In the example below, each
   574    letter uses a different font face within the Univers font family. The
   575    width used increases from top to bottom and the weight increases from left
   576    to right:
   578   <div class=figure><img alt="various width and weight variations within a
   579    single family" src=weightwidthvariations.png>
   580    <p class=caption>Weight and width variations within a single font family
   581   </div>
   583   <p>Creating fonts that support multiple scripts is a difficult task;
   584    designers need to understand the cultural traditions surrounding the use
   585    of type in different scripts and come up with letterforms that somehow
   586    share a common theme. Many languages often share a common script and each
   587    of these languages may have noticeable stylistic differences. For example,
   588    the Arabic script, when used for Persian and Urdu, exhibits significant
   589    and systematic differences in letterforms, as does Cyrillic when used with
   590    languages such as Serbian and Russian.
   592   <p>The <a href="#character-map"><em>character map</em></a> of a font
   593    defines the mapping of characters to glyphs for that font. If a document
   594    contains characters not supported by the <a href="#character-map"><em
   595    title="character map">character maps</em></a> of the fonts contained in a
   596    font family list, a user agent may use a <a
   597    href="#system-font-fallback"><em>system font fallback</em></a> procedure
   598    to locate an appropriate font that does. If no appropriate font can be
   599    found, some form of "missing glyph" character will be rendered by the user
   600    agent. System fallback can occur when the specified list of font families
   601    does not include a font that supports a given character.
   603   <p>Although the <a href="#character-map"><em>character map</em></a> of a
   604    font maps a given character to a glyph for that character, modern font
   605    technologies such as OpenType and AAT (Apple Advanced Typography) provide
   606    ways of mapping a character to different glyphs based upon feature
   607    settings. Fonts in these formats allow these features to be embedded in
   608    the font itself and controlled by applications. Common typographic
   609    features which can be specified this way include ligatures, swashes,
   610    contextual alternates, proportional and tabular figures, and automatic
   611    fractions, to list just a few. For a visual overview of OpenType features,
   612    see the <a href="#OPENTYPE-FONT-GUIDE"
   613    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
   615   <h2 id=basic-font-props><span class=secno>3 </span>Basic Font Properties</h2>
   617   <p>The particular font face used to render a character is determined by the
   618    font family and other font properties that apply to a given element. This
   619    structure allows settings to be varied independent of each other.</p>
   620   <!-- prop: font-family -->
   622   <h3 id=font-family-prop><span class=secno>3.1 </span>Font family: the <a
   623    href="#propdef-font-family">font-family</a> property</h3>
   625   <table class=propdef id=namefont-familyvalue-ltfamily-namegt-ltg>
   626    <tbody>
   627     <tr>
   628      <td>Name:
   630      <td><dfn id=propdef-font-family
   631       title="font-family!!property">font-family</dfn>
   633     <tr>
   634      <td>Value:
   636      <td>[ <a href="#family-name-value"><var>&lt;family-name&gt;</var></a> |
   637       <a href="#generic-family-value"><var>&lt;generic-family&gt;</var></a> ]
   638       #
   640     <tr>
   641      <td>Initial:
   643      <td>depends on user agent
   645     <tr>
   646      <td>Applies to:
   648      <td>all elements
   650     <tr>
   651      <td>Inherited:
   653      <td>yes
   655     <tr>
   656      <td>Percentages:
   658      <td>N/A
   660     <tr>
   661      <td>Media:
   663      <td>visual
   665     <tr>
   666      <td>Computed value:
   668      <td>as specified
   670     <tr>
   671      <td>Animatable:
   673      <td>no
   674   </table>
   676   <p>This property specifies a prioritized list of font family names or
   677    generic family names. A font family defines a set of faces that vary in
   678    weight, width or slope. CSS uses the combination of a family name with
   679    other style attributes to select an individual face. Using this selection
   680    mechanism, rather than selecting a face via the style name as is often
   681    done in design applications, allows some degree of regularity in textual
   682    display when fallback occurs.
   684   <p class=note>Designers should note that the CSS definition of font
   685    attributes used for selection are explicitly not intended to define a font
   686    taxonomy. A type designer's idea of a family may often extend to a set of
   687    faces that vary along axes other than just the standard axes of weight,
   688    width and slope. A family may extend to include both a set of serif faces
   689    and a set of sans-serif faces or vary along axes that are unique to that
   690    family. The CSS font selection mechanism merely provides a way to
   691    determine the “closest” substitute when substitution is necessary.
   693   <p>Unlike other CSS properties, component values are a comma-separated list
   694    indicating alternatives. A user agent iterates through the list of family
   695    names until it matches an available font that contains a glyph for the
   696    character to be rendered. This allows for differences in available fonts
   697    across platforms and for differences in the range of characters supported
   698    by individual fonts.
   700   <p>A font family name only specifies a name given to a set of font faces,
   701    it does not specify an individual face. For example, given the
   702    availability of the fonts below, Futura would match but Futura Medium
   703    would not:
   705   <div class=figure><img alt="family and face names"
   706    src=familyvsfacename.png>
   707    <p class=caption>Family and individual face names
   708   </div>
   710   <p>Consider the example below:
   712   <div class=example>
   713    <pre>body {
   714     font-family: Helvetica, Verdana, sans-serif;
   715 }</pre>
   717    <p>If Helvetica is available it will be used when rendering. If neither
   718     Helvetica nor Verdana is present, then the user-agent-defined sans serif
   719     font will be used.</p>
   720   </div>
   722   <p>There are two types of font family names:
   724   <dl>
   725    <dt><dfn id=family-name-value><var>&lt;family-name&gt;</var></dfn>
   727    <dd>The name of a font family of choice such as Helvetica or Verdana in
   728     the previous example.
   730    <dt><dfn id=generic-family-value><var>&lt;generic-family&gt;</var></dfn>
   732    <dd> The following generic family keywords are defined: ‘<a
   733     href="#serif"><code class=property>serif</code></a>’, ‘<a
   734     href="#sans-serif"><code class=property>sans-serif</code></a>’, ‘<a
   735     href="#cursive"><code class=property>cursive</code></a>’, ‘<a
   736     href="#fantasy"><code class=property>fantasy</code></a>’, and ‘<a
   737     href="#monospace"><code class=property>monospace</code></a>’. These
   738     keywords can be used as a general fallback mechanism when an author's
   739     desired font choices are not available. As keywords, they must not be
   740     quoted. Authors are encouraged to append a generic font family as a last
   741     alternative for improved robustness.
   742   </dl>
   744   <p>Font family names other than generic families must either be given
   745    quoted as <a
   746    href="http://www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or
   747    unquoted as a sequence of one or more <a
   748    href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
   749    This means most punctuation characters and digits at the start of each
   750    token must be escaped in unquoted font family names.
   752   <p>To illustrate this, the following declarations are invalid:
   754   <pre>
   755 font-family: Red/Black, sans-serif;
   756 font-family: "Lucida" Grande, sans-serif;
   757 font-family: Ahem!, sans-serif;
   758 font-family: test@foo, sans-serif;
   759 font-family: #POUND, sans-serif;
   760 font-family: Hawaii 5-0, sans-serif;
   761 </pre>
   763   <p>If a sequence of identifiers is given as a font family name, the
   764    computed value is the name converted to a string by joining all the
   765    identifiers in the sequence by single spaces.
   767   <p>To avoid mistakes in escaping, it is recommended to quote font family
   768    names that contain white space, digits, or punctuation characters other
   769    than hyphens:
   771   <pre>
   772 body { font-family: "New Century Schoolbook", serif }
   774 &lt;BODY STYLE="font-family: '21st Century', fantasy">
   775 </pre>
   777   <p>Font family <em>names</em> that happen to be the same as a keyword value
   778    (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
   779    class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
   780    class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
   781    class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
   782    class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
   783    class=property>cursive</code></a>’) must be quoted to prevent confusion
   784    with the keywords with the same names. The keywords ‘<code
   785    class=property>initial</code>’ and ‘<code
   786    class=property>default</code>’ are reserved for future use and must also
   787    be quoted when used as font names. UAs must not consider these keywords as
   788    matching the <a
   789    href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
   791   <p>The precise way a set of fonts are grouped into font families varies
   792    depending upon the platform font management API's. The Windows GDI API
   793    only allows four faces to be grouped into a family while the DirectWrite
   794    API and API's on OSX and other platforms support font families with a
   795    variety of weights, widths and slopes (see <a
   796    href="#platform-props-to-css">Appendix A</a> for more details).
   798   <p>Some font formats allow fonts to carry multiple localizations of the
   799    family name. User agents must recognize and correctly match all of these
   800    names independent of the underlying platform localization, system API used
   801    or document encoding:
   803   <div class=figure><img alt="examples of localized family names"
   804    src=localizedfamilynames.png>
   805    <p class=caption>Localized family names
   806   </div>
   808   <p>The details of localized font family name matching and the corresponding
   809    issues of case sensitivity are described below in the <a
   810    href="#font-family-casing">font matching</a> section.
   812   <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
   813    families</h4>
   815   <p>All five generic font families are defined to exist in all CSS
   816    implementations (they need not necessarily map to five distinct actual
   817    fonts). User agents should provide reasonable default choices for the
   818    generic font families, which express the characteristics of each family as
   819    well as possible within the limits allowed by the underlying technology.
   820    User agents are encouraged to allow users to select alternative choices
   821    for the generic fonts.
   823   <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
   824    definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
   826   <p>Serif fonts represent the formal text style for a script. This often
   827    means but is not limited to glyphs that have finishing strokes, flared or
   828    tapering ends, or have actual serifed endings (including slab serifs).
   829    Serif fonts are typically proportionately-spaced. They often display a
   830    greater variation between thick and thin strokes than fonts from the ‘<a
   831    href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
   832    font family. CSS uses the term ‘<a href="#serif"><code
   833    class=property>serif</code></a>’ to apply to a font for any script,
   834    although other names may be more familiar for particular scripts, such as
   835    Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
   836    Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
   837    class=property>serif</code></a>’ more due to its typographic role rather
   838    than its actual design style. Any font that is so described may be used to
   839    represent the generic ‘<a href="#serif"><code
   840    class=property>serif</code></a>’ family.
   842   <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
   843    <p class=caption>Sample serif fonts
   844   </div>
   846   <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
   847    title="sans-serif, definition of"> <a name=sans-serif-def><dfn
   848    id=sans-serif>sans-serif</dfn></a></span></h5>
   850   <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
   851    low contrast (vertical and horizontal stems have the close to the same
   852    thickness) and have stroke endings that are plain -- without any flaring,
   853    cross stroke, or other ornamentation. Sans-serif fonts are typically
   854    proportionately-spaced. They often have little variation between thick and
   855    thin strokes, compared to fonts from the ‘<a href="#serif"><code
   856    class=property>serif</code></a>’ family. CSS uses the term ‘<a
   857    href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
   858    to a font for any script, although other names may be more familiar for
   859    particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
   860    (Korean). Any font that is so described may be used to represent the
   861    generic ‘<a href="#sans-serif"><code
   862    class=property>sans-serif</code></a>’ family.
   864   <div class=figure><img alt="sample sans-serif fonts"
   865    src=sansserifexamples.png>
   866    <p class=caption>Sample sans-serif fonts
   867   </div>
   869   <h5 class="no-num no-toc"> <span class=index-def id=cursive0
   870    title="cursive, definition of"> <a name=cursive-def><dfn
   871    id=cursive>cursive</dfn></a></span></h5>
   873   <p>Glyphs in cursive fonts generally use a more informal script style, and
   874    the result looks more like handwritten pen or brush writing than printed
   875    letterwork. CSS uses the term ‘<a href="#cursive"><code
   876    class=property>cursive</code></a>’ to apply to a font for any script,
   877    although other names such as Chancery, Brush, Swing and Script are also
   878    used in font names.
   880   <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
   881    <p class=caption>Sample cursive fonts
   882   </div>
   884   <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
   885    title="fantasy, definition of"> <a name=fantasy-def><dfn
   886    id=fantasy>fantasy</dfn></a></span></h5>
   888   <p>Fantasy fonts are primarily decorative or expressive fonts that contain
   889    decorative or expressive representations of characters. These do not
   890    include Pi or Picture fonts which do not represent actual characters.
   892   <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
   893    <p class=caption>Sample fantasy fonts
   894   </div>
   896   <h5 class="no-num no-toc"> <span class=index-def id=monospace0
   897    title="monospace, definition of"> <a name=monospace-def><dfn
   898    id=monospace>monospace</dfn></a></span></h5>
   900   <p>The sole criterion of a monospace font is that all glyphs have the same
   901    fixed width. This is often used to render samples of computer code.
   903   <div class=figure><img alt="sample monospace fonts"
   904    src=monospaceexamples.png>
   905    <p class=caption>Sample monospace fonts
   906   </div>
   907   <!-- prop: font-weight -->
   909   <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
   910    href="#propdef-font-weight">font-weight</a> property</h3>
   912   <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
   913    <tbody>
   914     <tr>
   915      <td>Name:
   917      <td><dfn id=propdef-font-weight
   918       title="font-weight!!property">font-weight</dfn>
   920     <tr>
   921      <td>Value:
   923      <td><a href="#font-weight-normal-value"
   924       title="normal!!font-weight">normal</a> | <a href="#bold">bold</a> | <a
   925       href="#bolder">bolder</a> | <a href="#lighter">lighter</a> | <a
   926       href="#font-weight-numeric-values" title="100...900 weight
   927       values">100</a> | <a href="#font-weight-numeric-values"
   928       title="100...900 weight values">200</a> | <a
   929       href="#font-weight-numeric-values" title="100...900 weight
   930       values">300</a> | <a href="#font-weight-numeric-values"
   931       title="100...900 weight values">400</a> | <a
   932       href="#font-weight-numeric-values" title="100...900 weight
   933       values">500</a> | <a href="#font-weight-numeric-values"
   934       title="100...900 weight values">600</a> | <a
   935       href="#font-weight-numeric-values" title="100...900 weight
   936       values">700</a> | <a href="#font-weight-numeric-values"
   937       title="100...900 weight values">800</a> | <a
   938       href="#font-weight-numeric-values" title="100...900 weight
   939       values">900</a>
   941     <tr>
   942      <td>Initial:
   944      <td>normal
   946     <tr>
   947      <td>Applies to:
   949      <td>all elements
   951     <tr>
   952      <td>Inherited:
   954      <td>yes
   956     <tr>
   957      <td>Percentages:
   959      <td>N/A
   961     <tr>
   962      <td>Media:
   964      <td>visual
   966     <tr>
   967      <td>Computed value:
   969      <td>numeric weight value (see description)
   971     <tr>
   972      <td>Animatable:
   974      <td>as <a
   975       href="http://dev.w3.org/csswg/css-transitions/#animtype-font-weight">font
   976       weight</a>
   977   </table>
   979   <p>The <a href="#propdef-font-weight"
   980    title="font-weight!!property">‘<code
   981    class=property>font-weight</code>’</a> property specifies the weight of
   982    glyphs in the font, their degree of blackness or stroke thickness.
   984   <p>Values have the following meanings:
   986   <dl>
   987    <dt><dfn id=font-weight-numeric-values title="100...900 weight values">100
   988     to 900</dfn>
   990    <dd>These values form an ordered sequence, where each number indicates a
   991     weight that is at least as dark as its predecessor. These roughly
   992     correspond to the commonly used weight names below:
   993   </dl>
   995   <ul>
   996    <li>100 - Thin
   998    <li>200 - Extra Light (Ultra Light)
  1000    <li>300 - Light
  1002    <li>400 - Normal
  1004    <li>500 - Medium
  1006    <li>600 - Semi Bold (Demi Bold)
  1008    <li>700 - Bold
  1010    <li>800 - Extra Bold (Ultra Bold)
  1012    <li>900 - Black (Heavy)
  1013   </ul>
  1015   <dl>
  1016    <dt><dfn id=font-weight-normal-value
  1017     title="normal!!font-weight">normal</dfn>
  1019    <dd>Same as ‘<code class=css>400</code>’.
  1021    <dt><dfn id=bold>bold</dfn>
  1023    <dd>Same as ‘<code class=css>700</code>’.
  1025    <dt><dfn id=bolder>bolder</dfn>
  1027    <dd>Specifies a bolder weight than the inherited value.
  1029    <dt><dfn id=lighter>lighter</dfn>
  1031    <dd>Specifies a lighter weight than the inherited value.
  1032   </dl>
  1034   <p>Font formats that use a scale other than a nine-step scale should map
  1035    their scale onto the CSS scale so that 400 roughly corresponds with a face
  1036    that would be labeled as Regular, Book, Roman and 700 roughly matches a
  1037    face that would be labeled as Bold. Or weights may be inferred from the
  1038    style names, ones that correspond roughly with the scale above. The scale
  1039    is relative, so a face with a larger weight value must never appear
  1040    lighter. If style names are used to infer weights, care should be taken to
  1041    handle variations in style names across locales.
  1043   <p>Quite often there are only a few weights available for a particular font
  1044    family. When a weight is specified for which no face exists, a face with a
  1045    nearby weight is used. In general, bold weights map to faces with heavier
  1046    weights and light weights map to faces with lighter weights (see the <a
  1047    href="#font-matching-algorithm">font matching section below</a> for a
  1048    precise definition). The examples here illustrate which face is used for
  1049    different weights, grey indicates a face for that weight does not exist so
  1050    a face with a nearby weight is used:
  1052   <div class=figure><img alt="weight mappings for a family with 400, 700 and
  1053    900 weights" src=optimaweights.png>
  1054    <p class=caption>Weight mappings for a font family with 400, 700 and 900
  1055     weight faces
  1056   </div>
  1058   <div class=figure><img alt="weight mappings for a family with 300, 600
  1059    weights" src=hiraginoweights.png>
  1060    <p class=caption>Weight mappings for a font family with 300 and 600 weight
  1061     faces
  1062   </div>
  1064   <p>Although the practice is not well-loved by typographers, bold faces are
  1065    often synthesized by user agents for faces that lack actual bold faces.
  1066    For the purposes of style matching, these faces must be treated as if they
  1067    exist within the family. Authors can explicitly avoid this behavior by
  1068    using the ‘<a href="#propdef-font-synthesis"><code
  1069    class=property>font-synthesis</code></a>’ property.
  1071   <p>Specified values of ‘<a href="#bolder"><code
  1072    class=property>bolder</code></a>’ and ‘<a href="#lighter"><code
  1073    class=property>lighter</code></a>’ indicate weights relative to the
  1074    weight of the parent element. The computed weight is calculated based on
  1075    the inherited <a href="#propdef-font-weight"
  1076    title="font-weight!!property">‘<code
  1077    class=property>font-weight</code>’</a> value using the chart below.
  1079   <table class=data id=bolderlighter summary="Bolder/lighter mappings">
  1080    <thead>
  1081     <tr>
  1082      <th>Inherited value
  1084      <th>bolder
  1086      <th>lighter
  1088    <tbody>
  1089     <tr>
  1090      <th>100
  1092      <td>400
  1094      <td>100
  1096     <tr>
  1097      <th>200
  1099      <td>400
  1101      <td>100
  1103     <tr>
  1104      <th>300
  1106      <td>400
  1108      <td>100
  1110     <tr>
  1111      <th>400
  1113      <td>700
  1115      <td>100
  1117     <tr>
  1118      <th>500
  1120      <td>700
  1122      <td>100
  1124     <tr>
  1125      <th>600
  1127      <td>900
  1129      <td>400
  1131     <tr>
  1132      <th>700
  1134      <td>900
  1136      <td>400
  1138     <tr>
  1139      <th>800
  1141      <td>900
  1143      <td>700
  1145     <tr>
  1146      <th>900
  1148      <td>900
  1150      <td>700
  1151   </table>
  1153   <p>The table above is equivalent to selecting the next relative bolder or
  1154    lighter face, given a font family containing normal and bold faces along
  1155    with a thin and a heavy face. Authors who desire finer control over the
  1156    exact weight values used for a given element may use numerical values
  1157    instead of relative weights.</p>
  1158   <!-- prop: font-stretch -->
  1160   <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
  1161    href="#propdef-font-stretch">font-stretch</a> property</h3>
  1163   <table class=propdef id=namefont-stretchvalue-normal-ultra-conde>
  1164    <tbody>
  1165     <tr>
  1166      <td>Name:
  1168      <td><dfn id=propdef-font-stretch
  1169       title="font-stretch!!property">font-stretch</dfn>
  1171     <tr>
  1172      <td>Value:
  1174      <td> <a href="#font-stretch-normal-value"
  1175       title="normal!!font-stretch">normal</a> | <a
  1176       href="#ultra-condensed">ultra-condensed</a> | <a
  1177       href="#extra-condensed">extra-condensed</a> | <a
  1178       href="#condensed">condensed</a> | <a
  1179       href="#semi-condensed-">semi-condensed</a> | <a
  1180       href="#semi-expanded">semi-expanded</a> | <a
  1181       href="#expanded">expanded</a> | <a
  1182       href="#extra-expanded">extra-expanded</a> | <a
  1183       href="#ultra-expanded">ultra-expanded</a>
  1185     <tr>
  1186      <td>Initial:
  1188      <td>normal
  1190     <tr>
  1191      <td>Applies to:
  1193      <td>all elements
  1195     <tr>
  1196      <td>Inherited:
  1198      <td>yes
  1200     <tr>
  1201      <td>Percentages:
  1203      <td>N/A
  1205     <tr>
  1206      <td>Media:
  1208      <td>visual
  1210     <tr>
  1211      <td>Computed value:
  1213      <td>as specified
  1215     <tr>
  1216      <td>Animatable:
  1218      <td>as <a href="#font-stretch-animation">font stretch</a>
  1219   </table>
  1221   <p>The <a href="#propdef-font-stretch"
  1222    title="font-stretch!!property">‘<code
  1223    class=property>font-stretch</code>’</a> property selects a normal,
  1224    condensed, or expanded face from a font family. Absolute keyword values
  1225    have the following ordering, from narrowest to widest:
  1227   <ul>
  1228    <li><dfn id=ultra-condensed>ultra-condensed</dfn>
  1230    <li><dfn id=extra-condensed>extra-condensed</dfn>
  1232    <li><dfn id=condensed>condensed</dfn>
  1234    <li><dfn id=semi-condensed->semi-condensed </dfn>
  1236    <li><dfn id=font-stretch-normal-value
  1237     title="normal!!font-stretch">normal</dfn>
  1239    <li><dfn id=semi-expanded>semi-expanded</dfn>
  1241    <li><dfn id=expanded>expanded</dfn>
  1243    <li><dfn id=extra-expanded>extra-expanded</dfn>
  1245    <li><dfn id=ultra-expanded>ultra-expanded</dfn>
  1246   </ul>
  1248   <p>When a face does not exist for a given width, normal or condensed values
  1249    map to a narrower face, otherwise a wider face. Conversely, expanded
  1250    values map to a wider face, otherwise a narrower face. The figure below
  1251    shows how the nine font-stretch property settings affect font selection
  1252    for font family containing a variety of widths, grey indicates a width for
  1253    which no face exists and a different width is substituted:
  1255   <div class=figure><img alt="width mappings for a family with condensed,
  1256    normal and expanded faces" src=universwidths.png>
  1257    <p class=caption>Width mappings for a font family with condensed, normal
  1258     and expanded width faces
  1259   </div>
  1261   <p id=font-stretch-animation>Animation of font stretch: Font stretch is
  1262    interpolated in discrete steps. The interpolation happens as though the
  1263    ordered values are equally spaced real numbers. The interpolation result
  1264    is rounded to the nearest value, with values exactly halfway between two
  1265    values rounded towards the later value in the list above.</p>
  1266   <!-- prop: font-style -->
  1268   <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
  1269    href="#propdef-font-style">font-style</a> property</h3>
  1271   <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
  1272    <tbody>
  1273     <tr>
  1274      <td>Name:
  1276      <td><dfn id=propdef-font-style
  1277       title="font-style!!property">font-style</dfn>
  1279     <tr>
  1280      <td>Value:
  1282      <td><a href="#font-style-normal-value"
  1283       title="normal!!font-style">normal</a> | <a href="#italic">italic</a> |
  1284       <a href="#oblique">oblique</a>
  1286     <tr>
  1287      <td>Initial:
  1289      <td>normal
  1291     <tr>
  1292      <td>Applies to:
  1294      <td>all elements
  1296     <tr>
  1297      <td>Inherited:
  1299      <td>yes
  1301     <tr>
  1302      <td>Percentages:
  1304      <td>N/A
  1306     <tr>
  1307      <td>Media:
  1309      <td>visual
  1311     <tr>
  1312      <td>Computed value:
  1314      <td>as specified
  1316     <tr>
  1317      <td>Animatable:
  1319      <td>no
  1320   </table>
  1322   <p>The <a href="#propdef-font-style" title="font-style!!property">‘<code
  1323    class=property>font-style</code>’</a> property allows italic or oblique
  1324    faces to be selected. Italic forms are generally cursive in nature while
  1325    oblique faces are typically sloped versions of the regular face. Oblique
  1326    faces can be simulated by artificially sloping the glyphs of the regular
  1327    face. Compare the artificially sloped renderings of Palatino ‘<code
  1328    class=property>a</code>’ and Baskerville ‘<code
  1329    class=property>N</code>’ in grey with the actual italic versions:
  1331   <div class=figure><img alt="artificial sloping vs. real italics"
  1332    src=realvsfakeitalics.png>
  1333    <p class=caption>Artificial sloping versus real italics
  1334   </div>
  1336   <p>Values have the following meanings:
  1338   <dl>
  1339    <dt><dfn id=font-style-normal-value
  1340     title="normal!!font-style">normal</dfn>
  1342    <dd>selects a face that is classified as a normal face, one that is
  1343     neither italic or obliqued
  1345    <dt><dfn id=italic>italic</dfn>
  1347    <dd>selects a font that is labeled as an italic face, or an oblique face
  1348     if one is not
  1350    <dt><dfn id=oblique>oblique</dfn>
  1352    <dd>selects a font that is labeled as an oblique face, or an italic face
  1353     if one is not
  1354   </dl>
  1356   <p>If no italic or oblique face is available, oblique faces can be
  1357    synthesized by rendering non-obliqued faces with an artificial obliquing
  1358    operation. The use of these artificially obliqued faces can be disabled
  1359    using the ‘<a href="#propdef-font-synthesis"><code
  1360    class=property>font-synthesis</code></a>’ property. The details of the
  1361    obliquing operation are not explicitly defined.
  1363   <p class=note>Authors should also be aware that synthesized approaches may
  1364    not be suitable for scripts like Cyrillic, where italic forms are very
  1365    different in shape. It is always better to use an actual italic font
  1366    rather than rely on a synthetic version.</p>
  1367   <!-- resolution on the "undefined" nature of synthetics: http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
  1369   <p>Many scripts lack the tradition of mixing a cursive form within text
  1370    rendered with a normal face. Chinese, Japanese and Korean fonts almost
  1371    always lack italic or oblique faces. Fonts that support a mixture of
  1372    scripts will sometimes omit specific scripts such as Arabic from the set
  1373    of glyphs supported in the italic face. User agents should be careful
  1374    about making <a href="#character-map"><em>character map</em></a>
  1375    assumptions across faces when implementing support for <a
  1376    href="#system-font-fallback"><em>system font fallback</em></a>.</p>
  1377   <!-- prop: font-size -->
  1379   <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
  1380    href="#propdef-font-size">font-size</a> property</h3>
  1382   <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
  1383    <tbody>
  1384     <tr>
  1385      <td>Name:
  1387      <td><dfn id=propdef-font-size>font-size</dfn>
  1389     <tr>
  1390      <td>Value:
  1392      <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
  1393       | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
  1394       <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
  1395       href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
  1397     <tr>
  1398      <td>Initial:
  1400      <td>medium
  1402     <tr>
  1403      <td>Applies to:
  1405      <td>all elements
  1407     <tr>
  1408      <td>Inherited:
  1410      <td>yes
  1412     <tr>
  1413      <td>Percentages:
  1415      <td>refer to parent element's font size
  1417     <tr>
  1418      <td>Media:
  1420      <td>visual
  1422     <tr>
  1423      <td>Computed value:
  1425      <td>absolute length
  1427     <tr>
  1428      <td>Animatable:
  1430      <td>as <a
  1431       href="http://dev.w3.org/csswg/css-transitions/#animtype-length">length</a>
  1432   </table>
  1434   <p>This property indicates the desired height of glyphs from the font. For
  1435    scalable fonts, the font-size is a scale factor applied to the EM unit of
  1436    the font. (Note that certain glyphs may bleed outside their EM box.) For
  1437    non-scalable fonts, the font-size is converted into absolute units and
  1438    matched against the declared font-size of the font, using the same
  1439    absolute coordinate space for both of the matched values. Values have the
  1440    following meanings:
  1442   <dl>
  1443    <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
  1445    <dd> An <a
  1446     href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
  1447     refers to an entry in a table of font sizes computed and kept by the user
  1448     agent. Possible values are:
  1449     <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
  1451    <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
  1453    <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
  1454     keyword is interpreted relative to the table of font sizes and the
  1455     computed ‘<a href="#propdef-font-size"><code
  1456     class=property>font-size</code></a>’ of the parent element. Possible
  1457     values are:
  1458     <p> [ larger | smaller ]
  1460     <p> For example, if the parent element has a font size of ‘<code
  1461      class=property>medium</code>’, a value of ‘<code
  1462      class=property>larger</code>’ will make the font size of the current
  1463      element be ‘<code class=property>large</code>’. If the parent
  1464      element's size is not close to a table entry, the user agent is free to
  1465      interpolate between table entries or round off to the closest one. The
  1466      user agent may have to extrapolate table values if the numerical value
  1467      goes beyond the keywords.
  1469    <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
  1471    <dd>A length value specifies an absolute font size (independent of the
  1472     user agent's font table). Negative lengths are illegal.
  1474    <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
  1476    <dd>A percentage value specifies an absolute font size relative to the
  1477     parent element's font size. Use of percentage values, or values in
  1478     ‘<code class=property>em</code>’s, leads to more robust and
  1479     cascadable style sheets.
  1480   </dl>
  1482   <p>The following table provides user agent guidelines for the absolute-size
  1483    scaling factor and their mapping to HTML heading and absolute font-sizes.
  1484    The ‘<code class=property>medium</code>’ value is used as the
  1485    reference middle value. The user agent may fine-tune these values for
  1486    different fonts or different types of display devices.
  1488   <table class=data>
  1489    <thead>
  1490     <tr>
  1491      <th>CSS absolute-size values
  1493      <th>xx-small
  1495      <th>x-small
  1497      <th>small
  1499      <th>medium
  1501      <th>large
  1503      <th>x-large
  1505      <th>xx-large
  1507      <th> 
  1509    <tbody>
  1510     <tr>
  1511      <th>scaling factor
  1513      <td>3/5
  1515      <td>3/4
  1517      <td>8/9
  1519      <td>1
  1521      <td>6/5
  1523      <td>3/2
  1525      <td>2/1
  1527      <td>3/1
  1529     <tr>
  1530      <th>HTML headings
  1532      <td>h6
  1534      <td> 
  1536      <td>h5
  1538      <td>h4
  1540      <td>h3
  1542      <td>h2
  1544      <td>h1
  1546      <td> 
  1548     <tr>
  1549      <th>HTML font sizes
  1551      <td>1
  1553      <td> 
  1555      <td>2
  1557      <td>3
  1559      <td>4
  1561      <td>5
  1563      <td>6
  1565      <td>7
  1566   </table>
  1568   <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
  1569    applying these guidelines should nevertheless avoid creating font-size
  1570    resulting in less than 9 device pixels per EM unit on a computer
  1571    display.</em>
  1573   <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
  1574    factor between adjacent indexes was 1.5 which user experience proved to be
  1575    too large. In CSS2, the suggested scaling factor for computer screen
  1576    between adjacent indexes was 1.2 which still created issues for the small
  1577    sizes. The new scaling factor varies between each index to provide a
  1578    better readability.</em>
  1580   <p>The actual value of this property may differ from the computed value due
  1581    a numerical value on ‘<a href="#propdef-font-size-adjust"><code
  1582    class=property>font-size-adjust</code></a>’ and the unavailability of
  1583    certain font sizes.
  1585   <p>Child elements inherit the computed <a class=noxref
  1586    href="#font-size-prop"> <span class=property>‘<code
  1587    class=property>font-size</code>’</span></a> value (otherwise, the effect
  1588    of <a class=noxref href="#font-size-adjust-prop"><span
  1589    class=property>‘<code
  1590    class=property>font-size-adjust</code>’</span></a> would compound).
  1592   <div class=example>
  1593    <p style="display:none">Example(s):</p>
  1595    <pre>p { font-size: 12pt; }
  1596 blockquote { font-size: larger }
  1597 em { font-size: 150% }
  1598 em { font-size: 1.5em }
  1599 </pre>
  1600   </div>
  1601   <!-- prop: font-size-adjust -->
  1603   <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
  1604    the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
  1606   <table class=propdef id=namefont-size-adjustvaluenone-ltnumbergt>
  1607    <tbody>
  1608     <tr>
  1609      <td>Name:
  1611      <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
  1613     <tr>
  1614      <td>Value:
  1616      <td><a href="#font-size-adjust-none-value"
  1617       title="none!!font-size-adjust">none</a> | <a
  1618       href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
  1620     <tr>
  1621      <td>Initial:
  1623      <td>none
  1625     <tr>
  1626      <td>Applies to:
  1628      <td>all elements
  1630     <tr>
  1631      <td>Inherited:
  1633      <td>yes
  1635     <tr>
  1636      <td>Percentages:
  1638      <td>N/A
  1640     <tr>
  1641      <td>Media:
  1643      <td>visual
  1645     <tr>
  1646      <td>Computed value:
  1648      <td>as specified
  1650     <tr>
  1651      <td>Animatable:
  1653      <td>as <a
  1654       href="http://dev.w3.org/csswg/css-transitions/#animtype-number">number</a>
  1655   </table>
  1657   <p>For any given font size, the apparent size and legibility of text varies
  1658    across fonts. For scripts such as Latin or Cyrillic that distinguish
  1659    between upper and lowercase letters, the relative height of lowercase
  1660    letters compared to their uppercase counterparts is a determining factor
  1661    of legibility. This is commonly referred to as the <a class=index-def
  1662    href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
  1663    id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
  1664    the x-height of a font divided by the font size.
  1666   <p>In situations where font fallback occurs, fallback fonts may not share
  1667    the same aspect value as the desired font family and will thus appear less
  1668    readable. The ‘<a href="#propdef-font-size-adjust"><code
  1669    class=property>font-size-adjust</code></a>’ property is a way to
  1670    preserve the readability of text when font fallback occurs. It does this
  1671    by adjusting the font-size so that the x-height is the same regardless of
  1672    the font used.
  1674   <div class=example>
  1675    <p>The style defined below defines Verdana as the desired font family, but
  1676     if Verdana is not available Futura or Times will be used.</p>
  1678    <pre>p {
  1679     font-family: Verdana, Futura, Times;
  1682 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
  1683 </pre>
  1685    <p>Verdana has a relatively high aspect value, lowercase letters are
  1686     relatively tall compared to uppercase letters, so at small sizes text
  1687     appears legible. Times has a lower aspect value and so if fallback
  1688     occurs, the text will be less legible at small sizes than Verdana.</p>
  1689   </div>
  1691   <p>How text rendered in each of these fonts compares is shown below, the
  1692    columns show text rendered in Verdana, Futura and Times. The same
  1693    font-size value is used across cells within each row and red lines are
  1694    included to show the differences in x-height. In the upper half each row
  1695    is rendered in the same font-size value. The same is true for the lower
  1696    half but in this half the ‘<a href="#propdef-font-size-adjust"><code
  1697    class=property>font-size-adjust</code></a>’ property is also set so that
  1698    the actual font size is adjusted to preserve the x-height across each row.
  1699    Note how small text remains relatively legible across each row in the
  1700    lower half.
  1702   <div class=figure><img alt="text with and without 'font-size-adjust'"
  1703    src=fontsizeadjust.png>
  1704    <p class=caption>Text with and without the use of ‘<a
  1705     href="#propdef-font-size-adjust"><code
  1706     class=property>font-size-adjust</code></a>’
  1707   </div>
  1709   <p>This property allows authors to specify an <a
  1710    href="#aspect-value"><i>aspect value</i></a> for an element that will
  1711    effectively preserve the x-height of the first choice font, whether it is
  1712    substituted or not. Values have the following meanings:
  1714   <dl>
  1715    <dt><dfn id=font-size-adjust-none-value
  1716     title="none!!font-size-adjust">none</dfn>
  1718    <dd>Do not preserve the font's x-height.
  1720    <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
  1722    <dd>Specifies the <a href="#aspect-value"><i>aspect value</i></a> used in
  1723     the calculation below to calculate the adjusted font size:
  1724     <pre>c  =  ( a / a' ) s
  1725 </pre>
  1727     <p>where:</p>
  1729     <pre>s  =  font-size value
  1730 a  =  <a href="#aspect-value"><i>aspect value</i></a> as specified by the 'font-size-adjust' property
  1731 a' =  <a href="#aspect-value"><i>aspect value</i></a> of actual font
  1732 c  =  adjusted font-size to use
  1733 </pre>
  1735     <p>This value applies to any font that is selected but in typical usage
  1736      it should be based on the <a href="#aspect-value"><i>aspect
  1737      value</i></a> of the first font in the font-family list. If this is
  1738      specified accurately, the <tt>(a/a')</tt> term in the formula above is
  1739      effectively 1 for the first font and no adjustment occurs. If the value
  1740      is specified inaccurately, text rendered using the first font in the
  1741      family list will display differently in older user agents that don't
  1742      support ‘<a href="#propdef-font-size-adjust"><code
  1743      class=property>font-size-adjust</code></a>’.</p>
  1744   </dl>
  1746   <p>The value of ‘<a href="#propdef-font-size-adjust"><code
  1747    class=property>font-size-adjust</code></a>’ affects the used value of
  1748    ‘<a href="#propdef-font-size"><code
  1749    class=property>font-size</code></a>’ but does not affect the computed
  1750    value. It affects the size of relative units that are based on font
  1751    metrics of the <a href="#first-available-font"><i>first available
  1752    font</i></a> such as <code>ex</code> and <code>ch</code> but does not
  1753    affect the size of <code>em</code> units. Since numeric values of <a
  1754    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1755    class=property>line-height</code>’</a> refer to the computed size of
  1756    ‘<a href="#propdef-font-size"><code
  1757    class=property>font-size</code></a>’, ‘<a
  1758    href="#propdef-font-size-adjust"><code
  1759    class=property>font-size-adjust</code></a>’ does not affect the used
  1760    value of <a
  1761    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1762    class=property>line-height</code>’</a>.
  1764   <p class=note>In CSS, authors often specify <a
  1765    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1766    class=property>line-height</code>’</a> as a multiple of the ‘<a
  1767    href="#propdef-font-size"><code class=property>font-size</code></a>’.
  1768    Since the ‘<a href="#propdef-font-size-adjust"><code
  1769    class=property>font-size-adjust</code></a>’ property affects the used
  1770    value of ‘<a href="#propdef-font-size"><code
  1771    class=property>font-size</code></a>’, authors should take care setting
  1772    the line height when ‘<a href="#propdef-font-size-adjust"><code
  1773    class=property>font-size-adjust</code></a>’ is used. Setting the line
  1774    height too tightly can result in overlapping lines of text in this
  1775    situation.
  1777   <p>Authors can calculate the <a href="#aspect-value"><i>aspect
  1778    value</i></a> for a given font by comparing spans with the same content
  1779    but different ‘<a href="#propdef-font-size-adjust"><code
  1780    class=property>font-size-adjust</code></a>’ properties. If the same
  1781    font-size is used, the spans will match when the ‘<a
  1782    href="#propdef-font-size-adjust"><code
  1783    class=property>font-size-adjust</code></a>’ value is accurate for the
  1784    given font.
  1786   <div class=example>
  1787    <p>Two spans with borders are used to determine the <a
  1788     href="#aspect-value"><i>aspect value</i></a> of a font. The ‘<a
  1789     href="#propdef-font-size"><code class=property>font-size</code></a>’ is
  1790     the same for both spans but the ‘<a
  1791     href="#propdef-font-size-adjust"><code
  1792     class=property>font-size-adjust</code></a>’ property is specified only
  1793     for the right span. Starting with a value of 0.5, the aspect value can be
  1794     adjusted until the borders around the two letters line up.</p>
  1796    <pre>p {
  1797     font-family: Futura;
  1798     font-size: 500px;
  1801 span {
  1802     border: solid 1px red;
  1805 .adjust {
  1806     font-size-adjust: 0.5;
  1809 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
  1810 </pre>
  1812    <div class=figure><img alt="Futura with an <i>aspect value</i> of 0.5"
  1813     src=beforefontsizeadjust.png>
  1814     <p class=caption>Futura with an <a href="#aspect-value"><i>aspect
  1815      value</i></a> of 0.5
  1816    </div>
  1818    <p>The box on the right is a bit bigger than the one on the left, so the
  1819     <a href="#aspect-value"><i>aspect value</i></a> of this font is something
  1820     less than 0.5. Adjust the value until the boxes align.</p>
  1821   </div>
  1822   <!-- prop: font -->
  1824   <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
  1825    <a href="#propdef-font">font</a> property</h3>
  1827   <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
  1828    <tbody>
  1829     <tr>
  1830      <td>Name:
  1832      <td><dfn id=propdef-font>font</dfn>
  1834     <tr>
  1835      <td>Value:
  1837      <td>[ [ <var>&lt;<a href="#propdef-font-style"
  1838       title="font-style!!property">‘<code
  1839       class=property>font-style</code>’</a>&gt;</var> || <a
  1840       href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
  1841       || <var>&lt;<a href="#propdef-font-weight"
  1842       title="font-weight!!property">‘<code
  1843       class=property>font-weight</code>’</a>&gt;</var> || <var>&lt;<a
  1844       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  1845       class=property>font-stretch</code>’</a></var> ]? <var>&lt;‘<a
  1846       href="#propdef-font-size"><code
  1847       class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
  1848       class=property>line-height</code>’&gt;</var> ]? <var>&lt;<a
  1849       href="#propdef-font-family" title="font-family!!property">‘<code
  1850       class=property>font-family</code>’</a>&gt;</var> ] | caption | icon |
  1851       menu | message-box | small-caption | status-bar
  1853     <tr>
  1854      <td>Initial:
  1856      <td>see individual properties
  1858     <tr>
  1859      <td>Applies to:
  1861      <td>all elements
  1863     <tr>
  1864      <td>Inherited:
  1866      <td>yes
  1868     <tr>
  1869      <td>Percentages:
  1871      <td>see individual properties
  1873     <tr>
  1874      <td>Media:
  1876      <td>visual
  1878     <tr>
  1879      <td>Computed value:
  1881      <td>see individual properties
  1883     <tr>
  1884      <td>Animatable:
  1886      <td>see individual properties
  1887   </table>
  1889   <p>The <span class=property>‘<a href="#propdef-font"><code
  1890    class=property>font</code></a>’</span> property is, except as described
  1891    below, a shorthand property for setting <a href="#propdef-font-style"
  1892    title="font-style!!property">‘<code
  1893    class=property>font-style</code>’</a>, <a href="#propdef-font-variant"
  1894    title="font-variant!!property">‘<code
  1895    class=property>font-variant</code>’</a>, <a href="#propdef-font-weight"
  1896    title="font-weight!!property">‘<code
  1897    class=property>font-weight</code>’</a>, <a href="#propdef-font-stretch"
  1898    title="font-stretch!!property">‘<code
  1899    class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1900    href="#propdef-font-size"><code
  1901    class=property>font-size</code></a>’</span>, <a class=property
  1902    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1903    class=property>line-height</code>’</a>, <a href="#propdef-font-family"
  1904    title="font-family!!property">‘<code
  1905    class=property>font-family</code>’</a> at the same place in the
  1906    stylesheet. Values for the <a href="#propdef-font-variant"
  1907    title="font-variant!!property">‘<code
  1908    class=property>font-variant</code>’</a> property may also be included
  1909    but only those supported in CSS 2.1, none of the <a
  1910    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1911    class=property>font-variant</code>’</a> values added in this
  1912    specification can be used in the <span class=property>‘<a
  1913    href="#propdef-font"><code class=property>font</code></a>’</span>
  1914    shorthand:
  1916   <pre
  1917    class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
  1919   <p>The syntax of this property is based on a traditional typographical
  1920    shorthand notation to set multiple properties related to fonts.
  1922   <p>All subproperties of the ‘<a href="#propdef-font"><code
  1923    class=property>font</code></a>’ property are first reset to their
  1924    initial values, including those listed above plus <span
  1925    class=property>‘<a href="#propdef-font-size-adjust"><code
  1926    class=property>font-size-adjust</code></a>’</span>, <span
  1927    class=property>‘<a href="#propdef-font-kerning"><code
  1928    class=property>font-kerning</code></a>’</span>, subproperties of <a
  1929    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1930    class=property>font-variant</code>’</a> and and <span>‘<a
  1931    href="#propdef-font-language-override"><code
  1932    class=property>font-language-override</code></a>’</span>. Then, those
  1933    properties that are given explicit values in the <span
  1934    class=property>‘<a href="#propdef-font"><code
  1935    class=property>font</code></a>’</span> shorthand are set to those
  1936    values. For a definition of allowed and initial values, see the previously
  1937    defined properties. For reasons of backwards compatibility, it is not
  1938    possible to set <span class=property>‘<a
  1939    href="#propdef-font-size-adjust"><code
  1940    class=property>font-size-adjust</code></a>’</span> to anything other
  1941    than its initial value using the <span class=property>‘<a
  1942    href="#propdef-font"><code class=property>font</code></a>’</span>
  1943    shorthand property; instead, use the individual property.
  1945   <div class=example>
  1946    <p style="display:none">Example(s):</p>
  1948    <pre>p { font: 12pt/14pt sans-serif }
  1949 p { font: 80% sans-serif }
  1950 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
  1951 p { font: bold italic large Palatino, serif }
  1952 p { font: normal small-caps 120%/120% fantasy }
  1953 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
  1954 </pre>
  1956    <p> In the second rule, the font size percentage value (‘<code
  1957     class=css>80%</code>’) refers to the computed ‘<a
  1958     href="#propdef-font-size"><code class=property>font-size</code></a>’ of
  1959     the parent element. In the third rule, the line height percentage
  1960     (‘<code class=css>110%</code>’) refers to the font size of the
  1961     element itself.
  1963    <p>The first three rules do not specify the <a
  1964     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1965     class=property>font-variant</code>’</a> and <a
  1966     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1967     class=property>font-weight</code>’</a> explicitly, so these properties
  1968     receive their initial values (<span title="normal value">‘<code
  1969     class=property>normal</code>’</span>). Notice that the font family name
  1970     "new century schoolbook", which contains spaces, is enclosed in quotes.
  1971     The fourth rule sets the <a href="#propdef-font-weight"
  1972     title="font-weight!!property">‘<code
  1973     class=property>font-weight</code>’</a> to ‘<a href="#bold"><code
  1974     class=property>bold</code></a>’, the <a href="#propdef-font-style"
  1975     title="font-style!!property">‘<code
  1976     class=property>font-style</code>’</a> to ‘<a href="#italic"><code
  1977     class=property>italic</code></a>’, and implicitly sets <a
  1978     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1979     class=property>font-variant</code>’</a> to <a
  1980     href="#font-variant-normal-value" title="normal!!font-variant">‘<code
  1981     class=property>normal</code>’</a>.
  1983    <p> The fifth rule sets the <a href="#propdef-font-variant"
  1984     title="font-variant!!property">‘<code
  1985     class=property>font-variant</code>’</a> (‘<a href="#small-caps"><code
  1986     class=property>small-caps</code></a>’), the <span class=property>‘<a
  1987     href="#propdef-font-size"><code
  1988     class=property>font-size</code></a>’</span> (120% of the parent's font
  1989     size), the <a class=property
  1990     href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1991     class=property>line-height</code>’</a> (120% of the font size) and the
  1992     <a href="#propdef-font-family" title="font-family!!property">‘<code
  1993     class=property>font-family</code>’</a> (‘<a href="#fantasy"><code
  1994     class=property>fantasy</code></a>’). It follows that the keyword <span
  1995     title="normal value">‘<code class=property>normal</code>’</span>
  1996     applies to the two remaining properties: <a href="#propdef-font-style"
  1997     title="font-style!!property">‘<code
  1998     class=property>font-style</code>’</a> and <a
  1999     href="#propdef-font-weight" title="font-weight!!property">‘<code
  2000     class=property>font-weight</code>’</a>.
  2002    <p>The sixth rule sets the <a href="#propdef-font-style"
  2003     title="font-style!!property">‘<code
  2004     class=property>font-style</code>’</a>, <a href="#propdef-font-stretch"
  2005     title="font-stretch!!property">‘<code
  2006     class=property>font-stretch</code>’</a>, <span class=property>‘<a
  2007     href="#propdef-font-size"><code
  2008     class=property>font-size</code></a>’</span>, and <a
  2009     href="#propdef-font-family" title="font-family!!property">‘<code
  2010     class=property>font-family</code>’</a>, the other font properties being
  2011     set to their initial values.
  2012   </div>
  2014   <p>Since the <a href="#propdef-font-stretch"
  2015    title="font-stretch!!property">‘<code
  2016    class=property>font-stretch</code>’</a> property was not defined in CSS
  2017    2.1, when using <a href="#propdef-font-stretch"
  2018    title="font-stretch!!property">‘<code
  2019    class=property>font-stretch</code>’</a> values within ‘<a
  2020    href="#propdef-font"><code class=property>font</code></a>’ rules,
  2021    authors should include a extra version compatible with older user agents:
  2023   <pre>p {
  2024   font: 80% sans-serif;   /* for older user agents */
  2025   font: condensed 80% sans-serif;
  2026 }</pre>
  2028   <p>The following values refer to system fonts:
  2030   <dl>
  2031    <dt><strong>caption</strong>
  2033    <dd>The font used for captioned controls (e.g., buttons, drop-downs,
  2034     etc.).
  2036    <dt><strong>icon</strong>
  2038    <dd>The font used to label icons.
  2040    <dt><strong>menu</strong>
  2042    <dd>The font used in menus (e.g., dropdown menus and menu lists).
  2044    <dt><strong>message-box</strong>
  2046    <dd>The font used in dialog boxes.
  2048    <dt><strong>small-caption</strong>
  2050    <dd>The font used for labeling small controls.
  2052    <dt><strong>status-bar</strong>
  2054    <dd>The font used in window status bars.
  2055   </dl>
  2057   <p>System fonts may only be set as a whole; that is, the font family, size,
  2058    weight, style, etc. are all set at the same time. These values may then be
  2059    altered individually if desired. If no font with the indicated
  2060    characteristics exists on a given platform, the user agent should either
  2061    intelligently substitute (e.g., a smaller version of the ‘<code
  2062    class=property>caption</code>’ font might be used for the ‘<code
  2063    class=property>small-caption</code>’ font), or substitute a user agent
  2064    default font. As for regular fonts, if, for a system font, any of the
  2065    individual properties are not part of the operating system's available
  2066    user preferences, those properties should be set to their initial values.
  2068   <p>That is why this property is "almost" a shorthand property: system fonts
  2069    can only be specified with this property, not with <a
  2070    href="#propdef-font-family" title="font-family!!property">‘<code
  2071    class=property>font-family</code>’</a> itself, so <span
  2072    class=property>‘<a href="#propdef-font"><code
  2073    class=property>font</code></a>’</span> allows authors to do more than
  2074    the sum of its subproperties. However, the individual properties such as
  2075    <a href="#propdef-font-weight" title="font-weight!!property">‘<code
  2076    class=property>font-weight</code>’</a> are still given values taken from
  2077    the system font, which can be independently varied.
  2079   <p>Note that the keywords used for the system fonts listed above are only
  2080    treated as keywords when they occur in the initial position, in other
  2081    positions the same string is treated as part of the font family name:
  2083   <pre>  font: menu;        /* use the font settings for system menus */
  2084   font: large menu;  /* use a font family named "menu" */</pre>
  2086   <div class=example>
  2087    <p style="display:none">Example(s):</p>
  2089    <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
  2090 button p { font: menu }
  2091 button p em { font-weight: bolder }
  2092 </pre>
  2094    <p>If the font used for dropdown menus on a particular system happened to
  2095     be, for example, 9-point Charcoal, with a weight of 600, then P elements
  2096     that were descendants of BUTTON would be displayed as if this rule were
  2097     in effect:
  2099    <pre>button p { font: 600 9pt Charcoal }
  2100 </pre>
  2102    <p>Because the <span class=property>‘<a href="#propdef-font"><code
  2103     class=property>font</code></a>’</span> shorthand resets to its initial
  2104     value any property not explicitly given a value, this has the same effect
  2105     as this declaration:
  2107    <pre>button p {
  2108   font-style: normal;
  2109   font-variant: normal;
  2110   font-weight: 600;
  2111   font-size: 9pt;
  2112   line-height: normal;
  2113   font-family: Charcoal
  2115 </pre>
  2116   </div>
  2117   <!-- prop: font-synthesis -->
  2119   <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
  2120    synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
  2121    property</h3>
  2123   <table class=propdef id=namefont-synthesisvaluenone-weight-style>
  2124    <tbody>
  2125     <tr>
  2126      <td>Name:
  2128      <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
  2130     <tr>
  2131      <td>Value:
  2133      <td>none | [ weight || style ]
  2135     <tr>
  2136      <td>Initial:
  2138      <td>weight style
  2140     <tr>
  2141      <td>Applies to:
  2143      <td>all elements
  2145     <tr>
  2146      <td>Inherited:
  2148      <td>yes
  2150     <tr>
  2151      <td>Percentages:
  2153      <td>N/A
  2155     <tr>
  2156      <td>Media:
  2158      <td>visual
  2160     <tr>
  2161      <td>Computed value:
  2163      <td>as specified
  2165     <tr>
  2166      <td>Animatable:
  2168      <td>no
  2169   </table>
  2171   <p>This property controls whether user agents are allowed to synthesize
  2172    bold or oblique font faces when a font family lacks bold or italic faces.
  2173    If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
  2174    specified, user agents must not synthesize bold faces and if ‘<code
  2175    class=property>style</code>’ is not specified user agents must not
  2176    synthesize italic faces. A value of ‘<code class=property>none</code>’
  2177    disallows all synthetic faces.
  2179   <div class=example>
  2180    <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
  2182    <pre>*:lang(ar) { font-synthesis: none; }
  2183 </pre>
  2184   </div>
  2186   <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
  2188   <h3 id=font-face-rule><span class=secno>4.1 </span>The <dfn
  2189    id=at-font-face-rule style="font-weight: inherit; font-style:
  2190    inherit"><code>@font-face</code></dfn> rule</h3>
  2192   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule allows
  2193    for linking to fonts that are automatically fetched and activated when
  2194    needed. This allows authors to select a font that closely matches the
  2195    design goals for a given page rather than limiting the font choice to a
  2196    set of fonts available on a given platform. A set of font descriptors
  2197    define the location of a font resource, either locally or externally,
  2198    along with the style characteristics of an individual face. Multiple <a
  2199    href="#at-font-face-rule"><code>@font-face</code></a> rules can be used to
  2200    construct font families with a variety of faces. Using CSS font matching
  2201    rules, a user agent can selectively download only those faces that are
  2202    needed for a given piece of text.
  2204   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2205    consists of the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2206    at-keyword followed by a block of descriptor declarations. In terms of the
  2207    grammar, this specification defines the following productions:
  2209   <pre><dfn id=fontfacerule>font_face_rule</dfn>
  2210   : <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>*
  2213 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
  2214   : <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>
  2215   ;</pre>
  2217   <p>The following new definitions are introduced:
  2219   <pre>-    -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
  2220 F    f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
  2222   <p>The following new token is introduced:
  2224   <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
  2226   <p>Each <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2227    specifies a value for every font descriptor, either implicitly or
  2228    explicitly. Those not given explicit values in the rule take the initial
  2229    value listed with each descriptor in this specification. These descriptors
  2230    apply solely within the context of the <a
  2231    href="#at-font-face-rule"><code>@font-face</code></a> rule in which they
  2232    are defined, and do not apply to document language elements. There is no
  2233    notion of which elements the descriptors apply to or whether the values
  2234    are inherited by child elements. When a given descriptor occurs multiple
  2235    times in a given <a href="#at-font-face-rule"><code>@font-face</code></a>
  2236    rule, only the last descriptor declaration is used and all prior
  2237    declarations for that descriptor are ignored.
  2239   <div class=example>
  2240    <p>To use a downloadable font called Gentium:</p>
  2242    <pre>
  2243 @font-face {
  2244   font-family: Gentium;
  2245   src: url(http://example.com/fonts/Gentium.woff);
  2248 p { font-family: Gentium, serif; }
  2249 </pre>
  2251    <p>The user agent will download Gentium and use it when rendering text
  2252     within paragraph elements. If for some reason the site serving the font
  2253     is unavailable, the default serif font will be used.</p>
  2254   </div>
  2256   <p>A given set of <a href="#at-font-face-rule"><code>@font-face</code></a>
  2257    rules define a set of fonts available for use within the documents that
  2258    contain these rules. When font matching is done, fonts defined using these
  2259    rules are considered before other available fonts on a system.
  2261   <p>Downloaded fonts are only available to documents that reference them.
  2262    The process of activating these fonts must not make them available to
  2263    other applications or to documents that don't directly link to the same
  2264    font. User agent implementers might consider it convenient to use
  2265    downloaded fonts when rendering characters in other documents for which no
  2266    other available font exists as part of the <a
  2267    href="#system-font-fallback"><em>system font fallback</em></a> procedure.
  2268    However, this would cause a security leak since the contents of one page
  2269    would be able to affect other pages, something an attacker could use as an
  2270    attack vector. These restrictions do not affect caching behavior, fonts
  2271    are cached the same way other web resources are cached.
  2273   <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
  2274    properties in a declaration block, declarations of any descriptors that
  2275    are not supported by the user agent must be ignored. <a
  2276    href="#at-font-face-rule"><code>@font-face</code></a> rules require a
  2277    font-family and src descriptor; if either of these are missing, the <a
  2278    href="#at-font-face-rule"><code>@font-face</code></a> rule is invalid and
  2279    must be ignored entirely.
  2281   <p>In cases where user agents have limited platform resources or implement
  2282    the ability to disable downloadable font resources, <a
  2283    href="#at-font-face-rule"><code>@font-face</code></a> rules must simply be
  2284    ignored; the behavior of individual descriptors as defined in this
  2285    specification should not be altered.
  2287   <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
  2288    href="#descdef-font-family">font-family</a> descriptor</h3>
  2290   <table class=descdef>
  2291    <tbody>
  2292     <tr>
  2293      <td>Name:
  2295      <td><dfn id=descdef-font-family
  2296       title="font-family!!descriptor">font-family</dfn>
  2298     <tr>
  2299      <td>Value:
  2301      <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
  2303     <tr>
  2304      <td><em>Initial:</em>
  2306      <td>N/A
  2307   </table>
  2309   <p>This descriptor defines the font family name that will be used in all
  2310    CSS font family name matching. It is required for the <a
  2311    href="#at-font-face-rule"><code>@font-face</code></a> rule to be valid. It
  2312    overrides the font family names contained in the underlying font data. If
  2313    the font family name is the same as a font family available in a given
  2314    user's environment, it effectively hides the underlying font for documents
  2315    that use the stylesheet. This permits a web author to freely choose
  2316    font-family names without worrying about conflicts with font family names
  2317    present in a given user's environment. Likewise, platform substitutions
  2318    for a given font family name must not be used.
  2320   <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
  2321    href="#descdef-src">src</a> descriptor</h3>
  2323   <table class=descdef>
  2324    <tbody>
  2325     <tr>
  2326      <td>Name:
  2328      <td><dfn id=descdef-src>src</dfn>
  2330     <tr>
  2331      <td>Value:
  2333      <td>[ &lt;url> [format(&lt;string> #)]? | <a
  2334       href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
  2336     <tr>
  2337      <td><em>Initial:</em>
  2339      <td>N/A
  2340   </table>
  2342   <p>This descriptor specifies the resource containing font data. It is
  2343    required for the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2344    rule to be valid. Its value is a prioritized, comma-separated list of
  2345    external references or locally-installed font face names. When a font is
  2346    needed the user agent iterates over the set of references listed, using
  2347    the first one it can successfully activate. Fonts containing invalid data
  2348    or local font faces that are not found are ignored and the user agent
  2349    loads the next font in the list.
  2351   <p>As with other URLs in CSS, the URL may be relative, in which case it is
  2352    resolved relative to the location of the style sheet containing the <a
  2353    href="#at-font-face-rule"><code>@font-face</code></a> rule. In the case of
  2354    SVG fonts, the URL points to an element within a document containing SVG
  2355    font definitions. If the element reference is omitted, a reference to the
  2356    first defined font is implied. Similarly, font container formats that can
  2357    contain more than one font must load one and only one of the fonts for a
  2358    given <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  2359    Fragment identifiers are used to indicate which font to load. If a
  2360    container format lacks a defined fragment identifier scheme,
  2361    implementations should use a simple 1-based indexing scheme (e.g.
  2362    "font-collection#1" for the first font, "font-collection#2" for the second
  2363    font).
  2365   <pre>
  2366 src: url(fonts/simple.woff);   /* load simple.woff relative to stylesheet location */
  2367 src: url(/fonts/simple.woff);  /* load simple.woff from absolute location */
  2368 src: url(fonts.svg#simple);    /* load SVG font with id 'simple' */
  2369 </pre>
  2371   <p>External references consist of a URL, followed by an optional hint
  2372    describing the format of the font resource referenced by that URL. The
  2373    format hint contains a comma-separated list of format strings that denote
  2374    well-known font formats. Conformant user agents must skip downloading a
  2375    font resource if the format hints indicate only unsupported or unknown
  2376    font formats. If no format hints are supplied, the user agent should
  2377    download the font resource.
  2379   <pre>
  2380 /* load WOFF font if possible, otherwise use OpenType font */
  2381 @font-face {
  2382   font-family: bodytext;
  2383   src: url(ideal-sans-serif.woff) format("woff"),
  2384        url(basic-sans-serif.ttf) format("opentype");
  2386 </pre>
  2388   <p>Format strings defined by this specification:
  2390   <table class=data id=fontformats>
  2391    <thead>
  2392     <tr>
  2393      <th>String
  2395      <th>Font Format
  2397      <th>Common extensions
  2399    <tbody>
  2400     <tr>
  2401      <th>"woff"
  2403      <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
  2405      <td>.woff
  2407     <tr>
  2408      <th>"truetype"
  2410      <td><a
  2411       href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
  2413      <td>.ttf
  2415     <tr>
  2416      <th>"opentype"
  2418      <td><a
  2419       href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
  2421      <td>.ttf, .otf
  2423     <tr>
  2424      <th>"embedded-opentype"
  2426      <td><a
  2427       href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
  2428       OpenType</a>
  2430      <td>.eot
  2432     <tr>
  2433      <th>"svg"
  2435      <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
  2437      <td>.svg, .svgz
  2438   </table>
  2440   <p>Given the overlap in common usage between TrueType and OpenType, the
  2441    format hints "truetype" and "opentype" must be considered as synonymous; a
  2442    format hint of "opentype" does not imply that the font contains Postscript
  2443    CFF style glyph data or that it contains OpenType layout information (see
  2444    <a href="#platform-props-to-css">Appendix A</a> for more background on
  2445    this).
  2447   <p>When authors would prefer to use a locally available copy of a given
  2448    font and download it if it's not, <code>local()</code> can be used. The
  2449    locally-installed <dfn
  2450    id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
  2451    to <code>local()</code> is a format-specific string that uniquely
  2452    identifies a single font face within a larger family. The syntax for a <a
  2453    href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
  2454    unique font face name enclosed by "local(" and ")". The name can
  2455    optionally be enclosed in quotes. If unquoted, the unquoted font family
  2456    name processing conventions apply; the name must be a sequence of
  2457    identifiers separated by whitespace which is converted to a string by
  2458    joining the identifiers together separated by a single space.
  2460   <pre>
  2461 /* regular face of Gentium */
  2462 @font-face {
  2463   font-family: MyGentium;
  2464   src: local(Gentium),    /* use locally available Gentium */
  2465        url(Gentium.woff); /* otherwise, download it */
  2467 </pre>
  2469   <p>For OpenType and TrueType fonts, this string is used to match only the
  2470    Postscript name or the full font name in the name table of locally
  2471    available fonts. Which type of name is used varies by platform and font,
  2472    so authors should include both of these names to assure proper matching
  2473    across platforms. Platform substitutions for a given font name must not be
  2474    used.
  2476   <pre>
  2477 /* bold face of Gentium */
  2478 @font-face {
  2479   font-family: MyGentium;
  2480   src: local(Gentium Bold),    /* full font name */
  2481        local(Gentium-Bold),    /* Postscript name */
  2482        url(GentiumBold.woff);  /* otherwise, download it */
  2483   font-weight: bold;
  2485 </pre>
  2487   <p>Just as a <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2488    specifies the characteristics of a single font within a family, the unique
  2489    name used with <code>local()</code> specifies a single font, not an entire
  2490    font family. Defined in terms of OpenType font data, the Postscript name
  2491    is found in the font's <a
  2492    href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
  2493    in the name record with nameID = 6 (see <a href="#OPENTYPE"
  2494    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
  2495    Postscript name is the commonly used key for all fonts on OSX and for
  2496    Postscript CFF fonts under Windows. The full font name (nameID = 4) is
  2497    used as a unique key for fonts with TrueType glyphs on Windows.
  2499   <p>For OpenType fonts with multiple localizations of the full font name,
  2500    the US English version is used (language ID = 0x409 for Windows and
  2501    language ID = 0 for Macintosh) or the first localization when a US English
  2502    full font name is not available (the OpenType specification recommends
  2503    that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
  2504    fonts minimally include US English names</a>). User agents that also match
  2505    other full font names, e.g. matching the Dutch name when the current
  2506    system locale is set to Dutch, are considered non-conformant. This is done
  2507    not to prefer English but to avoid matching inconsistencies across font
  2508    versions and OS localizations, since font style names (e.g. "Bold") are
  2509    frequently localized into many languages and the set of localizations
  2510    available varies widely across platform and font version. User agents that
  2511    match a concatenation of family name (nameID = 1) with style name (nameID
  2512    = 2) are considered non-conformant.
  2514   <p>This also allows for referencing faces that belong to larger families
  2515    that cannot otherwise be referenced.
  2517   <div class=example>
  2518    <p>Use a local font or reference an SVG font in another document:</p>
  2520    <pre>
  2521 @font-face {
  2522   font-family: Headline;
  2523   src: local(Futura-Medium),
  2524        url(fonts.svg#MyGeometricModern) format("svg");
  2526 </pre>
  2528    <p>Create an alias for local Japanese fonts on different platforms:</p>
  2530    <pre>
  2531 @font-face {
  2532   font-family: jpgothic;
  2533   src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
  2535 </pre>
  2537    <p>Reference a font face that cannot be matched within a larger family:</p>
  2539    <pre>
  2540 @font-face {
  2541   font-family: Hoefler Text Ornaments;
  2542   /* has the same font properties as Hoefler Text Regular */
  2543   src: local(HoeflerText-Ornaments);
  2545 </pre>
  2547    <p>Since localized fullnames never match, a document with the header style
  2548     rules below would always render using the default serif font, regardless
  2549     whether a particular system locale parameter is set to Finnish or not:</p>
  2551    <pre>
  2552 @font-face {
  2553   font-family: SectionHeader;
  2554   src: local("Arial Lihavoitu");  /* Finnish fullname for Arial Bold, should fail */
  2555   font-weight: bold;
  2558 h2 { font-family: SectionHeader, serif; }
  2559 </pre>
  2561    <p>A conformant user agent would never load the font ‘<code
  2562     class=css>gentium.eot</code>’ in the example below, since it is
  2563     included in the first definition of the ‘<a href="#descdef-src"><code
  2564     class=property>src</code></a>’ descriptor which is overridden by the
  2565     second definition in the same <a
  2566     href="#at-font-face-rule"><code>@font-face</code></a> rule:</p>
  2568    <pre>
  2569 @font-face {
  2570   font-family: MainText;
  2571   src: url(gentium.eot);                     /* for use with older user agents */
  2572   src: local("Gentium"), url(gentium.woff);  /* Overrides src definition */
  2574 </pre>
  2575   </div>
  2577   <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
  2578    descriptors: the <a href="#descdef-font-style">font-style</a>, <a
  2579    href="#descdef-font-weight">font-weight</a>, <a
  2580    href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
  2582   <table class=descdef>
  2583    <tbody>
  2584     <tr>
  2585      <td>Name:
  2587      <td><dfn id=descdef-font-style
  2588       title="font-style!!descriptor">font-style</dfn>
  2590     <tr>
  2591      <td>Value:
  2593      <td>normal | italic | oblique
  2595     <tr>
  2596      <td><em>Initial:</em>
  2598      <td>normal
  2599   </table>
  2601   <table class=descdef>
  2602    <tbody>
  2603     <tr>
  2604      <td>Name:
  2606      <td><dfn id=descdef-font-weight
  2607       title="font-weight!!descriptor">font-weight</dfn>
  2609     <tr>
  2610      <td>Value:
  2612      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  2614     <tr>
  2615      <td><em>Initial:</em>
  2617      <td>normal
  2618   </table>
  2620   <table class=descdef>
  2621    <tbody>
  2622     <tr>
  2623      <td>Name:
  2625      <td><dfn id=descdef-font-stretch
  2626       title="font-stretch!!descriptor">font-stretch</dfn>
  2628     <tr>
  2629      <td>Value:
  2631      <td>normal | ultra-condensed | extra-condensed | condensed |
  2632       semi-condensed | semi-expanded | expanded | extra-expanded |
  2633       ultra-expanded
  2635     <tr>
  2636      <td><em>Initial:</em>
  2638      <td>normal
  2639   </table>
  2641   <p>These descriptors define the characteristics of a font face and are used
  2642    in the process of matching styles to specific faces. For a font family
  2643    defined with several <a
  2644    href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  2645    can either download all faces in the family or use these descriptors to
  2646    selectively download font faces that match actual styles used in document.
  2647    The values for these descriptors are the same as those for the
  2648    corresponding font properties except that relative keywords are not
  2649    allowed, ‘<a href="#bolder"><code class=property>bolder</code></a>’
  2650    and ‘<a href="#lighter"><code class=property>lighter</code></a>’. If
  2651    these descriptors are omitted, initial values are assumed.
  2653   <p>The value for these font face style attributes is used in place of the
  2654    style implied by the underlying font data. This allows authors to combine
  2655    faces in flexible combinations, even in situations where the original font
  2656    data was arranged differently. User agents that implement synthetic
  2657    bolding and obliquing must only apply synthetic styling in cases where the
  2658    font descriptors imply this is needed, rather than based on the style
  2659    attributes implied by the font data.
  2661   <div class=example>
  2662    <p>The font descriptors defined in this section are used for selecting a
  2663     font from within the set of fonts defined by <a
  2664     href="#at-font-face-rule"><code>@font-face</code></a> rules for a given
  2665     family.</p>
  2667    <p>Consider a family containing a single, regular face:</p>
  2669    <pre>
  2670 @font-face {
  2671   font-family: BaskervilleSimple;
  2672   src: url(baskerville-regular.woff);
  2674 </pre>
  2676    <p>Unstyled text would display using the regular face defined in the <a
  2677     href="#at-font-face-rule"><code>@font-face</code></a> rule:</p>
  2679    <div class=figure><img alt="regular face display"
  2680     src=fiddlesticks-regular.png width=373></div>
  2682    <p>However, italic text would display in most user agents using
  2683     synthetically obliqued glyphs from the regular face, since a separate
  2684     italic face is not defined:</p>
  2686    <div class=figure><img alt="synthetic italics display"
  2687     src=fiddlesticks-synitalics.png width=373></div>
  2689    <p>Now consider a family for which an actual italic face is defined:</p>
  2691    <pre>
  2692 @font-face {
  2693   font-family: BaskervilleFull;
  2694   src: url(baskerville-regular.woff);
  2697 @font-face {
  2698   font-family: BaskervilleFull;
  2699   src: url(baskerville-italic.woff);
  2700   font-style: italic;
  2702 </pre>
  2704    <p>The second <a href="#at-font-face-rule"><code>@font-face</code></a>
  2705     rule defines the font resource <code>baskerville-italic.woff</code> to
  2706     have style attributes of normal weight, normal stretch and italic style.
  2707     When displaying italic text, the user agent will use this font, since
  2708     it's the closest match for italic text. Thus, the text will display using
  2709     glyphs designed by a type designer rather than using synthetically
  2710     obliqued glyphs from the regular face:</p>
  2712    <div class=figure><img alt="real italics display"
  2713     src=fiddlesticks-italics.png width=373></div>
  2715    <p>See the section on <a href="#font-style-matching">font matching</a> for
  2716     more complete details of the process used to select a particular face
  2717     within a font family.</p>
  2718   </div>
  2720   <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
  2721    <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
  2723   <table class=descdef>
  2724    <tbody>
  2725     <tr>
  2726      <td>Name:
  2728      <td><dfn id=descdef-unicode-range>unicode-range</dfn>
  2730     <tr>
  2731      <td>Value:
  2733      <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
  2735     <tr>
  2736      <td><em>Initial:</em>
  2738      <td>U+0-10FFFF
  2739   </table>
  2741   <p>This descriptor defines the set of Unicode codepoints that may be
  2742    supported by the font face for which it is declared. The descriptor value
  2743    is a comma-delimited list of Unicode range (<a
  2744    href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
  2745    these ranges defines the set of codepoints that serves as a hint for user
  2746    agents when deciding whether or not to download a font resource for a
  2747    given text run.
  2749   <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
  2750    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2751    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
  2752    "U+" or "u+" prefix followed by a codepoint range in one of the three
  2753    forms listed below. Ranges that do not fit one of the these forms are
  2754    invalid and cause the declaration to be ignored.
  2756   <dl>
  2757    <dt>single codepoint (e.g. U+416)
  2759    <dd>a Unicode codepoint, represented as one to six hexadecimal digits
  2761    <dt>interval range (e.g. U+400-4ff)
  2763    <dd>represented as two hyphen-separated Unicode codepoints indicating the
  2764     inclusive start and end codepoints of a range
  2766    <dt>wildcard range (e.g. U+4??)
  2768    <dd>defined by the set of codepoints implied when trailing ‘<code
  2769     class=css>?</code>’ characters signify any hexadeximal digit
  2770   </dl>
  2772   <p>Individual codepoints are written using hexadecimal values that
  2773    correspond to <a href="http://www.unicode.org/charts/">Unicode character
  2774    codepoints</a>. Unicode codepoint values must be between 0 and 10FFFF
  2775    inclusive. Digit values of codepoints are ASCII case-insensitive. For
  2776    interval ranges, the start and end codepoints must be within the range
  2777    noted above and the end codepoint must be greater than or equal to the
  2778    start codepoint.
  2780   <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
  2781    "U+???") are valid and equivalent to a wildcard range with an initial zero
  2782    digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
  2783    the range of Unicode codepoints are invalid. Because of this, the maximum
  2784    number of trailing ‘<code class=css>?</code>’ wildcard characters is
  2785    five, even though the <a
  2786    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2787    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
  2789   <p>Within the comma-delimited list of Unicode ranges in a ‘<a
  2790    href="#descdef-unicode-range"><code
  2791    class=property>unicode-range</code></a>’ descriptor declaration, ranges
  2792    may overlap. The union of these ranges defines the set of codepoints for
  2793    which the corresponding font may be used. User agents must not download or
  2794    use the font for codepoints outside this set. User agents may normalize
  2795    the list of ranges into a list that is different but represents the same
  2796    set of codepoints.
  2798   <p>The associated font might not contain glyphs for the entire set of
  2799    codepoints defined by the ‘<a href="#descdef-unicode-range"><code
  2800    class=property>unicode-range</code></a>’ descriptor. When the font is
  2801    used, the <dfn id=effective-character-map>effective character map</dfn> is
  2802    the intersection of the codepoints defined by ‘<a
  2803    href="#descdef-unicode-range"><code
  2804    class=property>unicode-range</code></a>’ with the font's <a
  2805    href="#character-map"><em>character map</em></a>. This allows authors to
  2806    define supported ranges in terms of broad ranges without worrying about
  2807    the precise codepoint ranges supported by the underlying font.
  2809   <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
  2810    to define composite fonts</h3>
  2812   <p>Multiple <a href="#at-font-face-rule"><code>@font-face</code></a> rules
  2813    with different unicode ranges for the same family and style descriptor
  2814    values can be used to create composite fonts that mix the glyphs from
  2815    different fonts for different scripts. This can be used to combine fonts
  2816    that only contain glyphs for a single script (e.g. Latin, Greek, Cyrillic)
  2817    or it can be used by authors as a way of segmenting a font into fonts for
  2818    commonly used characters and less frequently used characters. Since the
  2819    user agent will only pull down the fonts it needs this helps reduce page
  2820    bandwidth.
  2822   <p>If the unicode ranges overlap for a set of <a
  2823    href="#at-font-face-rule"><code>@font-face</code></a> rules with the same
  2824    family and style descriptor values, the rules are ordered in the reverse
  2825    order they were defined; the last rule defined is the first to be checked
  2826    for a given character.
  2828   <p>Example ranges for specific languages or characters:
  2830   <dl>
  2831    <dt>unicode-range: U+A5;
  2833    <dd>a single code point, the yen/yuan symbol
  2835    <dt>unicode-range: U+0-7F;
  2837    <dd>code range for basic ASCII characters
  2839    <dt>unicode-range: U+590-5ff;
  2841    <dd>code range for Hebrew characters
  2843    <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
  2845    <dd>code range for Japanese kanji, hiragana and katakana characters plus
  2846     yen/yuan symbol
  2847   </dl>
  2849   <div class=example>
  2850    <p>The BBC provides news services in a wide variety of languages, many
  2851     that are not well supported across all platforms. Using an <a
  2852     href="#at-font-face-rule"><code>@font-face</code></a> rule, the BBC could
  2853     provide a font for any of these languages, as it already does via a
  2854     manual font download.</p>
  2856    <pre>
  2857 @font-face {
  2858   font-family: BBCBengali;
  2859   src: url(fonts/BBCBengali.woff) format("woff");
  2860   unicode-range: U+00-FF, U+980-9FF;
  2862 </pre>
  2863   </div>
  2865   <div class=example>
  2866    <p>Technical documents often require a wide range of symbols. The STIX
  2867     Fonts project is one project aimed at providing fonts to support a wide
  2868     range of technical typesetting in a standardized way. The example below
  2869     shows the use of a font that provides glyphs for many of the mathematical
  2870     and technical symbol ranges within Unicode:</p>
  2872    <pre>
  2873 @font-face {
  2874   font-family: STIXGeneral;
  2875   src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
  2876   unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
  2878 </pre>
  2879   </div>
  2881   <div class=example>
  2882    <p>This example shows how an author can override the glyphs used for Latin
  2883     characters in a Japanese font with glyphs from a different font. The
  2884     first rule specifies no range so it defaults to the entire range. The
  2885     range specified in the second rule overlaps but takes precedence because
  2886     it is defined later.</p>
  2888    <pre>
  2889 @font-face {
  2890   font-family: JapaneseWithGentium;
  2891   src: local(MSMincho);
  2892   /* no range specified, defaults to entire range */
  2895 @font-face {
  2896   font-family: JapaneseWithGentium;
  2897   src: url(../fonts/Gentium.woff);
  2898   unicode-range: U+0-2FF;
  2900 </pre>
  2901   </div>
  2903   <div class=example>
  2904    <p>Consider a family constructed to optimize bandwidth by separating out
  2905     Latin, Japanese and other characters into different font files:</p>
  2907    <pre>
  2908 /* fallback font - size: 4.5MB */
  2909 @font-face {
  2910   font-family: DroidSans;
  2911   src: url(DroidSansFallback.woff);
  2912   /* no range specified, defaults to entire range */
  2915 /* Japanese glyphs - size: 1.2MB */
  2916 @font-face {
  2917   font-family: DroidSans;
  2918   src: url(DroidSansJapanese.woff);
  2919   unicode-range: U+3000-9FFF, U+ff??;
  2922 /* Latin, Greek, Cyrillic along with some
  2923    punctuation and symbols - size: 190KB */
  2924 @font-face {
  2925   font-family: DroidSans;
  2926   src: url(DroidSans.woff);
  2927   unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
  2929 </pre>
  2931    <p>For simple Latin text, only the font for Latin characters is
  2932     downloaded:</p>
  2934    <pre>
  2935 body { font-family: DroidSans; }
  2937 &lt;p>This is that&lt;/p>
  2938 </pre>
  2940    <p>In this case the user agent first checks the unicode-range for the font
  2941     containing Latin characters (DroidSans.woff). Since all the characters
  2942     above are in the range U+0-5FF, the user agent downloads the font and
  2943     renders the text with that font.</p>
  2945    <p>Next, consider text that makes use of an arrow character (⇨):</p>
  2947    <pre>
  2948 &lt;p>This &amp;#x21e8; that&lt;p>
  2949 </pre>
  2951    <p>The user agent again first checks the unicode-range of the font
  2952     containing Latin characters. Since U+2000-2300 includes the arrow code
  2953     point (U+21E8), the user agent downloads the font. For this character
  2954     however the Latin font does not have a matching glyph, so the effective
  2955     unicode-range used for font matching excludes this code point. Next, the
  2956     user agent evaluates the Japanese font. The unicode-range for the
  2957     Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
  2958     user agent does not download the Japanese font. Next the fallback font is
  2959     considered. The <a href="#at-font-face-rule"><code>@font-face</code></a>
  2960     rule for the fallback font does not define unicode-range so its value
  2961     defaults to the range of all Unicode code points. The fallback font is
  2962     downloaded and used to render the arrow character.</p>
  2963   </div>
  2965   <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
  2966    href="#descdef-font-variant">font-variant</a> and <a
  2967    href="#descdef-font-feature-settings">font-feature-settings</a>
  2968    descriptors</h3>
  2970   <table class=descdef>
  2971    <tbody>
  2972     <tr>
  2973      <td>Name:
  2975      <td><dfn id=descdef-font-variant
  2976       title="font-variant!!descriptor">font-variant</dfn>
  2978     <tr>
  2979      <td>Value:
  2981      <td><a href="#font-variant-normal-value"
  2982       title="normal!!font-variant">normal</a> | <a
  2983       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  2984       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  2985       || <a
  2986       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  2987       || <a
  2988       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  2989       || <a
  2990       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  2991       || <a href="#stylistic"><var
  2992       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  2993       href="#historical-forms"><var>historical-forms</var></a> || <a
  2994       href="#styleset"><var
  2995       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  2996       href="#character-variant"><var
  2997       title=character-variant>character-variant(&lt;feature-value-name&gt;
  2998       #)</var></a> || <a href="#swash"><var
  2999       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  3000       href="#ornaments"><var
  3001       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  3002       href="#annotation"><var
  3003       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  3004       <a href="#small-caps"><i>small-caps</i></a> | <a
  3005       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  3006       href="#petite-caps"><i>petite-caps</i></a> | <a
  3007       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  3008       href="#unicase"><i>unicase</i></a> | <a
  3009       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  3010       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  3011       || <a
  3012       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  3013       || <a
  3014       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  3015       || <a href="#ordinal"><i>ordinal</i></a> || <a
  3016       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  3017       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  3018       || <a
  3019       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  3020       || <a href="#ruby"><i>ruby</i></a> ]
  3022     <tr>
  3023      <td><em>Initial:</em>
  3025      <td>normal
  3026   </table>
  3028   <table class=descdef>
  3029    <tbody>
  3030     <tr>
  3031      <td>Name:
  3033      <td><dfn id=descdef-font-feature-settings
  3034       title="font-feature-settings!!descriptor">font-feature-settings</dfn>
  3036     <tr>
  3037      <td>Value:
  3039      <td><a href="#font-feature-settings-normal-value"
  3040       title="normal!!font-feature-settings">normal</a> | <a
  3041       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  3043     <tr>
  3044      <td><em>Initial:</em>
  3046      <td>normal
  3047   </table>
  3049   <p>These descriptors define initial settings that apply when the font
  3050    defined by an <a href="#at-font-face-rule"><code>@font-face</code></a>
  3051    rule is rendered. They do not affect font selection. Values are identical
  3052    to those defined for the corresponding <a href="#propdef-font-variant"
  3053    title="font-variant!!property">‘<code
  3054    class=property>font-variant</code>’</a> and <a
  3055    href="#propdef-font-feature-settings"
  3056    title="font-feature-settings!!property">‘<code
  3057    class=property>font-feature-settings</code>’</a> properties defined
  3058    below except that the value ‘<code class=property>inherit</code>’ is
  3059    omitted. When multiple font feature descriptors or properties are used,
  3060    the cumulative effect on text rendering is detailed in the section <a
  3061    href="#font-feature-resolution">Font Feature Resolution</a> below. In
  3062    cases where specific values define synthesized fallback for certain <a
  3063    href="#propdef-font-variant" title="font-variant!!property">‘<code
  3064    class=property>font-variant</code>’</a> subproperties, the same
  3065    synthesized fallback applies when used within those values are used with
  3066    the <a href="#descdef-font-style" title="font-style!!descriptor">‘<code
  3067    class=property>font-variant</code>’</a> descriptor.
  3069   <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
  3070    guidelines</h3>
  3072   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule is
  3073    designed to allow lazy loading of font resources that are only downloaded
  3074    when used within a document. A stylesheet can include <a
  3075    href="#at-font-face-rule"><code>@font-face</code></a> rules for a library
  3076    of fonts of which only a select set are used; user agents must only
  3077    download those fonts that are referred to within the style rules
  3078    applicable to a given page. User agents that download all fonts defined in
  3079    <a href="#at-font-face-rule"><code>@font-face</code></a> rules without
  3080    considering whether those fonts are in fact used within a page are
  3081    considered non-conformant. In cases where a font might be downloaded in
  3082    character fallback cases, user agents may download a font if it's
  3083    contained within the computed value of <a href="#propdef-font-family"
  3084    title="font-family!!property">‘<code
  3085    class=property>font-family</code>’</a> for a given text run.
  3087   <pre>
  3088 @font-face {
  3089   font-family: GeometricModern;
  3090   src: url(font.woff);
  3093 p {
  3094   /* font will be downloaded for pages with p elements */
  3095   font-family: GeometricModern, sans-serif;
  3098 h2 {
  3099   /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
  3100   font-family: Futura, GeometricModern, sans-serif;
  3102 </pre>
  3104   <p>In cases where textual content is loaded before downloadable fonts are
  3105    available, user agents may render text as it would be rendered if
  3106    downloadable font resources are not available or they may render text
  3107    transparently with fallback fonts to avoid a flash of text using a
  3108    fallback font. In cases where the font download fails user agents must
  3109    display text, simply leaving transparent text is considered non-conformant
  3110    behavior. Authors are advised to use fallback fonts in their font lists
  3111    that closely match the metrics of the downloadable fonts to avoid large
  3112    page reflows where possible.
  3114   <p><a id=same-origin-restriction> </a><a
  3115    id=allowing-cross-origin-font-loading> </a>
  3117   <h3 id=font-fetching-requirements><span class=secno>4.9 </span>Font
  3118    fetching requirements</h3>
  3119   <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
  3120   http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
  3121   http://www.w3.org/2011/10/31-webapps-minutes.html#item02
  3122 -->
  3124   <p>For font loads, user agents must use the <a
  3125    href="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch">potentially
  3126    CORS-enabled fetch</a> method defined by the <a href="#HTML5"
  3127    rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification for URL's
  3128    defined within @font-face rules. When fetching, user agents must use
  3129    "Anonymous" mode, set the referrer source to the stylesheet's URL and set
  3130    the origin to the URL of the containing document.
  3132   <p class=note>The implications of this for authors are that fonts will
  3133    typically not be loaded cross-origin unless authors specifically takes
  3134    steps to permit cross-origin loads. Sites can explicitly allow cross-site
  3135    loading of font data using the <code>Access-Control-Allow-Origin</code>
  3136    HTTP header. For other schemes, no explicit mechanism to allow
  3137    cross-origin loading, beyond what is permitted by the <a
  3138    href="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch">potentially
  3139    CORS-enabled fetch</a> method, is defined or required.
  3141   <div class=example> For the examples given below, assume that a document is
  3142    located at <code>http://example.com/page.html</code> and all URL's link to
  3143    valid font resources supported by the user agent. Fonts defined with the
  3144    ‘<a href="#descdef-src"><code class=property>src</code></a>’
  3145    descriptor values below will be loaded:
  3146    <pre>/* same origin (i.e. domain, scheme, port match document) */
  3147 src: url(fonts/simple.woff);
  3149 /* data url's with no redirects are treated as same origin */
  3150 src: url("data:application/font-woff;base64,...");
  3152 /* cross origin, different domain */
  3153 /* Access-Control-Allow-Origin response header set to '*' */
  3154 src: url(http://another.example.com/fonts/simple.woff);
  3155 </pre>
  3156    Fonts defined with the ‘<a href="#descdef-src"><code
  3157    class=property>src</code></a>’ descriptor values below will fail to
  3158    load:
  3159    <pre>/* cross origin, different scheme */
  3160 /* no Access-Control-xxx headers in response */
  3161 src: url(https://example.com/fonts/simple.woff);
  3163 /* cross origin, different domain */
  3164 /* no Access-Control-xxx headers in response */
  3165 src: url(http://another.example.com/fonts/simple.woff);
  3166 </pre>
  3167   </div>
  3169   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
  3170    Algorithm</h2>
  3172   <p>The algorithm below describes how fonts are associated with individual
  3173    runs of text. For each character in the run a font family is chosen and a
  3174    particular font face is selected containing a glyph for that character.
  3176   <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
  3177    font family names</h3>
  3179   <p>As part of the font matching algorithm outlined below, user agents must
  3180    match font family names used in style rules with actual font family names
  3181    contained in fonts available in a given environment or with font family
  3182    names defined in <a href="#at-font-face-rule"><code>@font-face</code></a>
  3183    rules. User agents must match these names case insensitively, using the
  3184    "Default Caseless Matching" algorithm outlined in the Unicode
  3185    specification <a href="#UNICODE"
  3186    rel=biblioentry>[UNICODE]<!--{{!UNICODE}}--></a>. This algorithm is
  3187    detailed in section 3.13 entitled "Default Case Algorithms". Specifically,
  3188    the algorithm must be applied without normalizing the strings involved and
  3189    without applying any language-specific tailorings. The case folding method
  3190    specified by this algorithm uses the case mappings with status field
  3191    ‘<code class=property>C</code>’ or ‘<code class=property>F</code>’
  3192    in the CaseFolding.txt file of the Unicode Character Database.
  3194   <p class=note> For authors this means that font family names are matched
  3195    case insensitively, whether those names exist in a platform font or in the
  3196    <a href="#at-font-face-rule"><code>@font-face</code></a> rules contained
  3197    in a stylesheet. Authors should take care to ensure that names use a
  3198    character sequence consistent with the actual font family name,
  3199    particularly when using combining characters such as diacritical marks.
  3200    For example, a family name that contains an uppercase A (U+0041) followed
  3201    by a combining ring (U+030A) will <strong>not</strong> match a name that
  3202    looks identical but which uses the precomposed lowercase a-ring character
  3203    (U+00E5) instead of the combining sequence.
  3205   <p class=note> Implementors should take care to verify that a given
  3206    caseless string comparison implementation uses this precise algorithm and
  3207    not assume that a given platform string matching routine follows it, as
  3208    many of these have locale-specific behavior or use some level of string
  3209    normalization.
  3211   <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
  3212    styles</h3>
  3214   <p>The procedure for choosing a font for a given character in a run of text
  3215    consists of iterating over the font families named by the <a
  3216    href="#propdef-font-family" title="font-family!!property">‘<code
  3217    class=property>font-family</code>’</a> property, selecting a font face
  3218    with the appropriate style based on other font properties and then
  3219    determining whether a glyph exists for the given character. This is done
  3220    using the <dfn id=character-map>character map</dfn> of the font, data
  3221    which maps characters to the default glyph for that character. A font is
  3222    considered to <dfn id=support>support</dfn> a given character if (1) the
  3223    character is contained in the font's <a
  3224    href="#character-map"><em>character map</em></a> and (2) if required by
  3225    the containing script, shaping information is available for that
  3226    character.
  3228   <p>Some legacy fonts may include a given character in the <a
  3229    href="#character-map"><em>character map</em></a> but lack the shaping
  3230    information (e.g. <a
  3231    href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
  3232    layout tables</a> or <a
  3233    href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
  3234    tables</a>) necessary for correctly rendering text runs containing that
  3235    character.
  3237   <p>Codepoint sequences consisting of a base character followed by a
  3238    sequence of combining characters are treated slightly differently, see the
  3239    section on <a href="#cluster-matching">cluster matching</a> below.
  3241   <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
  3242    given font family is defined to be the face that would be selected if all
  3243    font style properties were set to their initial value.
  3245   <ol id=fontmatchingalg>
  3246    <li>Using the computed font property values for a given element, the user
  3247     agent starts with the first family name specified by the <a
  3248     href="#propdef-font-family" title="font-family!!property">‘<code
  3249     class=property>font-family</code>’</a> property.
  3251    <li>If the family name is a generic family keyword, the user agent looks
  3252     up the appropriate font family name to be used. User agents may choose
  3253     the generic font family to use based on the language of the containing
  3254     element or the Unicode range of the character.
  3256    <li>For other family names, the user agent attempts to find the family
  3257     name among fonts defined via <a
  3258     href="#at-font-face-rule"><code>@font-face</code></a> rules and then
  3259     among available system fonts, matching names with a <a
  3260     href="#font-family-casing">case-insensitive comparison</a> as outlined in
  3261     the section above. On systems containing fonts with multiple localized
  3262     font family names, user agents must match any of these names independent
  3263     of the underlying system locale or platform API used. If the font
  3264     resources defined for a given face in an <a
  3265     href="#at-font-face-rule"><code>@font-face</code></a> rule are either not
  3266     available or contain invalid font data, then the face should be treated
  3267     as not present in the family. If no faces are present for a family
  3268     defined via <a href="#at-font-face-rule"><code>@font-face</code></a>
  3269     rules, the family should be treated as missing; matching a platform font
  3270     with the same name must not occur in this case.
  3272    <li>If a font family match occurs, the user agent assembles the set of
  3273     font faces in that family and then narrows the set to a single face using
  3274     other font properties in the order given below. A group of faces defined
  3275     via <a href="#at-font-face-rule"><code>@font-face</code></a> rules with
  3276     identical font descriptor values but differing ‘<a
  3277     href="#descdef-unicode-range"><code
  3278     class=property>unicode-range</code></a>’ values are considered to be a
  3279     single <dfn id=composite-face>composite face</dfn> for this step:
  3280     <ol id=fontstylematchingalg>
  3281      <li><a href="#propdef-font-stretch"
  3282       title="font-stretch!!property">‘<code
  3283       class=property>font-stretch</code>’</a> is tried first. If the
  3284       matching set contains faces with width values matching the <a
  3285       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  3286       class=property>font-stretch</code>’</a> value, faces with other width
  3287       values are removed from the matching set. If there is no face that
  3288       exactly matches the width value the nearest width is used instead. If
  3289       the value of <a href="#propdef-font-stretch"
  3290       title="font-stretch!!property">‘<code
  3291       class=property>font-stretch</code>’</a> is <a
  3292       href="#font-stretch-normal-value" title="normal!!font-stretch">‘<code
  3293       class=property>normal</code>’</a> or one of the condensed values,
  3294       narrower width values are checked first, then wider values. If the
  3295       value of <a href="#propdef-font-stretch"
  3296       title="font-stretch!!property">‘<code
  3297       class=property>font-stretch</code>’</a> is one of the expanded
  3298       values, wider values are checked first, followed by narrower values.
  3299       Once the closest matching width has been determined by this process,
  3300       faces with other widths are removed from the matching set.
  3302      <li><a href="#propdef-font-style" title="font-style!!property">‘<code
  3303       class=property>font-style</code>’</a> is tried next. If the value of
  3304       <a href="#propdef-font-style" title="font-style!!property">‘<code
  3305       class=property>font-style</code>’</a> is ‘<a href="#italic"><code
  3306       class=property>italic</code></a>’, italic faces are checked first,
  3307       then oblique, then normal faces. If the value is ‘<a
  3308       href="#oblique"><code class=property>oblique</code></a>’, oblique
  3309       faces are checked first, then italic faces and then normal faces. If
  3310       the value is <a href="#font-style-normal-value"
  3311       title="normal!!font-style">‘<code
  3312       class=property>normal</code>’</a>, normal faces are checked first,
  3313       then oblique faces, then italic faces. Faces with other style values
  3314       are excluded from the matching set. User agents are permitted to
  3315       distinguish between italic and oblique faces within platform font
  3316       families but this is not required, so all italic or oblique faces may
  3317       be treated as italic faces. However, within font families defined via
  3318       <a href="#at-font-face-rule"><code>@font-face</code></a> rules, italic
  3319       and oblique faces must be distinguished using the value of the <a
  3320       href="#descdef-font-style" title="font-style!!descriptor">‘<code
  3321       class=property>font-style</code>’</a> descriptor. For families that
  3322       lack any italic or oblique faces, users agents may create artificial
  3323       oblique faces, if this is permitted by the value of the ‘<a
  3324       href="#propdef-font-synthesis"><code
  3325       class=property>font-synthesis</code></a>’ property.
  3327      <li><a href="#propdef-font-weight"
  3328       title="font-weight!!property">‘<code
  3329       class=property>font-weight</code>’</a> is matched next, so it will
  3330       always reduce the matching set to a single font face. If bolder/lighter
  3331       relative weights are used, the effective weight is calculated based on
  3332       the inherited weight value, as described in the definition of the <a
  3333       href="#propdef-font-weight" title="font-weight!!property">‘<code
  3334       class=property>font-weight</code>’</a> property. Given the desired
  3335       weight and the weights of faces in the matching set after the steps
  3336       above, if the desired weight is available that face matches. Otherwise,
  3337       a weight is chosen using the rules below:
  3338       <ul>
  3339        <li>If the desired weight is less than 400, weights below the desired
  3340         weight are checked in descending order followed by weights above the
  3341         desired weight in ascending order until a match is found.
  3343        <li>If the desired weight is greater than 500, weights above the
  3344         desired weight are checked in ascending order followed by weights
  3345         below the desired weight in descending order until a match is found.
  3347        <li>If the desired weight is 400, 500 is checked first and then the
  3348         rule for desired weights less than 400 is used.
  3350        <li>If the desired weight is 500, 400 is checked first and then the
  3351         rule for desired weights less than 400 is used.
  3352       </ul>
  3354      <li><span class=property>‘<a href="#propdef-font-size"><code
  3355       class=property>font-size</code></a>’</span> must be matched within a
  3356       UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
  3357       are rounded to the nearest whole pixel, while the tolerance for
  3358       bitmapped fonts could be as large as 20%.) Further computations, e.g.,
  3359       by ‘<code class=property>em</code>’ values in other properties, are
  3360       based on the <span class=property>‘<a href="#propdef-font-size"><code
  3361       class=property>font-size</code></a>’</span> value that is used, not
  3362       the one that is specified.
  3363     </ol>
  3365    <li>
  3366     <p>If the matched face is defined via <a
  3367      href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  3368      must use the procedure below to select a single font:
  3370     <ol>
  3371      <li>If the font resource has not been loaded and the range of characters
  3372       defined by the ‘<a href="#descdef-unicode-range"><code
  3373       class=property>unicode-range</code></a>’ descriptor value includes
  3374       the character in question, load the font.
  3376      <li>After downloading, if the <a
  3377       href="#effective-character-map"><em>effective character map</em></a>
  3378       supports the character in question, select that font.
  3379     </ol>
  3381     <p>When the matched face is a <a href="#composite-face"><em>composite
  3382      face</em></a>, user agents must use the procedure above on each of the
  3383      faces in the <a href="#composite-face"><em>composite face</em></a> in
  3384      reverse order of <a
  3385      href="#at-font-face-rule"><code>@font-face</code></a> rule definition.</p>
  3387     <p>While the download occurs, user agents may either wait until the font
  3388      is downloaded or render once with substituted font metrics and render
  3389      again once the font is downloaded.</p>
  3391    <li>
  3392     <p>If no matching face exists or the matched face does not contain a
  3393      glyph for the character to be rendered, the next family name is selected
  3394      and the previous three steps repeated. Glyphs from other faces in the
  3395      family are not considered. The only exception is that user agents may
  3396      optionally substitute a synthetically obliqued version of the <a
  3397      href="#default-face"><em>default face</em></a> if that face supports a
  3398      given glyph and synthesis of these faces is permitted by the value of
  3399      the ‘<a href="#propdef-font-synthesis"><code
  3400      class=property>font-synthesis</code></a>’ property. For example, a
  3401      synthetic italic version of the regular face may be used if the italic
  3402      face doesn't support glyphs for Arabic.</p>
  3403     <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
  3406    <li>If there are no more font families to be evaluated and no matching
  3407     face has been found, then the user agent performs a <dfn
  3408     id=system-font-fallback>system font fallback</dfn> procedure to find the
  3409     best match for the character to be rendered. The result of this procedure
  3410     may vary across user agents.
  3412    <li>If a particular character cannot be displayed using any font, the user
  3413     agent should indicate by some means that a character is not being
  3414     displayed, displaying either a symbolic representation of the missing
  3415     glyph (e.g. using a <a
  3416     href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
  3417     Font</a>) or using the missing character glyph from a default font.
  3418   </ol>
  3420   <p>Optimizations of this process are allowed provided that an
  3421    implementation behaves as if the algorithm had been followed exactly.
  3422    Matching occurs in a well-defined order to ensure that the results are as
  3423    consistent as possible across user agents, given an identical set of
  3424    available fonts and rendering technology.
  3426   <p>The <dfn id=first-available-font>first available font</dfn>, used in the
  3427    definition of <a
  3428    href="http://www.w3.org/TR/css3-values/#font-relative-lengths"><em>font-relative
  3429    lengths</em></a> such as ‘<code class=property>ex</code>’ and ‘<code
  3430    class=property>ch</code>’, is defined to be the first available font
  3431    that would match any character given font families in the ‘<code
  3432    class=property>font-family</code>’ list (or a user agent's default font
  3433    if none are available).
  3435   <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
  3437   <p>When text contains characters such as combining marks, ideally the base
  3438    character should be rendered using the same font as the mark, this assures
  3439    proper placement of the mark. For this reason, the font matching algorithm
  3440    for clusters is more specialized than the general case of matching a
  3441    single character by itself. For sequences containing variation selectors,
  3442    which indicate the precise glyph to be used for a given character, user
  3443    agents always attempt <a href="#system-font-fallback"><em>system font
  3444    fallback</em></a> to find the appropriate glyph before using the default
  3445    glyph of the base character.
  3447   <p>A sequence of codepoints containing combining mark or other modifiers is
  3448    termed a grapheme cluster (see <a href="#CSS3TEXT"
  3449    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
  3450    description). For a given cluster containing a base character, <em>b</em>
  3451    and a sequence of combining characters <em>c1, c2…</em>, the entire
  3452    cluster is matched using these steps:
  3454   <ol>
  3455    <li>For each family in the font list, a face is chosen using the style
  3456     selection rules defined in the previous section.
  3457     <ol>
  3458      <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
  3459       completely supported by the font, select this font for the sequence.
  3461      <li>If a sequence of multiple codepoints is canonically equivalent to a
  3462       single character and the font <a href="#support"><em
  3463       title=support>supports</em></a> that character, select this font for
  3464       the sequence and use the glyph associated with the canonically
  3465       equiavlent character for the entire cluster.
  3466     </ol>
  3468    <li>If no font was found in the font list in step 1:
  3469     <ol>
  3470      <li>If <em>c1</em> is a variation selector, system fallback must be used
  3471       to find a font that <a href="#support"><em
  3472       title=support>supports</em></a> the full sequence of <em>b + c1</em>.
  3473       If no font on the system <a href="#support"><em
  3474       title=support>supports</em></a> the full sequence, match the single
  3475       character <em>b</em> using the normal procedure for matching single
  3476       characters and ignore the variation selector. Note: a sequence with
  3477       more than one variation selector must be treated as an encoding error
  3478       and the trailing selectors must be ignored. <a href="#UNICODE"
  3479       rel=biblioentry>[UNICODE]<!--{{!UNICODE}}--></a>
  3481      <li>Otherwise, the user agent may optionally use system font fallback to
  3482       match a font that <a href="#support"><em
  3483       title=support>supports</em></a> the entire cluster.
  3484     </ol>
  3486    <li>If no font is found in step 2, use the matching sequence from step 1
  3487     to determine the longest sequence that is completely <a
  3488     href="#support"><em title=support>supported</em></a> by a font in the
  3489     font list and attempt to match the remaining combining characters
  3490     separately using the rules for single characters.
  3491   </ol>
  3493   <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
  3494    issues</h3>
  3496   <p>CSS font matching is always performed on text runs containing Unicode
  3497    characters, so documents using legacy encodings are assumed to have been
  3498    transcoded before matching fonts. For fonts containing <a
  3499    href="#character-map"><em title="character map">character maps</em></a>
  3500    for both legacy encodings and Unicode, the contents of the legacy encoding
  3501    <a href="#character-map"><em>character map</em></a> must have no effect on
  3502    the results of the font matching process.
  3504   <p>The font matching process does not assume that text runs are in either
  3505    normalized or denormalized form (see <a href="#CHARMOD-NORM"
  3506    rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
  3507    details). Fonts may only support precomposed forms and not the decomposed
  3508    sequence of base character plus combining marks. Authors should always
  3509    tailor their choice of fonts to their content, including whether that
  3510    content contains normalized or denormalized character streams.
  3512   <p>If a given character is a Private-Use Area Unicode codepoint, user
  3513    agents must only match font families named in the ‘<code
  3514    class=property>font-family</code>’ list that are not generic families.
  3515    If none of the families named in the ‘<code
  3516    class=property>font-family</code>’ list contain a glyph for that
  3517    codepoint, user agents must display some form of missing glyph symbol for
  3518    that character rather than attempting <a
  3519    href="#system-font-fallback"><em>system font fallback</em></a> for that
  3520    codepoint. When matching the replacement character U+FFFD, user agents may
  3521    skip the font matching process and immediately display some form of
  3522    missing glyph symbol, they are not required to display the glyph from the
  3523    font that would be selected by the font matching process.
  3525   <p>In general, the fonts for a given family will all have the same or
  3526    similar <a href="#character-map"><em title="character map">character
  3527    maps</em></a>. The process outlined here is designed to handle even font
  3528    families containing faces with widely variant <a href="#character-map"><em
  3529    title="character map">character maps</em></a>. However, authors are
  3530    cautioned that the use of such families can lead to unexpected results.
  3532   <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
  3533    changes since CSS 2.1</h3>
  3535   <p>The algorithm above is different from CSS 2.1 in a number of key places.
  3536    These changes were made to better reflect actual font matching behavior
  3537    across user agent implementations.
  3539   <p>Differences compared to the font matching algorithm in CSS 2.1:
  3541   <ul>
  3542    <li>The algorithm includes font-stretch matching.
  3544    <li>All possible font-style matching scenarios are delineated.
  3546    <li>Small-caps fonts are not matched as part of the font matching process,
  3547     they are now handled via font features.
  3549    <li>Unicode variation selector matching is required.
  3551    <li>Cluster sequences are matched as a unit.
  3552   </ul>
  3554   <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
  3555    examples</h3>
  3557   <div class=example>
  3558    <p>It's useful to note that the CSS selector syntax may be used to create
  3559     language-sensitive typography. For example, some Chinese and Japanese
  3560     characters are unified to have the same Unicode code point, although the
  3561     abstract glyphs are not the same in the two languages.
  3563    <pre>*:lang(ja) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
  3564 *:lang(zh-Hant-TW) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
  3565 </pre>
  3567    <p>This selects any element that has the given language — Japanese or
  3568     Traditional Chinese as used in Taiwan — and uses the appropriate font.
  3570   </div>
  3572   <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
  3574   <p>Modern font technologies support a variety of advanced typographic and
  3575    language-specific font features. Using these features, a single font can
  3576    provide glyphs for a wide range of ligatures, contextual and stylistic
  3577    alternates, tabular and old-style figures, small capitals, automatic
  3578    fractions, swashes, and alternates specific to a given language. To allow
  3579    authors control over these font capabilities, the ‘<code
  3580    class=property>font-variant</code>’ property has been expanded for CSS3.
  3581    It now functions as a shorthand for a set of properties that provide
  3582    control over stylistic font features.
  3584   <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
  3585    selection and positioning</h3>
  3587   <p>Simple fonts used for displaying Latin text use a very basic processing
  3588    model. Fonts contain a <a href="#character-map"><em>character map</em></a>
  3589    which maps each character to a glyph for that character. Glyphs for
  3590    subsequent characters are simply placed one after the other along a run of
  3591    text. Modern font formats such as OpenType and AAT (Apple Advanced
  3592    Typography) use a richer processing model. The glyph for a given character
  3593    can be chosen and positioned not just based on the codepoint of the
  3594    character itself, but also on adjacent characters as well as the language,
  3595    script, and features enabled for the text. Font features may be required
  3596    for specific scripts, or recommended as enabled by default or they might
  3597    be stylistic features meant to be used under author control.
  3599   <p>For a good visual overview of these features, see the <a
  3600    href="#OPENTYPE-FONT-GUIDE"
  3601    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
  3602    For a detailed description of glyph processing for OpenType fonts, see <a
  3603    href="#WINDOWS-GLYPH-PROC"
  3604    rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
  3606   <p>Stylistic font features can be classified into two broad categories:
  3607    ones that affect the harmonization of glyph shapes with the surrounding
  3608    context, such as kerning and ligature features, and ones such as the
  3609    small-caps, subscript/superscript and alternate features that affect shape
  3610    selection.
  3612   <p>The subproperties of <a href="#propdef-font-variant"
  3613    title="font-variant!!property">‘<code
  3614    class=property>font-variant</code>’</a> listed below are used to control
  3615    these stylistic font features. They do not control features that are
  3616    required for displaying certain scripts, such as the OpenType features
  3617    used when displaying Arabic or Indic language text. They affect glyph
  3618    selection and positioning, but do not affect font selection as described
  3619    in the font matching section (except in cases required for compatibility
  3620    with CSS 2.1).
  3622   <p>To assure consistent behavior across user agents, the equivalent
  3623    OpenType property settings are listed for individual properties and are
  3624    normative. When using other font formats these should be used as a
  3625    guideline to map CSS font feature property values to specific font
  3626    features.
  3628   <h3 id=language-specific-support><span class=secno>6.2
  3629    </span>Language-specific display</h3>
  3631   <p>OpenType also supports language-specific glyph selection and
  3632    positioning, so that text can be displayed correctly in cases where the
  3633    language dictates a specific display behavior. Many languages share a
  3634    common script, but the shape of certain letters can vary across those
  3635    languages. For example, certain Cyrillic letters have different shapes in
  3636    Russian text than in Bulgarian. In Latin text, it's common to render "fi"
  3637    with an explicit fi-ligature that lacks a dot on the "i". However, in
  3638    languages such as Turkish which uses both a dotted-i and a dotless-i, it's
  3639    important to not use this ligature or use a specialized version that
  3640    contains a dot over the "i". The example below shows language-specific
  3641    variations based on stylistic traditions found in Spanish, Italian and
  3642    French orthography:
  3644   <div class=featex><img alt="language specific forms, spanish"
  3645    src=locl-1.png></div>
  3647   <div class=featex><img alt="language specific forms, italian"
  3648    src=locl-2.png></div>
  3650   <div class=featex><img alt="language specific forms, french"
  3651    src=locl-3.png></div>
  3653   <p>If the content language of the element is known according to the rules
  3654    of the <a
  3655    href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
  3656    language</a>, user agents are required to infer the OpenType language
  3657    system from the content language and use that when selecting and
  3658    positioning glyphs using an OpenType font.
  3660   <p>For OpenType fonts, in some cases it may be necessary to explicitly
  3661    declare the OpenType language to be used, for example when displaying text
  3662    in a given language that uses the typographic conventions of another
  3663    language or when the font does not explicitly support a given language but
  3664    supports a language that shares common typographic conventions. The ‘<a
  3665    href="#propdef-font-language-override"><code
  3666    class=property>font-language-override</code></a>’ property is used for
  3667    this purpose.</p>
  3668   <!-- prop: font-kerning -->
  3670   <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
  3671    href="#propdef-font-kerning">font-kerning</a> property</h3>
  3673   <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
  3674    <tbody>
  3675     <tr>
  3676      <td>Name:
  3678      <td><dfn id=propdef-font-kerning>font-kerning</dfn>
  3680     <tr>
  3681      <td>Value:
  3683      <td><a href="#font-kerning-auto-value"
  3684       title="auto!!font-kerning">auto</a> | <a
  3685       href="#font-kerning-normal-value"
  3686       title="normal!!font-kerning">normal</a> | <a
  3687       href="#font-kerning-none-value" title="none!!font-kerning">none</a>
  3689     <tr>
  3690      <td>Initial:
  3692      <td>auto
  3694     <tr>
  3695      <td>Applies to:
  3697      <td>all elements
  3699     <tr>
  3700      <td>Inherited:
  3702      <td>yes
  3704     <tr>
  3705      <td>Percentages:
  3707      <td>N/A
  3709     <tr>
  3710      <td>Media:
  3712      <td>visual
  3714     <tr>
  3715      <td>Computed value:
  3717      <td>as specified
  3719     <tr>
  3720      <td>Animatable:
  3722      <td>no
  3723   </table>
  3725   <p>Kerning is the contextual adjustment of inter-glyph spacing. This
  3726    property controls metric kerning, kerning that utilizes adjustment data
  3727    contained in the font.
  3729   <dl>
  3730    <dt><dfn id=font-kerning-auto-value title="auto!!font-kerning">auto</dfn>
  3732    <dd>Specifies that kerning is applied at the discretion of the user agent
  3734    <dt><dfn id=font-kerning-normal-value
  3735     title="normal!!font-kerning">normal</dfn>
  3737    <dd>Specifies that kerning is applied
  3739    <dt><dfn id=font-kerning-none-value title="none!!font-kerning">none</dfn>
  3741    <dd>Specifies that kerning is not applied
  3742   </dl>
  3744   <p>For fonts that do not include kerning data this property will have no
  3745    visible effect. When rendering with OpenType fonts, the <a
  3746    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
  3747    specification suggests that kerning be enabled by default. When kerning is
  3748    enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
  3749    vertical text runs the <span class=tag>vkrn</span> feature is enabled
  3750    instead). User agents must also support fonts that only support kerning
  3751    via data contained in a <span class=tag>kern</span> font table, as
  3752    detailed in the OpenType specification. If the ‘<code
  3753    class=property>letter-spacing</code>’ property is defined, kerning
  3754    adjustments are considered part of the default spacing and letter spacing
  3755    adjustments are made after kerning has been applied.
  3757   <p>When set to ‘<code class=property>auto</code>’, user agents can
  3758    determine whether to apply kerning or not based on a number of factors:
  3759    text size, script, or other factors that influence text processing speed.
  3760    Authors who want proper kerning should use <a
  3761    href="#font-kerning-normal-value" title="normal!!font-kerning">‘<code
  3762    class=property>normal</code>’</a> to explicitly enable kerning.
  3763    Likewise, some authors may prefer to disable kerning in situations where
  3764    performance is more important than precise appearance. However, in
  3765    well-designed modern implementations the use of kerning generally does not
  3766    have a large impact on text rendering speed.</p>
  3767   <!-- prop: font-variant-ligatures -->
  3769   <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
  3770    the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  3771    property</h3>
  3773   <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
  3774    <tbody>
  3775     <tr>
  3776      <td>Name:
  3778      <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
  3780     <tr>
  3781      <td>Value:
  3783      <td><a href="#font-variant-ligatures-normal-value"
  3784       title="normal!!font-variant-ligatures">normal</a> | <a
  3785       href="#font-variant-ligatures-none-value"
  3786       title="none!!font-variant-ligatures">none</a> | [ <a
  3787       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  3788       <a
  3789       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  3790       || <a
  3791       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  3792       || <a
  3793       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  3796     <tr>
  3797      <td>Initial:
  3799      <td>normal
  3801     <tr>
  3802      <td>Applies to:
  3804      <td>all elements
  3806     <tr>
  3807      <td>Inherited:
  3809      <td>yes
  3811     <tr>
  3812      <td>Percentages:
  3814      <td>N/A
  3816     <tr>
  3817      <td>Media:
  3819      <td>visual
  3821     <tr>
  3822      <td>Computed value:
  3824      <td>as specified
  3826     <tr>
  3827      <td>Animatable:
  3829      <td>no
  3830   </table>
  3832   <p>Ligatures and contextual forms are ways of combining glyphs to produce
  3833    more harmonized forms.
  3835   <pre
  3836    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>
  3838   <pre
  3839    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>
  3841   <pre
  3842    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>
  3844   <pre
  3845    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>
  3847   <p>Individual values have the following meanings:
  3849   <dl>
  3850    <dt><dfn id=font-variant-ligatures-normal-value
  3851     title="normal!!font-variant-ligatures">normal</dfn>
  3853    <dd>A value of <a href="#font-variant-ligatures-normal-value"
  3854     title="normal!!font-variant-ligatures">‘<code
  3855     class=property>normal</code>’</a> specifies that common default
  3856     features are enabled, <a href="#font-feature-resolution">as described in
  3857     detail in the next section</a>. For OpenType fonts, common ligatures and
  3858     contextual forms are on by default, discretionary and historical
  3859     ligatures are not.
  3861    <dt><dfn id=font-variant-ligatures-none-value
  3862     title="none!!font-variant-ligatures">none</dfn>
  3864    <dd>Specifies that all types of ligatures and contextual forms covered by
  3865     this property are explicitly disabled. In situations where ligatures are
  3866     not considered necessary, this may improve the speed of text rendering.
  3868    <dt><dfn id=common-ligatures>common-ligatures</dfn>
  3870    <dd>Enables display of common ligatures (OpenType features: <span
  3871     class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
  3872     enabled by default.
  3873   </dl>
  3875   <div class=featex><img alt="common ligature example" src=liga.png></div>
  3877   <dl>
  3878    <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
  3880    <dd>Disables display of common ligatures (OpenType features: <span
  3881     class=tag>liga, clig</span>).
  3883    <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
  3885    <dd>Enables display of discretionary ligatures (OpenType feature: <span
  3886     class=tag>dlig</span>). Which ligatures are discretionary or optional is
  3887     decided by the type designer, so authors will need to refer to the
  3888     documentation of a given font to understand which ligatures are
  3889     considered discretionary.
  3890   </dl>
  3892   <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
  3894   <dl>
  3895    <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
  3897    <dd>Disables display of discretionary ligatures (OpenType feature: <span
  3898     class=tag>dlig</span>).
  3900    <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
  3902    <dd>Enables display of historical ligatures (OpenType feature: <span
  3903     class=tag>hlig</span>).
  3904   </dl>
  3906   <div class=featex><img alt="historical ligature example" src=hlig.png></div>
  3908   <dl>
  3909    <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
  3911    <dd>Disables display of historical ligatures (OpenType feature: <span
  3912     class=tag>hlig</span>).
  3914    <dt><dfn id=contextual>contextual</dfn>
  3916    <dd>Enables display of contextual alternates (OpenType feature: <span
  3917     class=tag>calt</span>). Although not strictly a ligature feature, like
  3918     ligatures this feature is commonly used to harmonize the shapes of glyphs
  3919     with the surrounding context. For OpenType fonts, this feature is on by
  3920     default.
  3921   </dl>
  3923   <div class=featex><img alt="contextual alternate example" src=calt.png></div>
  3925   <dl>
  3926    <dt><dfn id=no-contextual>no-contextual</dfn>
  3928    <dd>Disables display of contextual alternates (OpenType feature: <span
  3929     class=tag>calt</span>).
  3930   </dl>
  3932   <p>Required ligatures, needed for correctly rendering complex scripts, are
  3933    not affected by the settings above, including ‘<code
  3934    class=property>none</code>’ (OpenType feature: <span
  3935    class=tag>rlig</span>).</p>
  3936   <!-- prop: font-variant-position -->
  3938   <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
  3939    and superscript forms: the <a
  3940    href="#propdef-font-variant-position">font-variant-position</a> property</h3>
  3942   <table class=propdef id=namefont-variant-positionvaluenormal-sub>
  3943    <tbody>
  3944     <tr>
  3945      <td>Name:
  3947      <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
  3949     <tr>
  3950      <td>Value:
  3952      <td><a href="#font-variant-position-normal-value"
  3953       title="normal!!font-variant-position">normal</a> | <a
  3954       href="#sub">sub</a> | <a href="#super">super</a>
  3956     <tr>
  3957      <td>Initial:
  3959      <td>normal
  3961     <tr>
  3962      <td>Applies to:
  3964      <td>all elements
  3966     <tr>
  3967      <td>Inherited:
  3969      <td>yes
  3971     <tr>
  3972      <td>Percentages:
  3974      <td>N/A
  3976     <tr>
  3977      <td>Media:
  3979      <td>visual
  3981     <tr>
  3982      <td>Computed value:
  3984      <td>as specified
  3986     <tr>
  3987      <td>Animatable:
  3989      <td>no
  3990   </table>
  3992   <p>This property is used to enable typographic subscript and superscript
  3993    glyphs. These are alternate glyphs designed within the same em-box as
  3994    default glyphs and are intended to be laid out on the same baseline as the
  3995    default glyphs, with no resizing or repositioning of the baseline. They
  3996    are explicitly designed to match the surrounding text and to be more
  3997    readable without affecting the line height.
  3999   <div class=figure><img alt="comparison between real subscript glyphs and
  4000    synthesized ones" src=realsubscripts.png>
  4001    <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
  4002     (bottom)
  4003   </div>
  4005   <p>Individual values have the following meanings:
  4007   <dl>
  4008    <dt><dfn id=font-variant-position-normal-value
  4009     title="normal!!font-variant-position">normal</dfn>
  4011    <dd>None of the features listed below are enabled.
  4013    <dt><dfn id=sub>sub</dfn>
  4015    <dd>Enables display of subscript variants (OpenType feature: <span
  4016     class=tag>subs</span>).
  4018    <dt><dfn id=super>super</dfn>
  4020    <dd>Enables display of superscript variants (OpenType feature: <span
  4021     class=tag>sups</span>).
  4022   </dl>
  4024   <p>Because of the semantic nature of subscripts and superscripts, when the
  4025    value is either ‘<a href="#sub"><code class=property>sub</code></a>’
  4026    or ‘<a href="#super"><code class=property>super</code></a>’ for a
  4027    given contiguous run of text, if a variant glyph is not available for all
  4028    the characters in the run, simulated glyphs must be synthesized for all
  4029    characters using reduced forms of the glyphs that would be used without
  4030    this feature applied. This is done per run to avoid a mixture of variant
  4031    glyphs and synthesized ones that would not align correctly. In the case of
  4032    OpenType fonts that lack subscript or superscript glyphs for a given
  4033    character, user agents must use the appropriate subscript and superscript
  4034    metrics specified in the selected font's <a
  4035    href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
  4036    table</a> <a href="#OPENTYPE"
  4037    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
  4038    and offset of the synthesized substitutes.
  4040   <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
  4041    using superscript metrics" src=superscript-alt-synth.png>
  4042    <p class=caption>Superscript alternate glyph (left), synthesized
  4043     superscript glyphs (middle), and incorrect mixture of the two (right)
  4044   </div>
  4046   <p>In situations where text decorations are only applied to runs of text
  4047    containing superscript or subscript glyphs, the synthesized glyphs must be
  4048    used to avoid problems with the placement of decorations.
  4050   <p>In the past, user agents have used font-size and vertical-align to
  4051    simulate subscripts and superscripts for the <code title="HTML sub
  4052    element">sub</code> and <code title="HTML sup element">sup</code>
  4053    elements. To allow a backwards compatible way of defining subscripts and
  4054    superscripts, it is recommended that authors use conditional rules <a
  4055    href="#CSS3-CONDITIONAL"
  4056    rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
  4057    older user agents will still render subscripts and superscripts via the
  4058    older mechanism.
  4060   <p>Authors should note that fonts typically only provide subscript and
  4061    superscript glyphs for a subset of all characters supported by the font.
  4062    For example, while subscript and superscript glyphs are often available
  4063    for Latin numbers, glyphs for punctuation and letter characters are less
  4064    frequently provided. The synthetic fallback rules defined for this
  4065    property assure that subscripts and superscripts will always appear but
  4066    the appearance may not match author expectations if the font used does not
  4067    provide the appropriate alternate glyph for all characters contained in a
  4068    subscript or superscript.
  4070   <p>This property is not cumulative. Applying it to elements within a
  4071    subscript or superscript won't nest the placement of a subscript or
  4072    superscript glyph. Images contained within text runs where the value of
  4073    this property is ‘<a href="#sub"><code class=property>sub</code></a>’
  4074    or ‘<a href="#super"><code class=property>super</code></a>’ will be
  4075    drawn just as they would if the value was <a
  4076    href="#font-variant-position-normal-value"
  4077    title="normal!!font-variant-position">‘<code
  4078    class=property>normal</code>’</a>.</p>
  4079   <!-- due to lack of consensus, couldn't resolve on exact positioning of text decorations:
  4080 http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
  4082   <p>Because of these limitations, ‘<a
  4083    href="#propdef-font-variant-position"><code
  4084    class=property>font-variant-position</code></a>’ is not recommended for
  4085    use in user agent stylesheets. Authors should use it in cases where
  4086    subscripts or superscripts will only contain the narrow range of
  4087    characters supported by the fonts specified.
  4089   <p class=note>The variant glyphs use the same baseline as the default
  4090    glyphs would use. There is no shift in the placement along the baseline,
  4091    so the use of variant glyphs doesn't affect the height of the inline box
  4092    or alter the height of the linebox. This makes superscript and subscript
  4093    variants ideal for situations where it's important that leading remain
  4094    constant, such as in multi-column layout.
  4096   <div class=example>
  4097    <p>A typical user agent default style for the <a class=tag
  4098     href="#sub">sub</a> element:</p>
  4100    <pre>sub {
  4101   vertical-align: sub;
  4102   font-size: smaller;
  4103   line-height: normal;
  4105 </pre>
  4107    <p>Using font-variant-position to specify typographic subscripts in a way
  4108     that will still show subscripts in older user agents:</p>
  4110    <pre>@supports ( font-variant-position: sub ) {
  4112   sub {
  4113     vertical-align: baseline;
  4114     font-size: 100%;
  4115     line-height: inherit;
  4116     font-variant-position: sub;
  4120 </pre>
  4122    <p>User agents that support the ‘<a
  4123     href="#propdef-font-variant-position"><code
  4124     class=property>font-variant-position</code></a>’ property will select a
  4125     subscript variant glyph and render this without adjusting the baseline or
  4126     font-size. Older user agents will ignore the ‘<a
  4127     href="#propdef-font-variant-position"><code
  4128     class=property>font-variant-position</code></a>’ property definition
  4129     and use the standard defaults for subscripts.</p>
  4130   </div>
  4131   <!-- prop: font-variant-caps -->
  4133   <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
  4134    the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
  4136   <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
  4137    <tbody>
  4138     <tr>
  4139      <td>Name:
  4141      <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
  4143     <tr>
  4144      <td>Value:
  4146      <td><a href="#font-variant-caps-normal-value"
  4147       title="normal!!font-variant-caps">normal</a> | <a
  4148       href="#small-caps">small-caps</a> | <a
  4149       href="#all-small-caps">all-small-caps</a> | <a
  4150       href="#petite-caps">petite-caps</a> | <a
  4151       href="#all-petite-caps">all-petite-caps</a> | <a
  4152       href="#unicase">unicase</a> | <a href="#titling-caps">titling-caps</a>
  4154     <tr>
  4155      <td>Initial:
  4157      <td>normal
  4159     <tr>
  4160      <td>Applies to:
  4162      <td>all elements
  4164     <tr>
  4165      <td>Inherited:
  4167      <td>yes
  4169     <tr>
  4170      <td>Percentages:
  4172      <td>N/A
  4174     <tr>
  4175      <td>Media:
  4177      <td>visual
  4179     <tr>
  4180      <td>Computed value:
  4182      <td>as specified
  4184     <tr>
  4185      <td>Animatable:
  4187      <td>no
  4188   </table>
  4190   <p>This property allows the selection of alternate glyphs used for small or
  4191    petite capitals or for titling. These glyphs are specifically designed to
  4192    blend well with the surrounding normal glyphs, to maintain the weight and
  4193    readability which suffers when text is simply resized to fit this purpose.
  4195   <p>Individual values have the following meanings:
  4197   <dl>
  4198    <dt><dfn id=font-variant-caps-normal-value
  4199     title="normal!!font-variant-caps">normal</dfn>
  4201    <dd>None of the features listed below are enabled.
  4203    <dt><dfn id=small-caps>small-caps</dfn>
  4205    <dd>Enables display of small capitals (OpenType feature: <span
  4206     class=tag>smcp</span>). Small-caps glyphs typically use the form of
  4207     uppercase letters but are reduced to the size of lowercase letters.
  4208   </dl>
  4210   <div class=featex><img alt="small-caps example" src=smcp.png></div>
  4212   <dl>
  4213    <dt><dfn id=all-small-caps>all-small-caps</dfn>
  4215    <dd>Enables display of small capitals for both upper and lowercase letters
  4216     (OpenType features: <span class=tag>c2sc, smcp</span>).
  4218    <dt><dfn id=petite-caps>petite-caps</dfn>
  4220    <dd>Enables display of petite capitals (OpenType feature: <span
  4221     class=tag>pcap</span>).
  4223    <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
  4225    <dd>Enables display of petite capitals for both upper and lowercase
  4226     letters (OpenType features: <span class=tag>c2pc, pcap</span>).
  4228    <dt><dfn id=unicase>unicase</dfn>
  4230    <dd>Enables display of mixture of small capitals for uppercase letters
  4231     with normal lowercase letters (OpenType feature: <span
  4232     class=tag>unic</span>).
  4234    <dt><dfn id=titling-caps>titling-caps</dfn>
  4236    <dd>Enables display of titling capitals (OpenType feature: <span
  4237     class=tag>titl</span>). Uppercase letter glyphs are often designed for
  4238     use with lowercase letters. When used in all uppercase titling sequences
  4239     they can appear too strong. Titling capitals are designed specifically
  4240     for this situation.
  4241   </dl>
  4243   <p>The availability of these glyphs is based on whether a given feature is
  4244    defined or not in the feature list of the font. User agents can optionally
  4245    decide this on a per-script basis but should explicitly not decide this on
  4246    a per-character basis.
  4248   <p>Some fonts may only support a subset or none of the features described
  4249    for this property. For backwards compatibility with CSS 2.1, if ‘<a
  4250    href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
  4251    href="#all-small-caps"><code class=property>all-small-caps</code></a>’
  4252    is specified but small-caps glyphs are not available for a given font,
  4253    user agents should simulate a small-caps font, for example by taking a
  4254    normal font and replacing the glyphs for lowercase letters with scaled
  4255    versions of the glyphs for uppercase characters (replacing the glyphs for
  4256    both upper and lowercase letters in the case of ‘<a
  4257    href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
  4259   <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
  4260    real small-caps" class=hires src=synthetic-vs-real-small-caps.png
  4261    width=512>
  4262    <p class=caption>Synthetic vs. real small-caps
  4263   </div>
  4265   <p>To match the surrounding text, a font may provide alternate glyphs for
  4266    caseless characters when these features are enabled but when a user agent
  4267    simulates small capitals, it must not attempt to simulate alternates for
  4268    codepoints which are considered caseless.
  4270   <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
  4271    characters with small-caps, all-small-caps enabled" class=hires
  4272    src=small-capitals-variations.png width=418>
  4273    <p class=caption>Caseless characters with small-caps, all-small-caps
  4274     enabled
  4275   </div>
  4277   <p>If either ‘<a href="#petite-caps"><code
  4278    class=property>petite-caps</code></a>’ or ‘<a
  4279    href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
  4280    is specified for a font that doesn't support these features, the property
  4281    behaves as if ‘<a href="#small-caps"><code
  4282    class=property>small-caps</code></a>’ or ‘<a
  4283    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4284    respectively, had been specified. If ‘<a href="#unicase"><code
  4285    class=property>unicase</code></a>’ is specified for a font that doesn't
  4286    support that feature, the property behaves as if ‘<a
  4287    href="#small-caps"><code class=property>small-caps</code></a>’ was
  4288    applied only to lowercased uppercase letters. If ‘<a
  4289    href="#titling-caps"><code class=property>titling-caps</code></a>’ is
  4290    specified with a font that does not support this feature, this property
  4291    has no visible effect. When simulated small capital glyphs are used, for
  4292    scripts that lack uppercase and lowercase letters, ‘<a
  4293    href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
  4294    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4295    ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
  4296    ‘<a href="#all-petite-caps"><code
  4297    class=property>all-petite-caps</code></a>’ and ‘<a
  4298    href="#unicase"><code class=property>unicase</code></a>’ have no visible
  4299    effect.
  4301   <p>When casing transforms are used to simulate small capitals, the casing
  4302    transformations must match those used for the <span
  4303    class=property>‘<code class=property>text-transform</code>’</span>
  4304    property.
  4306   <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
  4307    replace glyphs in a small-caps font so that the text appears in all
  4308    uppercase letters.
  4310   <div class=figure style="padding: 0; margin: auto;"><img alt="using
  4311    all-small-caps in acronym-laden text" class=hires
  4312    src=acronym-laden-text.png width=596>
  4313    <p class=caption>Using small capitals to improve readability in
  4314     acronym-laden text
  4315   </div>
  4317   <div class=example>
  4318    <p>Quotes rendered italicised, with small-caps on the first line:</p>
  4320    <pre>blockquote            { font-style: italic; }
  4321 blockquote:first-line { font-variant: small-caps; }
  4323 &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>
  4324 </pre>
  4325   </div>
  4326   <!-- prop: font-variant-numeric -->
  4328   <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
  4329    formatting: the <a
  4330    href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
  4332   <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
  4333    <tbody>
  4334     <tr>
  4335      <td>Name:
  4337      <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
  4339     <tr>
  4340      <td>Value:
  4342      <td><a href="#font-variant-numeric-normal-value"
  4343       title="normal!!font-variant-numeric">normal</a> | [ <a
  4344       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4345       || <a
  4346       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4347       || <a
  4348       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4349       || <a href="#ordinal">ordinal</a> || <a
  4350       href="#slashed-zero">slashed-zero</a> ]
  4352     <tr>
  4353      <td>Initial:
  4355      <td>normal
  4357     <tr>
  4358      <td>Applies to:
  4360      <td>all elements
  4362     <tr>
  4363      <td>Inherited:
  4365      <td>yes
  4367     <tr>
  4368      <td>Percentages:
  4370      <td>N/A
  4372     <tr>
  4373      <td>Media:
  4375      <td>visual
  4377     <tr>
  4378      <td>Computed value:
  4380      <td>as specified
  4382     <tr>
  4383      <td>Animatable:
  4385      <td>no
  4386   </table>
  4388   <p>Specifies control over numerical forms. The example below shows how some
  4389    of these values can be combined to influence the rendering of tabular data
  4390    with fonts that support these features. Within normal paragraph text,
  4391    proportional numbers are used while tabular numbers are used so that
  4392    columns of numbers line up properly:
  4394   <div class=figure style="padding: 0; margin: auto;"><img alt="combining
  4395    number styles" src=numberstyles.png>
  4396    <p class=caption>Using number styles
  4397   </div>
  4399   <p>Possible combinations:
  4401   <pre
  4402    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>
  4404   <pre
  4405    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>
  4407   <pre
  4408    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>
  4410   <p>Individual values have the following meanings:
  4412   <dl>
  4413    <dt><dfn id=font-variant-numeric-normal-value
  4414     title="normal!!font-variant-numeric">normal</dfn>
  4416    <dd>None of the features listed below are enabled.
  4418    <dt><dfn id=lining-nums>lining-nums</dfn>
  4420    <dd>Enables display of lining numerals (OpenType feature: <span
  4421     class=tag>lnum</span>).
  4423    <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
  4425    <dd>Enables display of old-style numerals (OpenType feature: <span
  4426     class=tag>onum</span>).
  4428    <dt><dfn id=proportional-nums>proportional-nums</dfn>
  4430    <dd>Enables display of proportional numerals (OpenType feature: <span
  4431     class=tag>pnum</span>).
  4433    <dt><dfn id=tabular-nums>tabular-nums</dfn>
  4435    <dd>Enables display of tabular numerals (OpenType feature: <span
  4436     class=tag>tnum</span>).
  4438    <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
  4440    <dd>Enables display of lining diagonal fractions (OpenType feature: <span
  4441     class=tag>frac</span>).
  4442   </dl>
  4444   <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
  4446   <dl>
  4447    <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
  4449    <dd>Enables display of lining stacked fractions (OpenType feature: <span
  4450     class=tag>afrc</span>).
  4451   </dl>
  4453   <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
  4455   <dl>
  4456    <dt><dfn id=ordinal>ordinal</dfn>
  4458    <dd>Enables display of letter forms used with ordinal numbers (OpenType
  4459     feature: <span class=tag>ordn</span>).
  4460   </dl>
  4462   <div class=featex><img alt="ordinals example" src=ordinals.png></div>
  4464   <dl>
  4465    <dt><dfn id=slashed-zero>slashed-zero</dfn>
  4467    <dd>Enables display of slashed zeros (OpenType feature: <span
  4468     class=tag>zero</span>).
  4469   </dl>
  4471   <div class=featex><img alt="slashed zero example" src=zero.png></div>
  4473   <div class=example id=ordinal-example>
  4474    <p>In the case of ‘<a href="#ordinal"><code
  4475     class=property>ordinal</code></a>’, although ordinal forms are often
  4476     the same as superscript forms, they are marked up differently.</p>
  4478    <p>For superscripts, the variant property is only applied to the
  4479     sub-element containing the superscript:</p>
  4481    <pre>
  4482 sup { font-variant-position: super; }
  4483 x&lt;sup&gt;2&lt;/sup&gt;
  4484 </pre>
  4486    <p>For ordinals, the variant property is applied to the entire ordinal
  4487     number rather than just to the suffix (or to the containing paragraph):</p>
  4489    <pre>
  4490 .ordinal { font-variant-numeric: ordinal; }
  4491 &lt;span class="ordinal"&gt;17th&lt;/span&gt;
  4492 </pre>
  4494    <p>In this case only the "th" will appear in ordinal form, the digits will
  4495     remain unchanged. Depending upon the typographic traditions used in a
  4496     given language, ordinal forms may differ from superscript forms. In
  4497     Italian, for example, ordinal forms sometimes include an underline in the
  4498     ordinal design.</p>
  4499   </div>
  4501   <div class=example id=steak-marinade>
  4502    <p>A simple flank steak marinade recipe, rendered with automatic fractions
  4503     and old-style numerals:</p>
  4505    <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
  4507 &lt;h4>Steak marinade:&lt;/h4>
  4508 &lt;ul>
  4509   &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
  4510   &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
  4511   &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
  4512   &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
  4513   &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
  4514   &lt;li>Salt &amp;amp; pepper&lt;/li>
  4515 &lt;/ul>
  4517 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
  4518 for a few hours or overnight.&lt;/p>
  4519 </pre>
  4521    <p>Note that the fraction feature is only applied to values not the entire
  4522     paragraph. Fonts often implement this feature using contextual rules
  4523     based on the use of the slash (‘<code class=css>/</code>’) character.
  4524     As such, it's not suitable for use as a paragraph-level style.</p>
  4525   </div>
  4526   <!-- prop: font-variant-alternates -->
  4528   <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
  4529    and swashes: the <a
  4530    href="#propdef-font-variant-alternates">font-variant-alternates</a>
  4531    property</h3>
  4533   <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
  4534    <tbody>
  4535     <tr>
  4536      <td>Name:
  4538      <td><dfn
  4539       id=propdef-font-variant-alternates>font-variant-alternates</dfn>
  4541     <tr>
  4542      <td>Value:
  4544      <td>normal | [ <a href="#stylistic"
  4545       title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
  4546       href="#historical-forms">historical-forms</a> || <a href="#styleset"
  4547       title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
  4548       href="#character-variant"
  4549       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4550       #)</a> || <a href="#swash"
  4551       title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
  4552       href="#ornaments"
  4553       title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
  4554       href="#annotation"
  4555       title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
  4557     <tr>
  4558      <td>Initial:
  4560      <td>normal
  4562     <tr>
  4563      <td>Applies to:
  4565      <td>all elements
  4567     <tr>
  4568      <td>Inherited:
  4570      <td>yes
  4572     <tr>
  4573      <td>Percentages:
  4575      <td>N/A
  4577     <tr>
  4578      <td>Media:
  4580      <td>visual
  4582     <tr>
  4583      <td>Computed value:
  4585      <td>as specified
  4587     <tr>
  4588      <td>Animatable:
  4590      <td>no
  4591   </table>
  4593   <p>For any given character, fonts can provide a variety of alternate glyphs
  4594    in addition to the default glyph for that character. This property
  4595    provides control over the selection of these alternate glyphs.
  4597   <p>For many of the property values listed below, several different
  4598    alternate glyphs are available. How many alternates are available and what
  4599    they represent is font-specific, so these are each marked <dfn
  4600    id=font-specific>font specific</dfn> in the value definitions below.
  4601    Because the nature of these alternates is font-specific, the <a
  4602    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4603    rule is used to define values for a specific font family or set of
  4604    families that associate a font-specific numeric
  4605    <code>&lt;feature-index&gt;</code> with a custom
  4606    <code>&lt;feature-value-name&gt;</code>, which is then used in this
  4607    property to select specific alternates:
  4609   <pre>@font-feature-values Noble Script { @swash { swishy: 1; flowing: 2; } }
  4611 p {
  4612   font-family: Noble Script;
  4613   font-variant-alternates: swash(flowing); /* use swash alternate #2 */
  4614 }</pre>
  4616   <p>When a particular <code>&lt;feature-value-name&gt;</code> has not been
  4617    defined for a given family or for a particular feature type, the computed
  4618    value must be the same as if it had been defined. However, property values
  4619    that contain these undefined <code>&lt;feature-value-name&gt;</code>
  4620    identifiers must be ignored when choosing glyphs.
  4622   <pre>/* these two style rules are effectively the same */
  4623 p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
  4624 p { font-variant-alternates: normal; }
  4625 </pre>
  4627   <p>This allows values to be defined and used for a given set of font
  4628    families but ignored if fallback occurs, since the font family name would
  4629    be different. If a given value is outside the range supported by a given
  4630    font, the value is ignored. These values never apply to generic font
  4631    families.
  4633   <p>Individual values have the following meanings:
  4635   <dl>
  4636    <dt><dfn id=font-variant-alternates-normal-value
  4637     title="normal!!font-variant-alternates">normal</dfn>
  4639    <dd>None of the features listed below are enabled.
  4641    <dt><dfn id=historical-forms>historical-forms</dfn>
  4643    <dd>Enables display of historical forms (OpenType feature: <span
  4644     class=tag>hist</span>).
  4645   </dl>
  4647   <div class=featex><img alt="historical form example" src=hist.png></div>
  4649   <dl>
  4650    <dt><dfn id=stylistic
  4651     title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
  4653    <dd>Enables display of stylistic alternates (<a
  4654     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4655     class=tag>salt &lt;feature-index&gt;</span>).
  4656   </dl>
  4658   <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
  4660   <dl>
  4661    <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
  4662     #)</dfn>
  4664    <dd>Enables display with stylistic sets (<a href="#font-specific"><em>font
  4665     specific</em></a>, OpenType feature: <span
  4666     class=tag>ss&lt;feature-index&gt;</span> OpenType currently defines <span
  4667     class=tag>ss01</span> through <span class=tag>ss20</span>).
  4668   </dl>
  4670   <div class=featex><img alt="styleset example" src=ssnn.png></div>
  4672   <dl>
  4673    <dt><dfn id=character-variant
  4674     title=character-variant>character-variant(&lt;feature-value-name&gt;
  4675     #)</dfn>
  4677    <dd>Enables display of specific character variants (<a
  4678     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4679     class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
  4680     class=tag>cv01</span> through <span class=tag>cv99</span>).
  4682    <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
  4684    <dd>Enables display of swash glyphs (<a href="#font-specific"><em>font
  4685     specific</em></a>, OpenType feature: <span class=tag>swsh
  4686     &lt;feature-index&gt;, cswh &lt;feature-index&gt;</span>).
  4687   </dl>
  4689   <div class=featex><img alt="swash example" src=swsh.png></div>
  4691   <dl>
  4692    <dt><dfn id=ornaments
  4693     title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
  4695    <dd>Enables replacement of default glyphs with ornaments, if provided in
  4696     the font (<a href="#font-specific"><em>font specific</em></a>, OpenType
  4697     feature: <span class=tag>ornm &lt;feature-index&gt;</span>). Some fonts
  4698     may offer ornament glyphs as alternates for a wide collection of
  4699     characters; however, displaying arbitrary characters (e.g.,
  4700     alphanumerics) as ornaments is poor practice as it distorts the semantics
  4701     of the data. Font designers are encouraged to encode all ornaments
  4702     (except those explicitly encoded in the Unicode Dingbats blocks, etc.) as
  4703     alternates for the bullet character (U+2022) to allow authors to select
  4704     the desired glyph using ‘<a href="#ornaments"><code
  4705     class=property>ornaments</code></a>’.
  4706   </dl>
  4708   <div class=featex><img alt="ornaments example" src=ornm.png></div>
  4710   <dl>
  4711    <dt><dfn id=annotation
  4712     title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
  4714    <dd>Enables display of alternate annotation forms (<a
  4715     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4716     class=tag>nalt &lt;feature-index&gt;</span>).
  4717   </dl>
  4719   <div class=featex><img alt="alternate annotation form example"
  4720    src=nalt.png></div>
  4722   <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
  4723    specific alternates: the <dfn id=at-font-feature-values-rule
  4724    style="font-weight: inherit; font-style:
  4725    inherit"><code>@font-feature-values</code></dfn> rule</h3>
  4727   <p>Several of the possible values of ‘<a
  4728    href="#propdef-font-variant-alternates"><code
  4729    class=property>font-variant-alternates</code></a>’ listed above are
  4730    labeled as <a href="#font-specific"><em>font specific</em></a>. For these
  4731    features fonts may define not just a single glyph but a set of alternate
  4732    glyphs with an index to select a given alternate. Since these are font
  4733    family specific, the <a
  4734    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4735    rule is used to define named values for these indices for a given family.
  4737   <p class=note>See the <a href="#om-fontfeaturevalues">object model
  4738    reference section</a> for a description of the interfaces used to modify
  4739    these rules via the CSS Object Model.
  4741   <div class=example>
  4742    <p>In the case of the swash Q in the example shown above, the swash could
  4743     be specified using these style rules:</p>
  4745    <pre>
  4747 @font-feature-values Jupiter Sans {
  4748   @swash {
  4749     delicate: 1;
  4750     flowing: 2;
  4754 h2 { font-family: Jupiter Sans, sans-serif; }
  4756 /* show the second swash variant in h2 headings */
  4757 h2:first-letter { font-variant-alternates: swash(flowing); }
  4759 &lt;h2>Quick&lt;/h2></pre>
  4761    <p>When Jupiter Sans is present, the second alternate swash alternate will
  4762     be displayed. When not present, no swash character will be shown, since
  4763     the specific named value "flowing" is only defined for the Jupiter Sans
  4764     family. The @-mark indicates the name of the property value for which a
  4765     named value can be used. The name "flowing" is chosen by the author. The
  4766     index that represents each alternate is defined within a given font's
  4767     data.</p>
  4768   </div>
  4770   <h4 id=basic-syntax><span class=secno>6.9.1 </span>Basic syntax</h4>
  4772   <p>An <a
  4773    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4774    rule is composed of a list of font families followed by a block containing
  4775    individual <a href="#featurevalueblock"><i
  4776    title="feature_value_block">feature value blocks</i></a> that take the
  4777    form of @-rules. Each block defines a set of named values for a specific
  4778    font feature when a given set of font families is used. Effectively, they
  4779    define a mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
  4780    ⟨values⟩ are the numeric indices used for specific features defined
  4781    for a given font.
  4783   <p>In terms of the grammar, this specification defines the following
  4784    productions:
  4786   <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
  4787   : <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>*
  4788     '{' <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>*
  4791 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
  4792   : <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> ]*
  4795 <dfn id=fontfamilyname>font_family_name</dfn>
  4796   : <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> ]* ]
  4799 <dfn id=featurevalueblock>feature_value_block</dfn>
  4800   : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4801     '{' <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>*
  4804 <dfn id=featuretype>feature_type</dfn>:
  4805   <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
  4808 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
  4809   : <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> ]*
  4811 </pre>
  4813   <p>The following new token is introduced:
  4815   <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>;}
  4816 </pre>
  4818   <p><a href="#featurevalueblock"><i title="feature_value_block">Feature
  4819    value blocks</i></a> are handled as <a
  4820    href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">at-rules</a>, they
  4821    consist of everything up to the next block or semi-colon, whichever comes
  4822    first.
  4824   <p>The <a href="#fontfamilynamelist"><i title="font_family_name_list">font
  4825    family list</i></a> is a comma-delimited list of <a
  4826    href="#fontfamilyname"><i title="font_family_name">font family
  4827    names</i></a> that match the definition of <a
  4828    href="#family-name-value"><var>&lt;family-name&gt;</var></a> for the <a
  4829    href="#propdef-font-family" title="font-family!!property">‘<code
  4830    class=property>font-family</code>’</a> property. This means that only
  4831    named font families are allowed, rules that include generic or system
  4832    fonts in the list of font families are syntax errors. However, if a user
  4833    agent defines a generic font to be a specific named font (e.g. Helvetica),
  4834    the settings associated with that family name will be used. If syntax
  4835    errors occur within the font family list, the entire rule must be ignored.
  4837   <p>Within <a href="#featurevalueblock"><i
  4838    title="feature_value_block">feature value blocks</i></a>, the <a
  4839    href="#featuretype"><i title="feature_type">feature type</i></a> is
  4840    ‘<code class=css>@</code>’ followed by the name of one of the <a
  4841    href="#font-specific"><em>font specific</em></a> property values of ‘<a
  4842    href="#propdef-font-variant-alternates"><code
  4843    class=property>font-variant-alternates</code></a>’ (e.g. <a
  4844    href="#swash"><code>@swash</code></a>). The identifiers used within
  4845    feature value definitions follow the rules of CSS user identifiers and are
  4846    case-sensitive. They are unique only for a given set of font families and
  4847    <a href="#featuretype"><i title="feature_type">feature type</i></a>. The
  4848    same identifier used with a different <a href="#featuretype"><i
  4849    title="feature_type">feature type</i></a> is treated as a separate and
  4850    distinct value. If the same identifier is defined mulitple times for a
  4851    given <a href="#featuretype"><i title="feature_type">feature type</i></a>
  4852    and font family, the last defined value is used. Values associated with a
  4853    given identifier are limited to integer values 0 or greater.
  4855   <p>When syntax errors occur within a <a href="#featurevaluedefinition"><i
  4856    title="feature_value_definition">feature value definition</i></a>, such as
  4857    invalid identifiers or values, the entire <a
  4858    href="#featurevaluedefinition"><i title="feature_value_definition">feature
  4859    value definition</i></a> must be omitted, just as syntax errors in style
  4860    declarations are handled. When the <a href="#featuretype"><i
  4861    title="feature_type">feature type</i></a> is invalid, the entire
  4862    associated <a href="#featurevalueblock"><i
  4863    title="feature_value_block">feature value block</i></a> must be ignored.
  4865   <div class=example>
  4866    <p>Rules that are equivalent given syntax error handling:</p>
  4868    <pre>@font-feature-values Bongo {
  4869   @swash { ornate: 1; }
  4870   annotation { boxed: 4; } /* should be @annotation! */
  4871   @swash { double-loops: 1; flowing: -1; } /* negative value */
  4872   @ornaments ; /* incomplete definition */
  4873   @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
  4874   <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none; border: none;">redrum</a>  /* random editing mistake */
  4875 }</pre>
  4877    <p>The example above is equivalent to:</p>
  4879    <pre>@font-feature-values Bongo {
  4880   @swash { ornate: 1; }
  4881   @swash { double-loops: 1; }
  4882   @styleset { double-W: 14; sharp-terminals: 16 1; }
  4883 }</pre>
  4884   </div>
  4886   <p>If multiple <a
  4887    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4888    rules are defined for a given family, the resulting values definitions are
  4889    the union of the definitions contained within these rules. This allows a
  4890    set of named values to be defined for a given font family globally for a
  4891    site and specific additions made per-page.
  4893   <div class=example>
  4894    <p>Using both site-wide and per-page feature values:</p>
  4896    <pre>
  4897 site.css:
  4899   @font-feature-values Mercury Serif {
  4900     @styleset {
  4901       stacked-g: 3; /* "two-storey" versions of g, a */
  4902       stacked-a: 4;
  4906 page.css:
  4908   @font-feature-values Mercury Serif {
  4909     @styleset {
  4910       geometric-m: 7; /* alternate version of m */
  4914   body {
  4915     font-family: Mercury Serif, serif;
  4917     /* enable both the use of stacked g and alternate m */
  4918     font-variant-alternates: styleset(stacked-g, geometric-m);
  4919   }</pre>
  4920   </div>
  4922   <div class=example>
  4923    <p>Using a commonly named value allows authors to use a single style rule
  4924     to cover a set of fonts for which the underlying selector is different
  4925     for each font. If either font in the example below is found, a circled
  4926     number glyph will be used:</p>
  4928    <pre>@font-feature-values Taisho Gothic {
  4929   @annotation { boxed: 1; circled: 4; }
  4932 @font-feature-values Otaru Kisa {
  4933   @annotation { circled: 1; black-boxed: 3; }
  4936 h3.title {
  4937   /* circled form defined for both fonts */
  4938   font-family: Taisho Gothic, Otaru Kisa;
  4939   font-variant: annotation(circled);
  4940 }</pre>
  4941   </div>
  4943   <h4 id=multi-valued-feature-value-definitions><span class=secno>6.9.2
  4944    </span>Multi-valued feature value definitions</h4>
  4946   <p>Most <a href="#font-specific"><em>font specific</em></a> ‘<a
  4947    href="#propdef-font-variant-alternates"><code
  4948    class=property>font-variant-alternates</code></a>’ property values take
  4949    a single value (e.g. ‘<a href="#swash"><code
  4950    class=property>swash</code></a>’). The ‘<a
  4951    href="#character-variant"><code
  4952    class=property>character-variant</code></a>’ property value allows two
  4953    values and ‘<a href="#styleset"><code
  4954    class=property>styleset</code></a>’ allows an unlimited number.
  4956   <p>For the styleset property value, multiple values indicate the style sets
  4957    to be enabled. Values between 1 and 99 enable OpenType features <span
  4958    class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
  4959    OpenType standard only officially defines <span class=tag>ss01</span>
  4960    through <span class=tag>ss20</span>. For OpenType fonts, values greater
  4961    than 99 or equal to 0 do not generate a syntax error when parsed but
  4962    enable no OpenType features.
  4964   <pre>@font-feature-values Mars Serif {
  4965   @styleset {
  4966     alt-g: 1;        /* implies ss01 = 1 */
  4967     curly-quotes: 3; /* implies ss03 = 1 */
  4968     code: 4 5;       /* implies ss04 = 1, ss05 = 1 */
  4971   @styleset {
  4972     dumb: 125;        /* &gt;99, ignored */
  4975   @swash {
  4976     swishy: 3 5;     /* more than 1 value for swash, syntax error */
  4980 p.codeblock {
  4981   /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
  4982   font-variant-alternates: styleset(curly-quotes, code);
  4983 }</pre>
  4985   <p>For character-variant, a single value between 1 and 99 indicates the
  4986    enabling of OpenType feature <span class=tag>cv01</span> through <span
  4987    class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
  4988    to 0 are ignored but do not generate a syntax error when parsed but enable
  4989    no OpenType features. When two values are listed, the first value
  4990    indicates the feature used and the second the value passed for that
  4991    feature. If more than two values are assigned to a given name, a syntax
  4992    error occurs and the entire <a href="#featurevaluedefinition"><i
  4993    title="feature_value_definition">feature value definition</i></a> is
  4994    ignored.
  4996   <pre>@font-feature-values MM Greek {
  4997   @character-variant { alpha-2: 1 2; }   /* implies cv01 = 2 */
  4998   @character-variant { beta-3: 2 3; }    /* implies cv02 = 3 */
  4999   @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, definition ignored */
  5000   @character-variant { gamma: 12; }      /* implies cv12 = 1 */
  5001   @character-variant { zeta:   20 3; }   /* implies cv20 = 3 */
  5002   @character-variant { zeta-2: 20 2; }   /* implies cv20 = 2 */
  5003   @character-variant { silly: 105; }     /* &gt;99, ignored */
  5004   @character-variant { dumb: 323 3; }    /* &gt;99, ignored */
  5007 #title {
  5008   /* use the third alternate beta, first alternate gamma */
  5009   font-variant-alternates: character-variant(beta-3, gamma);
  5012 p {
  5013   /* zeta-2 follows zeta, implies cv20 = 2  */
  5014   font-variant-alternates: character-variant(zeta, zeta-2);
  5017 .special {
  5018   /* zeta follows zeta-2, implies cv20 = 3  */
  5019   font-variant-alternates: character-variant(zeta-2, zeta);
  5020 }</pre>
  5022   <div class=figure><img alt="Matching text on Byzantine seals using
  5023    character variants" src=byzantineseal.png>
  5024    <p class=caption>Byzantine seal text displayed with character variants
  5025   </div>
  5027   <div class=example>
  5028    <p>In the figure above, the text in red is rendered using a font
  5029     containing character variants that mimic the character forms found on a
  5030     Byzantine seal from the 8th century A.D. Two lines below is the same text
  5031     displayed in a font without variants. Note the two variants for U and N
  5032     used on the seal.</p>
  5034    <pre>@font-feature-values Athena Ruby {
  5035   @character-variant {
  5036     leo-B: 2 1;
  5037     leo-M: 13 3;
  5038     leo-alt-N: 14 1;
  5039     leo-N: 14 2;
  5040     leo-T: 20 1;
  5041     leo-U: 21 2;
  5042     leo-alt-U: 21 4;
  5046 p {
  5047   font-variant: discretionary-ligatures,
  5048                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
  5051 span.alt-N {
  5052   font-variant-alternates: character-variant(leo-alt-N);
  5055 span.alt-U {
  5056   font-variant-alternates: character-variant(leo-alt-U);
  5059 &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>
  5061 &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>
  5062 </pre>
  5063   </div>
  5065   <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
  5066    Asian text rendering: the <a
  5067    href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  5068    property</h3>
  5070   <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
  5071    <tbody>
  5072     <tr>
  5073      <td>Name:
  5075      <td><dfn
  5076       id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
  5078     <tr>
  5079      <td>Value:
  5081      <td><a href="#font-variant-east-asian-normal-value"
  5082       title="normal!!font-variant-east-asian">normal</a> | [ <a
  5083       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  5084       || <a
  5085       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  5086       || <a href="#ruby">ruby</a> ]
  5088     <tr>
  5089      <td>Initial:
  5091      <td>normal
  5093     <tr>
  5094      <td>Applies to:
  5096      <td>all elements
  5098     <tr>
  5099      <td>Inherited:
  5101      <td>yes
  5103     <tr>
  5104      <td>Percentages:
  5106      <td>N/A
  5108     <tr>
  5109      <td>Media:
  5111      <td>visual
  5113     <tr>
  5114      <td>Computed value:
  5116      <td>as specified
  5118     <tr>
  5119      <td>Animatable:
  5121      <td>no
  5122   </table>
  5124   <p>Allows control of glyph substitution and sizing in East Asian text.
  5126   <pre
  5127    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>
  5129   <pre
  5130    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>
  5132   <p>Individual values have the following meanings:
  5134   <dl>
  5135    <dt><dfn id=font-variant-east-asian-normal-value
  5136     title="normal!!font-variant-east-asian">normal</dfn>
  5138    <dd>None of the features listed below are enabled.
  5140    <dt><dfn id=jis78>jis78</dfn>
  5142    <dd>Enables rendering of JIS78 forms (OpenType feature: <span
  5143     class=tag>jp78</span>).
  5144   </dl>
  5146   <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
  5148   <dl>
  5149    <dt><dfn id=jis83>jis83</dfn>
  5151    <dd>Enables rendering of JIS83 forms (OpenType feature: <span
  5152     class=tag>jp83</span>).
  5154    <dt><dfn id=jis90>jis90</dfn>
  5156    <dd>Enables rendering of JIS90 forms (OpenType feature: <span
  5157     class=tag>jp90</span>).
  5159    <dt><dfn id=jis04>jis04</dfn>
  5161    <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
  5162     class=tag>jp04</span>).
  5163     <p>The various JIS variants reflect the glyph forms defined in different
  5164      Japanese national standards. Fonts generally include glyphs defined by
  5165      the most recent national standard but it's sometimes necessary to use
  5166      older variants, to match signage for example.</p>
  5168    <dt><dfn id=simplified>simplified</dfn>
  5170    <dd>Enables rendering of simplified forms (OpenType feature: <span
  5171     class=tag>smpl</span>).
  5173    <dt><dfn id=traditional>traditional</dfn>
  5175    <dd>Enables rendering of traditional forms (OpenType feature: <span
  5176     class=tag>trad</span>).
  5177   </dl>
  5179   <p>The ‘<a href="#simplified"><code
  5180    class=property>simplified</code></a>’ and ‘<a
  5181    href="#traditional"><code class=property>traditional</code></a>’ values
  5182    allow control over the glyph forms for characters which have been
  5183    simplified over time but for which the older, traditional form is still
  5184    used in some contexts. The exact set of characters and glyph forms will
  5185    vary to some degree by context for which a given font was designed.
  5187   <div class=featex><img alt="tradtional form example" src=trad.png></div>
  5189   <dl>
  5190    <dt><dfn id=full-width>full-width</dfn>
  5192    <dd>Enables rendering of full-width variants (OpenType feature: <span
  5193     class=tag>fwid</span>).
  5195    <dt><dfn id=proportional-width>proportional-width</dfn>
  5197    <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
  5198     <span class=tag>pwid</span>).
  5199   </dl>
  5201   <div class=featex><img alt="proportionally spaced Japanese example"
  5202    src=pwid.png></div>
  5204   <dl>
  5205    <dt><dfn id=ruby>ruby</dfn>
  5207    <dd>Enables display of ruby variant glyphs (OpenType feature: <span
  5208     class=tag>ruby</span>). Since ruby text is generally smaller than the
  5209     associated body text, font designers can design special glyphs for use
  5210     with ruby that are more readable than scaled down versions of the default
  5211     glyphs. Only glyph selection is affected, there is no associated font
  5212     scaling or other change that affects line layout. The red ruby text below
  5213     is shown with default glyphs (top) and with ruby variant glyphs (bottom).
  5214     Note the slight difference in stroke thickness.
  5215   </dl>
  5217   <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
  5219   <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
  5220    for font rendering: the <a href="#propdef-font-variant">font-variant</a>
  5221    property</h3>
  5223   <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
  5224    <tbody>
  5225     <tr>
  5226      <td>Name:
  5228      <td><dfn id=propdef-font-variant
  5229       title="font-variant!!property">font-variant</dfn>
  5231     <tr>
  5232      <td>Value:
  5234      <td><a href="#font-variant-normal-value"
  5235       title="normal!!font-variant">normal</a> | <a
  5236       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  5237       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  5238       || <a
  5239       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  5240       || <a
  5241       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  5242       || <a
  5243       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  5244       || <a href="#stylistic"><var
  5245       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  5246       href="#historical-forms"><var>historical-forms</var></a> || <a
  5247       href="#styleset"><var
  5248       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  5249       href="#character-variant"><var
  5250       title=character-variant>character-variant(&lt;feature-value-name&gt;
  5251       #)</var></a> || <a href="#swash"><var
  5252       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  5253       href="#ornaments"><var
  5254       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  5255       href="#annotation"><var
  5256       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  5257       <a href="#small-caps"><i>small-caps</i></a> | <a
  5258       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  5259       href="#petite-caps"><i>petite-caps</i></a> | <a
  5260       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  5261       href="#unicase"><i>unicase</i></a> | <a
  5262       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  5263       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  5264       || <a
  5265       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  5266       || <a
  5267       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  5268       || <a href="#ordinal"><i>ordinal</i></a> || <a
  5269       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  5270       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  5271       || <a
  5272       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  5273       || <a href="#ruby"><i>ruby</i></a> ]
  5275     <tr>
  5276      <td>Initial:
  5278      <td>normal
  5280     <tr>
  5281      <td>Applies to:
  5283      <td>all elements
  5285     <tr>
  5286      <td>Inherited:
  5288      <td>yes
  5290     <tr>
  5291      <td>Percentages:
  5293      <td>see individual properties
  5295     <tr>
  5296      <td>Media:
  5298      <td>visual
  5300     <tr>
  5301      <td>Computed value:
  5303      <td>see individual properties
  5305     <tr>
  5306      <td>Animatable:
  5308      <td>see individual properties
  5309   </table>
  5311   <p>The <a href="#propdef-font-variant"
  5312    title="font-variant!!property">‘<code
  5313    class=property>font-variant</code>’</a> property is a shorthand for all
  5314    font-variant subproperties. The value <dfn id=font-variant-normal-value
  5315    title="normal!!font-variant">‘<code
  5316    class=property>normal</code>’</dfn> resets all subproperties of <a
  5317    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5318    class=property>font-variant</code>’</a> to their inital value. The <dfn
  5319    id=font-variant-none-value title="none!!font-variant">‘<code
  5320    class=property>none</code>’</dfn> value sets ‘<a
  5321    href="#propdef-font-variant-ligatures"><code
  5322    class=property>font-variant-ligatures</code></a>’ to ‘<code
  5323    class=property>none</code>’ and resets all other font feature properties
  5324    to their initial value. Like other shorthands, using <a
  5325    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5326    class=property>font-variant</code>’</a> resets unspecified <a
  5327    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5328    class=property>font-variant</code>’</a> subproperties to their initial
  5329    values. It does not reset the values of either ‘<a
  5330    href="#propdef-font-language-override"><code
  5331    class=property>font-language-override</code></a>’ or <a
  5332    href="#propdef-font-feature-settings"
  5333    title="font-feature-settings!!property">‘<code
  5334    class=property>font-feature-settings</code>’</a>.
  5336   <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
  5337    font feature settings control: the <a
  5338    href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
  5340   <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
  5341    <tbody>
  5342     <tr>
  5343      <td>Name:
  5345      <td><dfn id=propdef-font-feature-settings
  5346       title="font-feature-settings!!property">font-feature-settings</dfn>
  5348     <tr>
  5349      <td>Value:
  5351      <td><a href="#font-feature-settings-normal-value"
  5352       title="normal!!font-feature-settings">normal</a> | <a
  5353       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  5355     <tr>
  5356      <td>Initial:
  5358      <td>normal
  5360     <tr>
  5361      <td>Applies to:
  5363      <td>all elements
  5365     <tr>
  5366      <td>Inherited:
  5368      <td>yes
  5370     <tr>
  5371      <td>Percentages:
  5373      <td>N/A
  5375     <tr>
  5376      <td>Media:
  5378      <td>visual
  5380     <tr>
  5381      <td>Computed value:
  5383      <td>as specified
  5385     <tr>
  5386      <td>Animatable:
  5388      <td>no
  5389   </table>
  5391   <p>This property provides low-level control over OpenType font features. It
  5392    is intended as a way of providing access to font features that are not
  5393    widely used but are needed for a particular use case.
  5395   <p>Authors should generally use <a href="#propdef-font-variant"
  5396    title="font-variant!!property">‘<code
  5397    class=property>font-variant</code>’</a> and its related subproperties
  5398    whenever possible and only use this property for special cases where its
  5399    use is the only way of accessing a particular infrequently used font
  5400    feature.
  5402   <pre>/* enable small caps and use second swash alternate */
  5403 font-feature-settings: "smcp", "swsh" 2;</pre>
  5405   <p>A value of <dfn id=font-feature-settings-normal-value
  5406    title="normal!!font-feature-settings">‘<code
  5407    class=property>normal</code>’</dfn> means that no change in glyph
  5408    selection or positioning occurs due to this property.
  5410   <p>Feature tag values have the following syntax:
  5412   <pre
  5413    class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
  5415   <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
  5416    specified in the OpenType specification, feature tags contain four ASCII
  5417    characters. Tag strings longer or shorter than four characters, or
  5418    containing characters outside the U+20–7E codepoint range are invalid.
  5419    Feature tags need only match a feature tag defined in the font, so they
  5420    are not limited to explicitly registered OpenType features. Fonts defining
  5421    custom feature tags should follow the <a
  5422    href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
  5423    rules</a> defined in the OpenType specification <a
  5424    href="#OPENTYPE-FEATURES"
  5425    rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
  5427   <p>Feature tags not present in the font are ignored; a user agent must not
  5428    attempt to synthesize fallback behavior based on these feature tags. The
  5429    one exception is that user agents may synthetically support the <span
  5430    class=tag>kern</span> feature with fonts that contain kerning data in the
  5431    form of a ‘<code class=property>kern</code>’ table but lack <span
  5432    class=tag>kern</span> feature support in the ‘<code
  5433    class=property>GPOS</code>’ table.
  5435   <p class=note>In general, authors should use the ‘<a
  5436    href="#propdef-font-kerning"><code
  5437    class=property>font-kerning</code></a>’ property to explicitly enable or
  5438    disable kerning since this property always affects fonts with either type
  5439    of kerning data.
  5441   <p>If present, a value indicates an index used for glyph selection. An
  5442    &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
  5443    the feature is disabled. For boolean features, a value of 1 enables the
  5444    feature. For non-boolean features, a value of 1 or greater enables the
  5445    feature and indicates the feature selection index. A value of ‘<code
  5446    class=property>on</code>’ is synonymous with 1 and ‘<code
  5447    class=property>off</code>’ is synonymous with 0. If the value is
  5448    omitted, a value of 1 is assumed.
  5450   <pre>
  5451 font-feature-settings: "dlig" 1;       /* dlig=1 enable discretionary ligatures */
  5452 font-feature-settings: "smcp" on;      /* smcp=1 enable small caps */
  5453 font-feature-settings: 'c2sc';         /* c2sc=1 enable caps to small caps */
  5454 font-feature-settings: "liga" off;     /* liga=0 no common ligatures */
  5455 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
  5456 font-feature-settings: "tnum" "hist";  /* invalid, need a comma-delimited list */
  5457 font-feature-settings: "silly" off;    /* invalid, tag too long */
  5458 font-feature-settings: "PKRN";         /* PKRN=1 enable custom feature */
  5459 font-feature-settings: dlig;           /* invalid, tag must be a string */
  5460 </pre>
  5462   <p>When values greater than the range supported by the font are specified,
  5463    the behavior is explicitly undefined. For boolean features, in general
  5464    these will enable the feature. For non-boolean features, out of range
  5465    values will in general be equivalent to a 0 value. However, in both cases
  5466    the exact behavior will depend upon the way the font is designed
  5467    (specifically, which type of lookup is used to define the feature).
  5469   <p>Although specifically defined for OpenType feature tags, feature tags
  5470    for other modern font formats that support font features may be added in
  5471    the future. Where possible, features defined for other font formats should
  5472    attempt to follow the pattern of registered OpenType tags.
  5474   <div class=example>
  5475    <p>The Japanese text below will be rendered with half-width kana
  5476     characters:</p>
  5478    <pre lang=ja>
  5479 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
  5481 &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>
  5482 </pre>
  5483   </div>
  5485   <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
  5486    language override: the <a
  5487    href="#propdef-font-language-override">font-language-override</a> property</h3>
  5489   <table class=propdef id=namefont-language-overridevaluenormal-lt>
  5490    <tbody>
  5491     <tr>
  5492      <td>Name:
  5494      <td><dfn id=propdef-font-language-override>font-language-override</dfn>
  5496     <tr>
  5497      <td>Value:
  5499      <td><a href="#font-language-override-normal-value"
  5500       title="normal!!font-language-override">normal</a> | <a
  5501       href="#font-language-override-string-value"><var>&lt;string&gt;</var></a>
  5503     <tr>
  5504      <td>Initial:
  5506      <td><a href="#font-language-override-normal-value"
  5507       title="normal!!font-language-override">normal</a>
  5509     <tr>
  5510      <td>Applies to:
  5512      <td>all elements
  5514     <tr>
  5515      <td>Inherited:
  5517      <td>yes
  5519     <tr>
  5520      <td>Percentages:
  5522      <td>N/A
  5524     <tr>
  5525      <td>Media:
  5527      <td>visual
  5529     <tr>
  5530      <td>Computed value:
  5532      <td>as specified
  5534     <tr>
  5535      <td>Animatable:
  5537      <td>no
  5538   </table>
  5540   <p>Normally, authors can control the use of language-specific glyph
  5541    substitutions and positioning by setting the content language of an
  5542    element, as <a href="#language-specific-support">described above</a>:
  5544   <pre>&lt;!-- Display text using S'gaw Karen specific features -->
  5545 &lt;p lang="ksw">...&lt;/p></pre>
  5547   <p>In some cases, authors may need to specify a language system that
  5548    differs from the content language, for example due to the need to mimic
  5549    another language's typographic traditions. The ‘<a
  5550    href="#propdef-font-language-override"><code
  5551    class=property>font-language-override</code></a>’ property allows
  5552    authors to explicitly specify the language system of the font, overriding
  5553    the language system implied by the content language.
  5555   <p>Values have the following meanings:
  5557   <dl>
  5558    <dt><dfn id=font-language-override-normal-value
  5559     title="normal!!font-language-override">normal</dfn>
  5561    <dd>specifies that when rendering with OpenType fonts, the content
  5562     language of the element is used to infer the OpenType language system
  5564    <dt><dfn
  5565     id=font-language-override-string-value><var>&lt;string&gt;</var></dfn>
  5567    <dd>single three-letter case-sensitive OpenType <a
  5568     href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
  5569     system tag</a>, specifies the OpenType language system to be used instead
  5570     of the language system implied by the language of the element
  5571   </dl>
  5572   <!-- For this level, string represents a single language code, there's no concept of "fallback" 
  5573 http://www.w3.org/2013/06/07-css-minutes.html#item04 -->
  5575   <p>Use of invalid OpenType language system tags must not generate a parse
  5576    error but must be ignored when doing glyph selection and placement.
  5578   <div class=example>
  5579    <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
  5580     Declaration of Human Rights</a> has been translated into a wide variety
  5581     of languages. In Turkish, Article 9 of this document might be marked up
  5582     as below:</p>
  5584    <pre lang=tr>&lt;body lang="tr">
  5586 &lt;h4>Madde 9&lt;/h4>
  5587 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
  5588 </pre>
  5590    <p>Here the user agent uses the value of the ‘<code
  5591     class=property>lang</code>’ attribute when rendering text and
  5592     appropriately renders this text without ‘<code
  5593     class=property>fi</code>’ ligatures. There is no need to use the ‘<a
  5594     href="#propdef-font-language-override"><code
  5595     class=property>font-language-override</code></a>’ property.</p>
  5597    <p>However, a given font may lack support for a specific language. In this
  5598     situation authors may need to use the typographic conventions of a
  5599     related language that are supported by that font:</p>
  5601    <pre lang=mk>&lt;body lang="mk">     &lt;!-- Macedonian lang code --&gt;
  5603 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
  5605 &lt;h4>Члeн 9&lt;/h4>
  5606 &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>
  5608 </pre>
  5610    <p>The Macedonian text here will be rendered using Serbian typographic
  5611     conventions, with the assumption that the font specified supports
  5612     Serbian.</p>
  5613   </div>
  5615   <p><a id=rendering-considerations></a>
  5617   <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
  5618    Resolution</h2>
  5620   <p>As described in the previous section, font features can be enabled in a
  5621    variety of ways, either via the use of <a href="#propdef-font-variant"
  5622    title="font-variant!!property">‘<code
  5623    class=property>font-variant</code>’</a> or <a
  5624    href="#propdef-font-feature-settings"
  5625    title="font-feature-settings!!property">‘<code
  5626    class=property>font-feature-settings</code>’</a> in a style rule or
  5627    within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5628    The resolution order for the union of these settings is defined below.
  5629    Features defined via CSS properties are applied on top of layout engine
  5630    default features.
  5632   <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
  5634   <p>For OpenType fonts, user agents must enable the default features defined
  5635    in the OpenType documentation for a given script and writing mode.
  5636    Required ligatures, common ligatures and contextual forms must be enabled
  5637    by default (OpenType features: <span class=tag>rlig, liga, clig,
  5638    calt</span>), along with localized forms (OpenType feature: <span
  5639    class=tag>locl</span>), and features required for proper display of
  5640    composed characters and marks (OpenType features: <span class=tag>ccmp,
  5641    mark, mkmk</span>). These features must always be enabled, even when the
  5642    value of the <a href="#propdef-font-variant"
  5643    title="font-variant!!property">‘<code
  5644    class=property>font-variant</code>’</a> and <a
  5645    href="#propdef-font-feature-settings"
  5646    title="font-feature-settings!!property">‘<code
  5647    class=property>font-feature-settings</code>’</a> properties is <span
  5648    title="normal value">‘<code class=property>normal</code>’</span>.
  5649    Individual features are only disabled when explicitly overridden by the
  5650    author, as when ‘<a href="#propdef-font-variant-ligatures"><code
  5651    class=property>font-variant-ligatures</code></a>’ is set to ‘<a
  5652    href="#no-common-ligatures"><code
  5653    class=property>no-common-ligatures</code></a>’. For handling complex
  5654    scripts such as <a
  5655    href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
  5656    <a
  5657    href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
  5658    or <a
  5659    href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
  5660    additional features are required. For upright text within vertical text
  5661    runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
  5662    must be enabled.
  5664   <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
  5666   <p>General and <a href="#font-specific"><em>font specific</em></a> font
  5667    feature property settings are resolved in the order below, in ascending
  5668    order of precedence. This ordering is used to construct a combined list of
  5669    font features that affect a given text run.
  5671   <ol>
  5672    <li>Font features enabled by default, including features required for a
  5673     given script.
  5675    <li>If the font is defined via an <a
  5676     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5677     features implied by the font-variant descriptor in the <a
  5678     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5680    <li>If the font is defined via an <a
  5681     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5682     features implied by the font-feature-settings descriptor in the <a
  5683     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5685    <li>Font features implied by the value of the <a
  5686     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5687     class=property>font-variant</code>’</a> property, the related <a
  5688     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5689     class=property>font-variant</code>’</a> subproperties and any other CSS
  5690     property that uses OpenType features (e.g. the ‘<a
  5691     href="#propdef-font-kerning"><code
  5692     class=property>font-kerning</code></a>’ property).</li>
  5693    <!-- other CSS props override 'font-variant' but not 'font-feature-settings' -->
  5694    <!-- http://lists.w3.org/Archives/Public/www-style/2013Aug/0110.html -->
  5696    <li>Feature settings determined by properties other than <a
  5697     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5698     class=property>font-variant</code>’</a> or <a
  5699     href="#propdef-font-feature-settings"
  5700     title="font-feature-settings!!property">‘<code
  5701     class=property>font-feature-settings</code>’</a>. For example, setting
  5702     a non-default value for the ‘<code
  5703     class=property>letter-spacing</code>’ property disables common
  5704     ligatures.
  5706    <li>Font features implied by the value of <a
  5707     href="#propdef-font-feature-settings"
  5708     title="font-feature-settings!!property">‘<code
  5709     class=property>font-feature-settings</code>’</a> property.
  5710   </ol>
  5712   <p>This ordering allows authors to set up a general set of defaults for
  5713    fonts within their <a
  5714    href="#at-font-face-rule"><code>@font-face</code></a> rules, then override
  5715    them with property settings for specific elements. General property
  5716    settings override the settings in <a
  5717    href="#at-font-face-rule"><code>@font-face</code></a> rules and low-level
  5718    font feature settings override <a href="#propdef-font-variant"
  5719    title="font-variant!!property">‘<code
  5720    class=property>font-variant</code>’</a> property settings.
  5722   <p>For situations where the combined list of font feature settings contains
  5723    more than one value for the same feature, the last value is used. When a
  5724    font lacks support for a given underlying font feature, text is simply
  5725    rendered as if that font feature was not enabled; font fallback does not
  5726    occur and no attempt is made to synthesize the feature except where
  5727    explicitly defined for specific properties.
  5729   <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
  5730    precedence examples</h3>
  5732   <div class=example>
  5733    <p>With the styles below, numbers are rendered proportionally when used
  5734     within a paragraph but are shown in tabular form within tables of prices:</p>
  5736    <pre>body {
  5737   font-variant-numeric: proportional-nums;
  5740 table.prices td {
  5741   font-variant-numeric: tabular-nums;
  5743 </pre>
  5744   </div>
  5746   <div class=example>
  5747    <p>When the <a href="#descdef-font-variant"
  5748     title="font-variant!!descriptor">font-variant</a> descriptor is used
  5749     within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule,
  5750     it only applies to the font defined by that rule.</p>
  5752    <pre>@font-face {
  5753   font-family: MainText;
  5754   src: url(http://example.com/font.woff);
  5755   font-variant: oldstyle-nums proportional-nums styleset(1,3);
  5758 body {
  5759   font-family: MainText, Helvetica;
  5762 table.prices td {
  5763   font-variant-numeric: tabular-nums;
  5765 </pre>
  5767    <p>In this case, old-style numerals will be used throughout but only where
  5768     the font "MainText" is used. Just as in the previous example, tabular
  5769     values will be used in price tables since ‘<a
  5770     href="#tabular-nums"><code class=property>tabular-nums</code></a>’
  5771     appears in a general style rule and its use is mutually exclusive with
  5772     ‘<a href="#proportional-nums"><code
  5773     class=property>proportional-nums</code></a>’. Stylistic alternate sets
  5774     will only be used where MainText is used.</p>
  5775   </div>
  5777   <div class=example>
  5778    <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule can
  5779     also be used to access font features in locally available fonts via the
  5780     use of <code>local()</code> in the ‘<a href="#descdef-src"><code
  5781     class=property>src</code></a>’ descriptor of the <a
  5782     href="#at-font-face-rule"><code>@font-face</code></a> definition:</p>
  5784    <pre>@font-face {
  5785   font-family: BodyText;
  5786   src: local("HiraMaruPro-W4");
  5787   font-variant: proportional-width;
  5788   font-feature-settings: "ital"; /* Latin italics within CJK text feature */
  5791 body { font-family: BodyText, serif; }
  5792 </pre>
  5794    <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
  5795     text rendering occurs, Japanese kana will be proportionally spaced and
  5796     Latin text will be italicised. Text rendered with the fallback serif font
  5797     will use default rendering properties.</p>
  5798   </div>
  5800   <div class=example>
  5801    <p>In the example below, discretionary ligatures are enabled only for a
  5802     downloadable font but are disabled within spans of class "special":</p>
  5804    <pre>@font-face {
  5805   font-family: main;
  5806   src: url(fonts/ffmeta.woff) format("woff");
  5807   font-variant: discretionary-ligatures;
  5810 body         { font-family: main, Helvetica; }
  5811 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5812 </pre>
  5814    <p>Suppose one adds a rule using ‘<code
  5815     class=property>font-feature-settings</code>’ to enable discretionary
  5816     ligatures:</p>
  5818    <pre>body         { font-family: main, Helvetica; }
  5819 span         { font-feature-settings: "dlig"; }
  5820 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5821 </pre>
  5823    <p>In this case, discretionary ligatures <em>will</em> be rendered within
  5824     spans of class "special". This is because both the <a
  5825     href="#propdef-font-feature-settings"
  5826     title="font-feature-settings!!property">‘<code
  5827     class=property>font-feature-settings</code>’</a> and ‘<a
  5828     href="#propdef-font-variant-ligatures"><code
  5829     class=property>font-variant-ligatures</code></a>’ properties apply to
  5830     these spans. Although the ‘<code class=css>no-discretionary
  5831     ligatures</code>’ setting of ‘<a
  5832     href="#propdef-font-variant-ligatures"><code
  5833     class=property>font-variant-ligatures</code></a>’ effectively disables
  5834     the OpenType <span class=tag>dlig</span> feature, because the <a
  5835     href="#propdef-font-feature-settings"
  5836     title="font-feature-settings!!property">‘<code
  5837     class=property>font-feature-settings</code>’</a> is resolved after
  5838     that, the ‘<code class=property>dlig</code>’ value reenables
  5839     discretionary ligatures.</p>
  5840   </div>
  5842   <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
  5844   <p>The contents of <a href="#at-font-face-rule"><code>@font-face</code></a>
  5845    and <a
  5846    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5847    rules can be accessed via the following extensions to the CSS Object
  5848    Model.
  5850   <h3 id=om-fontface><span class=secno>8.1 </span>The <a
  5851    href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
  5853   <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
  5854    <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5856   <pre class=idl>
  5857 interface CSSFontFaceRule : CSSRule {
  5858   attribute DOMString family;
  5859   attribute DOMString src;
  5860   attribute DOMString style;
  5861   attribute DOMString weight;
  5862   attribute DOMString stretch;
  5863   attribute DOMString unicodeRange;
  5864   attribute DOMString variant;
  5865   attribute DOMString featureSettings;
  5866 }</pre>
  5868   <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
  5869    rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
  5870    defined a different variant of this rule. This definition supercedes that
  5871    one.
  5873   <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
  5874    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5875    interface</h3>
  5877   <p>The <code>CSSRule</code> interface is extended as follows:
  5879   <pre class=idl>partial interface CSSRule {
  5880   const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  5881 }</pre>
  5883   <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
  5884    interface represents a <a
  5885    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5886    rule.
  5888   <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
  5889   attribute DOMString fontFamily;
  5890   readonly attribute CSSFontFeatureValuesMap annotation;
  5891   readonly attribute CSSFontFeatureValuesMap ornaments;
  5892   readonly attribute CSSFontFeatureValuesMap stylistic;
  5893   readonly attribute CSSFontFeatureValuesMap swash;
  5894   readonly attribute CSSFontFeatureValuesMap characterVariant;
  5895   readonly attribute CSSFontFeatureValuesMap styleset;
  5898 [MapClass(DOMString, sequence&lt;unsigned long&gt;)]
  5899 interface CSSFontFeatureValuesMap {
  5900   void set(DOMString featureValueName,
  5901            (unsigned long or sequence&lt;unsigned long&gt;) values);
  5902 }</pre>
  5904   <dl class=idl-attributes>
  5905    <dt><var>fontFamily</var> of type <code>DOMString</code>
  5907    <dd>The list of one or more font families for which a given set of feature
  5908     values is defined.
  5910    <dt>value maps of type <code>CSSFontFeatureValuesMap</code>, readonly
  5912    <dd>Maps of feature values associated with feature value names for a given
  5913     ‘<a href="#propdef-font-variant-alternates"><code
  5914     class=property>font-variant-alternates</code></a>’ value type
  5915   </dl>
  5917   <p>Each value map attribute of <a
  5918    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5919    reflects the values defined via a corresponding <a
  5920    href="#featurevalueblock"><i title="feature_value_block">feature value
  5921    block</i></a>. Thus, the <var title="annotation
  5922    attribute">annotation</var> attribute contains the values contained within
  5923    a <code title="@annotation">@annotation</code> <a
  5924    href="#featurevalueblock"><i title="feature_value_block">feature value
  5925    block</i></a>, the <var title="ornaments attribute">ornaments</var>
  5926    attribute contains the values contained with a <code
  5927    title="@ornaments">@ornaments</code> <a href="#featurevalueblock"><i
  5928    title="feature_value_block">feature value block</i></a> and so forth.
  5930   <p>The <code>CSSFontFeatureValuesMap</code> interface uses the <a
  5931    href="http://dev.w3.org/2006/webapi/WebIDL/#es-map-members">default map
  5932    class methods</a> but the <code>set</code> method has different behavior.
  5933    It takes a sequence of unsigned integers and associates it with a given
  5934    <code>featureValueName</code>. The method behaves the same as the default
  5935    map class method except that a single unsigned long value is treated as a
  5936    sequence of a single value. The method throws an exception if an invalid
  5937    number of values is passed in. If the associated <a
  5938    href="#featurevalueblock"><i title="feature_value_block">feature value
  5939    block</i></a> only allows a limited number of values, the <code>set</code>
  5940    method throws an <code>InvalidAccessError</code> exception when the input
  5941    sequence to <code>set</code> contains more than the limited number of
  5942    values. See the description of <a
  5943    href="#multi-valued-feature-value-definitions">multi-valued feature value
  5944    definitions</a> for details on the maximum number of values allowed for a
  5945    given type of <a href="#featurevalueblock"><i
  5946    title="feature_value_block">feature value block</i></a>. The
  5947    <code>get</code> method always returns a sequence of values, even if the
  5948    sequence only contains a single value.
  5950   <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
  5951    properties to CSS properties</h2>
  5953   <p><em>This appendix is included as background for some of the problems and
  5954    situations that are described in other sections. It should be viewed as
  5955    informative only.</em>
  5957   <p>Font properties in CSS are designed to be independent of the underlying
  5958    font formats used; they can be used to specify bitmap fonts, Type1 fonts,
  5959    SVG fonts in addition to the common TrueType and OpenType fonts. But there
  5960    are facets of the TrueType and OpenType formats that often cause confusion
  5961    for authors and present challenges to implementers on different platforms.
  5963   <p>Originally developed at Apple, TrueType was designed as an outline font
  5964    format for both screen and print. Microsoft joined Apple in developing the
  5965    TrueType format and both platforms have supported TrueType fonts since
  5966    then. Font data in the TrueType format consists of a set of tables
  5967    distinguished with common four-letter tag names, each containing a
  5968    specific type of data. For example, naming information, including
  5969    copyright and license information, is stored in the ‘<code
  5970    class=property>name</code>’ table. The <a
  5971    href="#character-map"><em>character map</em></a> (‘<code
  5972    class=property>cmap</code>’) table contains a mapping of character
  5973    encodings to glyphs. Apple later added additional tables for supporting
  5974    enhanced typographic functionality; these are now called Apple Advanced
  5975    Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
  5976    tables for advanced typography and called their format OpenType <a
  5977    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
  5979   <p>In many cases the font data used under Microsoft Windows or Linux is
  5980    slightly different from the data used under Apple's Mac OS X because the
  5981    TrueType format allowed for explicit variation across platforms. This
  5982    includes font metrics, names and <a href="#character-map"><em>character
  5983    map</em></a> data.
  5985   <p>Specifically, font family name data is handled differently across
  5986    platforms. For TrueType and OpenType fonts these names are contained in
  5987    the ‘<code class=property>name</code>’ table, in name records with
  5988    name ID 1. Mulitple names can be stored for different locales, but
  5989    Microsoft recommends fonts always include at least a US English version of
  5990    the name. On Windows, Microsoft made the decision for backwards
  5991    compatibility to limit this family name to a maximum of four faces; for
  5992    larger groupings the "preferred family" (name ID 16) or "WWS family" (name
  5993    ID 21) can be used. Other platforms such as OSX don't have this
  5994    limitation, so the family name is used to define all possible groupings.
  5996   <p>Other name table data provides names used to uniquely identify a
  5997    specific face within a family. The full font name (name ID 4) and the
  5998    Postscript name (name ID 6) describe a single face uniquely. For example,
  5999    the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
  6000    and a Postscript name of "GillSans-Bold". There can be multiple localized
  6001    versions of the fullname for a given face, but the Postscript name is
  6002    always a unique name made from a limited set of ASCII characters.
  6004   <p>On various platforms, different names are used to search for a font. For
  6005    example, with the Windows GDI CreateIndirectFont API, either a family or
  6006    fullname can be used to lookup a face, while on Mac OS X the
  6007    CTFontCreateWithName API call is used to lookup a given face using the
  6008    fullname and Postscript name. Under Linux, the fontconfig API allows fonts
  6009    to be searched using any of these names. In situations where platform
  6010    API's automatically substitute other font choices, it may be necessary to
  6011    verify a returned font matches a given name.
  6013   <p>The weight of a given face can be determined via the usWeightClass field
  6014    of the OS/2 table or inferred from the style name (name ID 2). Likewise,
  6015    the width can be determined via the usWidthClass of the OS/2 table or
  6016    inferred from the style name. For historical reasons related to synthetic
  6017    bolding at weights 200 or lower with the Windows GDI API, font designers
  6018    have sometimes skewed values in the OS/2 table to avoid these weights.
  6020   <p>Rendering complex scripts that use contextual shaping such as Thai,
  6021    Arabic and Devanagari requires features present only in OpenType or AAT
  6022    fonts. Currently, complex script rendering is supported on Windows and
  6023    Linux using OpenType font features while both OpenType and AAT font
  6024    features are used under Mac OS X.
  6026   <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
  6028   <h3 class=no-num id=recent-changes> Changes from the <a
  6029    href="http://www.w3.org/TR/2013/WD-css-fonts-3-20130711/">July 2013 CSS3
  6030    Fonts Last Call Working Draft</a></h3>
  6032   <ul>
  6033    <li>reorder feature precedence such that features implied by other CSS
  6034     properties override ‘<code class=property>font-variant</code>’
  6035     settings
  6037    <li>switched examples to use .woff files
  6039    <li>revised wording of font fetching algorithm
  6041    <li>drop ‘<code class=property>auto</code>’ value for ‘<a
  6042     href="#propdef-font-size-adjust"><code
  6043     class=property>font-size-adjust</code></a>’
  6045    <li>clarify effect of ‘<a href="#propdef-font-size-adjust"><code
  6046     class=property>font-size-adjust</code></a>’ on <a class=property
  6047     href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  6048     class=property>line-height</code>’</a>
  6050    <li>allow user agents to synthesize OpenType <span class=tag>kern</span>
  6051     feature
  6053    <li>add example of ordinals and associated markup
  6055    <li>minor editorial cleanups
  6056   </ul>
  6058   <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
  6060   <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
  6061    their help and feedback. John Hudson was kind enough to take the time to
  6062    explain the subtleties of OpenType language tags and provided the example
  6063    of character variant usage for displaying text on Byzantine seals. Ken
  6064    Lunde and Eric Muller provided valuable feedback on CJK OpenType features
  6065    and Unicode variation selectors. The idea for supporting font features by
  6066    using <a href="#propdef-font-variant"
  6067    title="font-variant!!property">‘<code
  6068    class=property>font-variant</code>’</a> subproperties originated with
  6069    Håkon Wium Lie, Adam Twardoch and Tal Leming. Elika Etemad supplied some
  6070    of the initial design ideas for the <a
  6071    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  6072    rule. Thanks also to House Industries for allowing the use of Ed Interlock
  6073    in the discretionary ligatures example.
  6075   <p>A special thanks to Robert Bringhurst for the sublime mind expansion
  6076    that is <em>The Elements of Typographic Style</em>.
  6078   <h2 class=no-num id=conformance> Conformance</h2>
  6080   <h3 class=no-num id=conventions> Document Conventions</h3>
  6082   <p>Conformance requirements are expressed with a combination of descriptive
  6083    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  6084    NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  6085    “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  6086    normative parts of this document are to be interpreted as described in RFC
  6087    2119. However, for readability, these words do not appear in all uppercase
  6088    letters in this specification.
  6090   <p>All of the text of this specification is normative except sections
  6091    explicitly marked as non-normative, examples, and notes. <a
  6092    href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  6094   <p>Examples in this specification are introduced with the words “for
  6095    example” or are set apart from the normative text with
  6096    <code>class="example"</code>, like this:
  6098   <div class=example>
  6099    <p>This is an example of an informative example.
  6100   </div>
  6102   <p>Informative notes begin with the word “Note” and are set apart from
  6103    the normative text with <code>class="note"</code>, like this:
  6105   <p class=note>Note, this is an informative note.
  6107   <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
  6109   <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
  6110    classes:
  6112   <dl>
  6113    <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  6114     sheet</dfn>
  6116    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  6117     style sheet</a>.
  6119    <dt><dfn id=renderer>renderer</dfn>
  6121    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  6122     that interprets the semantics of a style sheet and renders documents that
  6123     use them.
  6125    <dt><dfn id=authoring-tool>authoring tool</dfn>
  6127    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  6128     that writes a style sheet.
  6129   </dl>
  6131   <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
  6132    declarations that use properties defined in this module have values that
  6133    are valid according to the generic CSS grammar and the individual grammars
  6134    of each property as given in this module.
  6136   <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
  6137    interpreting the style sheet as defined by the appropriate specifications,
  6138    it supports all the features defined by CSS Fonts Level 3 Module by
  6139    parsing them correctly and rendering the document accordingly. However,
  6140    the inability of a UA to correctly render a document due to limitations of
  6141    the device does not make the UA non-conformant. (For example, a UA is not
  6142    required to render color on a monochrome monitor.)
  6144   <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
  6145    style sheets that are syntactically correct according to the generic CSS
  6146    grammar and the individual grammars of each feature in this module, and
  6147    meet all other conformance requirements of style sheets as described in
  6148    this module.
  6150   <h3 class=no-num id=partial> Partial Implementations</h3>
  6152   <p>So that authors can exploit the forward-compatible parsing rules to
  6153    assign fallback values, CSS renderers <strong>must</strong> treat as
  6154    invalid (and <a
  6155    href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  6156    appropriate</a>) any at-rules, properties, property values, keywords, and
  6157    other syntactic constructs for which they have no usable level of support.
  6158    In particular, user agents <strong>must not</strong> selectively ignore
  6159    unsupported component values and honor supported values in a single
  6160    multi-value property declaration: if any value is considered invalid (as
  6161    unsupported values must be), CSS requires that the entire declaration be
  6162    ignored.
  6164   <h3 class=no-num id=experimental> Experimental Implementations</h3>
  6166   <p>To avoid clashes with future CSS features, the CSS2.1 specification
  6167    reserves a <a
  6168    href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  6169    syntax</a> for proprietary and experimental extensions to CSS.
  6171   <p>Prior to a specification reaching the Candidate Recommendation stage in
  6172    the W3C process, all implementations of a CSS feature are considered
  6173    experimental. The CSS Working Group recommends that implementations use a
  6174    vendor-prefixed syntax for such features, including those in W3C Working
  6175    Drafts. This avoids incompatibilities with future changes in the draft.
  6177   <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
  6179   <p>Once a specification reaches the Candidate Recommendation stage,
  6180    non-experimental implementations are possible, and implementors should
  6181    release an unprefixed implementation of any CR-level feature they can
  6182    demonstrate to be correctly implemented according to spec.
  6184   <p>To establish and maintain the interoperability of CSS across
  6185    implementations, the CSS Working Group requests that non-experimental CSS
  6186    renderers submit an implementation report (and, if necessary, the
  6187    testcases used for that implementation report) to the W3C before releasing
  6188    an unprefixed implementation of any CSS features. Testcases submitted to
  6189    W3C are subject to review and correction by the CSS Working Group.
  6191   <p>Further information on submitting testcases and implementation reports
  6192    can be found from on the CSS Working Group's website at <a
  6193    href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  6194    Questions should be directed to the <a
  6195    href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  6196    mailing list.
  6198   <h3 class=no-num id=cr-exit-criteria>CR Exit Criteria</h3>
  6200   <p class=replaceme>Remove this section unless/until the module is in CR.</p>
  6201   <!-- This text was <a href="http://www.w3.org/Style/CSS/Tracker/actions/44"> decided on 2008-06-04.</a> -->
  6203   <p> For this specification to be advanced to Proposed Recommendation, there
  6204    must be at least two independent, interoperable implementations of each
  6205    feature. Each feature may be implemented by a different set of products,
  6206    there is no requirement that all features be implemented by a single
  6207    product. For the purposes of this criterion, we define the following
  6208    terms:
  6210   <dl>
  6211    <dt>independent
  6213    <dd>each implementation must be developed by a different party and cannot
  6214     share, reuse, or derive from code used by another qualifying
  6215     implementation. Sections of code that have no bearing on the
  6216     implementation of this specification are exempt from this requirement.
  6218    <dt>interoperable
  6220    <dd>passing the respective test case(s) in the official CSS test suite,
  6221     or, if the implementation is not a Web browser, an equivalent test. Every
  6222     relevant test in the test suite should have an equivalent test created if
  6223     such a user agent (UA) is to be used to claim interoperability. In
  6224     addition if such a UA is to be used to claim interoperability, then there
  6225     must one or more additional UAs which can also pass those equivalent
  6226     tests in the same way for the purpose of interoperability. The equivalent
  6227     tests must be made publicly available for the purposes of peer review.
  6229    <dt>implementation
  6231    <dd>a user agent which:
  6232     <ol class=inline>
  6233      <li>implements the specification.
  6235      <li>is available to the general public. The implementation may be a
  6236       shipping product or other publicly available version (i.e., beta
  6237       version, preview release, or “nightly build”). Non-shipping product
  6238       releases must have implemented the feature(s) for a period of at least
  6239       one month in order to demonstrate stability.
  6241      <li>is not experimental (i.e., a version specifically designed to pass
  6242       the test suite and is not intended for normal usage going forward).
  6243     </ol>
  6244   </dl>
  6246   <p>The specification will remain Candidate Recommendation for at least six
  6247    months.
  6249   <h2 class=no-num id=references>References</h2>
  6251   <h3 class=no-num id=normative-references>Normative References</h3>
  6252   <!--begin-normative-->
  6253   <!-- Sorted by label -->
  6255   <dl class=bibliography>
  6256    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6257     <!---->
  6259    <dt id=ref-CHARMOD>[CHARMOD]
  6261    <dd>Martin J. Dürst; et al. <a
  6262     href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
  6263     Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
  6264     2005. W3C Recommendation. URL: <a
  6265     href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
  6266     </dd>
  6267    <!---->
  6269    <dt id=ref-CORS>[CORS]
  6271    <dd>Anne van Kesteren. <a
  6272     href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
  6273     Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
  6274     Recommendation. (Work in progress.) URL: <a
  6275     href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
  6276     </dd>
  6277    <!---->
  6279    <dt id=ref-CSS21>[CSS21]
  6281    <dd>Bert Bos; et al. <a
  6282     href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  6283     Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  6284     2011. W3C Recommendation. URL: <a
  6285     href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  6286     </dd>
  6287    <!---->
  6289    <dt id=ref-CSS3VAL>[CSS3VAL]
  6291    <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  6292     href="http://www.w3.org/TR/2013/CR-css3-values-20130730/"><cite>CSS
  6293     Values and Units Module Level 3.</cite></a> 30 July 2013. W3C Candidate
  6294     Recommendation. (Work in progress.) URL: <a
  6295     href="http://www.w3.org/TR/2013/CR-css3-values-20130730/">http://www.w3.org/TR/2013/CR-css3-values-20130730/</a>
  6296     </dd>
  6297    <!---->
  6299    <dt id=ref-HTML5>[HTML5]
  6301    <dd>Robin Berjon; et al. <a
  6302     href="http://www.w3.org/TR/2013/CR-html5-20130806/"><cite>HTML5.</cite></a>
  6303     6 August 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a
  6304     href="http://www.w3.org/TR/2013/CR-html5-20130806/">http://www.w3.org/TR/2013/CR-html5-20130806/</a>
  6305     </dd>
  6306    <!---->
  6308    <dt id=ref-OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
  6310    <dd><a
  6311     href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=52136"><cite>Information
  6312     technology — Coding of audio-visual objects — Part 22: Open Font
  6313     Format.</cite></a> International Organization for Standardization.
  6314     ISO/IEC 14496-22:2009. URL: <a
  6315     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>
  6316     </dd>
  6317    <!---->
  6319    <dt id=ref-OPENTYPE>[OPENTYPE]
  6321    <dd><a
  6322     href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
  6323     specification.</cite></a> Microsoft. URL: <a
  6324     href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
  6325     </dd>
  6326    <!---->
  6328    <dt id=ref-OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
  6330    <dd><a
  6331     href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
  6332     feature registry.</cite></a> Microsoft. URL: <a
  6333     href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
  6334     </dd>
  6335    <!---->
  6337    <dt id=ref-RFC2119>[RFC2119]
  6339    <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  6340     words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  6341     RFC 2119. URL: <a
  6342     href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  6343     </dd>
  6344    <!---->
  6346    <dt id=ref-UAX15>[UAX15]
  6348    <dd>Mark Davis; Ken Whistler. <a
  6349     href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
  6350     Forms.</cite></a> 20 September 2013. Unicode Standard Annex #15. URL: <a
  6351     href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
  6352     </dd>
  6353    <!---->
  6355    <dt id=ref-UAX29>[UAX29]
  6357    <dd>Mark Davis. <a
  6358     href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
  6359     Segmentation.</cite></a> 20 September 2013. Unicode Standard Annex #29.
  6360     URL: <a
  6361     href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
  6362     </dd>
  6363    <!---->
  6365    <dt id=ref-UNICODE>[UNICODE]
  6367    <dd>The Unicode Consortium. <a
  6368     href="http://www.unicode.org/standard/versions/enumeratedversions.html"><cite>The
  6369     Unicode Standard.</cite></a> 2013. Defined by: The Unicode Standard,
  6370     Version 6.3.0, (Mountain View, CA: The Unicode Consortium, 2013. ISBN
  6371     978-1-936213-08-5), as updated from time to time by the publication of
  6372     new versions URL: <a
  6373     href="http://www.unicode.org/standard/versions/enumeratedversions.html">http://www.unicode.org/standard/versions/enumeratedversions.html</a>
  6374     </dd>
  6375    <!---->
  6376   </dl>
  6377   <!--end-normative-->
  6378   <!--{{!CSS21}}-->
  6379   <!--{{!CSS3VAL}}-->
  6380   <!--{{!OPENTYPE}}-->
  6381   <!--{{!OPENTYPE-FEATURES}}-->
  6382   <!--{{!OPEN-FONT-FORMAT}}-->
  6383   <!--{{!UNICODE}}-->
  6384   <!--{{!UAX15}}-->
  6385   <!--{{!UAX29}}-->
  6386   <!--{{!CORS}}-->
  6387   <!--{{!HTML5}}-->
  6388   <!--{{!CHARMOD}}-->
  6390   <h3 class=no-num id=other-references>Other References</h3>
  6391   <!--begin-informative-->
  6392   <!-- Sorted by label -->
  6394   <dl class=bibliography>
  6395    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6396     <!---->
  6398    <dt id=ref-AAT-FEATURES>[AAT-FEATURES]
  6400    <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
  6401     Advanced Typography font feature registry.</cite></a> Apple. URL: <a
  6402     href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
  6403     </dd>
  6404    <!---->
  6406    <dt id=ref-ARABIC-TYPO>[ARABIC-TYPO]
  6408    <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
  6409     Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
  6410    <!---->
  6412    <dt id=ref-CHARMOD-NORM>[CHARMOD-NORM]
  6414    <dd>François Yergeau; et al. <a
  6415     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
  6416     Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
  6417     W3C Working Draft. (Work in progress.) URL: <a
  6418     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
  6419     </dd>
  6420    <!---->
  6422    <dt id=ref-CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
  6424    <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
  6425     O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
  6426    <!---->
  6428    <dt id=ref-CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
  6430    <dd>L. David Baron. <a
  6431     href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/"><cite>CSS
  6432     Conditional Rules Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  6433     Recommendation. (Work in progress.) URL: <a
  6434     href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/">http://www.w3.org/TR/2013/CR-css3-conditional-20130404/</a>
  6435     </dd>
  6436    <!---->
  6438    <dt id=ref-CSS3TEXT>[CSS3TEXT]
  6440    <dd>Elika J. Etemad; Koji Ishii. <a
  6441     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
  6442     Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
  6443     progress.) URL: <a
  6444     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
  6445     </dd>
  6446    <!---->
  6448    <dt id=ref-DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
  6450    <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
  6451     and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
  6452     ISBN 0-201-17633-5.</dd>
  6453    <!---->
  6455    <dt id=ref-DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
  6457    <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
  6458     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
  6459     Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
  6460     2000. W3C Recommendation. URL: <a
  6461     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>
  6462     </dd>
  6463    <!---->
  6465    <dt id=ref-ELEMTYPO>[ELEMTYPO]
  6467    <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
  6468     4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
  6469    <!---->
  6471    <dt id=ref-LANGCULTTYPE>[LANGCULTTYPE]
  6473    <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
  6474     ISBN 1-932026-01-0.</dd>
  6475    <!---->
  6477    <dt id=ref-OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
  6479    <dd><a
  6480     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
  6481     User Guide.</cite></a> FontShop International. URL: <a
  6482     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
  6483     </dd>
  6484    <!---->
  6486    <dt id=ref-RASTER-TRAGEDY>[RASTER-TRAGEDY]
  6488    <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
  6489     Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
  6490     href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
  6491    <!---->
  6493    <dt id=ref-WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
  6495    <dd>John Hudson. <a
  6496     href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
  6497     Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
  6498     href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
  6499     </dd>
  6500    <!---->
  6501   </dl>
  6502   <!--end-informative-->
  6503   <!--{{ARABIC-TYPO}}-->
  6504   <!--{{CJKV-INFO-PROCESSING}}-->
  6505   <!--{{DIGITAL-TYPOGRAPHY}}-->
  6506   <!--{{DOM-LEVEL-2-STYLE}}-->
  6507   <!--{{ELEMTYPO}}-->
  6508   <!--{{LANGCULTTYPE}}-->
  6509   <!--{{OPENTYPE-FONT-GUIDE}}-->
  6510   <!--{{RASTER-TRAGEDY}}-->
  6511   <!--{{WINDOWS-GLYPH-PROC}}-->
  6512   <!--{{CHARMOD-NORM}}-->
  6513   <!--{{AAT-FEATURES}}-->
  6514   <!--{{CSS3-CONDITIONAL}}-->
  6515   <!--{{CSS3TEXT}}-->
  6517   <h2 class=no-num id=index>Index</h2>
  6518   <!--begin-index-->
  6520   <ul class=indexlist>
  6521    <li>100...900 weight values, <a href="#font-weight-numeric-values"
  6522     title="100...900 weight values"><strong>3.2</strong></a>
  6524    <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
  6525     title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
  6527    <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
  6528     title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
  6530    <li><var>&lt;contextual-alt-values&gt;</var>, <a
  6531     href="#contextual-alt-values"
  6532     title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
  6534    <li><var>&lt;discretionary-lig-values&gt;</var>, <a
  6535     href="#discretionary-lig-values"
  6536     title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
  6538    <li><var>&lt;east-asian-variant-values&gt;</var>, <a
  6539     href="#east-asian-variant-values"
  6540     title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
  6542    <li><var>&lt;east-asian-width-values&gt;</var>, <a
  6543     href="#east-asian-width-values"
  6544     title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
  6546    <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
  6547     title="&lt;family-name&gt;"><strong>3.1</strong></a>
  6549    <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
  6550     title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
  6552    <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
  6553     title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
  6555    <li><var>&lt;font-variant-css21&gt;</var>, <a
  6556     href="#font-variant-css21-values"
  6557     title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
  6559    <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
  6560     title="&lt;generic-family&gt;"><strong>3.1</strong></a>
  6562    <li><var>&lt;historical-lig-values&gt;</var>, <a
  6563     href="#historical-lig-values"
  6564     title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
  6566    <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
  6567     title="&lt;length&gt;"><strong>3.5</strong></a>
  6569    <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
  6570     title="&lt;number&gt;"><strong>3.6</strong></a>
  6572    <li><var>&lt;numeric-figure-values&gt;</var>, <a
  6573     href="#numeric-figure-values"
  6574     title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
  6576    <li><var>&lt;numeric-fraction-values&gt;</var>, <a
  6577     href="#numeric-fraction-values"
  6578     title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
  6580    <li><var>&lt;numeric-spacing-values&gt;</var>, <a
  6581     href="#numeric-spacing-values"
  6582     title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
  6584    <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
  6585     title="&lt;percentage&gt;"><strong>3.5</strong></a>
  6587    <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
  6588     title="&lt;relative-size&gt;"><strong>3.5</strong></a>
  6590    <li><var>&lt;string&gt;</var>, <a
  6591     href="#font-language-override-string-value"
  6592     title="&lt;string&gt;"><strong>6.13</strong></a>
  6594    <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
  6595     title="&lt;urange&gt;"><strong>4.5</strong></a>
  6597    <li><code>@font-face</code>, <a href="#at-font-face-rule"
  6598     title="@font-face"><strong>4.1</strong></a>
  6600    <li><code>@font-feature-values</code>, <a
  6601     href="#at-font-feature-values-rule"
  6602     title="@font-feature-values"><strong>6.9</strong></a>
  6604    <li>all-petite-caps, <a href="#all-petite-caps"
  6605     title=all-petite-caps><strong>6.6</strong></a>
  6607    <li>all-small-caps, <a href="#all-small-caps"
  6608     title=all-small-caps><strong>6.6</strong></a>
  6610    <li>annotation, <a href="#annotation"
  6611     title=annotation><strong>6.8</strong></a>
  6613    <li>aspect value, <a href="#aspect-value0" title="aspect
  6614     value"><strong>3.6</strong></a>
  6616    <li>authoring tool, <a href="#authoring-tool" title="authoring
  6617     tool"><strong>#</strong></a>
  6619    <li>auto
  6620     <ul>
  6621      <li>font-kerning, <a href="#font-kerning-auto-value" title="auto,
  6622       font-kerning"><strong>6.3</strong></a>
  6623     </ul>
  6625    <li>bold, <a href="#bold" title=bold><strong>3.2</strong></a>
  6627    <li>bolder, <a href="#bolder" title=bolder><strong>3.2</strong></a>
  6629    <li>character map, <a href="#character-map" title="character
  6630     map"><strong>5.2</strong></a>
  6632    <li>character-variant, <a href="#character-variant"
  6633     title=character-variant><strong>6.8</strong></a>
  6635    <li>common-ligatures, <a href="#common-ligatures"
  6636     title=common-ligatures><strong>6.4</strong></a>
  6638    <li>composite face, <a href="#composite-face" title="composite
  6639     face"><strong>5.2</strong></a>
  6641    <li>condensed, <a href="#condensed"
  6642     title=condensed><strong>3.3</strong></a>
  6644    <li>contextual, <a href="#contextual"
  6645     title=contextual><strong>6.4</strong></a>
  6647    <li>CSSFontFaceRule, <a href="#cssfontfacerule"
  6648     title=CSSFontFaceRule><strong>8.1</strong></a>
  6650    <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
  6651     title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
  6653    <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
  6654     of"><strong>#</strong></a>
  6656    <li>default face, <a href="#default-face" title="default
  6657     face"><strong>5.2</strong></a>
  6659    <li>descriptor_declaration, <a href="#descriptordeclaration"
  6660     title="descriptor_declaration"><strong>4.1</strong></a>
  6662    <li>diagonal-fractions, <a href="#diagonal-fractions"
  6663     title=diagonal-fractions><strong>6.7</strong></a>
  6665    <li>discretionary-ligatures, <a href="#discretionary-ligatures"
  6666     title=discretionary-ligatures><strong>6.4</strong></a>
  6668    <li>effective character map, <a href="#effective-character-map"
  6669     title="effective character map"><strong>4.5</strong></a>
  6671    <li>expanded, <a href="#expanded" title=expanded><strong>3.3</strong></a>
  6673    <li>extra-condensed, <a href="#extra-condensed"
  6674     title=extra-condensed><strong>3.3</strong></a>
  6676    <li>extra-expanded, <a href="#extra-expanded"
  6677     title=extra-expanded><strong>3.3</strong></a>
  6679    <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
  6680     of"><strong>#</strong></a>
  6682    <li>feature_type, <a href="#featuretype"
  6683     title="feature_type"><strong>6.9.1</strong></a>
  6685    <li>feature_value_block, <a href="#featurevalueblock"
  6686     title="feature_value_block"><strong>6.9.1</strong></a>
  6688    <li>feature_value_definition, <a href="#featurevaluedefinition"
  6689     title="feature_value_definition"><strong>6.9.1</strong></a>
  6691    <li>first available font, <a href="#first-available-font" title="first
  6692     available font"><strong>5.2</strong></a>
  6694    <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
  6696    <li>font specific, <a href="#font-specific" title="font
  6697     specific"><strong>6.8</strong></a>
  6699    <li>font-family
  6700     <ul>
  6701      <li>descriptor, <a href="#descdef-font-family" title="font-family,
  6702       descriptor"><strong>4.2</strong></a>
  6704      <li>property, <a href="#propdef-font-family" title="font-family,
  6705       property"><strong>3.1</strong></a>
  6706     </ul>
  6708    <li>font-feature-settings
  6709     <ul>
  6710      <li>descriptor, <a href="#descdef-font-feature-settings"
  6711       title="font-feature-settings, descriptor"><strong>4.7</strong></a>
  6713      <li>property, <a href="#propdef-font-feature-settings"
  6714       title="font-feature-settings, property"><strong>6.12</strong></a>
  6715     </ul>
  6717    <li>font-kerning, <a href="#propdef-font-kerning"
  6718     title=font-kerning><strong>6.3</strong></a>
  6720    <li>font-language-override, <a href="#propdef-font-language-override"
  6721     title=font-language-override><strong>6.13</strong></a>
  6723    <li>font-size, <a href="#propdef-font-size"
  6724     title=font-size><strong>3.5</strong></a>
  6726    <li>font-size-adjust, <a href="#propdef-font-size-adjust"
  6727     title=font-size-adjust><strong>3.6</strong></a>
  6729    <li>font-stretch
  6730     <ul>
  6731      <li>descriptor, <a href="#descdef-font-stretch" title="font-stretch,
  6732       descriptor"><strong>4.4</strong></a>
  6734      <li>property, <a href="#propdef-font-stretch" title="font-stretch,
  6735       property"><strong>3.3</strong></a>
  6736     </ul>
  6738    <li>font-style
  6739     <ul>
  6740      <li>descriptor, <a href="#descdef-font-style" title="font-style,
  6741       descriptor"><strong>4.4</strong></a>
  6743      <li>property, <a href="#propdef-font-style" title="font-style,
  6744       property"><strong>3.4</strong></a>
  6745     </ul>
  6747    <li>font-synthesis, <a href="#propdef-font-synthesis"
  6748     title=font-synthesis><strong>3.8</strong></a>
  6750    <li>font-variant
  6751     <ul>
  6752      <li>descriptor, <a href="#descdef-font-variant" title="font-variant,
  6753       descriptor"><strong>4.7</strong></a>
  6755      <li>property, <a href="#propdef-font-variant" title="font-variant,
  6756       property"><strong>6.11</strong></a>
  6757     </ul>
  6759    <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
  6760     title=font-variant-alternates><strong>6.8</strong></a>
  6762    <li>font-variant-caps, <a href="#propdef-font-variant-caps"
  6763     title=font-variant-caps><strong>6.6</strong></a>
  6765    <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
  6766     title=font-variant-east-asian><strong>6.10</strong></a>
  6768    <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
  6769     title=font-variant-ligatures><strong>6.4</strong></a>
  6771    <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
  6772     title=font-variant-numeric><strong>6.7</strong></a>
  6774    <li>font-variant-position, <a href="#propdef-font-variant-position"
  6775     title=font-variant-position><strong>6.5</strong></a>
  6777    <li>font-weight
  6778     <ul>
  6779      <li>descriptor, <a href="#descdef-font-weight" title="font-weight,
  6780       descriptor"><strong>4.4</strong></a>
  6782      <li>property, <a href="#propdef-font-weight" title="font-weight,
  6783       property"><strong>3.2</strong></a>
  6784     </ul>
  6786    <li>font_face_rule, <a href="#fontfacerule"
  6787     title="font_face_rule"><strong>4.1</strong></a>
  6789    <li>FONT_FACE_SYM, <a href="#fontfacesym"
  6790     title="FONT_FACE_SYM"><strong>4.1</strong></a>
  6792    <li>font_family_name, <a href="#fontfamilyname"
  6793     title="font_family_name"><strong>6.9.1</strong></a>
  6795    <li>font_family_name_list, <a href="#fontfamilynamelist"
  6796     title="font_family_name_list"><strong>6.9.1</strong></a>
  6798    <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
  6799     title="font_feature_values_rule"><strong>6.9.1</strong></a>
  6801    <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
  6802     title="FONT_FEATURE_VALUES_SYM"><strong>6.9.1</strong></a>
  6804    <li>full-width, <a href="#full-width"
  6805     title=full-width><strong>6.10</strong></a>
  6807    <li>historical-forms, <a href="#historical-forms"
  6808     title=historical-forms><strong>6.8</strong></a>
  6810    <li>historical-ligatures, <a href="#historical-ligatures"
  6811     title=historical-ligatures><strong>6.4</strong></a>
  6813    <li>italic, <a href="#italic" title=italic><strong>3.4</strong></a>
  6815    <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
  6817    <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
  6819    <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
  6821    <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
  6823    <li>lighter, <a href="#lighter" title=lighter><strong>3.2</strong></a>
  6825    <li>lining-nums, <a href="#lining-nums"
  6826     title=lining-nums><strong>6.7</strong></a>
  6828    <li>monospace, definition of, <a href="#monospace0" title="monospace,
  6829     definition of"><strong>#</strong></a>
  6831    <li>no-common-ligatures, <a href="#no-common-ligatures"
  6832     title=no-common-ligatures><strong>6.4</strong></a>
  6834    <li>no-contextual, <a href="#no-contextual"
  6835     title=no-contextual><strong>6.4</strong></a>
  6837    <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
  6838     title=no-discretionary-ligatures><strong>6.4</strong></a>
  6840    <li>no-historical-ligatures, <a href="#no-historical-ligatures"
  6841     title=no-historical-ligatures><strong>6.4</strong></a>
  6843    <li>none
  6844     <ul>
  6845      <li>font-kerning, <a href="#font-kerning-none-value" title="none,
  6846       font-kerning"><strong>6.3</strong></a>
  6848      <li>font-size-adjust, <a href="#font-size-adjust-none-value"
  6849       title="none, font-size-adjust"><strong>3.6</strong></a>
  6851      <li>font-variant, <a href="#font-variant-none-value" title="none,
  6852       font-variant"><strong>6.11</strong></a>
  6854      <li>font-variant-ligatures, <a href="#font-variant-ligatures-none-value"
  6855       title="none, font-variant-ligatures"><strong>6.4</strong></a>
  6856     </ul>
  6858    <li>normal
  6859     <ul>
  6860      <li>font-feature-settings, <a href="#font-feature-settings-normal-value"
  6861       title="normal, font-feature-settings"><strong>6.12</strong></a>
  6863      <li>font-kerning, <a href="#font-kerning-normal-value" title="normal,
  6864       font-kerning"><strong>6.3</strong></a>
  6866      <li>font-language-override, <a
  6867       href="#font-language-override-normal-value" title="normal,
  6868       font-language-override"><strong>6.13</strong></a>
  6870      <li>font-stretch, <a href="#font-stretch-normal-value" title="normal,
  6871       font-stretch"><strong>3.3</strong></a>
  6873      <li>font-style, <a href="#font-style-normal-value" title="normal,
  6874       font-style"><strong>3.4</strong></a>
  6876      <li>font-variant, <a href="#font-variant-normal-value" title="normal,
  6877       font-variant"><strong>6.11</strong></a>
  6879      <li>font-variant-alternates, <a
  6880       href="#font-variant-alternates-normal-value" title="normal,
  6881       font-variant-alternates"><strong>6.8</strong></a>
  6883      <li>font-variant-caps, <a href="#font-variant-caps-normal-value"
  6884       title="normal, font-variant-caps"><strong>6.6</strong></a>
  6886      <li>font-variant-east-asian, <a
  6887       href="#font-variant-east-asian-normal-value" title="normal,
  6888       font-variant-east-asian"><strong>6.10</strong></a>
  6890      <li>font-variant-ligatures, <a
  6891       href="#font-variant-ligatures-normal-value" title="normal,
  6892       font-variant-ligatures"><strong>6.4</strong></a>
  6894      <li>font-variant-numeric, <a href="#font-variant-numeric-normal-value"
  6895       title="normal, font-variant-numeric"><strong>6.7</strong></a>
  6897      <li>font-variant-position, <a href="#font-variant-position-normal-value"
  6898       title="normal, font-variant-position"><strong>6.5</strong></a>
  6900      <li>font-weight, <a href="#font-weight-normal-value" title="normal,
  6901       font-weight"><strong>3.2</strong></a>
  6902     </ul>
  6904    <li>oblique, <a href="#oblique" title=oblique><strong>3.4</strong></a>
  6906    <li>oldstyle-nums, <a href="#oldstyle-nums"
  6907     title=oldstyle-nums><strong>6.7</strong></a>
  6909    <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
  6911    <li>ornaments, <a href="#ornaments"
  6912     title=ornaments><strong>6.8</strong></a>
  6914    <li>petite-caps, <a href="#petite-caps"
  6915     title=petite-caps><strong>6.6</strong></a>
  6917    <li>proportional-nums, <a href="#proportional-nums"
  6918     title=proportional-nums><strong>6.7</strong></a>
  6920    <li>proportional-width, <a href="#proportional-width"
  6921     title=proportional-width><strong>6.10</strong></a>
  6923    <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
  6925    <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
  6927    <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
  6928     definition of"><strong>#</strong></a>
  6930    <li>semi-condensed, <a href="#semi-condensed-"
  6931     title=semi-condensed><strong>3.3</strong></a>
  6933    <li>semi-expanded, <a href="#semi-expanded"
  6934     title=semi-expanded><strong>3.3</strong></a>
  6936    <li>serif, definition of, <a href="#serif0" title="serif, definition
  6937     of"><strong>#</strong></a>
  6939    <li>simplified, <a href="#simplified"
  6940     title=simplified><strong>6.10</strong></a>
  6942    <li>slashed-zero, <a href="#slashed-zero"
  6943     title=slashed-zero><strong>6.7</strong></a>
  6945    <li>small-caps, <a href="#small-caps"
  6946     title=small-caps><strong>6.6</strong></a>
  6948    <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
  6950    <li>stacked-fractions, <a href="#stacked-fractions"
  6951     title=stacked-fractions><strong>6.7</strong></a>
  6953    <li>style sheet
  6954     <ul>
  6955      <li>as conformance class, <a href="#style-sheet" title="style sheet, as
  6956       conformance class"><strong>#</strong></a>
  6957     </ul>
  6959    <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
  6961    <li>stylistic, <a href="#stylistic"
  6962     title=stylistic><strong>6.8</strong></a>
  6964    <li>sub, <a href="#sub" title=sub><strong>6.5</strong></a>
  6966    <li>super, <a href="#super" title=super><strong>6.5</strong></a>
  6968    <li>support, <a href="#support" title=support><strong>5.2</strong></a>
  6970    <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
  6972    <li>system font fallback, <a href="#system-font-fallback" title="system
  6973     font fallback"><strong>5.2</strong></a>
  6975    <li>tabular-nums, <a href="#tabular-nums"
  6976     title=tabular-nums><strong>6.7</strong></a>
  6978    <li>titling-caps, <a href="#titling-caps"
  6979     title=titling-caps><strong>6.6</strong></a>
  6981    <li>traditional, <a href="#traditional"
  6982     title=traditional><strong>6.10</strong></a>
  6984    <li>ultra-condensed, <a href="#ultra-condensed"
  6985     title=ultra-condensed><strong>3.3</strong></a>
  6987    <li>ultra-expanded, <a href="#ultra-expanded"
  6988     title=ultra-expanded><strong>3.3</strong></a>
  6990    <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
  6992    <li>unicode-range, <a href="#descdef-unicode-range"
  6993     title=unicode-range><strong>4.5</strong></a>
  6995    <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
  6997    <li>width, <a href="#width" title=width><strong>2</strong></a>
  6998   </ul>
  6999   <!--end-index-->
  7001   <h2 class=no-num id=property-index>Property index</h2>
  7002   <!--begin-properties-->
  7004   <table class=proptable>
  7005    <thead>
  7006     <tr>
  7007      <th>Property
  7009      <th>Values
  7011      <th>Initial
  7013      <th>Applies to
  7015      <th>Inh.
  7017      <th>Percentages
  7019      <th>Media
  7021    <tbody>
  7022     <tr>
  7023      <th><a class=property href="#propdef-font">font</a>
  7025      <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
  7026       &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
  7027       &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
  7028       &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
  7029       small-caption | status-bar
  7031      <td>see individual properties
  7033      <td>all elements
  7035      <td>yes
  7037      <td>see individual properties
  7039      <td>visual
  7041     <tr>
  7042      <th><span class=property>font-family</span>
  7044      <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
  7046      <td>depends on user agent
  7048      <td>all elements
  7050      <td>yes
  7052      <td>N/A
  7054      <td>visual
  7056     <tr>
  7057      <th><span class=property>font-feature-settings</span>
  7059      <td>normal | &lt;feature-tag-value&gt; #
  7061      <td>normal
  7063      <td>all elements
  7065      <td>yes
  7067      <td>N/A
  7069      <td>visual
  7071     <tr>
  7072      <th><a class=property href="#propdef-font-kerning">font-kerning</a>
  7074      <td>auto | normal | none
  7076      <td>auto
  7078      <td>all elements
  7080      <td>yes
  7082      <td>N/A
  7084      <td>visual
  7086     <tr>
  7087      <th><a class=property
  7088       href="#propdef-font-language-override">font-language-override</a>
  7090      <td>normal | &lt;string&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 href="#propdef-font-size">font-size</a>
  7105      <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
  7106       &lt;percentage&gt;
  7108      <td>medium
  7110      <td>all elements
  7112      <td>yes
  7114      <td>refer to parent element's font size
  7116      <td>visual
  7118     <tr>
  7119      <th><a class=property
  7120       href="#propdef-font-size-adjust">font-size-adjust</a>
  7122      <td>none | &lt;number&gt;
  7124      <td>none
  7126      <td>all elements
  7128      <td>yes
  7130      <td>N/A
  7132      <td>visual
  7134     <tr>
  7135      <th><span class=property>font-stretch</span>
  7137      <td>normal | ultra-condensed | extra-condensed | condensed |
  7138       semi-condensed | semi-expanded | expanded | extra-expanded |
  7139       ultra-expanded
  7141      <td>normal
  7143      <td>all elements
  7145      <td>yes
  7147      <td>N/A
  7149      <td>visual
  7151     <tr>
  7152      <th><span class=property>font-style</span>
  7154      <td>normal | italic | oblique
  7156      <td>normal
  7158      <td>all elements
  7160      <td>yes
  7162      <td>N/A
  7164      <td>visual
  7166     <tr>
  7167      <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
  7169      <td>none | [ weight || style ]
  7171      <td>weight style
  7173      <td>all elements
  7175      <td>yes
  7177      <td>N/A
  7179      <td>visual
  7181     <tr>
  7182      <th><span class=property>font-variant</span>
  7184      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7185       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7186       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  7187       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  7188       character-variant(&lt;feature-value-name&gt; #) ||
  7189       swash(&lt;feature-value-name&gt;) ||
  7190       ornaments(&lt;feature-value-name&gt;) ||
  7191       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  7192       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  7193       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  7194       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  7195       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  7196       ruby ]
  7198      <td>normal
  7200      <td>all elements
  7202      <td>yes
  7204      <td>see individual properties
  7206      <td>visual
  7208     <tr>
  7209      <th><a class=property
  7210       href="#propdef-font-variant-alternates">font-variant-alternates</a>
  7212      <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
  7213       || styleset(&lt;feature-value-name&gt; #) ||
  7214       character-variant(&lt;feature-value-name&gt; #) ||
  7215       swash(&lt;feature-value-name&gt;) ||
  7216       ornaments(&lt;feature-value-name&gt;) ||
  7217       annotation(&lt;feature-value-name&gt;) ]
  7219      <td>normal
  7221      <td>all elements
  7223      <td>yes
  7225      <td>N/A
  7227      <td>visual
  7229     <tr>
  7230      <th><a class=property
  7231       href="#propdef-font-variant-caps">font-variant-caps</a>
  7233      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  7234       | unicase | titling-caps
  7236      <td>normal
  7238      <td>all elements
  7240      <td>yes
  7242      <td>N/A
  7244      <td>visual
  7246     <tr>
  7247      <th><a class=property
  7248       href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  7250      <td>normal | [ &lt;east-asian-variant-values&gt; ||
  7251       &lt;east-asian-width-values&gt; || ruby ]
  7253      <td>normal
  7255      <td>all elements
  7257      <td>yes
  7259      <td>N/A
  7261      <td>visual
  7263     <tr>
  7264      <th><a class=property
  7265       href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  7267      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7268       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7269       &lt;contextual-alt-values&gt; ]
  7271      <td>normal
  7273      <td>all elements
  7275      <td>yes
  7277      <td>N/A
  7279      <td>visual
  7281     <tr>
  7282      <th><a class=property
  7283       href="#propdef-font-variant-numeric">font-variant-numeric</a>
  7285      <td>normal | [ &lt;numeric-figure-values&gt; ||
  7286       &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
  7287       ordinal || slashed-zero ]
  7289      <td>normal
  7291      <td>all elements
  7293      <td>yes
  7295      <td>N/A
  7297      <td>visual
  7299     <tr>
  7300      <th><a class=property
  7301       href="#propdef-font-variant-position">font-variant-position</a>
  7303      <td>normal | sub | super
  7305      <td>normal
  7307      <td>all elements
  7309      <td>yes
  7311      <td>N/A
  7313      <td>visual
  7315     <tr>
  7316      <th><span class=property>font-weight</span>
  7318      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
  7319       | 700 | 800 | 900
  7321      <td>normal
  7323      <td>all elements
  7325      <td>yes
  7327      <td>N/A
  7329      <td>visual
  7330   </table>
  7331   <!--end-properties-->
  7332   <!--begin-descriptors-->
  7334   <table class=proptable>
  7335    <thead>
  7336     <tr>
  7337      <th>Descriptor
  7339      <th>Value
  7341      <th>Initial
  7343      <th>Percentages
  7345      <th>Media
  7347    <tbody>
  7348     <tr>
  7349      <th><span class=property>font-family</span>
  7351      <td>&lt;family-name&gt;
  7353      <td>N/A
  7355     <tr>
  7356      <th><span class=property>font-feature-settings</span>
  7358      <td>normal | &lt;feature-tag-value&gt; #
  7360      <td>normal
  7362     <tr>
  7363      <th><span class=property>font-stretch</span>
  7365      <td>normal | ultra-condensed | extra-condensed | condensed |
  7366       semi-condensed | semi-expanded | expanded | extra-expanded |
  7367       ultra-expanded
  7369      <td>normal
  7371     <tr>
  7372      <th><span class=property>font-style</span>
  7374      <td>normal | italic | oblique
  7376      <td>normal
  7378     <tr>
  7379      <th><span class=property>font-variant</span>
  7381      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7382       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7383       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  7384       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  7385       character-variant(&lt;feature-value-name&gt; #) ||
  7386       swash(&lt;feature-value-name&gt;) ||
  7387       ornaments(&lt;feature-value-name&gt;) ||
  7388       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  7389       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  7390       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  7391       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  7392       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  7393       ruby ]
  7395      <td>normal
  7397     <tr>
  7398      <th><span class=property>font-weight</span>
  7400      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  7402      <td>normal
  7404     <tr>
  7405      <th><a class=property href="#descdef-src">src</a>
  7407      <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
  7409      <td>N/A
  7411     <tr>
  7412      <th><a class=property href="#descdef-unicode-range">unicode-range</a>
  7414      <td>&lt;urange&gt; #
  7416      <td>U+0-10FFFF
  7417   </table>
  7418   <!--end-descriptors-->
  7419   <script type="text/javascript">
  7420 window.onload = function () {
  7421   if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
  7422   var i, hiresElements = document.getElementsByClassName("hires");
  7423   for (i = 0; i < hiresElements.length; i++) {
  7424     var h = hiresElements[i];
  7425     if (h.tagName != "IMG") continue;
  7426     var src = h.getAttribute("src");
  7427     var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
  7428     h.src = src2x;
  7431 </script>
  7432 </html>
  7433 <!-- Keep this comment at the end of the file
  7434 Local variables:
  7435 mode: sgml
  7436 sgml-declaration:"~/SGML/HTML4.decl"
  7437 sgml-default-doctype-name:"html"
  7438 sgml-minimize-attributes:t
  7439 sgml-nofill-elements:("pre" "style" "br")
  7440 sgml-live-element-indicator:t
  7441 sgml-omittag:nil
  7442 sgml-shorttag:nil
  7443 sgml-namecase-general:t
  7444 sgml-general-insert-case:lower
  7445 sgml-always-quote-attributes:t
  7446 sgml-indent-step:nil
  7447 sgml-indent-data:t
  7448 sgml-parent-document:nil
  7449 sgml-exposed-tags:nil
  7450 sgml-local-catalogs:nil
  7451 sgml-local-ecat-files:nil
  7452 End:
  7453 -->

mercurial