css-fonts/Fonts.html

Tue, 11 Jun 2013 14:34:10 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Tue, 11 Jun 2013 14:34:10 +0900
changeset 8430
330ae631cc35
parent 8397
8b231a13093c
child 8431
16e837f77ef5
permissions
-rw-r--r--

[css3-fonts] character handling tweaks

     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-11-june-2013>Editor's Draft 11
   119     June 2013</h2>
   121    <dl id=authors>
   122     <dt>This version:
   124     <dd><a
   125      href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
   126      <!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130611/">http://www.w3.org/TR/2013/ED-css3-fonts-20130611/</a> -->
   129     <dt>Latest version:
   131     <dd><a
   132      href="http://www.w3.org/TR/css3-fonts/">http://www.w3.org/TR/css3-fonts/</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-css3-fonts-20130212/">http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</a>
   147     <dt>Issues List:
   149     <dd><a href="http://www.w3.org/Style/CSS/Tracker/products/18">CSS3 Fonts
   150      issues in Tracker</a>
   152     <dd><a
   153      href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Fonts&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED">CSS3
   154      Fonts issues in Bugzilla</a>
   156     <dt>Discussion:
   158     <dd><a
   159      href="mailto:www-style@w3.org?subject=%5Bcss-fonts%5D%20feedback">www-style@w3.org</a>
   160      with subject line “<kbd>[css-fonts] <var>… message topic
   161      …</var></kbd>” (<a
   162      href="http://lists.w3.org/Archives/Public/www-style/"
   163      rel=discussion>archives</a>)
   165     <dt>Editor:
   167     <dd><a href="mailto:jdaggett@mozilla.com">John Daggett (Mozilla)</a>
   168    </dl>
   169    <!--begin-copyright-->
   170    <p class=copyright><a
   171     href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
   172     rel=license>Copyright</a> © 2013 <a href="http://www.w3.org/"><abbr
   173     title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
   174     href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of
   175     Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr
   176     title="European Research Consortium for Informatics and
   177     Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>,
   178     <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C
   179     <a
   180     href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
   181     <a
   182     href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
   183     and <a
   184     href="http://www.w3.org/Consortium/Legal/copyright-documents">document
   185     use</a> rules apply.</p>
   186    <!--end-copyright-->
   187    <hr title="Separator for header">
   188   </div>
   190   <h2 class="no-num no-toc" id=abstract>Abstract</h2>
   192   <p>This CSS3 module describes how font properties are specified and how
   193    font resources are loaded dynamically. The contents of this specification
   194    are a consolidation of content previously divided into <a
   195    href="http://www.w3.org/TR/2002/WD-css3-fonts-20020802/">CSS3 Fonts</a>
   196    and <a href="http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/">CSS3
   197    Web Fonts</a> modules. The description of font load events was moved into
   198    the <a href="http://dev.w3.org/csswg/css3-font-load-events/">CSS3 Font
   199    Load Events</a> module.
   201   <h2 class="no-num no-toc" id=status>Status of this document</h2>
   202   <!--begin-status-->
   204   <p>This is a public copy of the editors' draft. It is provided for
   205    discussion only and may change at any moment. Its publication here does
   206    not imply endorsement of its contents by W3C. Don't cite this document
   207    other than as work in progress.
   209   <p>The (<a
   210    href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
   211    mailing list <a
   212    href="mailto:www-style@w3.org?Subject=%5Bcss3-fonts%5D%20PUT%20SUBJECT%20HERE">
   213    www-style@w3.org</a> (see <a
   214    href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
   215    discussion of this specification. When sending e-mail, please put the text
   216    “css3-fonts” in the subject, preferably like this:
   217    “[<!---->css3-fonts<!---->] <em>…summary of comment…</em>”
   219   <p>This document was produced by the <a
   220    href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
   221    the <a href="http://www.w3.org/Style/">Style Activity</a>).
   223   <p>This document was produced by a group operating under the <a
   224    href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
   225    2004 W3C Patent Policy</a>. W3C maintains a <a
   226    href="http://www.w3.org/2004/01/pp-impl/32061/status"
   227    rel=disclosure>public list of any patent disclosures</a> made in
   228    connection with the deliverables of the group; that page also includes
   229    instructions for disclosing a patent. An individual who has actual
   230    knowledge of a patent which the individual believes contains <a
   231    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   232    Claim(s)</a> must disclose the information in accordance with <a
   233    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   234    6 of the W3C Patent Policy</a>.</p>
   235   <!--end-status-->
   237   <h3 class="no-num no-toc" id=atrisk>Features at risk</h3>
   239   <p>The following features are at risk and may be removed when exiting CR:
   241   <ul>
   242    <li>fallback handling for text decoration in superscript/subscript variant
   243     glyphs (‘<a href="#propdef-font-variant-position"><code
   244     class=property>font-variant-position</code></a>’)
   246    <li>‘<a href="#propdef-font-language-override"><code
   247     class=property>font-language-override</code></a>’ property
   248   </ul>
   250   <p>This draft is a <strong>Last Call Working Draft</strong>. Please send
   251    comments to the <a
   252    href="http://lists.w3.org/Archives/Public/www-style/">www-style mailing
   253    list</a> as described above. The <strong>deadline for comments</strong> is
   254    six weeks after the date of publication in the header.
   256   <h2 class="no-num no-toc" id=contents>Table of contents</h2>
   257   <!--begin-toc-->
   259   <ul class=toc>
   260    <li><a href="#introduction"><span class=secno>1 </span>Introduction</a>
   262    <li><a href="#typography-background"><span class=secno>2 </span>Typography
   263     Background</a>
   265    <li><a href="#basic-font-props"><span class=secno>3 </span>Basic Font
   266     Properties</a>
   267     <ul class=toc>
   268      <li><a href="#font-family-prop"><span class=secno>3.1 </span>Font
   269       family: the font-family property</a>
   270       <ul class=toc>
   271        <li><a href="#generic-font-families"><span class=secno>3.1.1
   272         </span>Generic font families</a>
   273       </ul>
   275      <li><a href="#font-weight-prop"><span class=secno>3.2 </span>Font
   276       weight: the font-weight property</a>
   278      <li><a href="#font-stretch-prop"><span class=secno>3.3 </span>Font
   279       width: the font-stretch property</a>
   281      <li><a href="#font-style-prop"><span class=secno>3.4 </span>Font style:
   282       the font-style property</a>
   284      <li><a href="#font-size-prop"><span class=secno>3.5 </span>Font size:
   285       the font-size property</a>
   287      <li><a href="#font-size-adjust-prop"><span class=secno>3.6
   288       </span>Relative sizing: the font-size-adjust property</a>
   290      <li><a href="#font-prop"><span class=secno>3.7 </span>Shorthand font
   291       property: the font property</a>
   293      <li><a href="#font-synthesis-prop"><span class=secno>3.8
   294       </span>Controlling synthetic faces: the font-synthesis property</a>
   295     </ul>
   297    <li><a href="#font-resources"><span class=secno>4 </span>Font
   298     Resources</a>
   299     <ul class=toc>
   300      <li><a href="#font-face-rule"><span class=secno>4.1 </span>The
   301       <code>@font-face</code> rule</a>
   303      <li><a href="#font-family-desc"><span class=secno>4.2 </span>Font
   304       family: the font-family descriptor</a>
   306      <li><a href="#src-desc"><span class=secno>4.3 </span>Font reference: the
   307       src descriptor</a>
   309      <li><a href="#font-prop-desc"><span class=secno>4.4 </span>Font property
   310       descriptors: the font-style, font-weight, font-stretch descriptors</a>
   312      <li><a href="#unicode-range-desc"><span class=secno>4.5 </span>Character
   313       range: the unicode-range descriptor</a>
   315      <li><a href="#composite-fonts"><span class=secno>4.6 </span>Using
   316       character ranges to define composite fonts</a>
   318      <li><a href="#font-rend-desc"><span class=secno>4.7 </span>Font
   319       features: the font-variant and font-feature-settings descriptors</a>
   321      <li><a href="#font-face-loading"><span class=secno>4.8 </span>Font
   322       loading guidelines</a>
   324      <li><a href="#same-origin-restriction"><span class=secno>4.9
   325       </span>Same-origin restriction for fonts</a>
   326       <ul class=toc>
   327        <li><a href="#default-same-origin-restriction"><span class=secno>4.9.1
   328         </span>Default same-origin restriction</a>
   330        <li><a href="#allowing-cross-origin-font-loading"><span
   331         class=secno>4.9.2 </span>Allowing cross-origin font loading</a>
   332       </ul>
   333     </ul>
   335    <li><a href="#font-matching-algorithm"><span class=secno>5 </span>Font
   336     Matching Algorithm</a>
   337     <ul class=toc>
   338      <li><a href="#font-family-casing"><span class=secno>5.1 </span>Case
   339       sensitivity of font family names</a>
   341      <li><a href="#font-style-matching"><span class=secno>5.2 </span>Matching
   342       font styles</a>
   344      <li><a href="#cluster-matching"><span class=secno>5.3 </span>Cluster
   345       matching</a>
   347      <li><a href="#char-handling-issues"><span class=secno>5.4
   348       </span>Character handling issues</a>
   350      <li><a href="#font-matching-changes"><span class=secno>5.5 </span>Font
   351       matching changes since CSS 2.1</a>
   353      <li><a href="#font-matching-examples"><span class=secno>5.6 </span>Font
   354       matching examples</a>
   355     </ul>
   357    <li><a href="#font-rend-props"><span class=secno>6 </span>Font Feature
   358     Properties</a>
   359     <ul class=toc>
   360      <li><a href="#glyph-selection-positioning"><span class=secno>6.1
   361       </span>Glyph selection and positioning</a>
   363      <li><a href="#language-specific-support"><span class=secno>6.2
   364       </span>Language-specific display</a>
   366      <li><a href="#font-kerning-prop"><span class=secno>6.3 </span>Kerning:
   367       the font-kerning property</a>
   369      <li><a href="#font-variant-ligatures-prop"><span class=secno>6.4
   370       </span>Ligatures: the font-variant-ligatures property</a>
   372      <li><a href="#font-variant-position-prop"><span class=secno>6.5
   373       </span>Subscript and superscript forms: the font-variant-position
   374       property</a>
   376      <li><a href="#font-variant-caps-prop"><span class=secno>6.6
   377       </span>Capitalization: the font-variant-caps property</a>
   379      <li><a href="#font-variant-numeric-prop"><span class=secno>6.7
   380       </span>Numerical formatting: the font-variant-numeric property</a>
   382      <li><a href="#font-variant-alternates-prop"><span class=secno>6.8
   383       </span>Alternates and swashes: the font-variant-alternates property</a>
   386      <li><a href="#font-feature-values"><span class=secno>6.9 </span>Defining
   387       font specific alternates: the <code>@font-feature-values</code>
   388       rule</a>
   389       <ul class=toc>
   390        <li><a href="#basic-syntax"><span class=secno>6.9.1 </span>Basic
   391         syntax</a>
   393        <li><a href="#multi-valued-feature-value-definitions"><span
   394         class=secno>6.9.2 </span>Multi-valued feature value definitions</a>
   395       </ul>
   397      <li><a href="#font-variant-east-asian-prop"><span class=secno>6.10
   398       </span>East Asian text rendering: the font-variant-east-asian
   399       property</a>
   401      <li><a href="#font-variant-prop"><span class=secno>6.11 </span>Overall
   402       shorthand for font rendering: the font-variant property</a>
   404      <li><a href="#font-feature-settings-prop"><span class=secno>6.12
   405       </span>Low-level font feature settings control: the
   406       font-feature-settings property</a>
   408      <li><a href="#font-language-override-prop"><span class=secno>6.13
   409       </span>Font language override: the font-language-override property</a>
   410     </ul>
   412    <li><a href="#font-feature-resolution"><span class=secno>7 </span>Font
   413     Feature Resolution </a>
   414     <ul class=toc>
   415      <li><a href="#default-features"><span class=secno>7.1 </span>Default
   416       features</a>
   418      <li><a href="#feature-precedence"><span class=secno>7.2 </span>Feature
   419       precedence</a>
   421      <li><a href="#feature-precedence-examples"><span class=secno>7.3
   422       </span>Feature precedence examples</a>
   423     </ul>
   425    <li><a href="#object-model"><span class=secno>8 </span>Object Model</a>
   426     <ul class=toc>
   427      <li><a href="#om-fontface"><span class=secno>8.1 </span>The
   428       <code>CSSFontFaceRule</code> interface</a>
   430      <li><a href="#om-fontfeaturevalues"><span class=secno>8.2 </span>The
   431       <code>CSSFontFeatureValuesRule</code> interface</a>
   432     </ul>
   434    <li class=no-num><a href="#platform-props-to-css">Appendix A: Mapping
   435     platform font properties to CSS properties</a>
   437    <li class=no-num><a href="#ch-ch-ch-changes">Changes</a>
   438     <ul class=toc>
   439      <li class=no-num><a href="#recent-changes"> Changes from the February
   440       2013 CSS3 Fonts Working Draft</a>
   441     </ul>
   443    <li class=no-num><a href="#acknowledgments">Acknowledgments</a>
   445    <li class=no-num><a href="#conformance"> Conformance</a>
   446     <ul class=toc>
   447      <li class=no-num><a href="#conventions"> Document Conventions</a>
   449      <li class=no-num><a href="#conformance-classes"> Conformance Classes</a>
   452      <li class=no-num><a href="#partial"> Partial Implementations</a>
   454      <li class=no-num><a href="#experimental"> Experimental
   455       Implementations</a>
   457      <li class=no-num><a href="#testing"> Non-Experimental
   458       Implementations</a>
   459     </ul>
   461    <li class=no-num><a href="#references">References</a>
   462     <ul class=toc>
   463      <li class=no-num><a href="#normative-references">Normative
   464       References</a>
   466      <li class=no-num><a href="#other-references">Other References</a>
   467     </ul>
   469    <li class=no-num><a href="#index">Index</a>
   471    <li class=no-num><a href="#property-index">Property index</a>
   472   </ul>
   473   <!--end-toc-->
   475   <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
   477   <p>A font provides a resource containing the visual representation of
   478    characters. At the simplest level it contains information that maps
   479    character codes to shapes (called glyphs) that represent these characters.
   480    Fonts sharing a common design style are commonly grouped into font
   481    families classified by a set of standard font properties. Within a family,
   482    the shape displayed for a given character can vary by stroke weight, slant
   483    or relative width, among others. An individual font face is described by a
   484    unique combination of these properties. For a given range of text, CSS
   485    font properties are used to select a font family and a specific font face
   486    within that family to be used when rendering that text. As a simple
   487    example, to use the bold form of Helvetica one could use:
   489   <pre>body {
   490     font-family: Helvetica;
   491     font-weight: bold;
   492 }</pre>
   494   <p>Font resources may be installed locally on the system on which a user
   495    agent is running or downloadable. For local font resources descriptive
   496    information can be obtained directly from the font resource. For
   497    downloadable font resources (sometimes referred to as web fonts), the
   498    descriptive information is included with the reference to the font
   499    resource.
   501   <p>Families of fonts typically don't contain a single face for each
   502    possible variation of font properties. The CSS font selection mechanism
   503    describes how to match a given set of CSS font properties to a single font
   504    face.
   506   <h2 id=typography-background><span class=secno>2 </span>Typography
   507    Background</h2>
   509   <p><em>This section is non-normative.</em>
   511   <p> Typographic traditions vary across the globe, so there is no unique way
   512    to classify all fonts across languages and cultures. For even common Latin
   513    letters, wide variations are possible:
   515   <div class=figure><img alt="variations in glyphs for a single character"
   516    src=aaaaaa.png>
   517    <p class=caption>One character, many glyph variations
   518   </div>
   520   <p>Differences in the anatomy of letterforms is one way to distinguish
   521    fonts. For Latin fonts, flourishes at the ends of a character's main
   522    strokes, or serifs, can distinguish a font from those without. Similar
   523    comparisons exist in non-Latin fonts between fonts with tapered strokes
   524    and those using primarily uniform strokes:
   526   <div class=figure><img alt="serif vs. non-serifs" src=serifvssansserif.png>
   527    <p class=caption>Letterforms with and without serifs
   528   </div>
   530   <div class=figure><img alt="serif vs. non-serifs for japanese"
   531    src=minchovsgothic.png>
   532    <p class=caption>Similar groupings for Japanese typefaces
   533   </div>
   535   <p>Fonts contain letterforms and the data needed to map characters to these
   536    letterforms. Often this may be a simple one-to-one mapping, but more
   537    complex mappings are also possible. The use of combining diacritic marks
   538    creates many variations for an underlying letterform:
   540   <div class=figure><img alt="diacritic marks" src=aaaaaa-diacritics.png>
   541    <p class=caption>Variations with diacritic marks
   542   </div>
   544   <p>A sequence of characters can be represented by a single glyph known as a
   545    ligature:
   547   <div class=figure><img alt="example of a fi ligature"
   548    src=final-ligature.png>
   549    <p class=caption>Ligature example
   550   </div>
   552   <p>Visual transformations based on textual context are often stylistic
   553    option in European languages. They are required to correctly render
   554    languages like Arabic, the lam and alef characters below <em>must</em> be
   555    combined when they exist in sequence:
   557   <div class=figure><img alt="lam alef ligature" src=lamaleflig.png>
   558    <p class=caption>Required Arabic ligature
   559   </div>
   561   <p>The relative complexity of these shaping transformations requires
   562    additional data within the font.
   564   <p>Sets of font faces with various stylistic variations are often grouped
   565    together into font families. In the simplest case a regular face is
   566    supplemented with bold and italic faces, but much more extensive groupings
   567    are possible. Variations in the thickness of letterform strokes, the <dfn
   568    id=weight>weight</dfn>, and the overall proportions of the letterform, the
   569    <dfn id=width>width</dfn>, are most common. In the example below, each
   570    letter uses a different font face within the Univers font family. The
   571    width used increases from top to bottom and the weight increases from left
   572    to right:
   574   <div class=figure><img alt="various width and weight variations within a
   575    single family" src=weightwidthvariations.png>
   576    <p class=caption>Weight and width variations within a single font family
   577   </div>
   579   <p>Creating fonts that support multiple scripts is a difficult task;
   580    designers need to understand the cultural traditions surrounding the use
   581    of type in different scripts and come up with letterforms that somehow
   582    share a common theme. Many languages often share a common script and each
   583    of these languages may have noticeable stylistic differences. For example,
   584    the Arabic script is shared by Persian and Urdu and Cyrillic is used with
   585    many languages, not just Russian.
   587   <p>The <a href="#character-map"><em>character map</em></a> of a font
   588    defines the mapping of characters to glyphs for that font. If a document
   589    contains characters not supported by the <a href="#character-map"><em
   590    title="character map">character maps</em></a> of the fonts contained in a
   591    font family list, a user agent may use a <a
   592    href="#system-font-fallback"><em>system font fallback</em></a> procedure
   593    to locate an appropriate font that does. If no appropriate font can be
   594    found, some form of "missing glyph" character will be rendered by the user
   595    agent. System fallback can occur when the specified list of font families
   596    does not include a font that supports a given character.
   598   <p>Although the <a href="#character-map"><em>character map</em></a> of a
   599    font maps a given character to a glyph for that character, modern font
   600    technologies such as OpenType and AAT (Apple Advanced Typography) provide
   601    ways of mapping a character to different glyphs based upon feature
   602    settings. Fonts in these formats allow these features to be embedded in
   603    the font itself and controlled by applications. Common typographic
   604    features which can be specified this way include ligatures, swashes,
   605    contextual alternates, proportional and tabular figures, and automatic
   606    fractions, to list just a few. For a visual overview of OpenType features,
   607    see the <a href="#OPENTYPE-FONT-GUIDE"
   608    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
   610   <h2 id=basic-font-props><span class=secno>3 </span>Basic Font Properties</h2>
   612   <p>The particular font face used to render a character is determined by the
   613    font family and other font properties that apply to a given element. This
   614    structure allows settings to be varied independent of each other.</p>
   615   <!-- prop: font-family -->
   617   <h3 id=font-family-prop><span class=secno>3.1 </span>Font family: the <a
   618    href="#propdef-font-family">font-family</a> property</h3>
   620   <table class=propdef id=namefont-familyvalue-ltfamily-namegt-ltg>
   621    <tbody>
   622     <tr>
   623      <td>Name:
   625      <td><dfn id=propdef-font-family
   626       title="font-family!!property">font-family</dfn>
   628     <tr>
   629      <td>Value:
   631      <td>[ <a href="#family-name-value"><var>&lt;family-name&gt;</var></a> |
   632       <a href="#generic-family-value"><var>&lt;generic-family&gt;</var></a> ]
   633       #
   635     <tr>
   636      <td>Initial:
   638      <td>depends on user agent
   640     <tr>
   641      <td>Applies to:
   643      <td>all elements
   645     <tr>
   646      <td>Inherited:
   648      <td>yes
   650     <tr>
   651      <td>Percentages:
   653      <td>N/A
   655     <tr>
   656      <td>Media:
   658      <td>visual
   660     <tr>
   661      <td>Computed value:
   663      <td>as specified
   665     <tr>
   666      <td>Animatable:
   668      <td>no
   669   </table>
   671   <p>This property specifies a prioritized list of font family names or
   672    generic family names. A font family defines a set of faces that vary in
   673    weight, width or slope. CSS uses the combination of a family name with
   674    other style attributes to select an individual face. Using this selection
   675    mechanism, rather than selecting a face via the style name as is often
   676    done in design applications, allows some degree of regularity in textual
   677    display when fallback occurs.
   679   <p class=note>Designers should note that the CSS definition of font
   680    attributes used for selection are explicitly not intended to define a font
   681    taxonomy. A type designer's idea of a family may often extend to a set of
   682    faces that vary along axes other than just the standard axes of weight,
   683    width and slope. A family may extend to include both a set of serif faces
   684    and a set of sans-serif faces or vary along axes that are unique to that
   685    family. The CSS font selection mechanism merely provides a way to
   686    determine the “closest” substitute when substitution is necessary.
   688   <p>Unlike other CSS properties, component values are a comma-separated list
   689    indicating alternatives. A user agent iterates through the list of family
   690    names until it matches an available font that contains a glyph for the
   691    character to be rendered. This allows for differences in available fonts
   692    across platforms and for differences in the range of characters supported
   693    by individual fonts.
   695   <p>A font family name only specifies a name given to a set of font faces,
   696    it does not specify an individual face. For example, given the
   697    availability of the fonts below, Futura would match but Futura Medium
   698    would not:
   700   <div class=figure><img alt="family and face names"
   701    src=familyvsfacename.png>
   702    <p class=caption>Family and individual face names
   703   </div>
   705   <p>Consider the example below:
   707   <div class=example>
   708    <pre>body {
   709     font-family: Helvetica, Verdana, sans-serif;
   710 }</pre>
   712    <p>If Helvetica is available it will be used when rendering. If neither
   713     Helvetica nor Verdana is present, then the user-agent-defined sans serif
   714     font will be used.</p>
   715   </div>
   717   <p>There are two types of font family names:
   719   <dl>
   720    <dt><dfn id=family-name-value><var>&lt;family-name&gt;</var></dfn>
   722    <dd>The name of a font family of choice such as Helvetica or Verdana in
   723     the previous example.
   725    <dt><dfn id=generic-family-value><var>&lt;generic-family&gt;</var></dfn>
   727    <dd> The following generic family keywords are defined: ‘<a
   728     href="#serif"><code class=property>serif</code></a>’, ‘<a
   729     href="#sans-serif"><code class=property>sans-serif</code></a>’, ‘<a
   730     href="#cursive"><code class=property>cursive</code></a>’, ‘<a
   731     href="#fantasy"><code class=property>fantasy</code></a>’, and ‘<a
   732     href="#monospace"><code class=property>monospace</code></a>’. These
   733     keywords can be used as a general fallback mechanism when an author's
   734     desired font choices are not available. As keywords, they must not be
   735     quoted. Authors are encouraged to append a generic font family as a last
   736     alternative for improved robustness.
   737   </dl>
   739   <p>Font family names other than generic families must either be given
   740    quoted as <a
   741    href="//www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or unquoted
   742    as a sequence of one or more <a
   743    href="//www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
   744    This means most punctuation characters and digits at the start of each
   745    token must be escaped in unquoted font family names.
   747   <p>To illustrate this, the following declarations are invalid:
   749   <pre>
   750 font-family: Red/Black, sans-serif;
   751 font-family: "Lucida" Grande, sans-serif;
   752 font-family: Ahem!, sans-serif;
   753 font-family: test@foo, sans-serif;
   754 font-family: #POUND, sans-serif;
   755 font-family: Hawaii 5-0, sans-serif;
   756 </pre>
   758   <p>If a sequence of identifiers is given as a font family name, the
   759    computed value is the name converted to a string by joining all the
   760    identifiers in the sequence by single spaces.
   762   <p>To avoid mistakes in escaping, it is recommended to quote font family
   763    names that contain white space, digits, or punctuation characters other
   764    than hyphens:
   766   <pre>
   767 body { font-family: "New Century Schoolbook", serif }
   769 &lt;BODY STYLE="font-family: '21st Century', fantasy">
   770 </pre>
   772   <p>Font family <em>names</em> that happen to be the same as a keyword value
   773    (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
   774    class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
   775    class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
   776    class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
   777    class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
   778    class=property>cursive</code></a>’) must be quoted to prevent confusion
   779    with the keywords with the same names. The keywords ‘<code
   780    class=property>initial</code>’ and ‘<code
   781    class=property>default</code>’ are reserved for future use and must also
   782    be quoted when used as font names. UAs must not consider these keywords as
   783    matching the <a
   784    href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
   786   <p>The precise way a set of fonts are grouped into font families varies
   787    depending upon the platform font management API's. The Windows GDI API
   788    only allows four faces to be grouped into a family while the DirectWrite
   789    API and API's on OSX and other platforms support font families with a
   790    variety of weights, widths and slopes (see <a
   791    href="#platform-props-to-css">Appendix A</a> for more details).
   793   <p>Some font formats allow fonts to carry multiple localizations of the
   794    family name. User agents must recognize and correctly match all of these
   795    names independent of the underlying platform localization, system API used
   796    or document encoding:
   798   <div class=figure><img alt="examples of localized family names"
   799    src=localizedfamilynames.png>
   800    <p class=caption>Localized family names
   801   </div>
   803   <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
   804    families</h4>
   806   <p>All five generic font families are defined to exist in all CSS
   807    implementations (they need not necessarily map to five distinct actual
   808    fonts). User agents should provide reasonable default choices for the
   809    generic font families, which express the characteristics of each family as
   810    well as possible within the limits allowed by the underlying technology.
   811    User agents are encouraged to allow users to select alternative choices
   812    for the generic fonts.
   814   <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
   815    definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
   817   <p>Serif fonts represent the formal text style for a script. This often
   818    means but is not limited to glyphs that have finishing strokes, flared or
   819    tapering ends, or have actual serifed endings (including slab serifs).
   820    Serif fonts are typically proportionately-spaced. They often display a
   821    greater variation between thick and thin strokes than fonts from the ‘<a
   822    href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
   823    font family. CSS uses the term ‘<a href="#serif"><code
   824    class=property>serif</code></a>’ to apply to a font for any script,
   825    although other names may be more familiar for particular scripts, such as
   826    Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
   827    Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
   828    class=property>serif</code></a>’ more due to its typographic role rather
   829    than its actual design style. Any font that is so described may be used to
   830    represent the generic ‘<a href="#serif"><code
   831    class=property>serif</code></a>’ family.
   833   <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
   834    <p class=caption>Sample serif fonts
   835   </div>
   837   <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
   838    title="sans-serif, definition of"> <a name=sans-serif-def><dfn
   839    id=sans-serif>sans-serif</dfn></a></span></h5>
   841   <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
   842    low contrast (vertical and horizontal stems have the close to the same
   843    thickness) and have stroke endings that are plain -- without any flaring,
   844    cross stroke, or other ornamentation. Sans-serif fonts are typically
   845    proportionately-spaced. They often have little variation between thick and
   846    thin strokes, compared to fonts from the ‘<a href="#serif"><code
   847    class=property>serif</code></a>’ family. CSS uses the term ‘<a
   848    href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
   849    to a font for any script, although other names may be more familiar for
   850    particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
   851    (Korean). Any font that is so described may be used to represent the
   852    generic ‘<a href="#sans-serif"><code
   853    class=property>sans-serif</code></a>’ family.
   855   <div class=figure><img alt="sample sans-serif fonts"
   856    src=sansserifexamples.png>
   857    <p class=caption>Sample sans-serif fonts
   858   </div>
   860   <h5 class="no-num no-toc"> <span class=index-def id=cursive0
   861    title="cursive, definition of"> <a name=cursive-def><dfn
   862    id=cursive>cursive</dfn></a></span></h5>
   864   <p>Glyphs in cursive fonts generally use a more informal script style, and
   865    the result looks more like handwritten pen or brush writing than printed
   866    letterwork. CSS uses the term ‘<a href="#cursive"><code
   867    class=property>cursive</code></a>’ to apply to a font for any script,
   868    although other names such as Chancery, Brush, Swing and Script are also
   869    used in font names.
   871   <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
   872    <p class=caption>Sample cursive fonts
   873   </div>
   875   <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
   876    title="fantasy, definition of"> <a name=fantasy-def><dfn
   877    id=fantasy>fantasy</dfn></a></span></h5>
   879   <p>Fantasy fonts are primarily decorative or expressive fonts that contain
   880    playful representations of characters. These do not include Pi or Picture
   881    fonts which do not represent actual characters.
   883   <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
   884    <p class=caption>Sample fantasy fonts
   885   </div>
   887   <h5 class="no-num no-toc"> <span class=index-def id=monospace0
   888    title="monospace, definition of"> <a name=monospace-def><dfn
   889    id=monospace>monospace</dfn></a></span></h5>
   891   <p>The sole criterion of a monospace font is that all glyphs have the same
   892    fixed width. This is often used to render samples of computer code.
   894   <div class=figure><img alt="sample monospace fonts"
   895    src=monospaceexamples.png>
   896    <p class=caption>Sample monospace fonts
   897   </div>
   898   <!-- prop: font-weight -->
   900   <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
   901    href="#propdef-font-weight">font-weight</a> property</h3>
   903   <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
   904    <tbody>
   905     <tr>
   906      <td>Name:
   908      <td><dfn id=propdef-font-weight
   909       title="font-weight!!property">font-weight</dfn>
   911     <tr>
   912      <td>Value:
   914      <td><a href="#font-weight-normal-value"
   915       title="normal!!font-weight">normal</a> | <a href="#bold">bold</a> | <a
   916       href="#bolder">bolder</a> | <a href="#lighter">lighter</a> | <a
   917       href="#font-weight-numeric-values" title="100...900 weight
   918       values">100</a> | <a href="#font-weight-numeric-values"
   919       title="100...900 weight values">200</a> | <a
   920       href="#font-weight-numeric-values" title="100...900 weight
   921       values">300</a> | <a href="#font-weight-numeric-values"
   922       title="100...900 weight values">400</a> | <a
   923       href="#font-weight-numeric-values" title="100...900 weight
   924       values">500</a> | <a href="#font-weight-numeric-values"
   925       title="100...900 weight values">600</a> | <a
   926       href="#font-weight-numeric-values" title="100...900 weight
   927       values">700</a> | <a href="#font-weight-numeric-values"
   928       title="100...900 weight values">800</a> | <a
   929       href="#font-weight-numeric-values" title="100...900 weight
   930       values">900</a>
   932     <tr>
   933      <td>Initial:
   935      <td>normal
   937     <tr>
   938      <td>Applies to:
   940      <td>all elements
   942     <tr>
   943      <td>Inherited:
   945      <td>yes
   947     <tr>
   948      <td>Percentages:
   950      <td>N/A
   952     <tr>
   953      <td>Media:
   955      <td>visual
   957     <tr>
   958      <td>Computed value:
   960      <td>numeric weight value (see description)
   962     <tr>
   963      <td>Animatable:
   965      <td>as <a
   966       href="http://dev.w3.org/csswg/css3-transitions/#animtype-font-weight">font
   967       weight</a>
   968   </table>
   970   <p>The <a href="#propdef-font-weight"
   971    title="font-weight!!property">‘<code
   972    class=property>font-weight</code>’</a> property specifies the weight of
   973    glyphs in the font, their degree of blackness or stroke thickness.
   975   <p>Values have the following meanings:
   977   <dl>
   978    <dt><dfn id=font-weight-numeric-values title="100...900 weight values">100
   979     to 900</dfn>
   981    <dd>These values form an ordered sequence, where each number indicates a
   982     weight that is at least as dark as its predecessor. These roughly
   983     correspond to the commonly used weight names below:
   984   </dl>
   986   <ul>
   987    <li>100 - Thin
   989    <li>200 - Extra Light (Ultra Light)
   991    <li>300 - Light
   993    <li>400 - Normal
   995    <li>500 - Medium
   997    <li>600 - Semi Bold (Demi Bold)
   999    <li>700 - Bold
  1001    <li>800 - Extra Bold (Ultra Bold)
  1003    <li>900 - Black (Heavy)
  1004   </ul>
  1006   <dl>
  1007    <dt><dfn id=font-weight-normal-value
  1008     title="normal!!font-weight">normal</dfn>
  1010    <dd>Same as ‘<code class=css>400</code>’.
  1012    <dt><dfn id=bold>bold</dfn>
  1014    <dd>Same as ‘<code class=css>700</code>’.
  1016    <dt><dfn id=bolder>bolder</dfn>
  1018    <dd>Specifies a bolder weight than the inherited value.
  1020    <dt><dfn id=lighter>lighter</dfn>
  1022    <dd>Specifies a lighter weight than the inherited value.
  1023   </dl>
  1025   <p>Font formats that use a scale other than a nine-step scale should map
  1026    their scale onto the CSS scale so that 400 roughly corresponds with a face
  1027    that would be labeled as Regular, Book, Roman and 700 roughly matches a
  1028    face that would be labeled as Bold. Or weights may be inferred from the
  1029    style names, ones that correspond roughly with the scale above. The scale
  1030    is relative, so a face with a larger weight value must never appear
  1031    lighter. If style names are used to infer weights, care should be taken to
  1032    handle variations in style names across locales.
  1034   <p>Quite often there are only a few weights available for a particular font
  1035    family. When a weight is specified for which no face exists, a face with a
  1036    nearby weight is used. In general, bold weights map to faces with heavier
  1037    weights and light weights map to faces with lighter weights (see the <a
  1038    href="#font-matching-algorithm">font matching section below</a> for a
  1039    precise definition). The examples here illustrate which face is used for
  1040    different weights, grey indicates a face for that weight does not exist so
  1041    a face with a nearby weight is used:
  1043   <div class=figure><img alt="weight mappings for a family with 400, 700 and
  1044    900 weights" src=optimaweights.png>
  1045    <p class=caption>Weight mappings for a font family with 400, 700 and 900
  1046     weight faces
  1047   </div>
  1049   <div class=figure><img alt="weight mappings for a family with 300, 600
  1050    weights" src=hiraginoweights.png>
  1051    <p class=caption>Weight mappings for a font family with 300 and 600 weight
  1052     faces
  1053   </div>
  1055   <p>Although the practice is not well-loved by typographers, bold faces are
  1056    often synthesized by user agents for faces that lack actual bold faces.
  1057    For the purposes of style matching, these faces must be treated as if they
  1058    exist within the family. Authors can explicitly avoid this behavior by
  1059    using the ‘<a href="#propdef-font-synthesis"><code
  1060    class=property>font-synthesis</code></a>’ property.
  1062   <p>Specified values of ‘<a href="#bolder"><code
  1063    class=property>bolder</code></a>’ and ‘<a href="#lighter"><code
  1064    class=property>lighter</code></a>’ indicate weights relative to the
  1065    weight of the parent element. The computed weight is calculated based on
  1066    the inherited <a href="#propdef-font-weight"
  1067    title="font-weight!!property">‘<code
  1068    class=property>font-weight</code>’</a> value using the chart below.
  1070   <table class=data id=bolderlighter summary="Bolder/lighter mappings">
  1071    <thead>
  1072     <tr>
  1073      <th>Inherited value
  1075      <th>bolder
  1077      <th>lighter
  1079    <tbody>
  1080     <tr>
  1081      <th>100
  1083      <td>400
  1085      <td>100
  1087     <tr>
  1088      <th>200
  1090      <td>400
  1092      <td>100
  1094     <tr>
  1095      <th>300
  1097      <td>400
  1099      <td>100
  1101     <tr>
  1102      <th>400
  1104      <td>700
  1106      <td>100
  1108     <tr>
  1109      <th>500
  1111      <td>700
  1113      <td>100
  1115     <tr>
  1116      <th>600
  1118      <td>900
  1120      <td>400
  1122     <tr>
  1123      <th>700
  1125      <td>900
  1127      <td>400
  1129     <tr>
  1130      <th>800
  1132      <td>900
  1134      <td>700
  1136     <tr>
  1137      <th>900
  1139      <td>900
  1141      <td>700
  1142   </table>
  1144   <p>The table above is equivalent to selecting the next relative bolder or
  1145    lighter face, given a font family containing normal and bold faces along
  1146    with a thin and a heavy face. Authors who desire finer control over the
  1147    exact weight values used for a given element may use numerical values
  1148    instead of relative weights.</p>
  1149   <!-- prop: font-stretch -->
  1151   <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
  1152    href="#propdef-font-stretch">font-stretch</a> property</h3>
  1154   <table class=propdef id=namefont-stretchvalue-normal-ultra-conde>
  1155    <tbody>
  1156     <tr>
  1157      <td>Name:
  1159      <td><dfn id=propdef-font-stretch
  1160       title="font-stretch!!property">font-stretch</dfn>
  1162     <tr>
  1163      <td>Value:
  1165      <td> <a href="#font-stretch-normal-value"
  1166       title="normal!!font-stretch">normal</a> | <a
  1167       href="#ultra-condensed">ultra-condensed</a> | <a
  1168       href="#extra-condensed">extra-condensed</a> | <a
  1169       href="#condensed">condensed</a> | <a
  1170       href="#semi-condensed-">semi-condensed</a> | <a
  1171       href="#semi-expanded">semi-expanded</a> | <a
  1172       href="#expanded">expanded</a> | <a
  1173       href="#extra-expanded">extra-expanded</a> | <a
  1174       href="#ultra-expanded">ultra-expanded</a>
  1176     <tr>
  1177      <td>Initial:
  1179      <td>normal
  1181     <tr>
  1182      <td>Applies to:
  1184      <td>all elements
  1186     <tr>
  1187      <td>Inherited:
  1189      <td>yes
  1191     <tr>
  1192      <td>Percentages:
  1194      <td>N/A
  1196     <tr>
  1197      <td>Media:
  1199      <td>visual
  1201     <tr>
  1202      <td>Computed value:
  1204      <td>as specified
  1206     <tr>
  1207      <td>Animatable:
  1209      <td>as <a href="#font-stretch-animation">font stretch</a>
  1210   </table>
  1212   <p>The <a href="#propdef-font-stretch"
  1213    title="font-stretch!!property">‘<code
  1214    class=property>font-stretch</code>’</a> property selects a normal,
  1215    condensed, or expanded face from a font family. Absolute keyword values
  1216    have the following ordering, from narrowest to widest:
  1218   <ul>
  1219    <li><dfn id=ultra-condensed>ultra-condensed</dfn>
  1221    <li><dfn id=extra-condensed>extra-condensed</dfn>
  1223    <li><dfn id=condensed>condensed</dfn>
  1225    <li><dfn id=semi-condensed->semi-condensed </dfn>
  1227    <li><dfn id=font-stretch-normal-value
  1228     title="normal!!font-stretch">normal</dfn>
  1230    <li><dfn id=semi-expanded>semi-expanded</dfn>
  1232    <li><dfn id=expanded>expanded</dfn>
  1234    <li><dfn id=extra-expanded>extra-expanded</dfn>
  1236    <li><dfn id=ultra-expanded>ultra-expanded</dfn>
  1237   </ul>
  1239   <p>When a face does not exist for a given width, normal or condensed values
  1240    map to a narrower face, otherwise a wider face. Conversely, expanded
  1241    values map to a wider face, otherwise a narrower face. The figure below
  1242    shows how the nine font-stretch property settings affect font selection
  1243    for font family containing a variety of widths, grey indicates a width for
  1244    which no face exists and a different width is substituted:
  1246   <div class=figure><img alt="width mappings for a family with condensed,
  1247    normal and expanded faces" src=universwidths.png>
  1248    <p class=caption>Width mappings for a font family with condensed, normal
  1249     and expanded width faces
  1250   </div>
  1252   <p id=font-stretch-animation>Animation of font stretch: Font stretch is
  1253    interpolated in discrete steps. The interpolation happens as though the
  1254    ordered values are equally spaced real numbers. The interpolation result
  1255    is rounded to the nearest value, with values exactly halfway between two
  1256    values rounded towards the later value in the list above.</p>
  1257   <!-- prop: font-style -->
  1259   <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
  1260    href="#propdef-font-style">font-style</a> property</h3>
  1262   <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
  1263    <tbody>
  1264     <tr>
  1265      <td>Name:
  1267      <td><dfn id=propdef-font-style
  1268       title="font-style!!property">font-style</dfn>
  1270     <tr>
  1271      <td>Value:
  1273      <td><a href="#font-style-normal-value"
  1274       title="normal!!font-style">normal</a> | <a href="#italic">italic</a> |
  1275       <a href="#oblique">oblique</a>
  1277     <tr>
  1278      <td>Initial:
  1280      <td>normal
  1282     <tr>
  1283      <td>Applies to:
  1285      <td>all elements
  1287     <tr>
  1288      <td>Inherited:
  1290      <td>yes
  1292     <tr>
  1293      <td>Percentages:
  1295      <td>N/A
  1297     <tr>
  1298      <td>Media:
  1300      <td>visual
  1302     <tr>
  1303      <td>Computed value:
  1305      <td>as specified
  1307     <tr>
  1308      <td>Animatable:
  1310      <td>no
  1311   </table>
  1313   <p>The <a href="#propdef-font-style" title="font-style!!property">‘<code
  1314    class=property>font-style</code>’</a> property allows italic or oblique
  1315    faces to be selected. Italic forms are generally cursive in nature while
  1316    oblique faces are typically sloped versions of the regular face. Oblique
  1317    faces can be simulated by artificially sloping the glyphs of the regular
  1318    face. Compare the artificially sloped renderings of Palatino ‘<code
  1319    class=property>a</code>’ and Baskerville ‘<code
  1320    class=property>N</code>’ in grey with the actual italic versions:
  1322   <div class=figure><img alt="artificial sloping vs. real italics"
  1323    src=realvsfakeitalics.png>
  1324    <p class=caption>Artificial sloping versus real italics
  1325   </div>
  1327   <p>Values have the following meanings:
  1329   <dl>
  1330    <dt><dfn id=font-style-normal-value
  1331     title="normal!!font-style">normal</dfn>
  1333    <dd>selects a face that is classified as a normal face, one that is
  1334     neither italic or obliqued
  1336    <dt><dfn id=italic>italic</dfn>
  1338    <dd>selects a font that is labeled as an italic face, or an oblique face
  1339     if one is not
  1341    <dt><dfn id=oblique>oblique</dfn>
  1343    <dd>selects a font that is labeled as an oblique face, or an italic face
  1344     if one is not
  1345   </dl>
  1347   <p>If no italic or oblique face is available, oblique faces can be
  1348    synthesized by rendering non-obliqued faces with an artificial obliquing
  1349    operation. The use of these artificially obliqued faces can be disabled
  1350    using the ‘<a href="#propdef-font-synthesis"><code
  1351    class=property>font-synthesis</code></a>’ property. The details of the
  1352    obliquing operation are not explicitly defined.</p>
  1353   <!-- resolution on the "undefined" nature of synthetics: http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
  1355   <p>Many scripts lack the tradition of mixing a cursive form within text
  1356    rendered with a normal face. Chinese, Japanese and Korean fonts almost
  1357    always lack italic or oblique faces. Fonts that support a mixture of
  1358    scripts will sometimes omit specific scripts such as Arabic from the set
  1359    of glyphs supported in the italic face. User agents should be careful
  1360    about making <a href="#character-map"><em>character map</em></a>
  1361    assumptions across faces when implementing support for <a
  1362    href="#system-font-fallback"><em>system font fallback</em></a>.</p>
  1363   <!-- prop: font-size -->
  1365   <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
  1366    href="#propdef-font-size">font-size</a> property</h3>
  1368   <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
  1369    <tbody>
  1370     <tr>
  1371      <td>Name:
  1373      <td><dfn id=propdef-font-size>font-size</dfn>
  1375     <tr>
  1376      <td>Value:
  1378      <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
  1379       | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
  1380       <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
  1381       href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
  1383     <tr>
  1384      <td>Initial:
  1386      <td>medium
  1388     <tr>
  1389      <td>Applies to:
  1391      <td>all elements
  1393     <tr>
  1394      <td>Inherited:
  1396      <td>yes
  1398     <tr>
  1399      <td>Percentages:
  1401      <td>refer to parent element's font size
  1403     <tr>
  1404      <td>Media:
  1406      <td>visual
  1408     <tr>
  1409      <td>Computed value:
  1411      <td>absolute length
  1413     <tr>
  1414      <td>Animatable:
  1416      <td>as <a
  1417       href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
  1418   </table>
  1420   <p>This property indicates the desired height of glyphs from the font. For
  1421    scalable fonts, the font-size is a scale factor applied to the EM unit of
  1422    the font. (Note that certain glyphs may bleed outside their EM box.) For
  1423    non-scalable fonts, the font-size is converted into absolute units and
  1424    matched against the declared font-size of the font, using the same
  1425    absolute coordinate space for both of the matched values. Values have the
  1426    following meanings:
  1428   <dl>
  1429    <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
  1431    <dd> An <a
  1432     href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
  1433     refers to an entry in a table of font sizes computed and kept by the user
  1434     agent. Possible values are:
  1435     <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
  1437    <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
  1439    <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
  1440     keyword is interpreted relative to the table of font sizes and the
  1441     computed ‘<a href="#propdef-font-size"><code
  1442     class=property>font-size</code></a>’ of the parent element. Possible
  1443     values are:
  1444     <p> [ larger | smaller ]
  1446     <p> For example, if the parent element has a font size of ‘<code
  1447      class=property>medium</code>’, a value of ‘<code
  1448      class=property>larger</code>’ will make the font size of the current
  1449      element be ‘<code class=property>large</code>’. If the parent
  1450      element's size is not close to a table entry, the user agent is free to
  1451      interpolate between table entries or round off to the closest one. The
  1452      user agent may have to extrapolate table values if the numerical value
  1453      goes beyond the keywords.
  1455    <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
  1457    <dd>A length value specifies an absolute font size (independent of the
  1458     user agent's font table). Negative lengths are illegal.
  1460    <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
  1462    <dd>A percentage value specifies an absolute font size relative to the
  1463     parent element's font size. Use of percentage values, or values in
  1464     ‘<code class=property>em</code>’s, leads to more robust and
  1465     cascadable style sheets.
  1466   </dl>
  1468   <p>The following table provides user agent guidelines for the absolute-size
  1469    scaling factor and their mapping to HTML heading and absolute font-sizes.
  1470    The ‘<code class=property>medium</code>’ value is used as the
  1471    reference middle value. The user agent may fine-tune these values for
  1472    different fonts or different types of display devices.
  1474   <table class=data>
  1475    <thead>
  1476     <tr>
  1477      <th>CSS absolute-size values
  1479      <th>xx-small
  1481      <th>x-small
  1483      <th>small
  1485      <th>medium
  1487      <th>large
  1489      <th>x-large
  1491      <th>xx-large
  1493      <th> 
  1495    <tbody>
  1496     <tr>
  1497      <th>scaling factor
  1499      <td>3/5
  1501      <td>3/4
  1503      <td>8/9
  1505      <td>1
  1507      <td>6/5
  1509      <td>3/2
  1511      <td>2/1
  1513      <td>3/1
  1515     <tr>
  1516      <th>HTML headings
  1518      <td>h6
  1520      <td> 
  1522      <td>h5
  1524      <td>h4
  1526      <td>h3
  1528      <td>h2
  1530      <td>h1
  1532      <td> 
  1534     <tr>
  1535      <th>HTML font sizes
  1537      <td>1
  1539      <td> 
  1541      <td>2
  1543      <td>3
  1545      <td>4
  1547      <td>5
  1549      <td>6
  1551      <td>7
  1552   </table>
  1554   <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
  1555    applying these guidelines should nevertheless avoid creating font-size
  1556    resulting in less than 9 device pixels per EM unit on a computer
  1557    display.</em>
  1559   <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
  1560    factor between adjacent indexes was 1.5 which user experience proved to be
  1561    too large. In CSS2, the suggested scaling factor for computer screen
  1562    between adjacent indexes was 1.2 which still created issues for the small
  1563    sizes. The new scaling factor varies between each index to provide a
  1564    better readability.</em>
  1566   <p>The actual value of this property may differ from the computed value due
  1567    a numerical value on ‘<a href="#propdef-font-size-adjust"><code
  1568    class=property>font-size-adjust</code></a>’ and the unavailability of
  1569    certain font sizes.
  1571   <p>Child elements inherit the computed <a class=noxref
  1572    href="#font-size-prop"> <span class=property>‘<code
  1573    class=property>font-size</code>’</span></a> value (otherwise, the effect
  1574    of <a class=noxref href="#font-size-adjust-prop"><span
  1575    class=property>‘<code
  1576    class=property>font-size-adjust</code>’</span></a> would compound).
  1578   <div class=example>
  1579    <p style="display:none">Example(s):
  1581    <p>
  1583    <pre>p { font-size: 12pt; }
  1584 blockquote { font-size: larger }
  1585 em { font-size: 150% }
  1586 em { font-size: 1.5em }
  1587 </pre>
  1588   </div>
  1589   <!-- prop: font-size-adjust -->
  1591   <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
  1592    the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
  1594   <table class=propdef id=namefont-size-adjustvaluenone-auto-ltnum>
  1595    <tbody>
  1596     <tr>
  1597      <td>Name:
  1599      <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
  1601     <tr>
  1602      <td>Value:
  1604      <td><a href="#font-size-adjust-none-value"
  1605       title="none!!font-size-adjust">none</a> | <a
  1606       href="#font-size-adjust-auto-value"
  1607       title="auto!!font-size-adjust">auto</a> | <a
  1608       href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
  1610     <tr>
  1611      <td>Initial:
  1613      <td>none
  1615     <tr>
  1616      <td>Applies to:
  1618      <td>all elements
  1620     <tr>
  1621      <td>Inherited:
  1623      <td>yes
  1625     <tr>
  1626      <td>Percentages:
  1628      <td>N/A
  1630     <tr>
  1631      <td>Media:
  1633      <td>visual
  1635     <tr>
  1636      <td>Computed value:
  1638      <td>as specified
  1640     <tr>
  1641      <td>Animatable:
  1643      <td>as <a
  1644       href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a>
  1645   </table>
  1647   <p>For any given font size, the apparent size and legibility of text varies
  1648    across fonts. For scripts such as Latin or Cyrillic that distinguish
  1649    between upper and lowercase letters, the relative height of lowercase
  1650    letters compared to their uppercase counterparts is a determining factor
  1651    of legibility. This is commonly referred to as the <a class=index-def
  1652    href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
  1653    id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
  1654    the x-height of a font divided by the font size.
  1656   <p>In situations where font fallback occurs, fallback fonts may not share
  1657    the same aspect ratio as the desired font family and will thus appear less
  1658    readable. The font-size-adjust property is a way to preserve the
  1659    readability of text when font fallback occurs. It does this by adjusting
  1660    the font-size so that the x-height is the same regardless of the font
  1661    used.
  1663   <div class=example>
  1664    <p>The style defined below defines Verdana as the desired font family, but
  1665     if Verdana is not available Futura or Times will be used.</p>
  1667    <pre>p {
  1668     font-family: Verdana, Futura, Times;
  1671 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
  1672 </pre>
  1674    <p>Verdana has a relatively high aspect ratio, lowercase letters are
  1675     relatively tall compared to uppercase letters, so at small sizes text
  1676     appears legible. Times has a lower aspect ratio and so if fallback
  1677     occurs, the text will be less legible at small sizes than Verdana.</p>
  1678   </div>
  1680   <p>How text rendered in each of these fonts compares is shown below, the
  1681    columns show text rendered in Verdana, Futura and Times. The same
  1682    font-size value is used across cells within each row and red lines are
  1683    included to show the differences in x-height. In the upper half each row
  1684    is rendered in the same font-size value. The same is true for the lower
  1685    half but in this half the font-size-adjust property is also set so that
  1686    the actual font size is adjusted to preserve the x-height across each row.
  1687    Note how small text remains relatively legible across each row in the
  1688    lower half.
  1690   <div class=figure><img alt="text with and without font-size-adjust"
  1691    src=fontsizeadjust.png>
  1692    <p class=caption>Text with and without the use of font-size-adjust
  1693   </div>
  1695   <p>This property allows authors to specify an aspect value for an element
  1696    that will effectively preserve the x-height of the first choice font,
  1697    whether it is substituted or not. Values have the following meanings:
  1699   <dl>
  1700    <dt><dfn id=font-size-adjust-none-value
  1701     title="none!!font-size-adjust">none</dfn>
  1703    <dd>Do not preserve the font's x-height.
  1705    <dt><dfn id=font-size-adjust-auto-value
  1706     title="auto!!font-size-adjust">auto</dfn>
  1708    <dd>Behaves just like &lt;number>, except the number used is the aspect
  1709     value calculated by user agents for the first font in the list of fonts
  1710     defined for the initial value of the <a href="#propdef-font-family"
  1711     title="font-family!!property">‘<code
  1712     class=property>font-family</code>’</a> property. Effectively this is
  1713     the default font used when <a href="#propdef-font-family"
  1714     title="font-family!!property">‘<code
  1715     class=property>font-family</code>’</a> is not otherwise specified.
  1716     <p>Authors can use this value to specify that font size should be
  1717      normalized across fonts based on the x-height without the need to
  1718      specify the aspect ratio explicitly.</p>
  1720    <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
  1722    <dd>Specifies the aspect value used in the calculation below to calculate
  1723     the adjusted font size:
  1724     <pre>c  =  ( a / a' ) s
  1725 </pre>
  1727     <p>where:</p>
  1729     <pre>s  =  font-size value
  1730 a  =  aspect value as specified by the font-size-adjust property
  1731 a' =  aspect value 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 aspect value of the first font in the
  1737      font-family list. If this is specified accurately, the <tt>(a/a')</tt>
  1738      term in the formula above is effectively 1 for the first font and no
  1739      adjustment occurs. If the value is specified inaccurately, text rendered
  1740      using the first font in the family list will display differently in
  1741      older user agents that don't support font-size-adjust.</p>
  1742   </dl>
  1744   <p>Authors can calculate the aspect value for a given font by comparing
  1745    spans with the same content but different font-size-adjust properties. If
  1746    the same font-size is used, the spans will match when the font-size-adjust
  1747    value is accurate for the given font.
  1749   <div class=example>
  1750    <p>Two spans with borders are used to determine the aspect value of a
  1751     font. The font-size is the same for both spans but the font-size-adjust
  1752     property is specified only for the right span. Starting with a value of
  1753     0.5, the aspect value can be adjusted until the borders around the two
  1754     letters line up.</p>
  1756    <pre>p {
  1757     font-family: Futura;
  1758     font-size: 500px;
  1761 span {
  1762     border: solid 1px red;
  1765 .adjust {
  1766     font-size-adjust: 0.5;
  1769 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
  1770 </pre>
  1772    <div class=figure><img alt="Futura with an aspect value of 0.5"
  1773     src=beforefontsizeadjust.png>
  1774     <p class=caption>Futura with an aspect value of 0.5
  1775    </div>
  1777    <p>The box on the right is a bit bigger than the one on the left, so the
  1778     aspect value of this font is something less than 0.5. Adjust the value
  1779     until the boxes align.</p>
  1780   </div>
  1781   <!-- prop: font -->
  1783   <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
  1784    <a href="#propdef-font">font</a> property</h3>
  1786   <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
  1787    <tbody>
  1788     <tr>
  1789      <td>Name:
  1791      <td><dfn id=propdef-font>font</dfn>
  1793     <tr>
  1794      <td>Value:
  1796      <td>[ [ <var>&lt;<a href="#propdef-font-style"
  1797       title="font-style!!property">‘<code
  1798       class=property>font-style</code>’</a>&gt;</var> || <a
  1799       href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
  1800       || <var>&lt;<a href="#propdef-font-weight"
  1801       title="font-weight!!property">‘<code
  1802       class=property>font-weight</code>’</a>&gt;</var> || <var>&lt;<a
  1803       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  1804       class=property>font-stretch</code>’</a></var> ]? <var>&lt;‘<a
  1805       href="#propdef-font-size"><code
  1806       class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
  1807       class=property>line-height</code>’&gt;</var> ]? <var>&lt;<a
  1808       href="#propdef-font-family" title="font-family!!property">‘<code
  1809       class=property>font-family</code>’</a>&gt;</var> ] | caption | icon |
  1810       menu | message-box | small-caption | status-bar
  1812     <tr>
  1813      <td>Initial:
  1815      <td>see individual properties
  1817     <tr>
  1818      <td>Applies to:
  1820      <td>all elements
  1822     <tr>
  1823      <td>Inherited:
  1825      <td>yes
  1827     <tr>
  1828      <td>Percentages:
  1830      <td>see individual properties
  1832     <tr>
  1833      <td>Media:
  1835      <td>visual
  1837     <tr>
  1838      <td>Computed value:
  1840      <td>see individual properties
  1842     <tr>
  1843      <td>Animatable:
  1845      <td>see individual properties
  1846   </table>
  1848   <p>The <span class=property>‘<a href="#propdef-font"><code
  1849    class=property>font</code></a>’</span> property is, except as described
  1850    below, a shorthand property for setting <a href="#propdef-font-style"
  1851    title="font-style!!property">‘<code
  1852    class=property>font-style</code>’</a>, <a href="#propdef-font-variant"
  1853    title="font-variant!!property">‘<code
  1854    class=property>font-variant</code>’</a>, <a href="#propdef-font-weight"
  1855    title="font-weight!!property">‘<code
  1856    class=property>font-weight</code>’</a>, <a href="#propdef-font-stretch"
  1857    title="font-stretch!!property">‘<code
  1858    class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1859    href="#propdef-font-size"><code
  1860    class=property>font-size</code></a>’</span>, <a class=property
  1861    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1862    class=property>line-height</code>’</a>, <a href="#propdef-font-family"
  1863    title="font-family!!property">‘<code
  1864    class=property>font-family</code>’</a> at the same place in the
  1865    stylesheet. Values for the <a href="#propdef-font-variant"
  1866    title="font-variant!!property">‘<code
  1867    class=property>font-variant</code>’</a> property may also be included
  1868    but only those supported in CSS 2.1, none of the <a
  1869    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1870    class=property>font-variant</code>’</a> values added in this
  1871    specification can be used in the <span class=property>‘<a
  1872    href="#propdef-font"><code class=property>font</code></a>’</span>
  1873    shorthand:
  1875   <pre
  1876    class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
  1878   <p>The syntax of this property is based on a traditional typographical
  1879    shorthand notation to set multiple properties related to fonts.
  1881   <p>All subproperties of the ‘<a href="#propdef-font"><code
  1882    class=property>font</code></a>’ property are first reset to their
  1883    initial values, including those listed above plus <span
  1884    class=property>‘<a href="#propdef-font-size-adjust"><code
  1885    class=property>font-size-adjust</code></a>’</span>, <span
  1886    class=property>‘<a href="#propdef-font-kerning"><code
  1887    class=property>font-kerning</code></a>’</span>, subproperties of <a
  1888    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1889    class=property>font-variant</code>’</a> and and <span>‘<a
  1890    href="#propdef-font-language-override"><code
  1891    class=property>font-language-override</code></a>’</span>. Then, those
  1892    properties that are given explicit values in the <span
  1893    class=property>‘<a href="#propdef-font"><code
  1894    class=property>font</code></a>’</span> shorthand are set to those
  1895    values. For a definition of allowed and initial values, see the previously
  1896    defined properties. For reasons of backwards compatibility, it is not
  1897    possible to set <span class=property>‘<a
  1898    href="#propdef-font-size-adjust"><code
  1899    class=property>font-size-adjust</code></a>’</span> to anything other
  1900    than its initial value using the <span class=property>‘<a
  1901    href="#propdef-font"><code class=property>font</code></a>’</span>
  1902    shorthand property; instead, use the individual property.
  1904   <div class=example>
  1905    <p style="display:none">Example(s):
  1907    <p>
  1909    <pre>p { font: 12pt/14pt sans-serif }
  1910 p { font: 80% sans-serif }
  1911 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
  1912 p { font: bold italic large Palatino, serif }
  1913 p { font: normal small-caps 120%/120% fantasy }
  1914 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
  1915 </pre>
  1917    <p> In the second rule, the font size percentage value (‘<code
  1918     class=css>80%</code>’) refers to the computed ‘<a
  1919     href="#propdef-font-size"><code class=property>font-size</code></a>’ of
  1920     the parent element. In the third rule, the line height percentage
  1921     (‘<code class=css>110%</code>’) refers to the font size of the
  1922     element itself.
  1924    <p>The first three rules do not specify the <a
  1925     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1926     class=property>font-variant</code>’</a> and <a
  1927     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1928     class=property>font-weight</code>’</a> explicitly, so these properties
  1929     receive their initial values (<span title="normal value">‘<code
  1930     class=property>normal</code>’</span>). Notice that the font family name
  1931     "new century schoolbook", which contains spaces, is enclosed in quotes.
  1932     The fourth rule sets the <a href="#propdef-font-weight"
  1933     title="font-weight!!property">‘<code
  1934     class=property>font-weight</code>’</a> to ‘<a href="#bold"><code
  1935     class=property>bold</code></a>’, the <a href="#propdef-font-style"
  1936     title="font-style!!property">‘<code
  1937     class=property>font-style</code>’</a> to ‘<a href="#italic"><code
  1938     class=property>italic</code></a>’, and implicitly sets <a
  1939     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1940     class=property>font-variant</code>’</a> to <a
  1941     href="#font-variant-normal-value" title="normal!!font-variant">‘<code
  1942     class=property>normal</code>’</a>.
  1944    <p> The fifth rule sets the <a href="#propdef-font-variant"
  1945     title="font-variant!!property">‘<code
  1946     class=property>font-variant</code>’</a> (‘<a href="#small-caps"><code
  1947     class=property>small-caps</code></a>’), the <span class=property>‘<a
  1948     href="#propdef-font-size"><code
  1949     class=property>font-size</code></a>’</span> (120% of the parent's font
  1950     size), the <a class=property
  1951     href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1952     class=property>line-height</code>’</a> (120% of the font size) and the
  1953     <a href="#propdef-font-family" title="font-family!!property">‘<code
  1954     class=property>font-family</code>’</a> (‘<a href="#fantasy"><code
  1955     class=property>fantasy</code></a>’). It follows that the keyword <span
  1956     title="normal value">‘<code class=property>normal</code>’</span>
  1957     applies to the two remaining properties: <a href="#propdef-font-style"
  1958     title="font-style!!property">‘<code
  1959     class=property>font-style</code>’</a> and <a
  1960     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1961     class=property>font-weight</code>’</a>.
  1963    <p>The sixth rule sets the <a href="#propdef-font-style"
  1964     title="font-style!!property">‘<code
  1965     class=property>font-style</code>’</a>, <a href="#propdef-font-stretch"
  1966     title="font-stretch!!property">‘<code
  1967     class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1968     href="#propdef-font-size"><code
  1969     class=property>font-size</code></a>’</span>, and <a
  1970     href="#propdef-font-family" title="font-family!!property">‘<code
  1971     class=property>font-family</code>’</a>, the other font properties being
  1972     set to their initial values.
  1973   </div>
  1975   <p>Since the <a href="#propdef-font-stretch"
  1976    title="font-stretch!!property">‘<code
  1977    class=property>font-stretch</code>’</a> property was not defined in CSS
  1978    2.1, when using <a href="#propdef-font-stretch"
  1979    title="font-stretch!!property">‘<code
  1980    class=property>font-stretch</code>’</a> values within ‘<a
  1981    href="#propdef-font"><code class=property>font</code></a>’ rules,
  1982    authors should include a extra version compatible with older user agents:
  1984   <pre>p {
  1985   font: 80% sans-serif;   /* for older user agents */
  1986   font: condensed 80% sans-serif;
  1987 }</pre>
  1989   <p>The following values refer to system fonts:
  1991   <dl>
  1992    <dt><strong>caption</strong>
  1994    <dd>The font used for captioned controls (e.g., buttons, drop-downs,
  1995     etc.).
  1997    <dt><strong>icon</strong>
  1999    <dd>The font used to label icons.
  2001    <dt><strong>menu</strong>
  2003    <dd>The font used in menus (e.g., dropdown menus and menu lists).
  2005    <dt><strong>message-box</strong>
  2007    <dd>The font used in dialog boxes.
  2009    <dt><strong>small-caption</strong>
  2011    <dd>The font used for labeling small controls.
  2013    <dt><strong>status-bar</strong>
  2015    <dd>The font used in window status bars.
  2016   </dl>
  2018   <p>System fonts may only be set as a whole; that is, the font family, size,
  2019    weight, style, etc. are all set at the same time. These values may then be
  2020    altered individually if desired. If no font with the indicated
  2021    characteristics exists on a given platform, the user agent should either
  2022    intelligently substitute (e.g., a smaller version of the ‘<code
  2023    class=property>caption</code>’ font might be used for the ‘<code
  2024    class=property>small-caption</code>’ font), or substitute a user agent
  2025    default font. As for regular fonts, if, for a system font, any of the
  2026    individual properties are not part of the operating system's available
  2027    user preferences, those properties should be set to their initial values.
  2029   <p>That is why this property is "almost" a shorthand property: system fonts
  2030    can only be specified with this property, not with <a
  2031    href="#propdef-font-family" title="font-family!!property">‘<code
  2032    class=property>font-family</code>’</a> itself, so <span
  2033    class=property>‘<a href="#propdef-font"><code
  2034    class=property>font</code></a>’</span> allows authors to do more than
  2035    the sum of its subproperties. However, the individual properties such as
  2036    <a href="#propdef-font-weight" title="font-weight!!property">‘<code
  2037    class=property>font-weight</code>’</a> are still given values taken from
  2038    the system font, which can be independently varied.
  2040   <p>Note that the keywords used for the system fonts listed above are only
  2041    treated as keywords when they occur in the initial position, in other
  2042    positions the same string is treated as part of the font family name:
  2044   <pre>  font: menu;        /* use the font settings for system menus */
  2045   font: large menu;  /* use a font family named "menu" */</pre>
  2047   <div class=example>
  2048    <p style="display:none">Example(s):
  2050    <p>
  2052    <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
  2053 button p { font: menu }
  2054 button p em { font-weight: bolder }
  2055 </pre>
  2057    <p>If the font used for dropdown menus on a particular system happened to
  2058     be, for example, 9-point Charcoal, with a weight of 600, then P elements
  2059     that were descendants of BUTTON would be displayed as if this rule were
  2060     in effect:
  2062    <pre>button p { font: 600 9pt Charcoal }
  2063 </pre>
  2065    <p>Because the <span class=property>‘<a href="#propdef-font"><code
  2066     class=property>font</code></a>’</span> shorthand resets to its initial
  2067     value any property not explicitly given a value, this has the same effect
  2068     as this declaration:
  2070    <pre>button p {
  2071   font-style: normal;
  2072   font-variant: normal;
  2073   font-weight: 600;
  2074   font-size: 9pt;
  2075   line-height: normal;
  2076   font-family: Charcoal
  2078 </pre>
  2079   </div>
  2080   <!-- prop: font-synthesis -->
  2082   <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
  2083    synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
  2084    property</h3>
  2086   <table class=propdef id=namefont-synthesisvaluenone-weight-style>
  2087    <tbody>
  2088     <tr>
  2089      <td>Name:
  2091      <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
  2093     <tr>
  2094      <td>Value:
  2096      <td>none | [ weight || style ]
  2098     <tr>
  2099      <td>Initial:
  2101      <td>weight style
  2103     <tr>
  2104      <td>Applies to:
  2106      <td>all elements
  2108     <tr>
  2109      <td>Inherited:
  2111      <td>yes
  2113     <tr>
  2114      <td>Percentages:
  2116      <td>N/A
  2118     <tr>
  2119      <td>Media:
  2121      <td>visual
  2123     <tr>
  2124      <td>Computed value:
  2126      <td>as specified
  2128     <tr>
  2129      <td>Animatable:
  2131      <td>no
  2132   </table>
  2134   <p>This property controls whether user agents are allowed to synthesize
  2135    bold or oblique font faces when a font family lacks bold or italic faces.
  2136    If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
  2137    specified, user agents must not synthesize bold faces and if ‘<code
  2138    class=property>style</code>’ is not specified user agents must not
  2139    synthesize italic faces. A value of ‘<code class=property>none</code>’
  2140    disallows all synthetic faces.
  2142   <div class=example>
  2143    <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
  2145    <pre>*:lang(ar) { font-synthesis: none; }
  2146 </pre>
  2147   </div>
  2149   <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
  2151   <h3 id=font-face-rule><span class=secno>4.1 </span>The <dfn
  2152    id=at-font-face-rule style="font-weight: inherit; font-style:
  2153    inherit"><code>@font-face</code></dfn> rule</h3>
  2155   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule allows
  2156    for linking to fonts that are automatically fetched and activated when
  2157    needed. This allows authors to select a font that closely matches the
  2158    design goals for a given page rather than limiting the font choice to a
  2159    set of fonts available on all platforms. A set of font descriptors define
  2160    the location of a font resource, either locally or externally, along with
  2161    the style characteristics of an individual face. Multiple <a
  2162    href="#at-font-face-rule"><code>@font-face</code></a> rules can be used to
  2163    construct font families with a variety of faces. Using CSS font matching
  2164    rules, a user agent can selectively download only those faces that are
  2165    needed for a given piece of text.
  2167   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2168    consists of the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2169    at-keyword followed by a block of descriptor declarations. In terms of the
  2170    grammar, this specification defines the following productions:
  2172   <pre><dfn id=fontfacerule>font_face_rule</dfn>
  2173   : <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>*
  2176 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
  2177   : <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>
  2178   ;</pre>
  2180   <p>The following new definitions are introduced:
  2182   <pre>-    -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
  2183 F    f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
  2185   <p>The following new token is introduced:
  2187   <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
  2189   <p>Each <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2190    specifies a value for every font descriptor, either implicitly or
  2191    explicitly. Those not given explicit values in the rule take the initial
  2192    value listed with each descriptor in this specification. These descriptors
  2193    apply solely within the context of the <a
  2194    href="#at-font-face-rule"><code>@font-face</code></a> rule in which they
  2195    are defined, and do not apply to document language elements. There is no
  2196    notion of which elements the descriptors apply to or whether the values
  2197    are inherited by child elements. When a given descriptor occurs multiple
  2198    times in a given <a href="#at-font-face-rule"><code>@font-face</code></a>
  2199    rule, only the last descriptor declaration is used and all prior
  2200    declarations for that descriptor are ignored.
  2202   <div class=example>
  2203    <p>To use a downloadable font called Gentium:</p>
  2205    <pre>
  2206 @font-face {
  2207   font-family: Gentium;
  2208   src: url(http://example.com/fonts/Gentium.ttf);
  2211 p { font-family: Gentium, serif; }
  2212 </pre>
  2214    <p>The user agent will download Gentium and use it when rendering text
  2215     within paragraph elements. If for some reason the site serving the font
  2216     is unavailable, the default serif font will be used.</p>
  2217   </div>
  2219   <p>A given set of <a href="#at-font-face-rule"><code>@font-face</code></a>
  2220    rules define a set of fonts available for use within the documents that
  2221    contain these rules. When font matching is done, fonts defined using these
  2222    rules are considered before other available fonts on a system.
  2224   <p>Downloaded fonts are only available to documents that reference them.
  2225    The process of activating these fonts must not make them available to
  2226    other applications or to documents that don't directly link to the same
  2227    font. User agent implementers might consider it convenient to use
  2228    downloaded fonts when rendering characters in other documents for which no
  2229    other available font exists as part of the <a
  2230    href="#system-font-fallback"><em>system font fallback</em></a> procedure.
  2231    However, this would cause a security leak since the contents of one page
  2232    would be able to affect other pages, something an attacker could use as an
  2233    attack vector. These restrictions do not affect caching behavior, fonts
  2234    are cached the same way other web resources are cached.
  2236   <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
  2237    properties in a declaration block, declarations of any descriptors that
  2238    are not supported by the user agent must be ignored. <a
  2239    href="#at-font-face-rule"><code>@font-face</code></a> rules require a
  2240    font-family and src descriptor; if either of these are missing, the <a
  2241    href="#at-font-face-rule"><code>@font-face</code></a> rule is invalid and
  2242    must be ignored entirely.
  2244   <p>In cases where user agents have limited platform resources or implement
  2245    the ability to disable downloadable font resources, <a
  2246    href="#at-font-face-rule"><code>@font-face</code></a> rules must simply be
  2247    ignored; the behavior of individual descriptors as defined in this
  2248    specification should not be altered.
  2250   <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
  2251    href="#descdef-font-family">font-family</a> descriptor</h3>
  2253   <table class=descdef>
  2254    <tbody>
  2255     <tr>
  2256      <td>Name:
  2258      <td><dfn id=descdef-font-family
  2259       title="font-family!!descriptor">font-family</dfn>
  2261     <tr>
  2262      <td>Value:
  2264      <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
  2266     <tr>
  2267      <td><em>Initial:</em>
  2269      <td>N/A
  2270   </table>
  2272   <p>This descriptor defines the font family name that will be used in all
  2273    CSS font family name matching. It is required for the <a
  2274    href="#at-font-face-rule"><code>@font-face</code></a> rule to be valid. It
  2275    overrides the font family names contained in the underlying font data. If
  2276    the font family name is the same as a font family available in a given
  2277    user's environment, it effectively hides the underlying font for documents
  2278    that use the stylesheet. This permits a web author to freely choose
  2279    font-family names without worrying about conflicts with font family names
  2280    present in a given user's environment. Likewise, platform substitutions
  2281    for a given font family name must not be used.
  2283   <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
  2284    href="#descdef-src">src</a> descriptor</h3>
  2286   <table class=descdef>
  2287    <tbody>
  2288     <tr>
  2289      <td>Name:
  2291      <td><dfn id=descdef-src>src</dfn>
  2293     <tr>
  2294      <td>Value:
  2296      <td>[ &lt;url> [format(&lt;string> #)]? | <a
  2297       href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
  2299     <tr>
  2300      <td><em>Initial:</em>
  2302      <td>N/A
  2303   </table>
  2305   <p>This descriptor specifies the resource containing font data. It is
  2306    required for the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2307    rule to be valid. Its value is a prioritized, comma-separated list of
  2308    external references or locally-installed font face names. When a font is
  2309    needed the user agent iterates over the set of references listed, using
  2310    the first one it can successfully activate. Fonts containing invalid data
  2311    or local font faces that are not found are ignored and the user agent
  2312    loads the next font in the list.
  2314   <p>As with other URLs in CSS, the URL may be relative, in which case it is
  2315    resolved relative to the location of the style sheet containing the <a
  2316    href="#at-font-face-rule"><code>@font-face</code></a> rule. In the case of
  2317    SVG fonts, the URL points to an element within a document containing SVG
  2318    font definitions. If the element reference is omitted, a reference to the
  2319    first defined font is implied. Similarly, font container formats that can
  2320    contain more than one font must load one and only one of the fonts for a
  2321    given <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  2322    Fragment identifiers are used to indicate which font to load. If a
  2323    container format lacks a defined fragment identifier scheme,
  2324    implementations should use a simple 1-based indexing scheme (e.g.
  2325    "font-collection#1" for the first font, "font-collection#2" for the second
  2326    font).
  2328   <pre>
  2329 src: url(fonts/simple.ttf);   /* load simple.ttf relative to stylesheet location */
  2330 src: url(/fonts/simple.ttf);  /* load simple.ttf from absolute location */
  2331 src: url(fonts.svg#simple);   /* load SVG font with id 'simple' */
  2332 </pre>
  2334   <p>External references consist of a URL, followed by an optional hint
  2335    describing the format of the font resource referenced by that URL. The
  2336    format hint contains a comma-separated list of format strings that denote
  2337    well-known font formats. Conformant user agents must skip downloading a
  2338    font resource if the format hints indicate only unsupported or unknown
  2339    font formats. If no format hints are supplied, the user agent should
  2340    download the font resource.
  2342   <pre>
  2343 /* load WOFF font if possible, otherwise use OpenType font */
  2344 @font-face {
  2345   font-family: bodytext;
  2346   src: url(ideal-sans-serif.woff) format("woff"),
  2347        url(basic-sans-serif.ttf) format("opentype");
  2349 </pre>
  2351   <p>Format strings defined by this specification:
  2353   <table class=data id=fontformats>
  2354    <thead>
  2355     <tr>
  2356      <th>String
  2358      <th>Font Format
  2360      <th>Common extensions
  2362    <tbody>
  2363     <tr>
  2364      <th>"woff"
  2366      <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
  2368      <td>.woff
  2370     <tr>
  2371      <th>"truetype"
  2373      <td><a
  2374       href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
  2376      <td>.ttf
  2378     <tr>
  2379      <th>"opentype"
  2381      <td><a
  2382       href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
  2384      <td>.ttf, .otf
  2386     <tr>
  2387      <th>"embedded-opentype"
  2389      <td><a
  2390       href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
  2391       OpenType</a>
  2393      <td>.eot
  2395     <tr>
  2396      <th>"svg"
  2398      <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
  2400      <td>.svg, .svgz
  2401   </table>
  2403   <p>Given the overlap in common usage between TrueType and OpenType, the
  2404    format hints "truetype" and "opentype" must be considered as synonymous; a
  2405    format hint of "opentype" does not imply that the font contains Postscript
  2406    CFF style glyph data or that it contains OpenType layout information (see
  2407    <a href="#platform-props-to-css">Appendix A</a> for more background on
  2408    this).
  2410   <p>When authors would prefer to use a locally available copy of a given
  2411    font and download it if it's not, <code>local()</code> can be used. The
  2412    locally-installed <dfn
  2413    id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
  2414    to <code>local()</code> is a format-specific string that uniquely
  2415    identifies a single font face within a larger family. The syntax for a <a
  2416    href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
  2417    unique font face name enclosed by "local(" and ")". The name can
  2418    optionally be enclosed in quotes. If unquoted, the unquoted font family
  2419    name processing conventions apply; the name must be a sequence of
  2420    identifiers separated by whitespace which is converted to a string by
  2421    joining the identifiers together separated by a single space.
  2423   <pre>
  2424 /* regular face of Gentium */
  2425 @font-face {
  2426   font-family: MyGentium;
  2427   src: local(Gentium),   /* use locally available Gentium */
  2428        url(Gentium.ttf); /* otherwise, download it */
  2430 </pre>
  2432   <p>For OpenType and TrueType fonts, this string is used to match only the
  2433    Postscript name or the full font name in the name table of locally
  2434    available fonts. Which type of name is used varies by platform and font,
  2435    so authors should include both of these names to assure proper matching
  2436    across platforms. Platform substitutions for a given font name must not be
  2437    used.
  2439   <pre>
  2440 /* bold face of Gentium */
  2441 @font-face {
  2442   font-family: MyGentium;
  2443   src: local(Gentium Bold),   /* full font name */
  2444        local(Gentium-Bold),   /* Postscript name */
  2445        url(GentiumBold.ttf);  /* otherwise, download it */
  2446   font-weight: bold;
  2448 </pre>
  2450   <p>Just as a <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2451    specifies the characteristics of a single font within a family, the unique
  2452    name used with <code>local()</code> specifies a single font, not an entire
  2453    font family. Defined in terms of OpenType font data, the Postscript name
  2454    is found in the font's <a
  2455    href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
  2456    in the name record with nameID = 6 (see <a href="#OPENTYPE"
  2457    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
  2458    Postscript name is the commonly used key for all fonts on OSX and for
  2459    Postscript CFF fonts under Windows. The full font name (nameID = 4) is
  2460    used as a unique key for fonts with TrueType glyphs on Windows.
  2462   <p>For OpenType fonts with multiple localizations of the full font name,
  2463    the US English version is used (language ID = 0x409 for Windows and
  2464    language ID = 0 for Macintosh) or the first localization when a US English
  2465    full font name is not available (the OpenType specification recommends
  2466    that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
  2467    fonts minimally include US English names</a>). User agents that also match
  2468    other full font names, e.g. matching the Dutch name when the current
  2469    system locale is set to Dutch, are considered non-conformant. This is done
  2470    not to prefer English but to avoid matching inconsistencies across font
  2471    versions and OS localizations, since font style names (e.g. "Bold") are
  2472    frequently localized into many languages and the set of localizations
  2473    available varies widely across platform and font version. User agents that
  2474    match a concatenation of family name (nameID = 1) with style name (nameID
  2475    = 2) are considered non-conformant.
  2477   <p>This also allows for referencing faces that belong to larger families
  2478    that cannot otherwise be referenced.
  2480   <div class=example>
  2481    <p>Use a local font or reference an SVG font in another document:</p>
  2483    <pre>
  2484 @font-face {
  2485   font-family: Headline;
  2486   src: local(Futura-Medium),
  2487        url(fonts.svg#MyGeometricModern) format("svg");
  2489 </pre>
  2491    <p>Create an alias for local Japanese fonts on different platforms:</p>
  2493    <pre>
  2494 @font-face {
  2495   font-family: jpgothic;
  2496   src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
  2498 </pre>
  2500    <p>Reference a font face that cannot be matched within a larger family:</p>
  2502    <pre>
  2503 @font-face {
  2504   font-family: Hoefler Text Ornaments;
  2505   /* has the same font properties as Hoefler Text Regular */
  2506   src: local(HoeflerText-Ornaments);
  2508 </pre>
  2510    <p>Since localized fullnames never match, a document with the header style
  2511     rules below would always render using the default serif font, regardless
  2512     whether a particular system locale parameter is set to Finnish or not:</p>
  2514    <pre>
  2515 @font-face {
  2516   font-family: SectionHeader;
  2517   src: local("Arial Lihavoitu");  /* Finnish fullname for Arial Bold, should fail */
  2518   font-weight: bold;
  2521 h2 { font-family: SectionHeader, serif; }
  2522 </pre>
  2524    <p>A conformant user agent would never load the font ‘<code
  2525     class=css>gentium.eot</code>’ in the example below, since it is
  2526     included in the first definition of the ‘<a href="#descdef-src"><code
  2527     class=property>src</code></a>’ descriptor which is overridden by the
  2528     second definition in the same <a
  2529     href="#at-font-face-rule"><code>@font-face</code></a> rule:</p>
  2531    <pre>
  2532 @font-face {
  2533   font-family: MainText;
  2534   src: url(gentium.eot); /* for use with older non-conformant user agents */
  2535   src: local("Gentium"), url(gentium.ttf);  /* Overrides src definition */
  2537 </pre>
  2538   </div>
  2540   <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
  2541    descriptors: the <a href="#descdef-font-style">font-style</a>, <a
  2542    href="#descdef-font-weight">font-weight</a>, <a
  2543    href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
  2545   <table class=descdef>
  2546    <tbody>
  2547     <tr>
  2548      <td>Name:
  2550      <td><dfn id=descdef-font-style
  2551       title="font-style!!descriptor">font-style</dfn>
  2553     <tr>
  2554      <td>Value:
  2556      <td>normal | italic | oblique
  2558     <tr>
  2559      <td><em>Initial:</em>
  2561      <td>normal
  2562   </table>
  2564   <table class=descdef>
  2565    <tbody>
  2566     <tr>
  2567      <td>Name:
  2569      <td><dfn id=descdef-font-weight
  2570       title="font-weight!!descriptor">font-weight</dfn>
  2572     <tr>
  2573      <td>Value:
  2575      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  2577     <tr>
  2578      <td><em>Initial:</em>
  2580      <td>normal
  2581   </table>
  2583   <table class=descdef>
  2584    <tbody>
  2585     <tr>
  2586      <td>Name:
  2588      <td><dfn id=descdef-font-stretch
  2589       title="font-stretch!!descriptor">font-stretch</dfn>
  2591     <tr>
  2592      <td>Value:
  2594      <td>normal | ultra-condensed | extra-condensed | condensed |
  2595       semi-condensed | semi-expanded | expanded | extra-expanded |
  2596       ultra-expanded
  2598     <tr>
  2599      <td><em>Initial:</em>
  2601      <td>normal
  2602   </table>
  2604   <p>These descriptors define the characteristics of a font face and are used
  2605    in the process of matching styles to specific faces. For a font family
  2606    defined with several <a
  2607    href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  2608    can either download all faces in the family or use these descriptors to
  2609    selectively download font faces that match actual styles used in document.
  2610    The values for these descriptors are the same as those for the
  2611    corresponding font properties except that relative keywords are not
  2612    allowed, ‘<a href="#bolder"><code class=property>bolder</code></a>’
  2613    and ‘<a href="#lighter"><code class=property>lighter</code></a>’. If
  2614    these descriptors are omitted, initial values are assumed.
  2616   <p>The value for these font face style attributes is used in place of the
  2617    style implied by the underlying font data. This allows authors to combine
  2618    faces in flexible combinations, even in situations where the original font
  2619    data was arranged differently. User agents that implement synthetic
  2620    bolding and obliquing must only apply synthetic styling in cases where the
  2621    font descriptors imply this is needed, rather than based on the style
  2622    attributes implied by the font data.
  2624   <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
  2625    <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
  2627   <table class=descdef>
  2628    <tbody>
  2629     <tr>
  2630      <td>Name:
  2632      <td><dfn id=descdef-unicode-range>unicode-range</dfn>
  2634     <tr>
  2635      <td>Value:
  2637      <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
  2639     <tr>
  2640      <td><em>Initial:</em>
  2642      <td>U+0-10FFFF
  2643   </table>
  2645   <p>This descriptor defines the set of Unicode codepoints that may be
  2646    supported by the font face for which it is declared. The descriptor value
  2647    is a comma-delimited list of Unicode range (<a
  2648    href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
  2649    these ranges defines the set of codepoints that serves as a hint for user
  2650    agents when deciding whether or not to download a font resource for a
  2651    given text run.
  2653   <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
  2654    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2655    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
  2656    "U+" or "u+" prefix followed by a codepoint range in one of the three
  2657    forms listed below. Ranges that do not fit one of the these forms are
  2658    invalid and cause the declaration to be ignored.
  2660   <dl>
  2661    <dt>single codepoint (e.g. U+416)
  2663    <dd>a valid Unicode codepoint, represented as one to six hexadecimal
  2664     digits
  2666    <dt>interval range (e.g. U+400-4ff)
  2668    <dd>represented as two hyphen-separated valid Unicode codepoints
  2669     indicating the inclusive start and end codepoints of a range
  2671    <dt>wildcard range (e.g. U+4??)
  2673    <dd>defined by the set of codepoints implied when trailing ‘<code
  2674     class=css>?</code>’ characters signify any hexadeximal digit
  2675   </dl>
  2677   <p>Individual codepoints are written using hexadecimal values that
  2678    correspond to <a href="http://www.unicode.org/charts/">Unicode character
  2679    codepoints</a>. Valid Unicode codepoint values vary between 0 and 10FFFF
  2680    inclusive. Digit values of codepoints are ASCII case-insensitive. For
  2681    interval ranges, the start and end codepoints are valid Unicode values and
  2682    the end codepoint is greater than or equal to the start codepoint.
  2684   <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
  2685    "U+???") are valid and equivalent to a wildcard range with an initial zero
  2686    digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
  2687    the range of valid Unicode codepoints are invalid. Because of this, the
  2688    maximum number of trailing ‘<code class=css>?</code>’ wildcard
  2689    characters is five, even though the <a
  2690    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2691    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
  2693   <p>Within the comma-delimited list of Unicode ranges in a ‘<a
  2694    href="#descdef-unicode-range"><code
  2695    class=property>unicode-range</code></a>’ descriptor declaration, ranges
  2696    may overlap. The union of these ranges defines the set of codepoints for
  2697    which the corresponding font may be used. User agents must not download or
  2698    use the font for codepoints outside this set. User agents may normalize
  2699    the list of ranges into a list that is different but represents the same
  2700    set of codepoints.
  2702   <p>The associated font might not contain glyphs for the entire set of
  2703    codepoints defined by the ‘<a href="#descdef-unicode-range"><code
  2704    class=property>unicode-range</code></a>’ descriptor. When the font is
  2705    used, the <dfn id=effective-character-map>effective character map</dfn> is
  2706    the intersection of the codepoints defined by ‘<a
  2707    href="#descdef-unicode-range"><code
  2708    class=property>unicode-range</code></a>’ with the font's <a
  2709    href="#character-map"><em>character map</em></a>. This allows authors to
  2710    define supported ranges in terms of broad ranges without worrying about
  2711    the precise codepoint ranges supported by the underlying font.
  2713   <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
  2714    to define composite fonts</h3>
  2716   <p>Multiple <a href="#at-font-face-rule"><code>@font-face</code></a> rules
  2717    with different unicode ranges for the same family and style descriptor
  2718    values can be used to create composite fonts that mix the glyphs from
  2719    different fonts for different scripts. This can be used to combine fonts
  2720    that only contain glyphs for a single script (e.g. Latin, Greek, Cyrillic)
  2721    or it can be used by authors as a way of segmenting a font into fonts for
  2722    commonly used characters and less frequently used characters. Since the
  2723    user agent will only pull down the fonts it needs this helps reduce page
  2724    bandwidth.
  2726   <p>If the unicode ranges overlap for a set of <a
  2727    href="#at-font-face-rule"><code>@font-face</code></a> rules with the same
  2728    family and style descriptor values, the rules are ordered in the reverse
  2729    order they were defined; the last rule defined is the first to be checked
  2730    for a given character.
  2732   <p>Example ranges for specific languages or characters:
  2734   <dl>
  2735    <dt>unicode-range: U+A5;
  2737    <dd>a single code point, the yen/yuan symbol
  2739    <dt>unicode-range: U+0-7F;
  2741    <dd>code range for basic ASCII characters
  2743    <dt>unicode-range: U+590-5ff;
  2745    <dd>code range for Hebrew characters
  2747    <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
  2749    <dd>code range for Japanese kanji, hiragana and katakana characters plus
  2750     yen/yuan symbol
  2751   </dl>
  2753   <div class=example>
  2754    <p>The BBC provides news services in a wide variety of languages, many
  2755     that are not well supported across all platforms. Using an <a
  2756     href="#at-font-face-rule"><code>@font-face</code></a> rule, the BBC could
  2757     provide a font for any of these languages, as it already does via a
  2758     manual font download.</p>
  2760    <pre>
  2761 @font-face {
  2762   font-family: BBCBengali;
  2763   src: url(fonts/BBCBengali.ttf) format("opentype");
  2764   unicode-range: U+00-FF, U+980-9FF;
  2766 </pre>
  2767   </div>
  2769   <div class=example>
  2770    <p>Technical documents often require a wide range of symbols. The STIX
  2771     Fonts project is one project aimed at providing fonts to support a wide
  2772     range of technical typesetting in a standardized way. The example below
  2773     shows the use of a font that provides glyphs for many of the mathematical
  2774     and technical symbol ranges within Unicode:</p>
  2776    <pre>
  2777 @font-face {
  2778   font-family: STIXGeneral;
  2779   src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
  2780   unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
  2782 </pre>
  2783   </div>
  2785   <div class=example>
  2786    <p>This example shows how an author can override the glyphs used for Latin
  2787     characters in a Japanese font with glyphs from a different font. The
  2788     first rule specifies no range so it defaults to the entire range. The
  2789     range specified in the second rule overlaps but takes precedence because
  2790     it is defined later.</p>
  2792    <pre>
  2793 @font-face {
  2794   font-family: JapaneseWithGentium;
  2795   src: local(MSMincho);
  2796   /* no range specified, defaults to entire range */
  2799 @font-face {
  2800   font-family: JapaneseWithGentium;
  2801   src: url(../fonts/Gentium.ttf);
  2802   unicode-range: U+0-2FF;
  2804 </pre>
  2805   </div>
  2807   <div class=example>
  2808    <p>Consider a family constructed to optimize bandwidth by separating out
  2809     Latin, Japanese and other characters into different font files:</p>
  2811    <pre>
  2812 /* fallback font - size: 4.5MB */
  2813 @font-face {
  2814   font-family: DroidSans;
  2815   src: url(DroidSansFallback.ttf);
  2816   /* no range specified, defaults to entire range */
  2819 /* Japanese glyphs - size: 1.2MB */
  2820 @font-face {
  2821   font-family: DroidSans;
  2822   src: url(DroidSansJapanese.ttf);
  2823   unicode-range: U+3000-9FFF, U+ff??;
  2826 /* Latin, Greek, Cyrillic along with some
  2827    punctuation and symbols - size: 190KB */
  2828 @font-face {
  2829   font-family: DroidSans;
  2830   src: url(DroidSans.ttf);
  2831   unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
  2833 </pre>
  2835    <p>For simple Latin text, only the font for Latin characters is
  2836     downloaded:</p>
  2838    <pre>
  2839 body { font-family: DroidSans; }
  2841 &lt;p>This is that&lt;/p>
  2842 </pre>
  2844    <p>In this case the user agent first checks the unicode-range for the font
  2845     containing Latin characters (DroidSans.ttf). Since all the characters
  2846     above are in the range U+0-5FF, the user agent downloads the font and
  2847     renders the text with that font.</p>
  2849    <p>Next, consider text that makes use of an arrow character (⇨):</p>
  2851    <pre>
  2852 &lt;p>This &amp;#x21e8; that&lt;p>
  2853 </pre>
  2855    <p>The user agent again first checks the unicode-range of the font
  2856     containing Latin characters. Since U+2000-2300 includes the arrow code
  2857     point (U+21E8), the user agent downloads the font. For this character
  2858     however the Latin font does not have a matching glyph, so the effective
  2859     unicode-range used for font matching excludes this code point. Next, the
  2860     user agent evaluates the Japanese font. The unicode-range for the
  2861     Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
  2862     user agent does not download the Japanese font. Next the fallback font is
  2863     considered. The <a href="#at-font-face-rule"><code>@font-face</code></a>
  2864     rule for the fallback font does not define unicode-range so its value
  2865     defaults to the range of all Unicode code points. The fallback font is
  2866     downloaded and used to render the arrow character.</p>
  2867   </div>
  2869   <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
  2870    href="#descdef-font-variant">font-variant</a> and <a
  2871    href="#descdef-font-feature-settings">font-feature-settings</a>
  2872    descriptors</h3>
  2874   <table class=descdef>
  2875    <tbody>
  2876     <tr>
  2877      <td>Name:
  2879      <td><dfn id=descdef-font-variant
  2880       title="font-variant!!descriptor">font-variant</dfn>
  2882     <tr>
  2883      <td>Value:
  2885      <td><a href="#font-variant-normal-value"
  2886       title="normal!!font-variant">normal</a> | <a
  2887       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  2888       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  2889       || <a
  2890       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  2891       || <a
  2892       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  2893       || <a
  2894       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  2895       || <a href="#stylistic"><var
  2896       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  2897       href="#historical-forms"><var>historical-forms</var></a> || <a
  2898       href="#styleset"><var
  2899       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  2900       href="#character-variant"><var
  2901       title=character-variant>character-variant(&lt;feature-value-name&gt;
  2902       #)</var></a> || <a href="#swash"><var
  2903       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  2904       href="#ornaments"><var
  2905       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  2906       href="#annotation"><var
  2907       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  2908       <a href="#small-caps"><i>small-caps</i></a> | <a
  2909       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  2910       href="#petite-caps"><i>petite-caps</i></a> | <a
  2911       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  2912       href="#unicase"><i>unicase</i></a> | <a
  2913       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  2914       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  2915       || <a
  2916       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  2917       || <a
  2918       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  2919       || <a href="#ordinal"><i>ordinal</i></a> || <a
  2920       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  2921       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  2922       || <a
  2923       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  2924       || <a href="#ruby"><i>ruby</i></a> ]
  2926     <tr>
  2927      <td><em>Initial:</em>
  2929      <td>normal
  2930   </table>
  2932   <table class=descdef>
  2933    <tbody>
  2934     <tr>
  2935      <td>Name:
  2937      <td><dfn id=descdef-font-feature-settings
  2938       title="font-feature-settings!!descriptor">font-feature-settings</dfn>
  2940     <tr>
  2941      <td>Value:
  2943      <td><a href="#font-feature-settings-normal-value"
  2944       title="normal!!font-feature-settings">normal</a> | <a
  2945       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  2947     <tr>
  2948      <td><em>Initial:</em>
  2950      <td>normal
  2951   </table>
  2953   <p>These descriptors define initial settings that apply when the font
  2954    defined by an <a href="#at-font-face-rule"><code>@font-face</code></a>
  2955    rule is rendered. They do not affect font selection. Values are identical
  2956    to those defined for the corresponding <a href="#propdef-font-variant"
  2957    title="font-variant!!property">‘<code
  2958    class=property>font-variant</code>’</a> and <a
  2959    href="#propdef-font-feature-settings"
  2960    title="font-feature-settings!!property">‘<code
  2961    class=property>font-feature-settings</code>’</a> properties defined
  2962    below except that the value ‘<code class=property>inherit</code>’ is
  2963    omitted. When multiple font feature descriptors or properties are used,
  2964    the cumulative effect on text rendering is detailed in the section <a
  2965    href="#font-feature-resolution">Font Feature Resolution</a> below. In
  2966    cases where specific values define synthesized fallback for certain <a
  2967    href="#propdef-font-variant" title="font-variant!!property">‘<code
  2968    class=property>font-variant</code>’</a> subproperties, the same
  2969    synthesized fallback applies when used within those values are used with
  2970    the <a href="#descdef-font-style" title="font-style!!descriptor">‘<code
  2971    class=property>font-variant</code>’</a> descriptor.
  2973   <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
  2974    guidelines</h3>
  2976   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule is
  2977    designed to allow lazy loading of font resources that are only downloaded
  2978    when used within a document. A stylesheet can include <a
  2979    href="#at-font-face-rule"><code>@font-face</code></a> rules for a library
  2980    of fonts of which only a select set are used; user agents must only
  2981    download those fonts that are referred to within the style rules
  2982    applicable to a given page. User agents that download all fonts defined in
  2983    <a href="#at-font-face-rule"><code>@font-face</code></a> rules without
  2984    considering whether those fonts are in fact used within a page are
  2985    considered non-conformant. In cases where a font might be downloaded in
  2986    character fallback cases, user agents may download a font if it's
  2987    contained within the computed value of <a href="#propdef-font-family"
  2988    title="font-family!!property">‘<code
  2989    class=property>font-family</code>’</a> for a given text run.
  2991   <pre>
  2992 @font-face {
  2993   font-family: GeometricModern;
  2994   src: url(font.ttf);
  2997 p {
  2998   /* font will be downloaded for pages with p elements */
  2999   font-family: GeometricModern, sans-serif;
  3002 h2 {
  3003   /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
  3004   font-family: Futura, GeometricModern, sans-serif;
  3006 </pre>
  3008   <p>In cases where textual content is loaded before downloadable fonts are
  3009    available, user agents may render text as it would be rendered if
  3010    downloadable font resources are not available or they may render text
  3011    transparently with fallback fonts to avoid a flash of text using a
  3012    fallback font. In cases where the font download fails user agents must
  3013    display text, simply leaving transparent text is considered non-conformant
  3014    behavior. Authors are advised to use fallback fonts in their font lists
  3015    that closely match the vertical metrics of the downloadable fonts to avoid
  3016    large page reflows where possible.
  3018   <h3 id=same-origin-restriction><span class=secno>4.9 </span>Same-origin
  3019    restriction for fonts</h3>
  3021   <h4 id=default-same-origin-restriction><span class=secno>4.9.1
  3022    </span>Default same-origin restriction</h4>
  3023   <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
  3024   http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
  3025   http://www.w3.org/2011/10/31-webapps-minutes.html#item02
  3026 -->
  3028   <p>User agents must implement a same-origin restriction when loading fonts
  3029    via the <a href="#at-font-face-rule"><code>@font-face</code></a>
  3030    mechanism. This restriction limits the loading of fonts for a given
  3031    document to fonts loaded from the same origin. Fonts can only be loaded
  3032    via the same host, port, and method combination as the containing
  3033    document, using the <a
  3034    href="http://www.w3.org/TR/html5/browsers.html#origin">origin matching
  3035    algorithm</a> described in the <a href="#HTML5"
  3036    rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification. The origin of
  3037    the stylesheet containing <a
  3038    href="#at-font-face-rule"><code>@font-face</code></a> rules is not used
  3039    when deciding whether a font is same origin or not, only the origin of the
  3040    containing document is used. The restriction applies to all font types.
  3042   <p>Given a document located at http://example.com/page.html, fonts defined
  3043    with ‘<a href="#descdef-src"><code class=property>src</code></a>’
  3044    definitions considered cross origin must not be loaded:
  3046   <pre>
  3047 /* same origin (i.e. domain, protocol, port match document) */
  3048 src: url(fonts/simple.ttf);
  3049 src: url(//fonts/simple.ttf);
  3051 /* cross origin, different protocol */
  3052 src: url(https://example.com/fonts/simple.ttf);
  3054 /* cross origin, different domain */
  3055 src: url(http://another.example.com/fonts/simple.ttf);
  3056 </pre>
  3058   <h4 id=allowing-cross-origin-font-loading><span class=secno>4.9.2
  3059    </span>Allowing cross-origin font loading</h4>
  3061   <p>User agents must also implement the ability to relax this restriction
  3062    using cross-site origin controls <a href="#CORS"
  3063    rel=biblioentry>[CORS]<!--{{!CORS}}--></a> for fonts loaded via HTTP.
  3064    Sites can explicitly allow cross-site downloading of font data using the
  3065    <code>Access-Control-Allow-Origin</code> HTTP header. For other protocols,
  3066    no explicit relaxation mechanism is defined or required.
  3068   <p>For font loads over HTTP, cross-origin requests must be made with the
  3069    following parameter settings which are used in conjunction with the <a
  3070    href="http://www.w3.org/TR/cors/#cross-origin-request-0"> <em>cross-origin
  3071    request algorithm</em></a> <a href="#CORS"
  3072    rel=biblioentry>[CORS]<!--{{!CORS}}--></a>:
  3074   <ul>
  3075    <li><em>request URL</em> — the URL of the font resource in the <a
  3076     href="#descdef-src"><code>src</code></a> descriptor
  3078    <li><em>request method</em> — GET
  3080    <li><em>author request headers</em> — none
  3082    <li><em>request entity body</em> — empty
  3084    <li><em>source origin</em> — the origin of the page which linked to the
  3085     stylesheet
  3087    <li><em>manual redirect flag</em> — false
  3089    <li><em>omit credentials flag</em> — true
  3091    <li><em>force preflight flag</em> — false
  3092   </ul>
  3094   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
  3095    Algorithm</h2>
  3097   <p>The algorithm below describes how fonts are associated with individual
  3098    runs of text. For each character in the run a font family is chosen and a
  3099    particular font face is selected containing a glyph for that character.
  3101   <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
  3102    font family names</h3>
  3104   <p>As part of the font matching algorithm outlined below, user agents must
  3105    match font family names used in style rules with actual font family names
  3106    contained in fonts available in a given environment or with font family
  3107    names defined in <a href="#at-font-face-rule"><code>@font-face</code></a>
  3108    rules. User agents must match these names case insensitively, using the
  3109    "Default Caseless Matching" algorithm outlined in the Unicode
  3110    specification <a href="#UNICODE6"
  3111    rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>. This algorithm is
  3112    detailed in section 3.13 entitled "Default Case Algorithms". Specifically,
  3113    the algorithm must be applied without normalizing the strings involved and
  3114    without applying any language-specific tailorings. The case folding method
  3115    specified by this algorithm uses the case mappings with status field
  3116    ‘<code class=property>C</code>’ or ‘<code class=property>F</code>’
  3117    in the CaseFolding.txt file of the Unicode Character Database.
  3119   <p class=note> For authors this means that font family names are matched
  3120    case insensitively, whether those names exist in a platform font or in the
  3121    <a href="#at-font-face-rule"><code>@font-face</code></a> rules contained
  3122    in a stylesheet. Authors should take care to ensure that names use a
  3123    character sequence consistent with the actual font family name,
  3124    particularly when using combining characters such as diacritical marks.
  3125    For example, a family name that contains an uppercase A (U+0041) followed
  3126    by a combining ring (U+030A) will <strong>not</strong> match a name that
  3127    looks identical but which uses the precomposed lowercase a-ring character
  3128    (U+00E5) instead of the combining sequence.
  3130   <p class=note> Implementors should take care to verify that a given
  3131    caseless string comparison implementation uses this precise algorithm and
  3132    not assume that a given platform string matching routine follows it, as
  3133    many of these have locale-specific behavior or use some level of string
  3134    normalization.
  3136   <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
  3137    styles</h3>
  3139   <p>The procedure for choosing a font for a given character in a run of text
  3140    consists of iterating over the font families named by the <a
  3141    href="#propdef-font-family" title="font-family!!property">‘<code
  3142    class=property>font-family</code>’</a> property, selecting a font face
  3143    with the appropriate style based on other font properties and then
  3144    determining whether a glyph exists for the given character. This is done
  3145    using the <dfn id=character-map>character map</dfn> of the font, data
  3146    which maps characters to the default glyph for that character. A font is
  3147    considered to <dfn id=support>support</dfn> a given character if (1) the
  3148    character is contained in the font's <a
  3149    href="#character-map"><em>character map</em></a> and (2) if required by
  3150    the containing script, shaping information is available for that
  3151    character.
  3153   <p>Some legacy fonts may include a given character in the <a
  3154    href="#character-map"><em>character map</em></a> but lack the shaping
  3155    information (e.g. <a
  3156    href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
  3157    layout tables</a> or <a
  3158    href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
  3159    tables</a>) necessary for correctly rendering text runs containing that
  3160    character.
  3162   <p>Codepoint sequences consisting of a base character followed by a
  3163    sequence of combining characters are treated slightly differently, see the
  3164    section on <a href="#cluster-matching">cluster matching</a> below.
  3166   <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
  3167    given font family is defined to be the face that would be selected if all
  3168    font style properties were set to their initial value.
  3170   <ol id=fontmatchingalg>
  3171    <li>Using the computed font property values for a given element, the user
  3172     agent starts with the first family name specified by the <a
  3173     href="#propdef-font-family" title="font-family!!property">‘<code
  3174     class=property>font-family</code>’</a> property.
  3176    <li>If the family name is a generic family keyword, the user agent looks
  3177     up the appropriate font family name to be used. User agents may choose
  3178     the generic font family to use based on the language of the containing
  3179     element or the Unicode range of the character.
  3181    <li>For other family names, the user agent attempts to find the family
  3182     name among fonts defined via <a
  3183     href="#at-font-face-rule"><code>@font-face</code></a> rules and then
  3184     among available system fonts, matching names with a <a
  3185     href="#font-family-casing">case-insensitive comparison</a> as outlined in
  3186     the section above. On systems containing fonts with multiple localized
  3187     font family names, user agents must match any of these names independent
  3188     of the underlying system locale or platform API used. If the font
  3189     resources defined for a given face in an <a
  3190     href="#at-font-face-rule"><code>@font-face</code></a> rule are either not
  3191     available or contain invalid font data, then the face should be treated
  3192     as not present in the family. If no faces are present for a family
  3193     defined via <a href="#at-font-face-rule"><code>@font-face</code></a>
  3194     rules, the family should be treated as missing; matching a platform font
  3195     with the same name must not occur in this case.
  3197    <li>If a font family match occurs, the user agent assembles the set of
  3198     font faces in that family and then narrows the set to a single face using
  3199     other font properties in the order given below. A group of faces defined
  3200     via <a href="#at-font-face-rule"><code>@font-face</code></a> rules with
  3201     identical font descriptor values but differing ‘<a
  3202     href="#descdef-unicode-range"><code
  3203     class=property>unicode-range</code></a>’ values are considered to be a
  3204     single <dfn id=composite-face>composite face</dfn> for this step:
  3205     <ol id=fontstylematchingalg>
  3206      <li><a href="#propdef-font-stretch"
  3207       title="font-stretch!!property">‘<code
  3208       class=property>font-stretch</code>’</a> is tried first. If the
  3209       matching set contains faces with width values matching the <a
  3210       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  3211       class=property>font-stretch</code>’</a> value, faces with other width
  3212       values are removed from the matching set. If there is no face that
  3213       exactly matches the width value the nearest width is used instead. If
  3214       the value of <a href="#propdef-font-stretch"
  3215       title="font-stretch!!property">‘<code
  3216       class=property>font-stretch</code>’</a> is <a
  3217       href="#font-stretch-normal-value" title="normal!!font-stretch">‘<code
  3218       class=property>normal</code>’</a> or one of the condensed values,
  3219       narrower width values are checked first, then wider values. If the
  3220       value of <a href="#propdef-font-stretch"
  3221       title="font-stretch!!property">‘<code
  3222       class=property>font-stretch</code>’</a> is one of the expanded
  3223       values, wider values are checked first, followed by narrower values.
  3224       Once the closest matching width has been determined by this process,
  3225       faces with other widths are removed from the matching set.
  3227      <li><a href="#propdef-font-style" title="font-style!!property">‘<code
  3228       class=property>font-style</code>’</a> is tried next. If the value of
  3229       <a href="#propdef-font-style" title="font-style!!property">‘<code
  3230       class=property>font-style</code>’</a> is ‘<a href="#italic"><code
  3231       class=property>italic</code></a>’, italic faces are checked first,
  3232       then oblique, then normal faces. If the value is ‘<a
  3233       href="#oblique"><code class=property>oblique</code></a>’, oblique
  3234       faces are checked first, then italic faces and then normal faces. If
  3235       the value is <a href="#font-style-normal-value"
  3236       title="normal!!font-style">‘<code
  3237       class=property>normal</code>’</a>, normal faces are checked first,
  3238       then oblique faces, then italic faces. Faces with other style values
  3239       are excluded from the matching set. User agents are permitted to
  3240       distinguish between italic and oblique faces within platform font
  3241       families but this is not required, so all italic or oblique faces may
  3242       be treated as italic faces. However, within font families defined via
  3243       <a href="#at-font-face-rule"><code>@font-face</code></a> rules, italic
  3244       and oblique faces must be distinguished using the value of the <a
  3245       href="#descdef-font-style" title="font-style!!descriptor">‘<code
  3246       class=property>font-style</code>’</a> descriptor. For families that
  3247       lack any italic or oblique faces, users agents may create artificial
  3248       oblique faces, if this is permitted by the value of the ‘<a
  3249       href="#propdef-font-synthesis"><code
  3250       class=property>font-synthesis</code></a>’ property.
  3252      <li><a href="#propdef-font-weight"
  3253       title="font-weight!!property">‘<code
  3254       class=property>font-weight</code>’</a> is matched next, so it will
  3255       always reduce the matching set to a single font face. If bolder/lighter
  3256       relative weights are used, the effective weight is calculated based on
  3257       the inherited weight value, as described in the definition of the <a
  3258       href="#propdef-font-weight" title="font-weight!!property">‘<code
  3259       class=property>font-weight</code>’</a> property. Given the desired
  3260       weight and the weights of faces in the matching set after the steps
  3261       above, if the desired weight is available that face matches. Otherwise,
  3262       a weight is chosen using the rules below:
  3263       <ul>
  3264        <li>If the desired weight is less than 400, weights below the desired
  3265         weight are checked in descending order followed by weights above the
  3266         desired weight in ascending order until a match is found.
  3268        <li>If the desired weight is greater than 500, weights above the
  3269         desired weight are checked in ascending order followed by weights
  3270         below the desired weight in descending order until a match is found.
  3272        <li>If the desired weight is 400, 500 is checked first and then the
  3273         rule for desired weights less than 400 is used.
  3275        <li>If the desired weight is 500, 400 is checked first and then the
  3276         rule for desired weights less than 400 is used.
  3277       </ul>
  3279      <li><span class=property>‘<a href="#propdef-font-size"><code
  3280       class=property>font-size</code></a>’</span> must be matched within a
  3281       UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
  3282       are rounded to the nearest whole pixel, while the tolerance for
  3283       bitmapped fonts could be as large as 20%.) Further computations, e.g.,
  3284       by ‘<code class=property>em</code>’ values in other properties, are
  3285       based on the <span class=property>‘<a href="#propdef-font-size"><code
  3286       class=property>font-size</code></a>’</span> value that is used, not
  3287       the one that is specified.
  3288     </ol>
  3290    <li>
  3291     <p>If the matched face is defined via <a
  3292      href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  3293      must use the procedure below to select a single font:
  3295     <ol>
  3296      <li>If the font resource has not been loaded and the range of characters
  3297       defined by the ‘<a href="#descdef-unicode-range"><code
  3298       class=property>unicode-range</code></a>’ descriptor value includes
  3299       the character in question, load the font.
  3301      <li>After downloading, if the <a
  3302       href="#effective-character-map"><em>effective character map</em></a>
  3303       supports the character in question, select that font.
  3304     </ol>
  3306     <p>When the matched face is a <a href="#composite-face"><em>composite
  3307      face</em></a>, user agents must use the procedure above on each of the
  3308      faces in the <a href="#composite-face"><em>composite face</em></a> in
  3309      reverse order of <a
  3310      href="#at-font-face-rule"><code>@font-face</code></a> rule definition.</p>
  3312     <p>While the download occurs, user agents may either wait until the font
  3313      is downloaded or render once with substituted font metrics and render
  3314      again once the font is downloaded.</p>
  3316    <li>
  3317     <p>If no matching face exists or the matched face does not contain a
  3318      glyph for the character to be rendered, the next family name is selected
  3319      and the previous three steps repeated. Glyphs from other faces in the
  3320      family are not considered. The only exception is that user agents may
  3321      optionally substitute a synthetically obliqued version of the <a
  3322      href="#default-face"><em>default face</em></a> if that face supports a
  3323      given glyph and synthesis of these faces is permitted by the value of
  3324      the ‘<a href="#propdef-font-synthesis"><code
  3325      class=property>font-synthesis</code></a>’ property. For example, a
  3326      synthetic italic version of the regular face may be used if the italic
  3327      face doesn't support glyphs for Arabic.</p>
  3328     <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
  3331    <li>If there are no more font families to be evaluated and no matching
  3332     face has been found, then the user agent performs a <dfn
  3333     id=system-font-fallback>system font fallback</dfn> procedure to find the
  3334     best match for the character to be rendered. The result of this procedure
  3335     may vary across user agents.
  3337    <li>If a particular character cannot be displayed using any font, the user
  3338     agent should indicate by some means that a character is not being
  3339     displayed, displaying either a symbolic representation of the missing
  3340     glyph (e.g. using a <a
  3341     href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
  3342     Font</a>) or using the missing character glyph from a default font.
  3343   </ol>
  3345   <p>Optimizations of this process are allowed provided that an
  3346    implementation behaves as if the algorithm had been followed exactly.
  3347    Matching occurs in a well-defined order to insure that the results are as
  3348    consistent as possible across user agents, given an identical set of
  3349    available fonts and rendering technology.
  3351   <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
  3353   <p>When text contains characters such as combining marks, ideally the base
  3354    character should be rendered using the same font as the mark, this assures
  3355    proper placement of the mark. For this reason, the font matching algorithm
  3356    for clusters is more specialized than the general case of matching a
  3357    single character by itself. For sequences containing variation selectors,
  3358    which indicate the precise glyph to be used for a given character, user
  3359    agents always attempt <a href="#system-font-fallback"><em>system font
  3360    fallback</em></a> to find the appropriate glyph before using the default
  3361    glyph of the base character.
  3363   <p>A sequence of codepoints containing combining mark or other modifiers is
  3364    termed a grapheme cluster (see <a href="#CSS3TEXT"
  3365    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
  3366    description). For a given cluster containing a base character, <em>b</em>
  3367    and a sequence of combining characters <em>c1, c2…</em>, the entire
  3368    cluster is matched using these steps:
  3370   <ol>
  3371    <li>For each family in the font list, a face is chosen using the style
  3372     selection rules defined in the previous section.
  3373     <ol>
  3374      <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
  3375       completely supported by the font, select this font for the sequence.
  3377      <li>If a sequence of multiple codepoints is canonically equivalent to a
  3378       single character and the font <a href="#support"><em
  3379       title=support>supports</em></a> that character, select this font for
  3380       the sequence.
  3381     </ol>
  3383    <li>If no font was found in the font list in step 1:
  3384     <ol>
  3385      <li>If <em>c1</em> is a variation selector, system fallback must be used
  3386       to find a font that <a href="#support"><em
  3387       title=support>supports</em></a> the full sequence of <em>b + c1</em>.
  3388       If no font on the system <a href="#support"><em
  3389       title=support>supports</em></a> the full sequence, match the single
  3390       character <em>b</em> using the normal procedure for matching single
  3391       characters and ignore the variation selector. Note: a sequence with
  3392       more than one variation selector must be treated as an encoding error
  3393       and the trailing selectors must be ignored. <a href="#UNICODE6"
  3394       rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>
  3396      <li>Otherwise, the user agent may optionally use system font fallback to
  3397       match a font that <a href="#support"><em
  3398       title=support>supports</em></a> the entire cluster.
  3399     </ol>
  3401    <li>If no font is found in step 2, use the matching sequence from step 1
  3402     to determine the longest sequence that is completely <a
  3403     href="#support"><em title=support>supported</em></a> by a font in the
  3404     font list and attempt to match the remaining combining characters
  3405     separately using the rules for single characters.
  3406   </ol>
  3408   <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
  3409    issues</h3>
  3411   <p>CSS font matching is always performed on text runs containing Unicode
  3412    characters, so documents using legacy encodings are assumed to have been
  3413    transcoded before matching fonts. For fonts containing <a
  3414    href="#character-map"><em title="character map">character maps</em></a>
  3415    for both legacy encodings and Unicode, the contents of the legacy encoding
  3416    <a href="#character-map"><em>character map</em></a> must have no effect on
  3417    the results of the font matching process.
  3419   <p>The font matching process does not assume that text runs are in either
  3420    normalized or denormalized form (see <a href="#CHARMOD-NORM"
  3421    rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
  3422    details). Fonts may only support precomposed forms and not the decomposed
  3423    sequence of base character plus combining marks. Authors should always
  3424    tailor their choice of fonts to their content, including whether that
  3425    content contains normalized or denormalized character streams.
  3427   <p>If a given character is a Private-Use Area Unicode codepoint, user
  3428    agents must only match font families named in the ‘<code
  3429    class=property>font-family</code>’ list that are not generic families.
  3430    If none of the families named in the ‘<code
  3431    class=property>font-family</code>’ list contain a glyph for that
  3432    codepoint, user agents must display some form of missing glyph symbol for
  3433    that character rather than attempting <a
  3434    href="#system-font-fallback"><em>system font fallback</em></a> for that
  3435    codepoint. When matching the replacement character U+FFFD, user agents may
  3436    skip the font matching process and immediately display some form of
  3437    missing glyph symbol, they are not required to display the glyph from the
  3438    font that would be selected by the font matching process.
  3440   <p>In general, the fonts for a given family will all have the same or
  3441    similar <a href="#character-map"><em title="character map">character
  3442    maps</em></a>. The process outlined here is designed to handle even font
  3443    families containing faces with widely variant <a href="#character-map"><em
  3444    title="character map">character maps</em></a>. However, authors are
  3445    cautioned that the use of such families can lead to unexpected results.
  3447   <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
  3448    changes since CSS 2.1</h3>
  3450   <p>The algorithm above is different from CSS 2.1 in a number of key places.
  3451    These changes were made to better reflect actual font matching behavior
  3452    across user agent implementations.
  3454   <p>Differences compared to the font matching algorithm in CSS 2.1:
  3456   <ul>
  3457    <li>The algorithm includes font-stretch matching.
  3459    <li>All possible font-style matching scenarios are delineated.
  3461    <li>Small-caps fonts are not matched as part of the font matching process,
  3462     they are now handled via font features.
  3464    <li>Unicode variation selector matching is required.
  3466    <li>Cluster sequences are matched as a unit.
  3467   </ul>
  3469   <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
  3470    examples</h3>
  3472   <div class=example>
  3473    <p>It's useful to note that the CSS selector syntax may be used to create
  3474     language-sensitive typography. For example, some Chinese and Japanese
  3475     characters are unified to have the same Unicode code point, although the
  3476     abstract glyphs are not the same in the two languages.
  3478    <pre>*:lang(ja-jp) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
  3479 *:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
  3480 </pre>
  3482    <p>This selects any element that has the given language — Japanese or
  3483     Traditional Chinese — and uses the appropriate font.
  3484   </div>
  3486   <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
  3488   <p>Modern font technologies support a variety of advanced typographic and
  3489    language-specific font features. Using these features, a single font can
  3490    provide glyphs for a wide range of ligatures, contextual and stylistic
  3491    alternates, tabular and old-style figures, small capitals, automatic
  3492    fractions, swashes, and alternates specific to a given language. To allow
  3493    authors control over these font capabilities, the ‘<code
  3494    class=property>font-variant</code>’ property has been expanded for CSS3.
  3495    It now functions as a shorthand for a set of properties that provide
  3496    control over stylistic font features.
  3498   <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
  3499    selection and positioning</h3>
  3501   <p>Simple fonts used for displaying Latin text use a very basic processing
  3502    model. Fonts contain a <a href="#character-map"><em>character map</em></a>
  3503    which maps each character to a glyph for that character. Glyphs for
  3504    subsequent characters are simply placed one after the other along a run of
  3505    text. Modern font formats such as OpenType and AAT (Apple Advanced
  3506    Typography) use a richer processing model. The glyph for a given character
  3507    can be chosen and positioned not just based on the codepoint of the
  3508    character itself, but also on adjacent characters as well as the language,
  3509    script, and features enabled for the text. Font features may be required
  3510    for specific scripts, or recommended as enabled by default or they might
  3511    be stylistic features meant to be used under author control.
  3513   <p>For a good visual overview of these features, see the <a
  3514    href="#OPENTYPE-FONT-GUIDE"
  3515    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
  3516    For a detailed description of glyph processing for OpenType fonts, see <a
  3517    href="#WINDOWS-GLYPH-PROC"
  3518    rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
  3520   <p>Stylistic font features can be classified into two broad categories:
  3521    ones that affect the harmonization of glyph shapes with the surrounding
  3522    context, such as kerning and ligature features, and ones such as the
  3523    small-caps, subscript/superscript and alternate features that affect shape
  3524    selection.
  3526   <p>The subproperties of <a href="#propdef-font-variant"
  3527    title="font-variant!!property">‘<code
  3528    class=property>font-variant</code>’</a> listed below are used to control
  3529    these stylistic font features. They do not control features that are
  3530    required for displaying certain scripts, such as the OpenType features
  3531    used when displaying Arabic or Indic language text. They affect glyph
  3532    selection and positioning, but do not affect font selection as described
  3533    in the font matching section (except in cases required for compatibility
  3534    with CSS 2.1).
  3536   <p>To assure consistent behavior across user agents, the equivalent
  3537    OpenType property settings are listed for individual properties and are
  3538    normative. When using other font formats these should be used as a
  3539    guideline to map CSS font feature property values to specific font
  3540    features.
  3542   <h3 id=language-specific-support><span class=secno>6.2
  3543    </span>Language-specific display</h3>
  3545   <p>OpenType also supports language-specific glyph selection and
  3546    positioning, so that text can be displayed correctly in cases where the
  3547    language dictates a specific display behavior. Many languages share a
  3548    common script, but the shape of certain letters can vary across those
  3549    languages. For example, certain Cyrillic letters have different shapes in
  3550    Russian text than in Bulgarian. In Latin text, it's common to render "fi"
  3551    with an explicit fi-ligature that lacks a dot on the "i". However, in
  3552    languages such as Turkish which uses both a dotted-i and a dotless-i, it's
  3553    important to not use this ligature or use a specialized version that
  3554    contains a dot over the "i". The example below shows language-specific
  3555    variations based on stylistic traditions found in Spanish, Italian and
  3556    French orthography:
  3558   <div class=featex><img alt="language specific forms, spanish"
  3559    src=locl-1.png></div>
  3561   <div class=featex><img alt="language specific forms, italian"
  3562    src=locl-2.png></div>
  3564   <div class=featex><img alt="language specific forms, french"
  3565    src=locl-3.png></div>
  3567   <p>If the content language of the element is known according to the rules
  3568    of the <a
  3569    href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
  3570    language</a>, user agents are required to infer the OpenType language
  3571    system from the content language and use that when selecting and
  3572    positioning glyphs using an OpenType font.
  3574   <p>For OpenType fonts, in some cases it may be necessary to explicitly
  3575    declare the OpenType language to be used, for example when displaying text
  3576    in a given language that uses the typographic conventions of another
  3577    language or when the font does not explicitly support a given language but
  3578    supports a language that shares common typographic conventions. The ‘<a
  3579    href="#propdef-font-language-override"><code
  3580    class=property>font-language-override</code></a>’ property is used for
  3581    this purpose.</p>
  3582   <!-- prop: font-kerning -->
  3584   <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
  3585    href="#propdef-font-kerning">font-kerning</a> property</h3>
  3587   <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
  3588    <tbody>
  3589     <tr>
  3590      <td>Name:
  3592      <td><dfn id=propdef-font-kerning>font-kerning</dfn>
  3594     <tr>
  3595      <td>Value:
  3597      <td><a href="#font-kerning-auto-value"
  3598       title="auto!!font-kerning">auto</a> | <a
  3599       href="#font-kerning-normal-value"
  3600       title="normal!!font-kerning">normal</a> | <a
  3601       href="#font-kerning-none-value" title="none!!font-kerning">none</a>
  3603     <tr>
  3604      <td>Initial:
  3606      <td>auto
  3608     <tr>
  3609      <td>Applies to:
  3611      <td>all elements
  3613     <tr>
  3614      <td>Inherited:
  3616      <td>yes
  3618     <tr>
  3619      <td>Percentages:
  3621      <td>N/A
  3623     <tr>
  3624      <td>Media:
  3626      <td>visual
  3628     <tr>
  3629      <td>Computed value:
  3631      <td>as specified
  3633     <tr>
  3634      <td>Animatable:
  3636      <td>no
  3637   </table>
  3639   <p>Kerning is the contextual adjustment of inter-glyph spacing. This
  3640    property controls metric kerning, kerning that utilizes adjustment data
  3641    contained in the font.
  3643   <dl>
  3644    <dt><dfn id=font-kerning-auto-value title="auto!!font-kerning">auto</dfn>
  3646    <dd>Specifies that kerning is applied at the discretion of the user agent
  3648    <dt><dfn id=font-kerning-normal-value
  3649     title="normal!!font-kerning">normal</dfn>
  3651    <dd>Specifies that kerning is applied
  3653    <dt><dfn id=font-kerning-none-value title="none!!font-kerning">none</dfn>
  3655    <dd>Specifies that kerning is not applied
  3656   </dl>
  3658   <p>For fonts that do not include kerning data this property will have no
  3659    visible effect. When rendering with OpenType fonts, the <a
  3660    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
  3661    specification suggests that kerning be enabled by default. When kerning is
  3662    enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
  3663    vertical text runs the <span class=tag>vkrn</span> feature is enabled
  3664    instead). User agents must also support fonts that only support kerning
  3665    via data contained in a <span class=tag>kern</span> font table, as
  3666    detailed in the OpenType specification. If the ‘<code
  3667    class=property>letter-spacing</code>’ property is defined, kerning
  3668    adjustments are considered part of the default spacing and letter spacing
  3669    adjustments are made after kerning has been applied.
  3671   <p>When set to ‘<code class=property>auto</code>’, user agents can
  3672    determine whether to apply kerning or not based on a number of factors:
  3673    text size, script, or other factors that influence text processing speed.
  3674    Authors who want proper kerning should use <a
  3675    href="#font-kerning-normal-value" title="normal!!font-kerning">‘<code
  3676    class=property>normal</code>’</a> to explicitly enable kerning.
  3677    Likewise, some authors may prefer to disable kerning in situations where
  3678    performance is more important than precise appearance. However, in
  3679    well-designed modern implementations the use of kerning generally does not
  3680    have a large impact on text rendering speed.</p>
  3681   <!-- prop: font-variant-ligatures -->
  3683   <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
  3684    the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  3685    property</h3>
  3687   <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
  3688    <tbody>
  3689     <tr>
  3690      <td>Name:
  3692      <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
  3694     <tr>
  3695      <td>Value:
  3697      <td><a href="#font-variant-ligatures-normal-value"
  3698       title="normal!!font-variant-ligatures">normal</a> | <a
  3699       href="#font-variant-ligatures-none-value"
  3700       title="none!!font-variant-ligatures">none</a> | [ <a
  3701       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  3702       <a
  3703       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  3704       || <a
  3705       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  3706       || <a
  3707       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  3710     <tr>
  3711      <td>Initial:
  3713      <td>normal
  3715     <tr>
  3716      <td>Applies to:
  3718      <td>all elements
  3720     <tr>
  3721      <td>Inherited:
  3723      <td>yes
  3725     <tr>
  3726      <td>Percentages:
  3728      <td>N/A
  3730     <tr>
  3731      <td>Media:
  3733      <td>visual
  3735     <tr>
  3736      <td>Computed value:
  3738      <td>as specified
  3740     <tr>
  3741      <td>Animatable:
  3743      <td>no
  3744   </table>
  3746   <p>Ligatures and contextual forms are ways of combining glyphs to produce
  3747    more harmonized forms.
  3749   <pre
  3750    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>
  3752   <pre
  3753    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>
  3755   <pre
  3756    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>
  3758   <pre
  3759    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>
  3761   <p>Individual values have the following meanings:
  3763   <dl>
  3764    <dt><dfn id=font-variant-ligatures-normal-value
  3765     title="normal!!font-variant-ligatures">normal</dfn>
  3767    <dd>A value of <a href="#font-variant-ligatures-normal-value"
  3768     title="normal!!font-variant-ligatures">‘<code
  3769     class=property>normal</code>’</a> specifies that common default
  3770     features are enabled, <a href="#font-feature-resolution">as described in
  3771     detail in the next section</a>. For OpenType fonts, common ligatures and
  3772     contextual forms are on by default, discretionary and historical
  3773     ligatures are not.
  3775    <dt><dfn id=font-variant-ligatures-none-value
  3776     title="none!!font-variant-ligatures">none</dfn>
  3778    <dd>Specifies that all types of ligatures and contextual forms covered by
  3779     this property are explicitly disabled. In situations where ligatures are
  3780     not considered necessary, this may improve the speed of text rendering.
  3782    <dt><dfn id=common-ligatures>common-ligatures</dfn>
  3784    <dd>Enables display of common ligatures (OpenType features: <span
  3785     class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
  3786     enabled by default.
  3787   </dl>
  3789   <div class=featex><img alt="common ligature example" src=liga.png></div>
  3791   <dl>
  3792    <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
  3794    <dd>Disables display of common ligatures (OpenType features: <span
  3795     class=tag>liga, clig</span>).
  3797    <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
  3799    <dd>Enables display of discretionary ligatures (OpenType feature: <span
  3800     class=tag>dlig</span>). Which ligatures are discretionary or optional is
  3801     decided by the type designer, so authors will need to refer to the
  3802     documentation of a given font to understand which ligatures are
  3803     considered discretionary.
  3804   </dl>
  3806   <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
  3808   <dl>
  3809    <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
  3811    <dd>Disables display of discretionary ligatures (OpenType feature: <span
  3812     class=tag>dlig</span>).
  3814    <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
  3816    <dd>Enables display of historical ligatures (OpenType feature: <span
  3817     class=tag>hlig</span>).
  3818   </dl>
  3820   <div class=featex><img alt="historical ligature example" src=hlig.png></div>
  3822   <dl>
  3823    <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
  3825    <dd>Disables display of historical ligatures (OpenType feature: <span
  3826     class=tag>hlig</span>).
  3828    <dt><dfn id=contextual>contextual</dfn>
  3830    <dd>Enables display of contextual alternates (OpenType feature: <span
  3831     class=tag>calt</span>). Although not strictly a ligature feature, like
  3832     ligatures this feature is commonly used to harmonize the shapes of glyphs
  3833     with the surrounding context. For OpenType fonts, this feature is on by
  3834     default.
  3835   </dl>
  3837   <div class=featex><img alt="contextual alternate example" src=calt.png></div>
  3839   <dl>
  3840    <dt><dfn id=no-contextual>no-contextual</dfn>
  3842    <dd>Disables display of contextual alternates (OpenType feature: <span
  3843     class=tag>calt</span>).
  3844   </dl>
  3846   <p>Required ligatures, needed for correctly rendering complex scripts, are
  3847    not affected by the settings above, including ‘<code
  3848    class=property>none</code>’ (OpenType feature: <span
  3849    class=tag>rlig</span>).</p>
  3850   <!-- prop: font-variant-position -->
  3852   <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
  3853    and superscript forms: the <a
  3854    href="#propdef-font-variant-position">font-variant-position</a> property</h3>
  3856   <table class=propdef id=namefont-variant-positionvaluenormal-sub>
  3857    <tbody>
  3858     <tr>
  3859      <td>Name:
  3861      <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
  3863     <tr>
  3864      <td>Value:
  3866      <td><a href="#font-variant-position-normal-value"
  3867       title="normal!!font-variant-position">normal</a> | <a
  3868       href="#sub">sub</a> | <a href="#super">super</a>
  3870     <tr>
  3871      <td>Initial:
  3873      <td>normal
  3875     <tr>
  3876      <td>Applies to:
  3878      <td>all elements
  3880     <tr>
  3881      <td>Inherited:
  3883      <td>yes
  3885     <tr>
  3886      <td>Percentages:
  3888      <td>N/A
  3890     <tr>
  3891      <td>Media:
  3893      <td>visual
  3895     <tr>
  3896      <td>Computed value:
  3898      <td>as specified
  3900     <tr>
  3901      <td>Animatable:
  3903      <td>no
  3904   </table>
  3906   <p>This property is used to enable typographic subscript and superscript
  3907    glyphs. These are alternate glyphs designed within the same em-box as
  3908    default glyphs and are intended to be laid out on the same baseline as the
  3909    default glyphs, with no resizing or repositioning of the baseline. They
  3910    are explicitly designed to match the surrounding text and to be more
  3911    readable without affecting the line height.
  3913   <div class=figure><img alt="comparison between real subscript glyphs and
  3914    synthesized ones" src=realsubscripts.png>
  3915    <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
  3916     (bottom)
  3917   </div>
  3919   <p>Individual values have the following meanings:
  3921   <dl>
  3922    <dt><dfn id=font-variant-position-normal-value
  3923     title="normal!!font-variant-position">normal</dfn>
  3925    <dd>None of the features listed below are enabled.
  3927    <dt><dfn id=sub>sub</dfn>
  3929    <dd>Enables display of subscript variants (OpenType feature: <span
  3930     class=tag>subs</span>).
  3932    <dt><dfn id=super>super</dfn>
  3934    <dd>Enables display of superscript variants (OpenType feature: <span
  3935     class=tag>sups</span>).
  3936   </dl>
  3938   <p>Because of the semantic nature of subscripts and superscripts, when the
  3939    value is either ‘<a href="#sub"><code class=property>sub</code></a>’
  3940    or ‘<a href="#super"><code class=property>super</code></a>’ for a
  3941    given contiguous run of text, if a variant glyph is not available for all
  3942    the characters in the run, simulated glyphs must be synthesized for all
  3943    characters using reduced forms of the glyphs that would be used without
  3944    this feature applied. This is done per run to avoid a mixture of variant
  3945    glyphs and synthesized ones that would not align correctly. In the case of
  3946    OpenType fonts that lack subscript or superscript glyphs for a given
  3947    character, user agents must use the appropriate subscript and superscript
  3948    metrics specified in the selected font's <a
  3949    href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
  3950    table</a> <a href="#OPENTYPE"
  3951    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
  3952    and offset of the synthesized substitutes.
  3954   <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
  3955    using superscript metrics" src=superscript-alt-synth.png>
  3956    <p class=caption>Superscript alternate glyph (left), synthesized
  3957     superscript glyphs (middle), and incorrect mixture of the two (right)
  3958   </div>
  3960   <p>In situations where text decorations are only applied to runs of text
  3961    containing superscript or subscript glyphs, the synthesized glyphs must be
  3962    used to avoid problems with the placement of decorations.
  3964   <p>In the past, user agents have used font-size and vertical-align to
  3965    simulate subscripts and superscripts for the <code title="HTML sub
  3966    element">sub</code> and <code title="HTML sup element">sup</code>
  3967    elements. To allow a backwards compatible way of defining subscripts and
  3968    superscripts, it is recommended that authors use conditional rules <a
  3969    href="#CSS3-CONDITIONAL"
  3970    rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
  3971    older user agents will still render subscripts and superscripts via the
  3972    older mechanism.
  3974   <p>Authors should note that fonts typically only provide subscript and
  3975    superscript glyphs for a subset of all characters supported by the font.
  3976    For example, while subscript and superscript glyphs are often available
  3977    for Latin numbers, glyphs for punctuation and letter characters are less
  3978    frequently provided. The synthetic fallback rules defined for this
  3979    property assure that subscripts and superscripts will always appear but
  3980    the appearance may not match author expectations if the font used does not
  3981    provide the appropriate alternate glyph for all characters contained in a
  3982    subscript or superscript.
  3984   <p>This property is not cumulative. Applying it to elements within a
  3985    subscript or superscript won't nest the placement of a subscript or
  3986    superscript glyph. Images contained within text runs where the value of
  3987    this property is ‘<a href="#sub"><code class=property>sub</code></a>’
  3988    or ‘<a href="#super"><code class=property>super</code></a>’ will be
  3989    drawn just as they would if the value was <a
  3990    href="#font-variant-position-normal-value"
  3991    title="normal!!font-variant-position">‘<code
  3992    class=property>normal</code>’</a>.</p>
  3993   <!-- due to lack of consensus, couldn't resolve on exact positioning of text decorations:
  3994 http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
  3996   <p>Because of these limitations, ‘<a
  3997    href="#propdef-font-variant-position"><code
  3998    class=property>font-variant-position</code></a>’ is not recommended for
  3999    use in user agent stylesheets. Authors should use it in cases where
  4000    subscripts or superscripts will only contain the narrow range of
  4001    characters supported by the fonts specified.
  4003   <p class=note>The variant glyphs use the same baseline as the default
  4004    glyphs would use. There is no shift in the placement along the baseline,
  4005    so the use of variant glyphs doesn't affect the height of the inline box
  4006    or alter the height of the linebox. This makes superscript and subscript
  4007    variants ideal for situations where it's important that leading remain
  4008    constant, such as in multi-column layout.
  4010   <div class=example>
  4011    <p>A typical user agent default style for the <a class=tag
  4012     href="#sub">sub</a> element:</p>
  4014    <pre>sub {
  4015   vertical-align: sub;
  4016   font-size: smaller;
  4017   line-height: normal;
  4019 </pre>
  4021    <p>Using font-variant-position to specify typographic subscripts in a way
  4022     that will still show subscripts in older user agents:</p>
  4024    <pre>@supports ( font-variant-position: sub ) {
  4026   sub {
  4027     vertical-align: baseline;
  4028     font-size: 100%;
  4029     line-height: inherit;
  4030     font-variant-position: sub;
  4034 </pre>
  4036    <p>User agents that support the ‘<a
  4037     href="#propdef-font-variant-position"><code
  4038     class=property>font-variant-position</code></a>’ property will select a
  4039     subscript variant glyph and render this without adjusting the baseline or
  4040     font-size. Older user agents will ignore the ‘<a
  4041     href="#propdef-font-variant-position"><code
  4042     class=property>font-variant-position</code></a>’ property definition
  4043     and use the standard defaults for subscripts.</p>
  4044   </div>
  4045   <!-- prop: font-variant-caps -->
  4047   <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
  4048    the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
  4050   <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
  4051    <tbody>
  4052     <tr>
  4053      <td>Name:
  4055      <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
  4057     <tr>
  4058      <td>Value:
  4060      <td><a href="#font-variant-caps-normal-value"
  4061       title="normal!!font-variant-caps">normal</a> | <a
  4062       href="#small-caps">small-caps</a> | <a
  4063       href="#all-small-caps">all-small-caps</a> | <a
  4064       href="#petite-caps">petite-caps</a> | <a
  4065       href="#all-petite-caps">all-petite-caps</a> | <a
  4066       href="#unicase">unicase</a> | <a href="#titling-caps">titling-caps</a>
  4068     <tr>
  4069      <td>Initial:
  4071      <td>normal
  4073     <tr>
  4074      <td>Applies to:
  4076      <td>all elements
  4078     <tr>
  4079      <td>Inherited:
  4081      <td>yes
  4083     <tr>
  4084      <td>Percentages:
  4086      <td>N/A
  4088     <tr>
  4089      <td>Media:
  4091      <td>visual
  4093     <tr>
  4094      <td>Computed value:
  4096      <td>as specified
  4098     <tr>
  4099      <td>Animatable:
  4101      <td>no
  4102   </table>
  4104   <p>This property allows the selection of alternate glyphs used for small or
  4105    petite capitals or for titling. These glyphs are specifically designed to
  4106    blend well with the surrounding normal glyphs, to maintain the weight and
  4107    readability which suffers when text is simply resized to fit this purpose.
  4109   <p>Individual values have the following meanings:
  4111   <dl>
  4112    <dt><dfn id=font-variant-caps-normal-value
  4113     title="normal!!font-variant-caps">normal</dfn>
  4115    <dd>None of the features listed below are enabled.
  4117    <dt><dfn id=small-caps>small-caps</dfn>
  4119    <dd>Enables display of small capitals (OpenType feature: <span
  4120     class=tag>smcp</span>). Small-caps glyphs typically use the form of
  4121     uppercase letters but are reduced to the size of lowercase letters.
  4122   </dl>
  4124   <div class=featex><img alt="small-caps example" src=smcp.png></div>
  4126   <dl>
  4127    <dt><dfn id=all-small-caps>all-small-caps</dfn>
  4129    <dd>Enables display of small capitals for both upper and lowercase letters
  4130     (OpenType features: <span class=tag>c2sc, smcp</span>).
  4132    <dt><dfn id=petite-caps>petite-caps</dfn>
  4134    <dd>Enables display of petite capitals (OpenType feature: <span
  4135     class=tag>pcap</span>).
  4137    <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
  4139    <dd>Enables display of petite capitals for both upper and lowercase
  4140     letters (OpenType features: <span class=tag>c2pc, pcap</span>).
  4142    <dt><dfn id=unicase>unicase</dfn>
  4144    <dd>Enables display of mixture of small capitals for uppercase letters
  4145     with normal lowercase letters (OpenType feature: <span
  4146     class=tag>unic</span>).
  4148    <dt><dfn id=titling-caps>titling-caps</dfn>
  4150    <dd>Enables display of titling capitals (OpenType feature: <span
  4151     class=tag>titl</span>). Uppercase letter glyphs are often designed for
  4152     use with lowercase letters. When used in all uppercase titling sequences
  4153     they can appear too strong. Titling capitals are designed specifically
  4154     for this situation.
  4155   </dl>
  4157   <p>The availability of these glyphs is based on whether a given feature is
  4158    defined or not in the feature list of the font. User agents can optionally
  4159    decide this on a per-script basis but should explicitly not decide this on
  4160    a per-character basis.
  4162   <p>Some fonts may only support a subset or none of the features described
  4163    for this property. For backwards compatibility with CSS 2.1, if ‘<a
  4164    href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
  4165    href="#all-small-caps"><code class=property>all-small-caps</code></a>’
  4166    is specified but small-caps glyphs are not available for a given font,
  4167    user agents should simulate a small-caps font, for example by taking a
  4168    normal font and replacing the glyphs for lowercase letters with scaled
  4169    versions of the glyphs for uppercase characters (replacing the glyphs for
  4170    both upper and lowercase letters in the case of ‘<a
  4171    href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
  4173   <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
  4174    real small-caps" class=hires src=synthetic-vs-real-small-caps.png
  4175    width=512px>
  4176    <p class=caption>Synthetic vs. real small-caps
  4177   </div>
  4179   <p>To match the surrounding text, a font may provide alternate glyphs for
  4180    caseless characters when these features are enabled but when a user agent
  4181    simulates small capitals, it must not attempt to simulate alternates for
  4182    codepoints which are considered caseless.
  4184   <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
  4185    characters with small-caps, all-small-caps enabled" class=hires
  4186    src=small-capitals-variations.png width=418px>
  4187    <p class=caption>Caseless characters with small-caps, all-small-caps
  4188     enabled
  4189   </div>
  4191   <p>If either ‘<a href="#petite-caps"><code
  4192    class=property>petite-caps</code></a>’ or ‘<a
  4193    href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
  4194    is specified for a font that doesn't support these features, the property
  4195    behaves as if ‘<a href="#small-caps"><code
  4196    class=property>small-caps</code></a>’ or ‘<a
  4197    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4198    respectively, had been specified. If ‘<a href="#unicase"><code
  4199    class=property>unicase</code></a>’ is specified for a font that doesn't
  4200    support that feature, the property behaves as if ‘<a
  4201    href="#small-caps"><code class=property>small-caps</code></a>’ was
  4202    applied only to lowercased uppercase letters. If ‘<a
  4203    href="#titling-caps"><code class=property>titling-caps</code></a>’ is
  4204    specified with a font that does not support this feature, this property
  4205    has no visible effect. When simulated small capital glyphs are used, for
  4206    scripts that lack uppercase and lowercase letters, ‘<a
  4207    href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
  4208    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4209    ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
  4210    ‘<a href="#all-petite-caps"><code
  4211    class=property>all-petite-caps</code></a>’ and ‘<a
  4212    href="#unicase"><code class=property>unicase</code></a>’ have no visible
  4213    effect.
  4215   <p>When casing transforms are used to simulate small capitals, the casing
  4216    transformations must match those used for the <span
  4217    class=property>‘<code class=property>text-transform</code>’</span>
  4218    property.
  4220   <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
  4221    replace glyphs in a small-caps font so that the text appears in all
  4222    uppercase letters.
  4224   <div class=figure style="padding: 0; margin: auto;"><img alt="using
  4225    all-small-caps in acronym-laden text" class=hires
  4226    src=acronym-laden-text.png width=596px>
  4227    <p class=caption>Using small capitals to improve readability in
  4228     acronym-laden text
  4229   </div>
  4231   <div class=example>
  4232    <p>Quotes rendered italicised, with small-caps on the first line:</p>
  4234    <pre>blockquote            { font-style: italic; }
  4235 blockquote:first-line { font-variant: small-caps; }
  4237 &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>
  4238 </pre>
  4239   </div>
  4240   <!-- prop: font-variant-numeric -->
  4242   <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
  4243    formatting: the <a
  4244    href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
  4246   <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
  4247    <tbody>
  4248     <tr>
  4249      <td>Name:
  4251      <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
  4253     <tr>
  4254      <td>Value:
  4256      <td><a href="#font-variant-numeric-normal-value"
  4257       title="normal!!font-variant-numeric">normal</a> | [ <a
  4258       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4259       || <a
  4260       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4261       || <a
  4262       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4263       || <a href="#ordinal">ordinal</a> || <a
  4264       href="#slashed-zero">slashed-zero</a> ]
  4266     <tr>
  4267      <td>Initial:
  4269      <td>normal
  4271     <tr>
  4272      <td>Applies to:
  4274      <td>all elements
  4276     <tr>
  4277      <td>Inherited:
  4279      <td>yes
  4281     <tr>
  4282      <td>Percentages:
  4284      <td>N/A
  4286     <tr>
  4287      <td>Media:
  4289      <td>visual
  4291     <tr>
  4292      <td>Computed value:
  4294      <td>as specified
  4296     <tr>
  4297      <td>Animatable:
  4299      <td>no
  4300   </table>
  4302   <p>Specifies control over numerical forms. The example below shows how some
  4303    of these values can be combined to influence the rendering of tabular data
  4304    with fonts that support these features. Within normal paragraph text,
  4305    proportional numbers are used while tabular numbers are used so that
  4306    columns of numbers line up properly:
  4308   <div class=figure style="padding: 0; margin: auto;"><img alt="combining
  4309    number styles" src=numberstyles.png>
  4310    <p class=caption>Using number styles
  4311   </div>
  4313   <p>Possible combinations:
  4315   <pre
  4316    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>
  4318   <pre
  4319    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>
  4321   <pre
  4322    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>
  4324   <p>Individual values have the following meanings:
  4326   <dl>
  4327    <dt><dfn id=font-variant-numeric-normal-value
  4328     title="normal!!font-variant-numeric">normal</dfn>
  4330    <dd>None of the features listed below are enabled.
  4332    <dt><dfn id=lining-nums>lining-nums</dfn>
  4334    <dd>Enables display of lining numerals (OpenType feature: <span
  4335     class=tag>lnum</span>).
  4337    <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
  4339    <dd>Enables display of old-style numerals (OpenType feature: <span
  4340     class=tag>onum</span>).
  4342    <dt><dfn id=proportional-nums>proportional-nums</dfn>
  4344    <dd>Enables display of proportional numerals (OpenType feature: <span
  4345     class=tag>pnum</span>).
  4347    <dt><dfn id=tabular-nums>tabular-nums</dfn>
  4349    <dd>Enables display of tabular numerals (OpenType feature: <span
  4350     class=tag>tnum</span>).
  4352    <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
  4354    <dd>Enables display of lining diagonal fractions (OpenType feature: <span
  4355     class=tag>frac</span>).
  4356   </dl>
  4358   <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
  4360   <dl>
  4361    <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
  4363    <dd>Enables display of lining stacked fractions (OpenType feature: <span
  4364     class=tag>afrc</span>).
  4365   </dl>
  4367   <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
  4369   <dl>
  4370    <dt><dfn id=ordinal>ordinal</dfn>
  4372    <dd>Enables display of forms used with ordinal numbers (OpenType feature:
  4373     <span class=tag>ordn</span>).
  4375    <dt><dfn id=slashed-zero>slashed-zero</dfn>
  4377    <dd>Enables display of slashed zeros (OpenType feature: <span
  4378     class=tag>zero</span>).
  4379   </dl>
  4381   <div class=featex><img alt="slashed zero example" src=zero.png></div>
  4383   <div class=example id=steak-marinade>
  4384    <p>A simple flank steak marinade recipe, rendered with automatic fractions
  4385     and old-style numerals:</p>
  4387    <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
  4389 &lt;h4>Steak marinade:&lt;/h4>
  4390 &lt;ul>
  4391   &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
  4392   &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
  4393   &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
  4394   &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
  4395   &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
  4396   &lt;li>Salt &amp;amp; pepper&lt;/li>
  4397 &lt;/ul>
  4399 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
  4400 for a few hours or overnight.&lt;/p>
  4401 </pre>
  4403    <p>Note that the fraction feature is only applied to values not the entire
  4404     paragraph. Fonts often implement this feature using contextual rules
  4405     based on the use of the slash (‘<code class=css>/</code>’) character.
  4406     As such, it's not suitable for use as a paragraph-level style.</p>
  4407   </div>
  4408   <!-- prop: font-variant-alternates -->
  4410   <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
  4411    and swashes: the <a
  4412    href="#propdef-font-variant-alternates">font-variant-alternates</a>
  4413    property</h3>
  4415   <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
  4416    <tbody>
  4417     <tr>
  4418      <td>Name:
  4420      <td><dfn
  4421       id=propdef-font-variant-alternates>font-variant-alternates</dfn>
  4423     <tr>
  4424      <td>Value:
  4426      <td>normal | [ <a href="#stylistic"
  4427       title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
  4428       href="#historical-forms">historical-forms</a> || <a href="#styleset"
  4429       title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
  4430       href="#character-variant"
  4431       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4432       #)</a> || <a href="#swash"
  4433       title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
  4434       href="#ornaments"
  4435       title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
  4436       href="#annotation"
  4437       title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
  4439     <tr>
  4440      <td>Initial:
  4442      <td>normal
  4444     <tr>
  4445      <td>Applies to:
  4447      <td>all elements
  4449     <tr>
  4450      <td>Inherited:
  4452      <td>yes
  4454     <tr>
  4455      <td>Percentages:
  4457      <td>N/A
  4459     <tr>
  4460      <td>Media:
  4462      <td>visual
  4464     <tr>
  4465      <td>Computed value:
  4467      <td>as specified
  4469     <tr>
  4470      <td>Animatable:
  4472      <td>no
  4473   </table>
  4475   <p>For any given character, fonts can provide a variety of alternate glyphs
  4476    in addition to the default glyph for that character. This property
  4477    provides control over the selection of these alternate glyphs.
  4479   <p>For many of the property values listed below, several different
  4480    alternate glyphs are available. How many alternates are available and what
  4481    they represent is font-specific, so these are each marked <dfn
  4482    id=font-specific>font specific</dfn> in the value definitions below.
  4483    Because the nature of these alternates is font-specific, the <a
  4484    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4485    rule is used to define values for a specific font family or set of
  4486    families that associate a font-specific numeric
  4487    <code>&lt;feature-index&gt;</code> with a custom
  4488    <code>&lt;feature-value-name&gt;</code>, which is then used in this
  4489    property to select specific alternates:
  4491   <pre>@font-feature-values Noble Script { @swash { swishy: 1; flowing: 2; } }
  4493 p {
  4494   font-family: Noble Script;
  4495   font-variant-alternates: swash(flowing); /* use swash alternate #2 */
  4496 }</pre>
  4498   <p>When a particular <code>&lt;feature-value-name&gt;</code> has not been
  4499    defined for a given family or for a particular feature type, the computed
  4500    value must be the same as if it had been defined. However, property values
  4501    that contain these undefined <code>&lt;feature-value-name&gt;</code>
  4502    identifiers must be ignored when choosing glyphs.
  4504   <pre>/* these two style rules are effectively the same */
  4505 p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
  4506 p { font-variant-alternates: normal; }
  4507 </pre>
  4509   <p>This allows values to be defined and used for a given set of font
  4510    families but ignored if fallback occurs, since the font family name would
  4511    be different. If a given value is outside the range supported by a given
  4512    font, the value is ignored. These values never apply to generic font
  4513    families.
  4515   <p>Individual values have the following meanings:
  4517   <dl>
  4518    <dt><dfn id=font-variant-alternates-normal-value
  4519     title="normal!!font-variant-alternates">normal</dfn>
  4521    <dd>None of the features listed below are enabled.
  4523    <dt><dfn id=historical-forms>historical-forms</dfn>
  4525    <dd>Enables display of historical forms (OpenType feature: <span
  4526     class=tag>hist</span>).
  4527   </dl>
  4529   <div class=featex><img alt="historical form example" src=hist.png></div>
  4531   <dl>
  4532    <dt><dfn id=stylistic
  4533     title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
  4535    <dd>Enables display of stylistic alternates (<a
  4536     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4537     class=tag>salt &lt;feature-index&gt;</span>).
  4538   </dl>
  4540   <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
  4542   <dl>
  4543    <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
  4544     #)</dfn>
  4546    <dd>Enables display with stylistic sets (<a href="#font-specific"><em>font
  4547     specific</em></a>, OpenType feature: <span
  4548     class=tag>ss&lt;feature-index&gt;</span> OpenType currently defines <span
  4549     class=tag>ss01</span> through <span class=tag>ss20</span>).
  4550   </dl>
  4552   <div class=featex><img alt="styleset example" src=ssnn.png></div>
  4554   <dl>
  4555    <dt><dfn id=character-variant
  4556     title=character-variant>character-variant(&lt;feature-value-name&gt;
  4557     #)</dfn>
  4559    <dd>Enables display of specific character variants (<a
  4560     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4561     class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
  4562     class=tag>cv01</span> through <span class=tag>cv99</span>).
  4564    <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
  4566    <dd>Enables display of swash glyphs (<a href="#font-specific"><em>font
  4567     specific</em></a>, OpenType feature: <span class=tag>swsh
  4568     &lt;feature-index&gt;, cswh &lt;feature-index&gt;</span>).
  4569   </dl>
  4571   <div class=featex><img alt="swash example" src=swsh.png></div>
  4573   <dl>
  4574    <dt><dfn id=ornaments
  4575     title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
  4577    <dd>Enables replacement of default glyphs with ornaments, if provided in
  4578     the font (<a href="#font-specific"><em>font specific</em></a>, OpenType
  4579     feature: <span class=tag>ornm &lt;feature-index&gt;</span>). Some fonts
  4580     may offer ornament glyphs as alternates for a wide collection of
  4581     characters; however, displaying arbitrary characters (e.g.,
  4582     alphanumerics) as ornaments is poor practice as it distorts the semantics
  4583     of the data. Font designers are encouraged to encode all ornaments
  4584     (except those explicitly encoded in the Unicode Dingbats blocks, etc.) as
  4585     alternates for the bullet character (U+2022) to allow authors to select
  4586     the desired glyph using ‘<a href="#ornaments"><code
  4587     class=property>ornaments</code></a>’.
  4588   </dl>
  4590   <div class=featex><img alt="ornaments example" src=ornm.png></div>
  4592   <dl>
  4593    <dt><dfn id=annotation
  4594     title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
  4596    <dd>Enables display of alternate annotation forms (<a
  4597     href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
  4598     class=tag>nalt &lt;feature-index&gt;</span>).
  4599   </dl>
  4601   <div class=featex><img alt="alternate annotation form example"
  4602    src=nalt.png></div>
  4604   <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
  4605    specific alternates: the <dfn id=at-font-feature-values-rule
  4606    style="font-weight: inherit; font-style:
  4607    inherit"><code>@font-feature-values</code></dfn> rule</h3>
  4609   <p>Several of the possible values of ‘<a
  4610    href="#propdef-font-variant-alternates"><code
  4611    class=property>font-variant-alternates</code></a>’ listed above are
  4612    labeled as <a href="#font-specific"><em>font specific</em></a>. For these
  4613    features fonts may define not just a single glyph but a set of alternate
  4614    glyphs with an index to select a given alternate. Since these are font
  4615    family specific, the <a
  4616    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4617    rule is used to define named values for these indices for a given family.
  4619   <p class=note>See the <a href="#om-fontfeaturevalues">object model
  4620    reference section</a> for a description of the interfaces used to modify
  4621    these rules via the CSS Object Model.
  4623   <div class=example>
  4624    <p>In the case of the swash Q in the example shown above, the swash could
  4625     be specified using these style rules:</p>
  4627    <pre>
  4629 @font-feature-values Jupiter Sans {
  4630   @swash {
  4631     delicate: 1;
  4632     flowing: 2;
  4636 h2 { font-family: Jupiter Sans, sans-serif; }
  4638 /* show the second swash variant in h2 headings */
  4639 h2:first-letter { font-variant-alternates: swash(flowing); }
  4641 &lt;h2>Quick&lt;/h2></pre>
  4643    <p>When Jupiter Sans is present, the second alternate swash alternate will
  4644     be displayed. When not present, no swash character will be shown, since
  4645     the specific named value "flowing" is only defined for the Jupiter Sans
  4646     family. The @-mark indicates the name of the property value for which a
  4647     named value can be used. The name "flowing" is chosen by the author. The
  4648     index that represents each alternate is defined within a given font's
  4649     data.</p>
  4650   </div>
  4652   <h4 id=basic-syntax><span class=secno>6.9.1 </span>Basic syntax</h4>
  4654   <p>An <a
  4655    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4656    rule is composed of a list of font families followed by a block containing
  4657    individual <a href="#featurevalueblock"><i
  4658    title="feature_value_block">feature value blocks</i></a> that take the
  4659    form of @-rules. Each block defines a set of named values for a specific
  4660    font feature when a given set of font families is used. Effectively, they
  4661    define a mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
  4662    ⟨values⟩ are the numeric indices used for specific features defined
  4663    for a given font.
  4665   <p>In terms of the grammar, this specification defines the following
  4666    productions:
  4668   <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
  4669   : <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>*
  4670     '{' <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>*
  4673 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
  4674   : <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> ]*
  4677 <dfn id=fontfamilyname>font_family_name</dfn>
  4678   : <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> ]* ]
  4681 <dfn id=featurevalueblock>feature_value_block</dfn>
  4682   : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4683     '{' <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>*
  4686 <dfn id=featuretype>feature_type</dfn>:
  4687   <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
  4690 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
  4691   : <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> ]*
  4693 </pre>
  4695   <p>The following new token is introduced:
  4697   <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>;}
  4698 </pre>
  4700   <p><a href="#featurevalueblock"><i title="feature_value_block">Feature
  4701    value blocks</i></a> are handled as <a
  4702    href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">at-rules</a>, they
  4703    consist of everything up to the next block or semi-colon, whichever comes
  4704    first.
  4706   <p>The <a href="#fontfamilynamelist"><i title="font_family_name_list">font
  4707    family list</i></a> is a comma-delimited list of <a
  4708    href="#fontfamilyname"><i title="font_family_name">font family
  4709    names</i></a> that match the definition of <a
  4710    href="#family-name-value"><var>&lt;family-name&gt;</var></a> for the <a
  4711    href="#propdef-font-family" title="font-family!!property">‘<code
  4712    class=property>font-family</code>’</a> property. This means that only
  4713    named font families are allowed, rules that include generic or system
  4714    fonts in the list of font families are syntax errors. However, if a user
  4715    agent defines a generic font to be a specific named font (e.g. Helvetica),
  4716    the settings associated with that family name will be used. If syntax
  4717    errors occur within the font family list, the entire rule must be ignored.
  4719   <p>Within <a href="#featurevalueblock"><i
  4720    title="feature_value_block">feature value blocks</i></a>, the <a
  4721    href="#featuretype"><i title="feature_type">feature type</i></a> is
  4722    ‘<code class=css>@</code>’ followed by the name of one of the <a
  4723    href="#font-specific"><em>font specific</em></a> property values of ‘<a
  4724    href="#propdef-font-variant-alternates"><code
  4725    class=property>font-variant-alternates</code></a>’ (e.g. <a
  4726    href="#swash"><code>@swash</code></a>). The identifiers used within
  4727    feature value definitions follow the rules of CSS user identifiers and are
  4728    case-sensitive. They are unique only for a given set of font families and
  4729    <a href="#featuretype"><i title="feature_type">feature type</i></a>. The
  4730    same identifier used with a different <a href="#featuretype"><i
  4731    title="feature_type">feature type</i></a> is treated as a separate and
  4732    distinct value. If the same identifier is defined mulitple times for a
  4733    given <a href="#featuretype"><i title="feature_type">feature type</i></a>
  4734    and font family, the last defined value is used. Values associated with a
  4735    given identifier are limited to integer values 0 or greater.
  4737   <p>When syntax errors occur within a <a href="#featurevaluedefinition"><i
  4738    title="feature_value_definition">feature value definition</i></a>, such as
  4739    invalid identifiers or values, the entire <a
  4740    href="#featurevaluedefinition"><i title="feature_value_definition">feature
  4741    value definition</i></a> must be omitted, just as syntax errors in style
  4742    declarations are handled. When the <a href="#featuretype"><i
  4743    title="feature_type">feature type</i></a> is invalid, the entire
  4744    associated <a href="#featurevalueblock"><i
  4745    title="feature_value_block">feature value block</i></a> must be ignored.
  4747   <div class=example>
  4748    <p>Rules that are equivalent given syntax error handling:</p>
  4750    <pre>@font-feature-values Bongo {
  4751   @swash { ornate: 1; }
  4752   annotation { boxed: 4; } /* should be @annotation! */
  4753   @swash { double-loops: 1; flowing: -1; } /* negative value */
  4754   @ornaments ; /* incomplete definition */
  4755   @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
  4756   <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none; border: none;">redrum</a>  /* random editing mistake */
  4757 }</pre>
  4759    <p>The example above is equivalent to:</p>
  4761    <pre>@font-feature-values Bongo {
  4762   @swash { ornate: 1; }
  4763   @swash { double-loops: 1; }
  4764   @styleset { double-W: 14; sharp-terminals: 16 1; }
  4765 }</pre>
  4766   </div>
  4768   <p>If multiple <a
  4769    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4770    rules are defined for a given family, the resulting values definitions are
  4771    the union of the definitions contained within these rules. This allows a
  4772    set of named values to be defined for a given font family globally for a
  4773    site and specific additions made per-page.
  4775   <div class=example>
  4776    <p>Using both site-wide and per-page feature values:</p>
  4778    <pre>
  4779 site.css:
  4781   @font-feature-values Mercury Serif {
  4782     @styleset {
  4783       stacked-g: 3; /* "two-storey" versions of g, a */
  4784       stacked-a: 4;
  4788 page.css:
  4790   @font-feature-values Mercury Serif {
  4791     @styleset {
  4792       geometric-m: 7; /* alternate version of m */
  4796   body {
  4797     font-family: Mercury Serif, serif;
  4799     /* enable both the use of stacked g and alternate m */
  4800     font-variant-alternates: styleset(stacked-g, geometric-m);
  4801   }</pre>
  4802   </div>
  4804   <div class=example>
  4805    <p>Using a commonly named value allows authors to use a single style rule
  4806     to cover a set of fonts for which the underlying selector is different
  4807     for each font. If either font in the example below is found, a circled
  4808     number glyph will be used:</p>
  4810    <pre>@font-feature-values Taisho Gothic {
  4811   @annotation { boxed: 1; circled: 4; }
  4814 @font-feature-values Otaru Kisa {
  4815   @annotation { circled: 1; black-boxed: 3; }
  4818 h3.title {
  4819   /* circled form defined for both fonts */
  4820   font-family: Taisho Gothic, Otaru Kisa;
  4821   font-variant: annotation(circled);
  4822 }</pre>
  4823   </div>
  4825   <h4 id=multi-valued-feature-value-definitions><span class=secno>6.9.2
  4826    </span>Multi-valued feature value definitions</h4>
  4828   <p>Most <a href="#font-specific"><em>font specific</em></a> ‘<a
  4829    href="#propdef-font-variant-alternates"><code
  4830    class=property>font-variant-alternates</code></a>’ property values take
  4831    a single value (e.g. ‘<a href="#swash"><code
  4832    class=property>swash</code></a>’). The ‘<a
  4833    href="#character-variant"><code
  4834    class=property>character-variant</code></a>’ property value allows two
  4835    values and ‘<a href="#styleset"><code
  4836    class=property>styleset</code></a>’ allows an unlimited number.
  4838   <p>For the styleset property value, multiple values indicate the style sets
  4839    to be enabled. Values between 1 and 99 enable OpenType features <span
  4840    class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
  4841    OpenType standard only officially defines <span class=tag>ss01</span>
  4842    through <span class=tag>ss20</span>. For OpenType fonts, values greater
  4843    than 99 or equal to 0 do not generate a syntax error when parsed but
  4844    enable no OpenType features.
  4846   <pre>@font-feature-values Mars Serif {
  4847   @styleset {
  4848     alt-g: 1;        /* implies ss01 = 1 */
  4849     curly-quotes: 3; /* implies ss03 = 1 */
  4850     code: 4 5;       /* implies ss04 = 1, ss05 = 1 */
  4853   @styleset {
  4854     dumb: 125;        /* &gt;99, ignored */
  4857   @swash {
  4858     swishy: 3 5;     /* more than 1 value for swash, syntax error */
  4862 p.codeblock {
  4863   /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
  4864   font-variant-alternates: styleset(curly-quotes, code);
  4865 }</pre>
  4867   <p>For character-variant, a single value between 1 and 99 indicates the
  4868    enabling of OpenType feature <span class=tag>cv01</span> through <span
  4869    class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
  4870    to 0 are ignored but do not generate a syntax error when parsed but enable
  4871    no OpenType features. When two values are listed, the first value
  4872    indicates the feature used and the second the value passed for that
  4873    feature. If more than two values are assigned to a given name, a syntax
  4874    error occurs and the entire <a href="#featurevaluedefinition"><i
  4875    title="feature_value_definition">feature value definition</i></a> is
  4876    ignored.
  4878   <pre>@font-feature-values MM Greek {
  4879   @character-variant { alpha-2: 1 2; }   /* implies cv01 = 2 */
  4880   @character-variant { beta-3: 2 3; }    /* implies cv02 = 3 */
  4881   @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, definition ignored */
  4882   @character-variant { gamma: 12; }      /* implies cv12 = 1 */
  4883   @character-variant { zeta:   20 3; }   /* implies cv20 = 3 */
  4884   @character-variant { zeta-2: 20 2; }   /* implies cv20 = 2 */
  4885   @character-variant { silly: 105; }     /* &gt;99, ignored */
  4886   @character-variant { dumb: 323 3; }    /* &gt;99, ignored */
  4889 #title {
  4890   /* use the third alternate beta, first alternate gamma */
  4891   font-variant-alternates: character-variant(beta-3, gamma);
  4894 p {
  4895   /* zeta-2 follows zeta, implies cv20 = 2  */
  4896   font-variant-alternates: character-variant(zeta, zeta-2);
  4899 .special {
  4900   /* zeta follows zeta-2, implies cv20 = 3  */
  4901   font-variant-alternates: character-variant(zeta-2, zeta);
  4902 }</pre>
  4904   <div class=figure><img alt="Matching text on Byzantine seals using
  4905    character variants" src=byzantineseal.png>
  4906    <p class=caption>Byzantine seal text displayed with character variants
  4907   </div>
  4909   <div class=example>
  4910    <p>In the figure above, the text in red is rendered using a font
  4911     containing character variants that mimic the character forms found on a
  4912     Byzantine seal from the 8th century A.D. Two lines below is the same text
  4913     displayed in a font without variants. Note the two variants for U and N
  4914     used on the seal.</p>
  4916    <pre>@font-feature-values Athena Ruby {
  4917   @character-variant {
  4918     leo-B: 2 1;
  4919     leo-M: 13 3;
  4920     leo-alt-N: 14 1;
  4921     leo-N: 14 2;
  4922     leo-T: 20 1;
  4923     leo-U: 21 2;
  4924     leo-alt-U: 21 4;
  4928 p {
  4929   font-variant: discretionary-ligatures,
  4930                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
  4933 span.alt-N {
  4934   font-variant-alternates: character-variant(leo-alt-N);
  4937 span.alt-U {
  4938   font-variant-alternates: character-variant(leo-alt-U);
  4941 &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>
  4943 &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>
  4944 </pre>
  4945   </div>
  4947   <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
  4948    Asian text rendering: the <a
  4949    href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  4950    property</h3>
  4952   <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
  4953    <tbody>
  4954     <tr>
  4955      <td>Name:
  4957      <td><dfn
  4958       id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
  4960     <tr>
  4961      <td>Value:
  4963      <td><a href="#font-variant-east-asian-normal-value"
  4964       title="normal!!font-variant-east-asian">normal</a> | [ <a
  4965       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4966       || <a
  4967       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4968       || <a href="#ruby">ruby</a> ]
  4970     <tr>
  4971      <td>Initial:
  4973      <td>normal
  4975     <tr>
  4976      <td>Applies to:
  4978      <td>all elements
  4980     <tr>
  4981      <td>Inherited:
  4983      <td>yes
  4985     <tr>
  4986      <td>Percentages:
  4988      <td>N/A
  4990     <tr>
  4991      <td>Media:
  4993      <td>visual
  4995     <tr>
  4996      <td>Computed value:
  4998      <td>as specified
  5000     <tr>
  5001      <td>Animatable:
  5003      <td>no
  5004   </table>
  5006   <p>Allows control of glyph substitution and sizing in East Asian text.
  5008   <pre
  5009    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>
  5011   <pre
  5012    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>
  5014   <p>Individual values have the following meanings:
  5016   <dl>
  5017    <dt><dfn id=font-variant-east-asian-normal-value
  5018     title="normal!!font-variant-east-asian">normal</dfn>
  5020    <dd>None of the features listed below are enabled.
  5022    <dt><dfn id=jis78>jis78</dfn>
  5024    <dd>Enables rendering of JIS78 forms (OpenType feature: <span
  5025     class=tag>jp78</span>).
  5026   </dl>
  5028   <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
  5030   <dl>
  5031    <dt><dfn id=jis83>jis83</dfn>
  5033    <dd>Enables rendering of JIS83 forms (OpenType feature: <span
  5034     class=tag>jp83</span>).
  5036    <dt><dfn id=jis90>jis90</dfn>
  5038    <dd>Enables rendering of JIS90 forms (OpenType feature: <span
  5039     class=tag>jp90</span>).
  5041    <dt><dfn id=jis04>jis04</dfn>
  5043    <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
  5044     class=tag>jp04</span>).
  5045     <p>The various JIS variants reflect the glyph forms defined in different
  5046      Japanese national standards. Fonts generally include glyphs defined by
  5047      the most recent national standard but it's sometimes necessary to use
  5048      older variants, to match signage for example.</p>
  5050    <dt><dfn id=simplified>simplified</dfn>
  5052    <dd>Enables rendering of simplified forms (OpenType feature: <span
  5053     class=tag>smpl</span>).
  5055    <dt><dfn id=traditional>traditional</dfn>
  5057    <dd>Enables rendering of traditional forms (OpenType feature: <span
  5058     class=tag>trad</span>).
  5059   </dl>
  5061   <p>The ‘<a href="#simplified"><code
  5062    class=property>simplified</code></a>’ and ‘<a
  5063    href="#traditional"><code class=property>traditional</code></a>’ values
  5064    allow control over the glyph forms for characters which have been
  5065    simplified over time but for which the older, traditional form is still
  5066    used in some contexts. The exact set of characters and glyph forms will
  5067    vary to some degree by context for which a given font was designed.
  5069   <div class=featex><img alt="tradtional form example" src=trad.png></div>
  5071   <dl>
  5072    <dt><dfn id=full-width>full-width</dfn>
  5074    <dd>Enables rendering of full-width variants (OpenType feature: <span
  5075     class=tag>fwid</span>).
  5077    <dt><dfn id=proportional-width>proportional-width</dfn>
  5079    <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
  5080     <span class=tag>pwid</span>).
  5081   </dl>
  5083   <div class=featex><img alt="proportionally spaced Japanese example"
  5084    src=pwid.png></div>
  5086   <dl>
  5087    <dt><dfn id=ruby>ruby</dfn>
  5089    <dd>Enables display of ruby variant glyphs (OpenType feature: <span
  5090     class=tag>ruby</span>). Since ruby text is generally smaller than the
  5091     associated body text, font designers can design special glyphs for use
  5092     with ruby that are more readable than scaled down versions of the default
  5093     glyphs. Only glyph selection is affected, there is no associated font
  5094     scaling or other change that affects line layout. The red ruby text below
  5095     is shown with default glyphs (top) and with ruby variant glyphs (bottom).
  5096     Note the slight difference in stroke thickness.
  5097   </dl>
  5099   <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
  5101   <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
  5102    for font rendering: the <a href="#propdef-font-variant">font-variant</a>
  5103    property</h3>
  5105   <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
  5106    <tbody>
  5107     <tr>
  5108      <td>Name:
  5110      <td><dfn id=propdef-font-variant
  5111       title="font-variant!!property">font-variant</dfn>
  5113     <tr>
  5114      <td>Value:
  5116      <td><a href="#font-variant-normal-value"
  5117       title="normal!!font-variant">normal</a> | <a
  5118       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  5119       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  5120       || <a
  5121       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  5122       || <a
  5123       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  5124       || <a
  5125       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  5126       || <a href="#stylistic"><var
  5127       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  5128       href="#historical-forms"><var>historical-forms</var></a> || <a
  5129       href="#styleset"><var
  5130       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  5131       href="#character-variant"><var
  5132       title=character-variant>character-variant(&lt;feature-value-name&gt;
  5133       #)</var></a> || <a href="#swash"><var
  5134       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  5135       href="#ornaments"><var
  5136       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  5137       href="#annotation"><var
  5138       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  5139       <a href="#small-caps"><i>small-caps</i></a> | <a
  5140       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  5141       href="#petite-caps"><i>petite-caps</i></a> | <a
  5142       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  5143       href="#unicase"><i>unicase</i></a> | <a
  5144       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  5145       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  5146       || <a
  5147       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  5148       || <a
  5149       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  5150       || <a href="#ordinal"><i>ordinal</i></a> || <a
  5151       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  5152       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  5153       || <a
  5154       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  5155       || <a href="#ruby"><i>ruby</i></a> ]
  5157     <tr>
  5158      <td>Initial:
  5160      <td>normal
  5162     <tr>
  5163      <td>Applies to:
  5165      <td>all elements
  5167     <tr>
  5168      <td>Inherited:
  5170      <td>yes
  5172     <tr>
  5173      <td>Percentages:
  5175      <td>see individual properties
  5177     <tr>
  5178      <td>Media:
  5180      <td>visual
  5182     <tr>
  5183      <td>Computed value:
  5185      <td>see individual properties
  5187     <tr>
  5188      <td>Animatable:
  5190      <td>see individual properties
  5191   </table>
  5193   <p>The <a href="#propdef-font-variant"
  5194    title="font-variant!!property">‘<code
  5195    class=property>font-variant</code>’</a> property is a shorthand for all
  5196    font-variant subproperties. The value <dfn id=font-variant-normal-value
  5197    title="normal!!font-variant">‘<code
  5198    class=property>normal</code>’</dfn> resets all subproperties of <a
  5199    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5200    class=property>font-variant</code>’</a> to their inital value. The <dfn
  5201    id=font-variant-none-value title="none!!font-variant">‘<code
  5202    class=property>none</code>’</dfn> value sets ‘<a
  5203    href="#propdef-font-variant-ligatures"><code
  5204    class=property>font-variant-ligatures</code></a>’ to ‘<code
  5205    class=property>none</code>’ and resets all other font feature properties
  5206    to their initial value. Like other shorthands, using <a
  5207    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5208    class=property>font-variant</code>’</a> resets unspecified <a
  5209    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5210    class=property>font-variant</code>’</a> subproperties to their initial
  5211    values. It does not reset the values of either ‘<a
  5212    href="#propdef-font-language-override"><code
  5213    class=property>font-language-override</code></a>’ or <a
  5214    href="#propdef-font-feature-settings"
  5215    title="font-feature-settings!!property">‘<code
  5216    class=property>font-feature-settings</code>’</a>.
  5218   <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
  5219    font feature settings control: the <a
  5220    href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
  5222   <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
  5223    <tbody>
  5224     <tr>
  5225      <td>Name:
  5227      <td><dfn id=propdef-font-feature-settings
  5228       title="font-feature-settings!!property">font-feature-settings</dfn>
  5230     <tr>
  5231      <td>Value:
  5233      <td><a href="#font-feature-settings-normal-value"
  5234       title="normal!!font-feature-settings">normal</a> | <a
  5235       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  5237     <tr>
  5238      <td>Initial:
  5240      <td>normal
  5242     <tr>
  5243      <td>Applies to:
  5245      <td>all elements
  5247     <tr>
  5248      <td>Inherited:
  5250      <td>yes
  5252     <tr>
  5253      <td>Percentages:
  5255      <td>N/A
  5257     <tr>
  5258      <td>Media:
  5260      <td>visual
  5262     <tr>
  5263      <td>Computed value:
  5265      <td>as specified
  5267     <tr>
  5268      <td>Animatable:
  5270      <td>no
  5271   </table>
  5273   <p>This property provides low-level control over OpenType font features. It
  5274    is intended as a way of providing access to font features that are not
  5275    widely used but are needed for a particular use case.
  5277   <p>Authors should generally use <a href="#propdef-font-variant"
  5278    title="font-variant!!property">‘<code
  5279    class=property>font-variant</code>’</a> and its related subproperties
  5280    whenever possible and only use this property for special cases where its
  5281    use is the only way of accessing a particular infrequently used font
  5282    feature.
  5284   <pre>/* enable small caps and use second swash alternate */
  5285 font-feature-settings: "smcp", "swsh" 2;</pre>
  5287   <p>A value of <dfn id=font-feature-settings-normal-value
  5288    title="normal!!font-feature-settings">‘<code
  5289    class=property>normal</code>’</dfn> means that no change in glyph
  5290    selection or positioning occurs due to this property.
  5292   <p>Feature tag values have the following syntax:
  5294   <pre
  5295    class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
  5297   <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
  5298    specified in the OpenType specification, feature tags contain four ASCII
  5299    characters. Tag strings longer or shorter than four characters, or
  5300    containing characters outside the U+20–7E codepoint range are invalid.
  5301    Feature tags need only match a feature tag defined in the font, so they
  5302    are not limited to explicitly registered OpenType features. Fonts defining
  5303    custom feature tags should follow the <a
  5304    href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
  5305    rules</a> defined in the OpenType specification <a
  5306    href="#OPENTYPE-FEATURES"
  5307    rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
  5308    Feature tags not present in the font are ignored; a user agent must not
  5309    attempt to synthesize fallback behavior based on these feature tags.
  5311   <p>This means that explicitly disabling the <span class=tag>kern</span>
  5312    feature will not affect the application of kerning data found in the
  5313    ‘<code class=property>kern</code>’ table (as opposed to kerning data
  5314    associated with the <span class=tag>kern</span> feature in the ‘<code
  5315    class=property>GPOS</code>’ table). Authors should use the ‘<a
  5316    href="#propdef-font-kerning"><code
  5317    class=property>font-kerning</code></a>’ property to explictly enable or
  5318    disable kerning since this property affects both types of kerning.
  5320   <p>If present, a value indicates an index used for glyph selection. An
  5321    &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
  5322    the feature is disabled. For boolean features, a value of 1 enables the
  5323    feature. For non-boolean features, a value of 1 or greater enables the
  5324    feature and indicates the feature selection index. A value of ‘<code
  5325    class=property>on</code>’ is synonymous with 1 and ‘<code
  5326    class=property>off</code>’ is synonymous with 0. If the value is
  5327    omitted, a value of 1 is assumed.
  5329   <pre>
  5330 font-feature-settings: "dlig" 1;       /* dlig=1 enable discretionary ligatures */
  5331 font-feature-settings: "smcp" on;      /* smcp=1 enable small caps */
  5332 font-feature-settings: 'c2sc';         /* c2sc=1 enable caps to small caps */
  5333 font-feature-settings: "liga" off;     /* liga=0 no common ligatures */
  5334 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
  5335 font-feature-settings: "tnum" "hist";  /* invalid, need a comma-delimited list */
  5336 font-feature-settings: "palin" off;    /* good idea but invalid tagname */
  5337 font-feature-settings: "PKRN";         /* PKRN=1 enable custom feature */
  5338 font-feature-settings: dlig;           /* invalid, tag must be a string */
  5339 </pre>
  5341   <p>When values greater than the range supported by the font are specified,
  5342    the behavior is explicitly undefined. For boolean features, in general
  5343    these will enable the feature. For non-boolean features, out of range
  5344    values will in general be equivalent to a 0 value. However, in both cases
  5345    the exact behavior will depend upon the way the font is designed
  5346    (specifically, which type of lookup is used to define the feature).
  5348   <p>Although specifically defined for OpenType feature tags, feature tags
  5349    for other modern font formats that support font features may be added in
  5350    the future. Where possible, features defined for other font formats should
  5351    attempt to follow the pattern of registered OpenType tags.
  5353   <div class=example>
  5354    <p>The Japanese text below will be rendered with half-width kana
  5355     characters:</p>
  5357    <pre lang=ja>
  5358 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
  5360 &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>
  5361 </pre>
  5362   </div>
  5364   <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
  5365    language override: the <a
  5366    href="#propdef-font-language-override">font-language-override</a> property</h3>
  5368   <table class=propdef id=namefont-language-overridevaluenormal-lt>
  5369    <tbody>
  5370     <tr>
  5371      <td>Name:
  5373      <td><dfn id=propdef-font-language-override>font-language-override</dfn>
  5375     <tr>
  5376      <td>Value:
  5378      <td><a href="#font-language-override-normal-value"
  5379       title="normal!!font-language-override">normal</a> | <a
  5380       href="#font-language-override-string-value"><var>&lt;string&gt;</var></a>
  5382     <tr>
  5383      <td>Initial:
  5385      <td><a href="#font-language-override-normal-value"
  5386       title="normal!!font-language-override">normal</a>
  5388     <tr>
  5389      <td>Applies to:
  5391      <td>all elements
  5393     <tr>
  5394      <td>Inherited:
  5396      <td>yes
  5398     <tr>
  5399      <td>Percentages:
  5401      <td>N/A
  5403     <tr>
  5404      <td>Media:
  5406      <td>visual
  5408     <tr>
  5409      <td>Computed value:
  5411      <td>as specified
  5413     <tr>
  5414      <td>Animatable:
  5416      <td>no
  5417   </table>
  5419   <p>Normally, authors can control the use of language-specific glyph
  5420    substitutions and positioning by setting the content language of an
  5421    element, as <a href="#language-specific-support">described above</a>:
  5423   <pre>&lt;!-- Display text using S'gaw Karen specific features -->
  5424 &lt;p lang="ksw">...&lt;/p></pre>
  5426   <p>In some cases, authors may need to specify a language system that
  5427    differs from the content language, for example due to the need to mimic
  5428    another language's typographic traditions. The ‘<a
  5429    href="#propdef-font-language-override"><code
  5430    class=property>font-language-override</code></a>’ property allows
  5431    authors to explicitly specify the language system of the font, overriding
  5432    the language system implied by the content language.
  5434   <p>Values have the following meanings:
  5436   <dl>
  5437    <dt><dfn id=font-language-override-normal-value
  5438     title="normal!!font-language-override">normal</dfn>
  5440    <dd>specifies that when rendering with OpenType fonts, the content
  5441     language of the element is used to infer the OpenType language system
  5443    <dt><dfn
  5444     id=font-language-override-string-value><var>&lt;string&gt;</var></dfn>
  5446    <dd>single three-letter case-sensitive OpenType <a
  5447     href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
  5448     system tag</a>, specifies the OpenType language system to be used instead
  5449     of the language system implied by the language of the element
  5450   </dl>
  5451   <!-- For this level, string represents a single language code, there's no concept of "fallback" 
  5452 http://www.w3.org/2013/06/07-css-minutes.html#item04 -->
  5454   <p>Use of invalid OpenType language system tags must not generate a parse
  5455    error but must be ignored when doing glyph selection and placement.
  5457   <div class=example>
  5458    <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
  5459     Declaration of Human Rights</a> has been translated into a wide variety
  5460     of languages. In Turkish, Article 9 of this document might be marked up
  5461     as below:</p>
  5463    <pre lang=tr>&lt;body lang="tr">
  5465 &lt;h4>Madde 9&lt;/h4>
  5466 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
  5467 </pre>
  5469    <p>Here the user agent uses the value of the ‘<code
  5470     class=property>lang</code>’ attribute when rendering text and
  5471     appropriately renders this text without ‘<code
  5472     class=property>fi</code>’ ligatures. There is no need to use the ‘<a
  5473     href="#propdef-font-language-override"><code
  5474     class=property>font-language-override</code></a>’ property.</p>
  5476    <p>However, a given font may lack support for a specific language. In this
  5477     situation authors may need to use the typographic conventions of a
  5478     related language that are supported by that font:</p>
  5480    <pre lang=mk>&lt;body lang="mk">     &lt;!-- Macedonian lang code --&gt;
  5482 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
  5484 &lt;h4>Члeн 9&lt;/h4>
  5485 &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>
  5487 </pre>
  5489    <p>The Macedonian text here will be rendered using Serbian typographic
  5490     conventions, with the assumption that the font specified supports
  5491     Serbian.</p>
  5492   </div>
  5494   <p><a id=rendering-considerations></a>
  5496   <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
  5497    Resolution</h2>
  5499   <p>As described in the previous section, font features can be enabled in a
  5500    variety of ways, either via the use of <a href="#propdef-font-variant"
  5501    title="font-variant!!property">‘<code
  5502    class=property>font-variant</code>’</a> or <a
  5503    href="#propdef-font-feature-settings"
  5504    title="font-feature-settings!!property">‘<code
  5505    class=property>font-feature-settings</code>’</a> in a style rule or
  5506    within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5507    The resolution order for the union of these settings is defined below.
  5508    Features defined via CSS properties are applied on top of layout engine
  5509    default features.
  5511   <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
  5513   <p>For OpenType fonts, user agents must enable the default features defined
  5514    in the OpenType documentation for a given script and writing mode.
  5515    Required ligatures, common ligatures and contextual forms must be enabled
  5516    by default (OpenType features: <span class=tag>rlig, liga, clig,
  5517    calt</span>), along with localized forms (OpenType feature: <span
  5518    class=tag>locl</span>), and features required for proper display of
  5519    composed characters and marks (OpenType features: <span class=tag>ccmp,
  5520    mark, mkmk</span>). These features must always be enabled, even when the
  5521    value of the <a href="#propdef-font-variant"
  5522    title="font-variant!!property">‘<code
  5523    class=property>font-variant</code>’</a> and <a
  5524    href="#propdef-font-feature-settings"
  5525    title="font-feature-settings!!property">‘<code
  5526    class=property>font-feature-settings</code>’</a> properties is <span
  5527    title="normal value">‘<code class=property>normal</code>’</span>.
  5528    Individual features are only disabled when explicitly overridden by the
  5529    author, as when ‘<a href="#propdef-font-variant-ligatures"><code
  5530    class=property>font-variant-ligatures</code></a>’ is set to ‘<a
  5531    href="#no-common-ligatures"><code
  5532    class=property>no-common-ligatures</code></a>’. For handling complex
  5533    scripts such as <a
  5534    href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
  5535    <a
  5536    href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
  5537    or <a
  5538    href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
  5539    additional features are required. For upright text within vertical text
  5540    runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
  5541    must be enabled.
  5543   <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
  5545   <p>General and <a href="#font-specific"><em>font specific</em></a> font
  5546    feature property settings are resolved in the order below, in ascending
  5547    order of precedence. This ordering is used to construct a combined list of
  5548    font features that affect a given text run.
  5550   <ol>
  5551    <li>Font features enabled by default, including features required for a
  5552     given script.
  5554    <li>If the font is defined via an <a
  5555     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5556     features implied by the font-variant descriptor in the <a
  5557     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5559    <li>If the font is defined via an <a
  5560     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5561     features implied by the font-feature-settings descriptor in the <a
  5562     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5564    <li>Feature settings determined by properties other than <a
  5565     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5566     class=property>font-variant</code>’</a> or <a
  5567     href="#propdef-font-feature-settings"
  5568     title="font-feature-settings!!property">‘<code
  5569     class=property>font-feature-settings</code>’</a>. For example, setting
  5570     a non-default value for the ‘<code
  5571     class=property>letter-spacing</code>’ property disables common
  5572     ligatures.
  5574    <li>Font features implied by the value of the <a
  5575     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5576     class=property>font-variant</code>’</a> property, the related <a
  5577     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5578     class=property>font-variant</code>’</a> subproperties and any other CSS
  5579     property that uses OpenType features (e.g. the ‘<a
  5580     href="#propdef-font-kerning"><code
  5581     class=property>font-kerning</code></a>’ property).
  5583    <li>Font features implied by the value of <a
  5584     href="#propdef-font-feature-settings"
  5585     title="font-feature-settings!!property">‘<code
  5586     class=property>font-feature-settings</code>’</a> property.
  5587   </ol>
  5589   <p>This ordering allows authors to set up a general set of defaults for
  5590    fonts within their <a
  5591    href="#at-font-face-rule"><code>@font-face</code></a> rules, then override
  5592    them with property settings for specific elements. General property
  5593    settings override the settings in <a
  5594    href="#at-font-face-rule"><code>@font-face</code></a> rules and low-level
  5595    font feature settings override <a href="#propdef-font-variant"
  5596    title="font-variant!!property">‘<code
  5597    class=property>font-variant</code>’</a> property settings.
  5599   <p>For situations where the combined list of font feature settings contains
  5600    more than one value for the same feature, the last value is used. When a
  5601    font lacks support for a given underlying font feature, text is simply
  5602    rendered as if that font feature was not enabled; font fallback does not
  5603    occur and no attempt is made to synthesize the feature except where
  5604    explicitly defined for specific properties.
  5606   <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
  5607    precedence examples</h3>
  5609   <div class=example>
  5610    <p>With the styles below, numbers are rendered proportionally when used
  5611     within a paragraph but are shown in tabular form within tables of prices:</p>
  5613    <pre>body {
  5614   font-variant-numeric: proportional-nums;
  5617 table.prices td {
  5618   font-variant-numeric: tabular-nums;
  5620 </pre>
  5621   </div>
  5623   <div class=example>
  5624    <p>When the <a href="#descdef-font-variant"
  5625     title="font-variant!!descriptor">font-variant</a> descriptor is used
  5626     within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule,
  5627     it only applies to the font defined by that rule.</p>
  5629    <pre>@font-face {
  5630   font-family: MainText;
  5631   src: url(http://example.com/font.ttf);
  5632   font-variant: oldstyle-nums proportional-nums styleset(1,3);
  5635 body {
  5636   font-family: MainText, Helvetica;
  5639 table.prices td {
  5640   font-variant-numeric: tabular-nums;
  5642 </pre>
  5644    <p>In this case, old-style numerals will be used throughout but only where
  5645     the font "MainText" is used. Just as in the previous example, tabular
  5646     values will be used in price tables since ‘<a
  5647     href="#tabular-nums"><code class=property>tabular-nums</code></a>’
  5648     appears in a general style rule and its use is mutually exclusive with
  5649     ‘<a href="#proportional-nums"><code
  5650     class=property>proportional-nums</code></a>’. Stylistic alternate sets
  5651     will only be used where MainText is used.</p>
  5652   </div>
  5654   <div class=example>
  5655    <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule can
  5656     also be used to access font features in locally available fonts via the
  5657     use of <code>local()</code> in the ‘<a href="#descdef-src"><code
  5658     class=property>src</code></a>’ descriptor of the <a
  5659     href="#at-font-face-rule"><code>@font-face</code></a> definition:</p>
  5661    <pre>@font-face {
  5662   font-family: BodyText;
  5663   src: local("HiraMaruPro-W4");
  5664   font-variant: proportional-width;
  5665   font-feature-settings: "ital"; /* Latin italics within CJK text feature */
  5668 body { font-family: BodyText, serif; }
  5669 </pre>
  5671    <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
  5672     text rendering occurs, Japanese kana will be proportionally spaced and
  5673     Latin text will be italicised. Text rendered with the fallback serif font
  5674     will use default rendering properties.</p>
  5675   </div>
  5677   <div class=example>
  5678    <p>In the example below, discretionary ligatures are enabled only for a
  5679     downloadable font but are disabled within spans of class "special":</p>
  5681    <pre>@font-face {
  5682   font-family: main;
  5683   src: url(fonts/ffmeta.woff) format("woff");
  5684   font-variant: discretionary-ligatures;
  5687 body         { font-family: main, Helvetica; }
  5688 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5689 </pre>
  5691    <p>Suppose one adds a rule using ‘<code
  5692     class=property>font-feature-settings</code>’ to enable discretionary
  5693     ligatures:</p>
  5695    <pre>body         { font-family: main, Helvetica; }
  5696 span         { font-feature-settings: "dlig"; }
  5697 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5698 </pre>
  5700    <p>In this case, discretionary ligatures <em>will</em> be rendered within
  5701     spans of class "special". This is because both the <a
  5702     href="#propdef-font-feature-settings"
  5703     title="font-feature-settings!!property">‘<code
  5704     class=property>font-feature-settings</code>’</a> and ‘<a
  5705     href="#propdef-font-variant-ligatures"><code
  5706     class=property>font-variant-ligatures</code></a>’ properties apply to
  5707     these spans. Although the ‘<code class=css>no-discretionary
  5708     ligatures</code>’ setting of ‘<a
  5709     href="#propdef-font-variant-ligatures"><code
  5710     class=property>font-variant-ligatures</code></a>’ effectively disables
  5711     the OpenType <span class=tag>dlig</span> feature, because the <a
  5712     href="#propdef-font-feature-settings"
  5713     title="font-feature-settings!!property">‘<code
  5714     class=property>font-feature-settings</code>’</a> is resolved after
  5715     that, the ‘<code class=property>dlig</code>’ value reenables
  5716     discretionary ligatures.</p>
  5717   </div>
  5719   <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
  5721   <p>The contents of <a href="#at-font-face-rule"><code>@font-face</code></a>
  5722    and <a
  5723    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5724    rules can be accessed via the following extensions to the CSS Object
  5725    Model.
  5727   <h3 id=om-fontface><span class=secno>8.1 </span>The <a
  5728    href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
  5730   <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
  5731    <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5733   <pre class=idl>
  5734 interface CSSFontFaceRule : CSSRule {
  5735   attribute DOMString family;
  5736   attribute DOMString src;
  5737   attribute DOMString style;
  5738   attribute DOMString weight;
  5739   attribute DOMString stretch;
  5740   attribute DOMString unicodeRange;
  5741   attribute DOMString variant;
  5742   attribute DOMString featureSettings;
  5743 }</pre>
  5745   <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
  5746    rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
  5747    defined a different variant of this rule. This definition supercedes that
  5748    one.
  5750   <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
  5751    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5752    interface</h3>
  5754   <p>The <code>CSSRule</code> interface is extended as follows:
  5756   <pre class=idl>partial interface CSSRule {
  5757   const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  5758 }</pre>
  5760   <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
  5761    interface represents a <a
  5762    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5763    rule.
  5765   <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
  5766   readonly attribute DOMString familyList;
  5767   readonly attribute DOMString valueText;
  5768 };</pre>
  5770   <dl class=idl-attributes>
  5771    <dt><var>familyList</var> of type <code>DOMString</code>, readonly
  5773    <dd>The list of one or more font families for which a given set of feature
  5774     values is defined.
  5776    <dt><var>valueText</var> of type <code>DOMString</code>, readonly
  5778    <dd>Serialized set of feature values.
  5779   </dl>
  5781   <p class=issue>This needs to be reworked along the lines of <a
  5782    href="http://lists.w3.org/Archives/Public/www-style/2013May/0781.html">Tab's
  5783    proposal</a> for a rule containing a family list and map objects for each
  5784    of the feature types.
  5786   <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
  5787    properties to CSS properties</h2>
  5789   <p><em>This appendix is included as background for some of the problems and
  5790    situations that are described in other sections. It should be viewed as
  5791    informative only.</em>
  5793   <p>Font properties in CSS are designed to be independent of the underlying
  5794    font formats used; they can be used to specify bitmap fonts, Type1 fonts,
  5795    SVG fonts in addition to the common TrueType and OpenType fonts. But there
  5796    are facets of the TrueType and OpenType formats that often cause confusion
  5797    for authors and present challenges to implementers on different platforms.
  5799   <p>Originally developed at Apple, TrueType was designed as an outline font
  5800    format for both screen and print. Microsoft joined Apple in developing the
  5801    TrueType format and both platforms have supported TrueType fonts since
  5802    then. Font data in the TrueType format consists of a set of tables
  5803    distinguished with common four-letter tag names, each containing a
  5804    specific type of data. For example, naming information, including
  5805    copyright and license information, is stored in the ‘<code
  5806    class=property>name</code>’ table. The <a
  5807    href="#character-map"><em>character map</em></a> (‘<code
  5808    class=property>cmap</code>’) table contains a mapping of character
  5809    encodings to glyphs. Apple later added additional tables for supporting
  5810    enhanced typographic functionality; these are now called Apple Advanced
  5811    Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
  5812    tables for advanced typography and called their format OpenType <a
  5813    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
  5815   <p>In many cases the font data used under Microsoft Windows or Linux is
  5816    slightly different from the data used under Apple's Mac OS X because the
  5817    TrueType format allowed for explicit variation across platforms. This
  5818    includes font metrics, names and <a href="#character-map"><em>character
  5819    map</em></a> data.
  5821   <p>Specifically, font family name data is handled differently across
  5822    platforms. For TrueType and OpenType fonts these names are contained in
  5823    the ‘<code class=property>name</code>’ table, in name records with
  5824    name ID 1. Mulitple names can be stored for different locales, but
  5825    Microsoft recommends fonts always include at least a US English version of
  5826    the name. On Windows, Microsoft made the decision for backwards
  5827    compatibility to limit this family name to a maximum of four faces; for
  5828    larger groupings the "preferred family" (name ID 16) or "WWS family" (name
  5829    ID 21) can be used. Other platforms such as OSX don't have this
  5830    limitation, so the family name is used to define all possible groupings.
  5832   <p>Other name table data provides names used to uniquely identify a
  5833    specific face within a family. The full font name (name ID 4) and the
  5834    Postscript name (name ID 6) describe a single face uniquely. For example,
  5835    the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
  5836    and a Postscript name of "GillSans-Bold". There can be multiple localized
  5837    versions of the fullname for a given face, but the Postscript name is
  5838    always a unique name made from a limited set of ASCII characters.
  5840   <p>On various platforms, different names are used to search for a font. For
  5841    example, with the Windows GDI CreateIndirectFont API, either a family or
  5842    fullname can be used to lookup a face, while on Mac OS X the
  5843    CTFontCreateWithName API call is used to lookup a given face using the
  5844    fullname and Postscript name. Under Linux, the fontconfig API allows fonts
  5845    to be searched using any of these names. In situations where platform
  5846    API's automatically substitute other font choices, it may be necessary to
  5847    verify a returned font matches a given name.
  5849   <p>The weight of a given face can be determined via the usWeightClass field
  5850    of the OS/2 table or inferred from the style name (name ID 2). Likewise,
  5851    the width can be determined via the usWidthClass of the OS/2 table or
  5852    inferred from the style name. For historical reasons related to synthetic
  5853    bolding at weights 200 or lower with the Windows GDI API, font designers
  5854    have sometimes skewed values in the OS/2 table to avoid these weights.
  5856   <p>Rendering complex scripts that use contextual shaping such as Thai,
  5857    Arabic and Devanagari requires features present only in OpenType or AAT
  5858    fonts. Currently, complex script rendering is supported on Windows and
  5859    Linux using OpenType font features while both OpenType and AAT font
  5860    features are used under Mac OS X.
  5862   <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
  5864   <h3 class=no-num id=recent-changes> Changes from the <a
  5865    href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">February 2013
  5866    CSS3 Fonts Working Draft</a></h3>
  5868   <p>Major changes include:
  5870   <ul>
  5871    <li>Moved font load events into a separate <a
  5872     href="http://dev.w3.org/csswg/css3-font-load-events/">spec</a>
  5874    <li>Tightened syntax rules for <a
  5875     href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5876     rules
  5878    <li>Added grammar productions for <a
  5879     href="#at-font-face-rule"><code>@font-face</code></a> and <a
  5880     href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5881     rules
  5883    <li>Tightened definition of synthetic oblique
  5885    <li>Revised definition of ‘<a href="#descdef-unicode-range"><code
  5886     class=property>unicode-range</code></a>’ descriptor
  5888    <li>Detailed font matching of composite faces
  5889   </ul>
  5891   <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
  5893   <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
  5894    their help and feedback. John Hudson was kind enough to take the time to
  5895    explain the subtleties of OpenType language tags and provided the example
  5896    of character variant usage for displaying text on Byzantine seals. Ken
  5897    Lunde and Eric Muller provided valuable feedback on CJK OpenType features
  5898    and Unicode variation selectors. The idea for supporting font features by
  5899    using <a href="#propdef-font-variant"
  5900    title="font-variant!!property">‘<code
  5901    class=property>font-variant</code>’</a> subproperties originated with
  5902    Håkon Wium Lie, Adam Twardoch and Tal Leming. Elika Etemad supplied some
  5903    of the initial design ideas for the <a
  5904    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5905    rule. Thanks also to House Industries for allowing the use of Ed Interlock
  5906    in the discretionary ligatures example.
  5908   <p>A special thanks to Robert Bringhurst for the sublime mind expansion
  5909    that is <em>The Elements of Typographic Style</em>.
  5911   <h2 class=no-num id=conformance> Conformance</h2>
  5913   <h3 class=no-num id=conventions> Document Conventions</h3>
  5915   <p>Conformance requirements are expressed with a combination of descriptive
  5916    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  5917    NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  5918    “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  5919    normative parts of this document are to be interpreted as described in RFC
  5920    2119. However, for readability, these words do not appear in all uppercase
  5921    letters in this specification.
  5923   <p>All of the text of this specification is normative except sections
  5924    explicitly marked as non-normative, examples, and notes. <a
  5925    href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  5927   <p>Examples in this specification are introduced with the words “for
  5928    example” or are set apart from the normative text with
  5929    <code>class="example"</code>, like this:
  5931   <div class=example>
  5932    <p>This is an example of an informative example.
  5933   </div>
  5935   <p>Informative notes begin with the word “Note” and are set apart from
  5936    the normative text with <code>class="note"</code>, like this:
  5938   <p class=note>Note, this is an informative note.
  5940   <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
  5942   <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
  5943    classes:
  5945   <dl>
  5946    <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  5947     sheet</dfn>
  5949    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  5950     style sheet</a>.
  5952    <dt><dfn id=renderer>renderer</dfn>
  5954    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5955     that interprets the semantics of a style sheet and renders documents that
  5956     use them.
  5958    <dt><dfn id=authoring-tool>authoring tool</dfn>
  5960    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5961     that writes a style sheet.
  5962   </dl>
  5964   <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
  5965    declarations that use properties defined in this module have values that
  5966    are valid according to the generic CSS grammar and the individual grammars
  5967    of each property as given in this module.
  5969   <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
  5970    interpreting the style sheet as defined by the appropriate specifications,
  5971    it supports all the features defined by CSS Fonts Level 3 Module by
  5972    parsing them correctly and rendering the document accordingly. However,
  5973    the inability of a UA to correctly render a document due to limitations of
  5974    the device does not make the UA non-conformant. (For example, a UA is not
  5975    required to render color on a monochrome monitor.)
  5977   <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
  5978    style sheets that are syntactically correct according to the generic CSS
  5979    grammar and the individual grammars of each feature in this module, and
  5980    meet all other conformance requirements of style sheets as described in
  5981    this module.
  5983   <h3 class=no-num id=partial> Partial Implementations</h3>
  5985   <p>So that authors can exploit the forward-compatible parsing rules to
  5986    assign fallback values, CSS renderers <strong>must</strong> treat as
  5987    invalid (and <a
  5988    href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  5989    appropriate</a>) any at-rules, properties, property values, keywords, and
  5990    other syntactic constructs for which they have no usable level of support.
  5991    In particular, user agents <strong>must not</strong> selectively ignore
  5992    unsupported component values and honor supported values in a single
  5993    multi-value property declaration: if any value is considered invalid (as
  5994    unsupported values must be), CSS requires that the entire declaration be
  5995    ignored.
  5997   <h3 class=no-num id=experimental> Experimental Implementations</h3>
  5999   <p>To avoid clashes with future CSS features, the CSS2.1 specification
  6000    reserves a <a
  6001    href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  6002    syntax</a> for proprietary and experimental extensions to CSS.
  6004   <p>Prior to a specification reaching the Candidate Recommendation stage in
  6005    the W3C process, all implementations of a CSS feature are considered
  6006    experimental. The CSS Working Group recommends that implementations use a
  6007    vendor-prefixed syntax for such features, including those in W3C Working
  6008    Drafts. This avoids incompatibilities with future changes in the draft.
  6010   <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
  6012   <p>Once a specification reaches the Candidate Recommendation stage,
  6013    non-experimental implementations are possible, and implementors should
  6014    release an unprefixed implementation of any CR-level feature they can
  6015    demonstrate to be correctly implemented according to spec.
  6017   <p>To establish and maintain the interoperability of CSS across
  6018    implementations, the CSS Working Group requests that non-experimental CSS
  6019    renderers submit an implementation report (and, if necessary, the
  6020    testcases used for that implementation report) to the W3C before releasing
  6021    an unprefixed implementation of any CSS features. Testcases submitted to
  6022    W3C are subject to review and correction by the CSS Working Group.
  6024   <p>Further information on submitting testcases and implementation reports
  6025    can be found from on the CSS Working Group's website at <a
  6026    href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  6027    Questions should be directed to the <a
  6028    href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  6029    mailing list.
  6031   <h2 class=no-num id=references>References</h2>
  6033   <h3 class=no-num id=normative-references>Normative References</h3>
  6034   <!--begin-normative-->
  6035   <!-- Sorted by label -->
  6037   <dl class=bibliography>
  6038    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6039     <!---->
  6041    <dt id=CHARMOD>[CHARMOD]
  6043    <dd>Martin J. Dürst; et al. <a
  6044     href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
  6045     Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
  6046     2005. W3C Recommendation. URL: <a
  6047     href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
  6048     </dd>
  6049    <!---->
  6051    <dt id=CORS>[CORS]
  6053    <dd>Anne van Kesteren. <a
  6054     href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
  6055     Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
  6056     Recommendation. (Work in progress.) URL: <a
  6057     href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
  6058     </dd>
  6059    <!---->
  6061    <dt id=CSS21>[CSS21]
  6063    <dd>Bert Bos; et al. <a
  6064     href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  6065     Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  6066     2011. W3C Recommendation. URL: <a
  6067     href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  6068     </dd>
  6069    <!---->
  6071    <dt id=CSS3VAL>[CSS3VAL]
  6073    <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  6074     href="http://www.w3.org/TR/2013/CR-css3-values-20130404/"><cite>CSS
  6075     Values and Units Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  6076     Recommendation. (Work in progress.) URL: <a
  6077     href="http://www.w3.org/TR/2013/CR-css3-values-20130404/">http://www.w3.org/TR/2013/CR-css3-values-20130404/</a>
  6078     </dd>
  6079    <!---->
  6081    <dt id=HTML5>[HTML5]
  6083    <dd>Ian Hickson. <a
  6084     href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
  6085     17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
  6086     <a
  6087     href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
  6088     </dd>
  6089    <!---->
  6091    <dt id=OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
  6093    <dd><a
  6094     href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip"><cite>Information
  6095     technology — Coding of audio-visual objects — Part 22: Open Font
  6096     Format.</cite></a> International Organization for Standardization.
  6097     ISO/IEC 14496-22:2009. URL: <a
  6098     href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip">http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip</a>
  6099     </dd>
  6100    <!---->
  6102    <dt id=OPENTYPE>[OPENTYPE]
  6104    <dd><a
  6105     href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
  6106     specification.</cite></a> Microsoft. URL: <a
  6107     href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
  6108     </dd>
  6109    <!---->
  6111    <dt id=OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
  6113    <dd><a
  6114     href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
  6115     feature registry.</cite></a> Microsoft. URL: <a
  6116     href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
  6117     </dd>
  6118    <!---->
  6120    <dt id=RFC2119>[RFC2119]
  6122    <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  6123     words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  6124     RFC 2119. URL: <a
  6125     href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  6126     </dd>
  6127    <!---->
  6129    <dt id=UAX15>[UAX15]
  6131    <dd>Mark Davis; Ken Whistler. <a
  6132     href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
  6133     Forms.</cite></a> 31 August 2012. Unicode Standard Annex #15. URL: <a
  6134     href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
  6135     </dd>
  6136    <!---->
  6138    <dt id=UAX29>[UAX29]
  6140    <dd>Mark Davis. <a
  6141     href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
  6142     Segmentation.</cite></a> 12 September 2012. Unicode Standard Annex #29.
  6143     URL: <a
  6144     href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
  6145     </dd>
  6146    <!---->
  6148    <dt id=UNICODE6>[UNICODE6]
  6150    <dd>The Unicode Consortium. <a
  6151     href="http://www.unicode.org/versions/Unicode6.2.0/"><cite>The Unicode
  6152     Standard, Version 6.2.0.</cite></a> Defined by: The Unicode Standard,
  6153     Version 6.2.0 URL: <a
  6154     href="http://www.unicode.org/versions/Unicode6.2.0/">http://www.unicode.org/versions/Unicode6.2.0/</a>
  6155     </dd>
  6156    <!---->
  6157   </dl>
  6158   <!--end-normative-->
  6159   <!--{{!CSS21}}-->
  6160   <!--{{!CSS3VAL}}-->
  6161   <!--{{!OPENTYPE}}-->
  6162   <!--{{!OPENTYPE-FEATURES}}-->
  6163   <!--{{!OPEN-FONT-FORMAT}}-->
  6164   <!--{{!UNICODE6}}-->
  6165   <!--{{!UAX15}}-->
  6166   <!--{{!UAX29}}-->
  6167   <!--{{!CORS}}-->
  6168   <!--{{!HTML5}}-->
  6169   <!--{{!CHARMOD}}-->
  6171   <h3 class=no-num id=other-references>Other References</h3>
  6172   <!--begin-informative-->
  6173   <!-- Sorted by label -->
  6175   <dl class=bibliography>
  6176    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6177     <!---->
  6179    <dt id=AAT-FEATURES>[AAT-FEATURES]
  6181    <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
  6182     Advanced Typography font feature registry.</cite></a> Apple. URL: <a
  6183     href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
  6184     </dd>
  6185    <!---->
  6187    <dt id=ARABIC-TYPO>[ARABIC-TYPO]
  6189    <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
  6190     Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
  6191    <!---->
  6193    <dt id=CHARMOD-NORM>[CHARMOD-NORM]
  6195    <dd>François Yergeau; et al. <a
  6196     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
  6197     Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
  6198     W3C Working Draft. (Work in progress.) URL: <a
  6199     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
  6200     </dd>
  6201    <!---->
  6203    <dt id=CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
  6205    <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
  6206     O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
  6207    <!---->
  6209    <dt id=CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
  6211    <dd>L. David Baron. <a
  6212     href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/"><cite>CSS
  6213     Conditional Rules Module Level 3.</cite></a> 4 April 2013. W3C Candidate
  6214     Recommendation. (Work in progress.) URL: <a
  6215     href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/">http://www.w3.org/TR/2013/CR-css3-conditional-20130404/</a>
  6216     </dd>
  6217    <!---->
  6219    <dt id=CSS3TEXT>[CSS3TEXT]
  6221    <dd>Elika J. Etemad; Koji Ishii. <a
  6222     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
  6223     Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
  6224     progress.) URL: <a
  6225     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
  6226     </dd>
  6227    <!---->
  6229    <dt id=DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
  6231    <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
  6232     and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
  6233     ISBN 0-201-17633-5.</dd>
  6234    <!---->
  6236    <dt id=DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
  6238    <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
  6239     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
  6240     Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
  6241     2000. W3C Recommendation. URL: <a
  6242     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>
  6243     </dd>
  6244    <!---->
  6246    <dt id=ELEMTYPO>[ELEMTYPO]
  6248    <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
  6249     4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
  6250    <!---->
  6252    <dt id=LANGCULTTYPE>[LANGCULTTYPE]
  6254    <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
  6255     ISBN 1-932026-01-0.</dd>
  6256    <!---->
  6258    <dt id=OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
  6260    <dd><a
  6261     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
  6262     User Guide.</cite></a> FontShop International. URL: <a
  6263     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
  6264     </dd>
  6265    <!---->
  6267    <dt id=RASTER-TRAGEDY>[RASTER-TRAGEDY]
  6269    <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
  6270     Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
  6271     href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
  6272    <!---->
  6274    <dt id=WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
  6276    <dd>John Hudson. <a
  6277     href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
  6278     Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
  6279     href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
  6280     </dd>
  6281    <!---->
  6282   </dl>
  6283   <!--end-informative-->
  6284   <!--{{ARABIC-TYPO}}-->
  6285   <!--{{CJKV-INFO-PROCESSING}}-->
  6286   <!--{{DIGITAL-TYPOGRAPHY}}-->
  6287   <!--{{DOM-LEVEL-2-STYLE}}-->
  6288   <!--{{ELEMTYPO}}-->
  6289   <!--{{LANGCULTTYPE}}-->
  6290   <!--{{OPENTYPE-FONT-GUIDE}}-->
  6291   <!--{{RASTER-TRAGEDY}}-->
  6292   <!--{{WINDOWS-GLYPH-PROC}}-->
  6293   <!--{{CHARMOD-NORM}}-->
  6294   <!--{{AAT-FEATURES}}-->
  6295   <!--{{CSS3-CONDITIONAL}}-->
  6296   <!--{{CSS3TEXT}}-->
  6298   <h2 class=no-num id=index>Index</h2>
  6299   <!--begin-index-->
  6301   <ul class=indexlist>
  6302    <li>100...900 weight values, <a href="#font-weight-numeric-values"
  6303     title="100...900 weight values"><strong>3.2</strong></a>
  6305    <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
  6306     title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
  6308    <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
  6309     title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
  6311    <li><var>&lt;contextual-alt-values&gt;</var>, <a
  6312     href="#contextual-alt-values"
  6313     title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
  6315    <li><var>&lt;discretionary-lig-values&gt;</var>, <a
  6316     href="#discretionary-lig-values"
  6317     title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
  6319    <li><var>&lt;east-asian-variant-values&gt;</var>, <a
  6320     href="#east-asian-variant-values"
  6321     title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
  6323    <li><var>&lt;east-asian-width-values&gt;</var>, <a
  6324     href="#east-asian-width-values"
  6325     title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
  6327    <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
  6328     title="&lt;family-name&gt;"><strong>3.1</strong></a>
  6330    <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
  6331     title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
  6333    <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
  6334     title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
  6336    <li><var>&lt;font-variant-css21&gt;</var>, <a
  6337     href="#font-variant-css21-values"
  6338     title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
  6340    <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
  6341     title="&lt;generic-family&gt;"><strong>3.1</strong></a>
  6343    <li><var>&lt;historical-lig-values&gt;</var>, <a
  6344     href="#historical-lig-values"
  6345     title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
  6347    <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
  6348     title="&lt;length&gt;"><strong>3.5</strong></a>
  6350    <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
  6351     title="&lt;number&gt;"><strong>3.6</strong></a>
  6353    <li><var>&lt;numeric-figure-values&gt;</var>, <a
  6354     href="#numeric-figure-values"
  6355     title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
  6357    <li><var>&lt;numeric-fraction-values&gt;</var>, <a
  6358     href="#numeric-fraction-values"
  6359     title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
  6361    <li><var>&lt;numeric-spacing-values&gt;</var>, <a
  6362     href="#numeric-spacing-values"
  6363     title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
  6365    <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
  6366     title="&lt;percentage&gt;"><strong>3.5</strong></a>
  6368    <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
  6369     title="&lt;relative-size&gt;"><strong>3.5</strong></a>
  6371    <li><var>&lt;string&gt;</var>, <a
  6372     href="#font-language-override-string-value"
  6373     title="&lt;string&gt;"><strong>6.13</strong></a>
  6375    <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
  6376     title="&lt;urange&gt;"><strong>4.5</strong></a>
  6378    <li><code>@font-face</code>, <a href="#at-font-face-rule"
  6379     title="@font-face"><strong>4.1</strong></a>
  6381    <li><code>@font-feature-values</code>, <a
  6382     href="#at-font-feature-values-rule"
  6383     title="@font-feature-values"><strong>6.9</strong></a>
  6385    <li>all-petite-caps, <a href="#all-petite-caps"
  6386     title=all-petite-caps><strong>6.6</strong></a>
  6388    <li>all-small-caps, <a href="#all-small-caps"
  6389     title=all-small-caps><strong>6.6</strong></a>
  6391    <li>annotation, <a href="#annotation"
  6392     title=annotation><strong>6.8</strong></a>
  6394    <li>aspect value, <a href="#aspect-value0" title="aspect
  6395     value"><strong>3.6</strong></a>
  6397    <li>authoring tool, <a href="#authoring-tool" title="authoring
  6398     tool"><strong>#</strong></a>
  6400    <li>auto
  6401     <ul>
  6402      <li>font-kerning, <a href="#font-kerning-auto-value" title="auto,
  6403       font-kerning"><strong>6.3</strong></a>
  6405      <li>font-size-adjust, <a href="#font-size-adjust-auto-value"
  6406       title="auto, font-size-adjust"><strong>3.6</strong></a>
  6407     </ul>
  6409    <li>bold, <a href="#bold" title=bold><strong>3.2</strong></a>
  6411    <li>bolder, <a href="#bolder" title=bolder><strong>3.2</strong></a>
  6413    <li>character map, <a href="#character-map" title="character
  6414     map"><strong>5.2</strong></a>
  6416    <li>character-variant, <a href="#character-variant"
  6417     title=character-variant><strong>6.8</strong></a>
  6419    <li>common-ligatures, <a href="#common-ligatures"
  6420     title=common-ligatures><strong>6.4</strong></a>
  6422    <li>composite face, <a href="#composite-face" title="composite
  6423     face"><strong>5.2</strong></a>
  6425    <li>condensed, <a href="#condensed"
  6426     title=condensed><strong>3.3</strong></a>
  6428    <li>contextual, <a href="#contextual"
  6429     title=contextual><strong>6.4</strong></a>
  6431    <li>CSSFontFaceRule, <a href="#cssfontfacerule"
  6432     title=CSSFontFaceRule><strong>8.1</strong></a>
  6434    <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
  6435     title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
  6437    <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
  6438     of"><strong>#</strong></a>
  6440    <li>default face, <a href="#default-face" title="default
  6441     face"><strong>5.2</strong></a>
  6443    <li>descriptor_declaration, <a href="#descriptordeclaration"
  6444     title="descriptor_declaration"><strong>4.1</strong></a>
  6446    <li>diagonal-fractions, <a href="#diagonal-fractions"
  6447     title=diagonal-fractions><strong>6.7</strong></a>
  6449    <li>discretionary-ligatures, <a href="#discretionary-ligatures"
  6450     title=discretionary-ligatures><strong>6.4</strong></a>
  6452    <li>effective character map, <a href="#effective-character-map"
  6453     title="effective character map"><strong>4.5</strong></a>
  6455    <li>expanded, <a href="#expanded" title=expanded><strong>3.3</strong></a>
  6457    <li>extra-condensed, <a href="#extra-condensed"
  6458     title=extra-condensed><strong>3.3</strong></a>
  6460    <li>extra-expanded, <a href="#extra-expanded"
  6461     title=extra-expanded><strong>3.3</strong></a>
  6463    <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
  6464     of"><strong>#</strong></a>
  6466    <li>feature_type, <a href="#featuretype"
  6467     title="feature_type"><strong>6.9.1</strong></a>
  6469    <li>feature_value_block, <a href="#featurevalueblock"
  6470     title="feature_value_block"><strong>6.9.1</strong></a>
  6472    <li>feature_value_definition, <a href="#featurevaluedefinition"
  6473     title="feature_value_definition"><strong>6.9.1</strong></a>
  6475    <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
  6477    <li>font specific, <a href="#font-specific" title="font
  6478     specific"><strong>6.8</strong></a>
  6480    <li>font-family
  6481     <ul>
  6482      <li>descriptor, <a href="#descdef-font-family" title="font-family,
  6483       descriptor"><strong>4.2</strong></a>
  6485      <li>property, <a href="#propdef-font-family" title="font-family,
  6486       property"><strong>3.1</strong></a>
  6487     </ul>
  6489    <li>font-feature-settings
  6490     <ul>
  6491      <li>descriptor, <a href="#descdef-font-feature-settings"
  6492       title="font-feature-settings, descriptor"><strong>4.7</strong></a>
  6494      <li>property, <a href="#propdef-font-feature-settings"
  6495       title="font-feature-settings, property"><strong>6.12</strong></a>
  6496     </ul>
  6498    <li>font-kerning, <a href="#propdef-font-kerning"
  6499     title=font-kerning><strong>6.3</strong></a>
  6501    <li>font-language-override, <a href="#propdef-font-language-override"
  6502     title=font-language-override><strong>6.13</strong></a>
  6504    <li>font-size, <a href="#propdef-font-size"
  6505     title=font-size><strong>3.5</strong></a>
  6507    <li>font-size-adjust, <a href="#propdef-font-size-adjust"
  6508     title=font-size-adjust><strong>3.6</strong></a>
  6510    <li>font-stretch
  6511     <ul>
  6512      <li>descriptor, <a href="#descdef-font-stretch" title="font-stretch,
  6513       descriptor"><strong>4.4</strong></a>
  6515      <li>property, <a href="#propdef-font-stretch" title="font-stretch,
  6516       property"><strong>3.3</strong></a>
  6517     </ul>
  6519    <li>font-style
  6520     <ul>
  6521      <li>descriptor, <a href="#descdef-font-style" title="font-style,
  6522       descriptor"><strong>4.4</strong></a>
  6524      <li>property, <a href="#propdef-font-style" title="font-style,
  6525       property"><strong>3.4</strong></a>
  6526     </ul>
  6528    <li>font-synthesis, <a href="#propdef-font-synthesis"
  6529     title=font-synthesis><strong>3.8</strong></a>
  6531    <li>font-variant
  6532     <ul>
  6533      <li>descriptor, <a href="#descdef-font-variant" title="font-variant,
  6534       descriptor"><strong>4.7</strong></a>
  6536      <li>property, <a href="#propdef-font-variant" title="font-variant,
  6537       property"><strong>6.11</strong></a>
  6538     </ul>
  6540    <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
  6541     title=font-variant-alternates><strong>6.8</strong></a>
  6543    <li>font-variant-caps, <a href="#propdef-font-variant-caps"
  6544     title=font-variant-caps><strong>6.6</strong></a>
  6546    <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
  6547     title=font-variant-east-asian><strong>6.10</strong></a>
  6549    <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
  6550     title=font-variant-ligatures><strong>6.4</strong></a>
  6552    <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
  6553     title=font-variant-numeric><strong>6.7</strong></a>
  6555    <li>font-variant-position, <a href="#propdef-font-variant-position"
  6556     title=font-variant-position><strong>6.5</strong></a>
  6558    <li>font-weight
  6559     <ul>
  6560      <li>descriptor, <a href="#descdef-font-weight" title="font-weight,
  6561       descriptor"><strong>4.4</strong></a>
  6563      <li>property, <a href="#propdef-font-weight" title="font-weight,
  6564       property"><strong>3.2</strong></a>
  6565     </ul>
  6567    <li>font_face_rule, <a href="#fontfacerule"
  6568     title="font_face_rule"><strong>4.1</strong></a>
  6570    <li>FONT_FACE_SYM, <a href="#fontfacesym"
  6571     title="FONT_FACE_SYM"><strong>4.1</strong></a>
  6573    <li>font_family_name, <a href="#fontfamilyname"
  6574     title="font_family_name"><strong>6.9.1</strong></a>
  6576    <li>font_family_name_list, <a href="#fontfamilynamelist"
  6577     title="font_family_name_list"><strong>6.9.1</strong></a>
  6579    <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
  6580     title="font_feature_values_rule"><strong>6.9.1</strong></a>
  6582    <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
  6583     title="FONT_FEATURE_VALUES_SYM"><strong>6.9.1</strong></a>
  6585    <li>full-width, <a href="#full-width"
  6586     title=full-width><strong>6.10</strong></a>
  6588    <li>historical-forms, <a href="#historical-forms"
  6589     title=historical-forms><strong>6.8</strong></a>
  6591    <li>historical-ligatures, <a href="#historical-ligatures"
  6592     title=historical-ligatures><strong>6.4</strong></a>
  6594    <li>italic, <a href="#italic" title=italic><strong>3.4</strong></a>
  6596    <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
  6598    <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
  6600    <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
  6602    <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
  6604    <li>lighter, <a href="#lighter" title=lighter><strong>3.2</strong></a>
  6606    <li>lining-nums, <a href="#lining-nums"
  6607     title=lining-nums><strong>6.7</strong></a>
  6609    <li>monospace, definition of, <a href="#monospace0" title="monospace,
  6610     definition of"><strong>#</strong></a>
  6612    <li>no-common-ligatures, <a href="#no-common-ligatures"
  6613     title=no-common-ligatures><strong>6.4</strong></a>
  6615    <li>no-contextual, <a href="#no-contextual"
  6616     title=no-contextual><strong>6.4</strong></a>
  6618    <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
  6619     title=no-discretionary-ligatures><strong>6.4</strong></a>
  6621    <li>no-historical-ligatures, <a href="#no-historical-ligatures"
  6622     title=no-historical-ligatures><strong>6.4</strong></a>
  6624    <li>none
  6625     <ul>
  6626      <li>font-kerning, <a href="#font-kerning-none-value" title="none,
  6627       font-kerning"><strong>6.3</strong></a>
  6629      <li>font-size-adjust, <a href="#font-size-adjust-none-value"
  6630       title="none, font-size-adjust"><strong>3.6</strong></a>
  6632      <li>font-variant, <a href="#font-variant-none-value" title="none,
  6633       font-variant"><strong>6.11</strong></a>
  6635      <li>font-variant-ligatures, <a href="#font-variant-ligatures-none-value"
  6636       title="none, font-variant-ligatures"><strong>6.4</strong></a>
  6637     </ul>
  6639    <li>normal
  6640     <ul>
  6641      <li>font-feature-settings, <a href="#font-feature-settings-normal-value"
  6642       title="normal, font-feature-settings"><strong>6.12</strong></a>
  6644      <li>font-kerning, <a href="#font-kerning-normal-value" title="normal,
  6645       font-kerning"><strong>6.3</strong></a>
  6647      <li>font-language-override, <a
  6648       href="#font-language-override-normal-value" title="normal,
  6649       font-language-override"><strong>6.13</strong></a>
  6651      <li>font-stretch, <a href="#font-stretch-normal-value" title="normal,
  6652       font-stretch"><strong>3.3</strong></a>
  6654      <li>font-style, <a href="#font-style-normal-value" title="normal,
  6655       font-style"><strong>3.4</strong></a>
  6657      <li>font-variant, <a href="#font-variant-normal-value" title="normal,
  6658       font-variant"><strong>6.11</strong></a>
  6660      <li>font-variant-alternates, <a
  6661       href="#font-variant-alternates-normal-value" title="normal,
  6662       font-variant-alternates"><strong>6.8</strong></a>
  6664      <li>font-variant-caps, <a href="#font-variant-caps-normal-value"
  6665       title="normal, font-variant-caps"><strong>6.6</strong></a>
  6667      <li>font-variant-east-asian, <a
  6668       href="#font-variant-east-asian-normal-value" title="normal,
  6669       font-variant-east-asian"><strong>6.10</strong></a>
  6671      <li>font-variant-ligatures, <a
  6672       href="#font-variant-ligatures-normal-value" title="normal,
  6673       font-variant-ligatures"><strong>6.4</strong></a>
  6675      <li>font-variant-numeric, <a href="#font-variant-numeric-normal-value"
  6676       title="normal, font-variant-numeric"><strong>6.7</strong></a>
  6678      <li>font-variant-position, <a href="#font-variant-position-normal-value"
  6679       title="normal, font-variant-position"><strong>6.5</strong></a>
  6681      <li>font-weight, <a href="#font-weight-normal-value" title="normal,
  6682       font-weight"><strong>3.2</strong></a>
  6683     </ul>
  6685    <li>oblique, <a href="#oblique" title=oblique><strong>3.4</strong></a>
  6687    <li>oldstyle-nums, <a href="#oldstyle-nums"
  6688     title=oldstyle-nums><strong>6.7</strong></a>
  6690    <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
  6692    <li>ornaments, <a href="#ornaments"
  6693     title=ornaments><strong>6.8</strong></a>
  6695    <li>petite-caps, <a href="#petite-caps"
  6696     title=petite-caps><strong>6.6</strong></a>
  6698    <li>proportional-nums, <a href="#proportional-nums"
  6699     title=proportional-nums><strong>6.7</strong></a>
  6701    <li>proportional-width, <a href="#proportional-width"
  6702     title=proportional-width><strong>6.10</strong></a>
  6704    <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
  6706    <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
  6708    <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
  6709     definition of"><strong>#</strong></a>
  6711    <li>semi-condensed, <a href="#semi-condensed-"
  6712     title=semi-condensed><strong>3.3</strong></a>
  6714    <li>semi-expanded, <a href="#semi-expanded"
  6715     title=semi-expanded><strong>3.3</strong></a>
  6717    <li>serif, definition of, <a href="#serif0" title="serif, definition
  6718     of"><strong>#</strong></a>
  6720    <li>simplified, <a href="#simplified"
  6721     title=simplified><strong>6.10</strong></a>
  6723    <li>slashed-zero, <a href="#slashed-zero"
  6724     title=slashed-zero><strong>6.7</strong></a>
  6726    <li>small-caps, <a href="#small-caps"
  6727     title=small-caps><strong>6.6</strong></a>
  6729    <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
  6731    <li>stacked-fractions, <a href="#stacked-fractions"
  6732     title=stacked-fractions><strong>6.7</strong></a>
  6734    <li>style sheet
  6735     <ul>
  6736      <li>as conformance class, <a href="#style-sheet" title="style sheet, as
  6737       conformance class"><strong>#</strong></a>
  6738     </ul>
  6740    <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
  6742    <li>stylistic, <a href="#stylistic"
  6743     title=stylistic><strong>6.8</strong></a>
  6745    <li>sub, <a href="#sub" title=sub><strong>6.5</strong></a>
  6747    <li>super, <a href="#super" title=super><strong>6.5</strong></a>
  6749    <li>support, <a href="#support" title=support><strong>5.2</strong></a>
  6751    <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
  6753    <li>system font fallback, <a href="#system-font-fallback" title="system
  6754     font fallback"><strong>5.2</strong></a>
  6756    <li>tabular-nums, <a href="#tabular-nums"
  6757     title=tabular-nums><strong>6.7</strong></a>
  6759    <li>titling-caps, <a href="#titling-caps"
  6760     title=titling-caps><strong>6.6</strong></a>
  6762    <li>traditional, <a href="#traditional"
  6763     title=traditional><strong>6.10</strong></a>
  6765    <li>ultra-condensed, <a href="#ultra-condensed"
  6766     title=ultra-condensed><strong>3.3</strong></a>
  6768    <li>ultra-expanded, <a href="#ultra-expanded"
  6769     title=ultra-expanded><strong>3.3</strong></a>
  6771    <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
  6773    <li>unicode-range, <a href="#descdef-unicode-range"
  6774     title=unicode-range><strong>4.5</strong></a>
  6776    <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
  6778    <li>width, <a href="#width" title=width><strong>2</strong></a>
  6779   </ul>
  6780   <!--end-index-->
  6782   <h2 class=no-num id=property-index>Property index</h2>
  6783   <!--begin-properties-->
  6785   <table class=proptable>
  6786    <thead>
  6787     <tr>
  6788      <th>Property
  6790      <th>Values
  6792      <th>Initial
  6794      <th>Applies to
  6796      <th>Inh.
  6798      <th>Percentages
  6800      <th>Media
  6802    <tbody>
  6803     <tr>
  6804      <th><a class=property href="#propdef-font">font</a>
  6806      <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
  6807       &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
  6808       &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
  6809       &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
  6810       small-caption | status-bar
  6812      <td>see individual properties
  6814      <td>all elements
  6816      <td>yes
  6818      <td>see individual properties
  6820      <td>visual
  6822     <tr>
  6823      <th><span class=property>font-family</span>
  6825      <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
  6827      <td>depends on user agent
  6829      <td>all elements
  6831      <td>yes
  6833      <td>N/A
  6835      <td>visual
  6837     <tr>
  6838      <th><span class=property>font-feature-settings</span>
  6840      <td>normal | &lt;feature-tag-value&gt; #
  6842      <td>normal
  6844      <td>all elements
  6846      <td>yes
  6848      <td>N/A
  6850      <td>visual
  6852     <tr>
  6853      <th><a class=property href="#propdef-font-kerning">font-kerning</a>
  6855      <td>auto | normal | none
  6857      <td>auto
  6859      <td>all elements
  6861      <td>yes
  6863      <td>N/A
  6865      <td>visual
  6867     <tr>
  6868      <th><a class=property
  6869       href="#propdef-font-language-override">font-language-override</a>
  6871      <td>normal | &lt;string&gt;
  6873      <td>normal
  6875      <td>all elements
  6877      <td>yes
  6879      <td>N/A
  6881      <td>visual
  6883     <tr>
  6884      <th><a class=property href="#propdef-font-size">font-size</a>
  6886      <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
  6887       &lt;percentage&gt;
  6889      <td>medium
  6891      <td>all elements
  6893      <td>yes
  6895      <td>refer to parent element's font size
  6897      <td>visual
  6899     <tr>
  6900      <th><a class=property
  6901       href="#propdef-font-size-adjust">font-size-adjust</a>
  6903      <td>none | auto | &lt;number&gt;
  6905      <td>none
  6907      <td>all elements
  6909      <td>yes
  6911      <td>N/A
  6913      <td>visual
  6915     <tr>
  6916      <th><span class=property>font-stretch</span>
  6918      <td>normal | ultra-condensed | extra-condensed | condensed |
  6919       semi-condensed | semi-expanded | expanded | extra-expanded |
  6920       ultra-expanded
  6922      <td>normal
  6924      <td>all elements
  6926      <td>yes
  6928      <td>N/A
  6930      <td>visual
  6932     <tr>
  6933      <th><span class=property>font-style</span>
  6935      <td>normal | italic | oblique
  6937      <td>normal
  6939      <td>all elements
  6941      <td>yes
  6943      <td>N/A
  6945      <td>visual
  6947     <tr>
  6948      <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
  6950      <td>none | [ weight || style ]
  6952      <td>weight style
  6954      <td>all elements
  6956      <td>yes
  6958      <td>N/A
  6960      <td>visual
  6962     <tr>
  6963      <th><span class=property>font-variant</span>
  6965      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6966       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6967       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  6968       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  6969       character-variant(&lt;feature-value-name&gt; #) ||
  6970       swash(&lt;feature-value-name&gt;) ||
  6971       ornaments(&lt;feature-value-name&gt;) ||
  6972       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  6973       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  6974       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  6975       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  6976       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  6977       ruby ]
  6979      <td>normal
  6981      <td>all elements
  6983      <td>yes
  6985      <td>see individual properties
  6987      <td>visual
  6989     <tr>
  6990      <th><a class=property
  6991       href="#propdef-font-variant-alternates">font-variant-alternates</a>
  6993      <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
  6994       || styleset(&lt;feature-value-name&gt; #) ||
  6995       character-variant(&lt;feature-value-name&gt; #) ||
  6996       swash(&lt;feature-value-name&gt;) ||
  6997       ornaments(&lt;feature-value-name&gt;) ||
  6998       annotation(&lt;feature-value-name&gt;) ]
  7000      <td>normal
  7002      <td>all elements
  7004      <td>yes
  7006      <td>N/A
  7008      <td>visual
  7010     <tr>
  7011      <th><a class=property
  7012       href="#propdef-font-variant-caps">font-variant-caps</a>
  7014      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  7015       | unicase | titling-caps
  7017      <td>normal
  7019      <td>all elements
  7021      <td>yes
  7023      <td>N/A
  7025      <td>visual
  7027     <tr>
  7028      <th><a class=property
  7029       href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  7031      <td>normal | [ &lt;east-asian-variant-values&gt; ||
  7032       &lt;east-asian-width-values&gt; || ruby ]
  7034      <td>normal
  7036      <td>all elements
  7038      <td>yes
  7040      <td>N/A
  7042      <td>visual
  7044     <tr>
  7045      <th><a class=property
  7046       href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  7048      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7049       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7050       &lt;contextual-alt-values&gt; ]
  7052      <td>normal
  7054      <td>all elements
  7056      <td>yes
  7058      <td>N/A
  7060      <td>visual
  7062     <tr>
  7063      <th><a class=property
  7064       href="#propdef-font-variant-numeric">font-variant-numeric</a>
  7066      <td>normal | [ &lt;numeric-figure-values&gt; ||
  7067       &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
  7068       ordinal || slashed-zero ]
  7070      <td>normal
  7072      <td>all elements
  7074      <td>yes
  7076      <td>N/A
  7078      <td>visual
  7080     <tr>
  7081      <th><a class=property
  7082       href="#propdef-font-variant-position">font-variant-position</a>
  7084      <td>normal | sub | super
  7086      <td>normal
  7088      <td>all elements
  7090      <td>yes
  7092      <td>N/A
  7094      <td>visual
  7096     <tr>
  7097      <th><span class=property>font-weight</span>
  7099      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
  7100       | 700 | 800 | 900
  7102      <td>normal
  7104      <td>all elements
  7106      <td>yes
  7108      <td>N/A
  7110      <td>visual
  7111   </table>
  7112   <!--end-properties-->
  7113   <!--begin-descriptors-->
  7115   <table class=proptable>
  7116    <thead>
  7117     <tr>
  7118      <th>Descriptor
  7120      <th>Value
  7122      <th>Initial
  7124      <th>Percentages
  7126      <th>Media
  7128    <tbody>
  7129     <tr>
  7130      <th><span class=property>font-family</span>
  7132      <td>&lt;family-name&gt;
  7134      <td>N/A
  7136     <tr>
  7137      <th><span class=property>font-feature-settings</span>
  7139      <td>normal | &lt;feature-tag-value&gt; #
  7141      <td>normal
  7143     <tr>
  7144      <th><span class=property>font-stretch</span>
  7146      <td>normal | ultra-condensed | extra-condensed | condensed |
  7147       semi-condensed | semi-expanded | expanded | extra-expanded |
  7148       ultra-expanded
  7150      <td>normal
  7152     <tr>
  7153      <th><span class=property>font-style</span>
  7155      <td>normal | italic | oblique
  7157      <td>normal
  7159     <tr>
  7160      <th><span class=property>font-variant</span>
  7162      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7163       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7164       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  7165       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  7166       character-variant(&lt;feature-value-name&gt; #) ||
  7167       swash(&lt;feature-value-name&gt;) ||
  7168       ornaments(&lt;feature-value-name&gt;) ||
  7169       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  7170       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  7171       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  7172       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  7173       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  7174       ruby ]
  7176      <td>normal
  7178     <tr>
  7179      <th><span class=property>font-weight</span>
  7181      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  7183      <td>normal
  7185     <tr>
  7186      <th><a class=property href="#descdef-src">src</a>
  7188      <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
  7190      <td>N/A
  7192     <tr>
  7193      <th><a class=property href="#descdef-unicode-range">unicode-range</a>
  7195      <td>&lt;urange&gt; #
  7197      <td>U+0-10FFFF
  7198   </table>
  7199   <!--end-descriptors-->
  7200   <script type="text/javascript">
  7201 window.onload = function () {
  7202   if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
  7203   var i, hiresElements = document.getElementsByClassName("hires");
  7204   for (i = 0; i < hiresElements.length; i++) {
  7205     var h = hiresElements[i];
  7206     if (h.tagName != "IMG") continue;
  7207     var src = h.getAttribute("src");
  7208     var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
  7209     h.src = src2x;
  7212 </script>
  7213 </html>
  7214 <!-- Keep this comment at the end of the file
  7215 Local variables:
  7216 mode: sgml
  7217 sgml-declaration:"~/SGML/HTML4.decl"
  7218 sgml-default-doctype-name:"html"
  7219 sgml-minimize-attributes:t
  7220 sgml-nofill-elements:("pre" "style" "br")
  7221 sgml-live-element-indicator:t
  7222 sgml-omittag:nil
  7223 sgml-shorttag:nil
  7224 sgml-namecase-general:t
  7225 sgml-general-insert-case:lower
  7226 sgml-always-quote-attributes:t
  7227 sgml-indent-step:nil
  7228 sgml-indent-data:t
  7229 sgml-parent-document:nil
  7230 sgml-exposed-tags:nil
  7231 sgml-local-catalogs:nil
  7232 sgml-local-ecat-files:nil
  7233 End:
  7234 -->
  7235 <!--
  7237 to do:
  7239 - wording of OpenType family name handling
  7240 - handling combining sequences in the font matching algorithm
  7241 - fix-up fi ligature example
  7243 -->

mercurial