css-fonts/Fonts.html

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

author
John Daggett <jdaggett@mozilla.com>
date
Thu, 30 May 2013 11:39:14 +0900
changeset 8276
bf52664a49ae
parent 8272
5e29c9d80cca
child 8277
a09de2f3e565
permissions
-rw-r--r--

[css-fonts] rework font-kerning description

     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">
   108  <body>
   109   <div class=head> <!--begin-logo-->
   110    <p><a href="http://www.w3.org/"><img alt=W3C height=48
   111     src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
   113    <h1>CSS Fonts Module Level 3</h1>
   115    <h2 class="no-num no-toc" id=editors-draft-29-may-2013>Editor's Draft 29
   116     May 2013</h2>
   118    <dl id=authors>
   119     <dt>This version:
   121     <dd><a
   122      href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
   123      <!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130529/">http://www.w3.org/TR/2013/ED-css3-fonts-20130529/</a> -->
   126     <dt>Latest version:
   128     <dd><a
   129      href="http://www.w3.org/TR/css3-fonts/">http://www.w3.org/TR/css3-fonts/</a>
   131     <dt>Latest editor's draft:
   133     <dd><a
   134      href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
   135      (<a
   136      href="https://dvcs.w3.org/hg/csswg/log/tip/css-fonts/Fonts.html">change
   137      log</a>)
   139     <dt>Previous version:
   141     <dd><a
   142      href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</a>
   144     <dt>Issues List:
   146     <dd><a href="http://www.w3.org/Style/CSS/Tracker/products/18">CSS3 Fonts
   147      issues in Tracker</a>
   149     <dd><a
   150      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
   151      Fonts issues in Bugzilla</a>
   153     <dt>Discussion:
   155     <dd><a
   156      href="mailto:www-style@w3.org?subject=%5Bcss-fonts%5D%20feedback">www-style@w3.org</a>
   157      with subject line “<kbd>[css-fonts] <var>… message topic
   158      …</var></kbd>” (<a
   159      href="http://lists.w3.org/Archives/Public/www-style/"
   160      rel=discussion>archives</a>)
   162     <dt>Editor:
   164     <dd><a href="mailto:jdaggett@mozilla.com">John Daggett (Mozilla)</a>
   165    </dl>
   166    <!--begin-copyright-->
   167    <p class=copyright><a
   168     href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
   169     rel=license>Copyright</a> © 2013 <a href="http://www.w3.org/"><abbr
   170     title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
   171     href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of
   172     Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr
   173     title="European Research Consortium for Informatics and
   174     Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>,
   175     <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C
   176     <a
   177     href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
   178     <a
   179     href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
   180     and <a
   181     href="http://www.w3.org/Consortium/Legal/copyright-documents">document
   182     use</a> rules apply.</p>
   183    <!--end-copyright-->
   184    <hr title="Separator for header">
   185   </div>
   187   <h2 class="no-num no-toc" id=abstract>Abstract</h2>
   189   <p>This CSS3 module describes how font properties are specified and how
   190    font resources are loaded dynamically. The contents of this specification
   191    are a consolidation of content previously divided into <a
   192    href="http://www.w3.org/TR/2002/WD-css3-fonts-20020802/">CSS3 Fonts</a>
   193    and <a href="http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/">CSS3
   194    Web Fonts</a> modules. The description of font load events was moved into
   195    the <a href="http://dev.w3.org/csswg/css3-font-load-events/">CSS3 Font
   196    Load Events</a> module.
   198   <h2 class="no-num no-toc" id=status>Status of this document</h2>
   199   <!--begin-status-->
   201   <p>This is a public copy of the editors' draft. It is provided for
   202    discussion only and may change at any moment. Its publication here does
   203    not imply endorsement of its contents by W3C. Don't cite this document
   204    other than as work in progress.
   206   <p>The (<a
   207    href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
   208    mailing list <a
   209    href="mailto:www-style@w3.org?Subject=%5Bcss3-fonts%5D%20PUT%20SUBJECT%20HERE">
   210    www-style@w3.org</a> (see <a
   211    href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
   212    discussion of this specification. When sending e-mail, please put the text
   213    “css3-fonts” in the subject, preferably like this:
   214    “[<!---->css3-fonts<!---->] <em>…summary of comment…</em>”
   216   <p>This document was produced by the <a
   217    href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
   218    the <a href="http://www.w3.org/Style/">Style Activity</a>).
   220   <p>This document was produced by a group operating under the <a
   221    href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
   222    2004 W3C Patent Policy</a>. W3C maintains a <a
   223    href="http://www.w3.org/2004/01/pp-impl/32061/status"
   224    rel=disclosure>public list of any patent disclosures</a> made in
   225    connection with the deliverables of the group; that page also includes
   226    instructions for disclosing a patent. An individual who has actual
   227    knowledge of a patent which the individual believes contains <a
   228    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   229    Claim(s)</a> must disclose the information in accordance with <a
   230    href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   231    6 of the W3C Patent Policy</a>.</p>
   232   <!--end-status-->
   233   <!--
   234 <h3 class="no-num no-toc" id="atrisk">Features at risk</h3>
   236 <p>The following features are at risk and may be removed when exiting CR:</p>
   238 <ul>
   239 </ul>
   240 -->
   242   <h2 class="no-num no-toc" id=contents>Table of contents</h2>
   243   <!--begin-toc-->
   245   <ul class=toc>
   246    <li><a href="#introduction"><span class=secno>1 </span>Introduction</a>
   248    <li><a href="#typography-background"><span class=secno>2 </span>Typography
   249     Background</a>
   251    <li><a href="#basic-font-props"><span class=secno>3 </span>Basic Font
   252     Properties</a>
   253     <ul class=toc>
   254      <li><a href="#font-family-prop"><span class=secno>3.1 </span>Font
   255       family: the font-family property</a>
   256       <ul class=toc>
   257        <li><a href="#generic-font-families"><span class=secno>3.1.1
   258         </span>Generic font families</a>
   259       </ul>
   261      <li><a href="#font-weight-prop"><span class=secno>3.2 </span>Font
   262       weight: the font-weight property</a>
   264      <li><a href="#font-stretch-prop"><span class=secno>3.3 </span>Font
   265       width: the font-stretch property</a>
   267      <li><a href="#font-style-prop"><span class=secno>3.4 </span>Font style:
   268       the font-style property</a>
   270      <li><a href="#font-size-prop"><span class=secno>3.5 </span>Font size:
   271       the font-size property</a>
   273      <li><a href="#font-size-adjust-prop"><span class=secno>3.6
   274       </span>Relative sizing: the font-size-adjust property</a>
   276      <li><a href="#font-prop"><span class=secno>3.7 </span>Shorthand font
   277       property: the font property</a>
   279      <li><a href="#font-synthesis-prop"><span class=secno>3.8
   280       </span>Controlling synthetic faces: the font-synthesis property</a>
   281     </ul>
   283    <li><a href="#font-resources"><span class=secno>4 </span>Font
   284     Resources</a>
   285     <ul class=toc>
   286      <li><a href="#font-face-rule"><span class=secno>4.1 </span>The
   287       <code>@font-face</code> rule</a>
   289      <li><a href="#font-family-desc"><span class=secno>4.2 </span>Font
   290       family: the font-family descriptor</a>
   292      <li><a href="#src-desc"><span class=secno>4.3 </span>Font reference: the
   293       src descriptor</a>
   295      <li><a href="#font-prop-desc"><span class=secno>4.4 </span>Font property
   296       descriptors: the font-style, font-weight, font-stretch descriptors</a>
   298      <li><a href="#unicode-range-desc"><span class=secno>4.5 </span>Character
   299       range: the unicode-range descriptor</a>
   301      <li><a href="#composite-fonts"><span class=secno>4.6 </span>Using
   302       character ranges to define composite fonts</a>
   304      <li><a href="#font-rend-desc"><span class=secno>4.7 </span>Font
   305       features: the font-variant and font-feature-settings descriptors</a>
   307      <li><a href="#font-face-loading"><span class=secno>4.8 </span>Font
   308       loading guidelines</a>
   310      <li><a href="#same-origin-restriction"><span class=secno>4.9
   311       </span>Same-origin restriction for fonts</a>
   312       <ul class=toc>
   313        <li><a href="#default-same-origin-restriction"><span class=secno>4.9.1
   314         </span>Default same-origin restriction</a>
   316        <li><a href="#allowing-cross-origin-font-loading"><span
   317         class=secno>4.9.2 </span>Allowing cross-origin font loading</a>
   318       </ul>
   319     </ul>
   321    <li><a href="#font-matching-algorithm"><span class=secno>5 </span>Font
   322     Matching Algorithm</a>
   323     <ul class=toc>
   324      <li><a href="#font-family-casing"><span class=secno>5.1 </span>Case
   325       sensitivity of font family names</a>
   327      <li><a href="#font-style-matching"><span class=secno>5.2 </span>Matching
   328       font styles</a>
   330      <li><a href="#cluster-matching"><span class=secno>5.3 </span>Cluster
   331       matching</a>
   333      <li><a href="#char-handling-issues"><span class=secno>5.4
   334       </span>Character handling issues</a>
   336      <li><a href="#font-matching-changes"><span class=secno>5.5 </span>Font
   337       matching changes since CSS 2.1</a>
   339      <li><a href="#font-matching-examples"><span class=secno>5.6 </span>Font
   340       matching examples</a>
   341     </ul>
   343    <li><a href="#font-rend-props"><span class=secno>6 </span>Font Feature
   344     Properties</a>
   345     <ul class=toc>
   346      <li><a href="#glyph-selection-positioning"><span class=secno>6.1
   347       </span>Glyph selection and positioning</a>
   349      <li><a href="#language-specific-support"><span class=secno>6.2
   350       </span>Language-specific display</a>
   352      <li><a href="#font-kerning-prop"><span class=secno>6.3 </span>Kerning:
   353       the font-kerning property</a>
   355      <li><a href="#font-variant-ligatures-prop"><span class=secno>6.4
   356       </span>Ligatures: the font-variant-ligatures property</a>
   358      <li><a href="#font-variant-position-prop"><span class=secno>6.5
   359       </span>Subscript and superscript forms: the font-variant-position
   360       property</a>
   362      <li><a href="#font-variant-caps-prop"><span class=secno>6.6
   363       </span>Capitalization: the font-variant-caps property</a>
   365      <li><a href="#font-variant-numeric-prop"><span class=secno>6.7
   366       </span>Numerical formatting: the font-variant-numeric property</a>
   368      <li><a href="#font-variant-alternates-prop"><span class=secno>6.8
   369       </span>Alternates and swashes: the font-variant-alternates property</a>
   372      <li><a href="#font-feature-values"><span class=secno>6.9 </span>Defining
   373       font specific alternates: the <code>@font-feature-values</code>
   374       rule</a>
   376      <li><a href="#font-variant-east-asian-prop"><span class=secno>6.10
   377       </span>East Asian text rendering: the font-variant-east-asian
   378       property</a>
   380      <li><a href="#font-variant-prop"><span class=secno>6.11 </span>Overall
   381       shorthand for font rendering: the font-variant property</a>
   383      <li><a href="#font-feature-settings-prop"><span class=secno>6.12
   384       </span>Low-level font feature settings control: the
   385       font-feature-settings property</a>
   387      <li><a href="#font-language-override-prop"><span class=secno>6.13
   388       </span>Font language override: the font-language-override property</a>
   389     </ul>
   391    <li><a href="#font-feature-resolution"><span class=secno>7 </span>Font
   392     Feature Resolution </a>
   393     <ul class=toc>
   394      <li><a href="#default-features"><span class=secno>7.1 </span>Default
   395       features</a>
   397      <li><a href="#feature-precedence"><span class=secno>7.2 </span>Feature
   398       precedence</a>
   400      <li><a href="#feature-precedence-examples"><span class=secno>7.3
   401       </span>Feature precedence examples</a>
   402     </ul>
   404    <li><a href="#object-model"><span class=secno>8 </span>Object Model</a>
   405     <ul class=toc>
   406      <li><a href="#om-fontface"><span class=secno>8.1 </span>The
   407       <code>CSSFontFaceRule</code> interface</a>
   409      <li><a href="#om-fontfeaturevalues"><span class=secno>8.2 </span>The
   410       <code>CSSFontFeatureValuesRule</code> interface</a>
   411     </ul>
   413    <li class=no-num><a href="#platform-props-to-css">Appendix A: Mapping
   414     platform font properties to CSS properties</a>
   416    <li class=no-num><a href="#ch-ch-ch-changes">Changes</a>
   417     <ul class=toc>
   418      <li class=no-num><a href="#recent-changes"> Changes from the February
   419       2013 CSS3 Fonts Working Draft</a>
   420     </ul>
   422    <li class=no-num><a href="#acknowledgments">Acknowledgments</a>
   424    <li class=no-num><a href="#conformance"> Conformance</a>
   425     <ul class=toc>
   426      <li class=no-num><a href="#conventions"> Document Conventions</a>
   428      <li class=no-num><a href="#conformance-classes"> Conformance Classes</a>
   431      <li class=no-num><a href="#partial"> Partial Implementations</a>
   433      <li class=no-num><a href="#experimental"> Experimental
   434       Implementations</a>
   436      <li class=no-num><a href="#testing"> Non-Experimental
   437       Implementations</a>
   438     </ul>
   440    <li class=no-num><a href="#references">References</a>
   441     <ul class=toc>
   442      <li class=no-num><a href="#normative-references">Normative
   443       References</a>
   445      <li class=no-num><a href="#other-references">Other References</a>
   446     </ul>
   448    <li class=no-num><a href="#index">Index</a>
   450    <li class=no-num><a href="#property-index">Property index</a>
   451   </ul>
   452   <!--end-toc-->
   454   <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
   456   <p>A font provides a resource containing the visual representation of
   457    characters. At the simplest level it contains information that maps
   458    character codes to shapes (called glyphs) that represent these characters.
   459    Fonts sharing a common design style are commonly grouped into font
   460    families classified by a set of standard font properties. Within a family,
   461    the shape displayed for a given character can vary by stroke weight, slant
   462    or relative width, among others. An individual font face is described by a
   463    unique combination of these properties. For a given range of text, CSS
   464    font properties are used to select a font family and a specific font face
   465    within that family to be used when rendering that text. As a simple
   466    example, to use the bold form of Helvetica one could use:
   468   <pre>body { 
   469     font-family: Helvetica; 
   470     font-weight: bold; 
   471 }</pre>
   473   <p>Font resources may be installed locally on the system on which a user
   474    agent is running or downloadable. For local font resources descriptive
   475    information can be obtained directly from the font resource. For
   476    downloadable font resources (sometimes referred to as web fonts), the
   477    descriptive information is included with the reference to the font
   478    resource.
   480   <p>Families of fonts typically don't contain a single face for each
   481    possible variation of font properties. The CSS font selection mechanism
   482    describes how to match a given set of CSS font properties to a single font
   483    face.
   485   <h2 id=typography-background><span class=secno>2 </span>Typography
   486    Background</h2>
   488   <p><em>This section is non-normative.</em>
   490   <p> Typographic traditions vary across the globe, so there is no unique way
   491    to classify all fonts across languages and cultures. For even common Latin
   492    letters, wide variations are possible:
   494   <div class=figure><img alt="variations in glyphs for a single character"
   495    src=aaaaaa.png>
   496    <p class=caption>One character, many glyph variations
   497   </div>
   499   <p>Differences in the anatomy of letterforms is one way to distinguish
   500    fonts. For Latin fonts, flourishes at the ends of a character's main
   501    strokes, or serifs, can distinguish a font from those without. Similar
   502    comparisons exist in non-Latin fonts between fonts with tapered strokes
   503    and those using primarily uniform strokes:
   505   <div class=figure><img alt="serif vs. non-serifs" src=serifvssansserif.png>
   506    <p class=caption>Letterforms with and without serifs
   507   </div>
   509   <div class=figure><img alt="serif vs. non-serifs for japanese"
   510    src=minchovsgothic.png>
   511    <p class=caption>Similar groupings for Japanese typefaces
   512   </div>
   514   <p>Fonts contain letterforms and the data needed to map characters to these
   515    letterforms. Often this may be a simple one-to-one mapping, but more
   516    complex mappings are also possible. The use of combining diacritic marks
   517    creates many variations for an underlying letterform:
   519   <div class=figure><img alt="diacritic marks" src=aaaaaa-diacritics.png>
   520    <p class=caption>Variations with diacritic marks
   521   </div>
   523   <p>A sequence of characters can be represented by a single glyph known as a
   524    ligature:
   526   <div class=figure><img alt="example of a fi ligature"
   527    src=final-ligature.png>
   528    <p class=caption>Ligature example
   529   </div>
   531   <p>Visual transformations based on textual context are often stylistic
   532    option in European languages. They are required to correctly render
   533    languages like Arabic, the lam and alef characters below <em>must</em> be
   534    combined when they exist in sequence:
   536   <div class=figure><img alt="lam alef ligature" src=lamaleflig.png>
   537    <p class=caption>Required Arabic ligature
   538   </div>
   540   <p>The relative complexity of these shaping transformations requires
   541    additional data within the font.
   543   <p>Sets of font faces with various stylistic variations are often grouped
   544    together into font families. In the simplest case a regular face is
   545    supplemented with bold and italic faces, but much more extensive groupings
   546    are possible. Variations in the thickness of letterform strokes, the <dfn
   547    id=weight>weight</dfn>, and the overall proportions of the letterform, the
   548    <dfn id=width>width</dfn>, are most common. In the example below, each
   549    letter uses a different font face within the Univers font family. The
   550    width used increases from top to bottom and the weight increases from left
   551    to right:
   553   <div class=figure><img alt="various width and weight variations within a
   554    single family" src=weightwidthvariations.png>
   555    <p class=caption>Weight and width variations within a single font family
   556   </div>
   558   <p>Creating fonts that support multiple scripts is a difficult task;
   559    designers need to understand the cultural traditions surrounding the use
   560    of type in different scripts and come up with letterforms that somehow
   561    share a common theme. Many languages often share a common script and each
   562    of these languages may have noticeable stylistic differences. For example,
   563    the Arabic script is shared by Persian and Urdu and Cyrillic is used with
   564    many languages, not just Russian.
   566   <p>The <a href="#character-map"><em>character map</em></a> of a font
   567    defines the mapping of characters to glyphs for that font. If a document
   568    contains characters not supported by the <a href="#character-map"><em
   569    title="character map">character maps</em></a> of the fonts contained in a
   570    font family list, a user agent may use a system font fallback procedure to
   571    locate an appropriate font that does. If no appropriate font can be found,
   572    some form of "missing glyph" character will be rendered by the user agent.
   573    System fallback can occur when the specified list of font families does
   574    not include a font that supports a given character.
   576   <p>Although the <a href="#character-map"><em>character map</em></a> of a
   577    font maps a given character to a glyph for that character, modern font
   578    technologies such as OpenType and AAT (Apple Advanced Typography) provide
   579    ways of mapping a character to different glyphs based upon feature
   580    settings. Fonts in these formats allow these features to be embedded in
   581    the font itself and controlled by applications. Common typographic
   582    features which can be specified this way include ligatures, swashes,
   583    contextual alternates, proportional and tabular figures, and automatic
   584    fractions, to list just a few. For a visual overview of OpenType features,
   585    see the <a href="#OPENTYPE-FONT-GUIDE"
   586    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
   588   <h2 id=basic-font-props><span class=secno>3 </span>Basic Font Properties</h2>
   590   <p>The particular font face used to render a character is determined by the
   591    font family and other font properties that apply to a given element. This
   592    structure allows settings to be varied independent of each other.</p>
   593   <!-- prop: font-family -->
   595   <h3 id=font-family-prop><span class=secno>3.1 </span>Font family: the <a
   596    href="#propdef-font-family">font-family</a> property</h3>
   598   <table class=propdef id=namefont-familyvalue-ltfamily-namegt-ltg>
   599    <tbody>
   600     <tr>
   601      <td>Name:
   603      <td><dfn id=propdef-font-family>font-family</dfn>
   605     <tr>
   606      <td>Value:
   608      <td>[ <a href="#family-name-value"><var>&lt;family-name&gt;</var></a> |
   609       <a href="#generic-family-value"><var>&lt;generic-family&gt;</var></a> ]
   610       #
   612     <tr>
   613      <td>Initial:
   615      <td>depends on user agent
   617     <tr>
   618      <td>Applies to:
   620      <td>all elements
   622     <tr>
   623      <td>Inherited:
   625      <td>yes
   627     <tr>
   628      <td>Percentages:
   630      <td>N/A
   632     <tr>
   633      <td>Media:
   635      <td>visual
   637     <tr>
   638      <td>Computed value:
   640      <td>as specified
   642     <tr>
   643      <td>Animatable:
   645      <td>no
   646   </table>
   648   <p>This property specifies a prioritized list of font family names or
   649    generic family names. A font family defines a set of faces that vary in
   650    weight, width or slope. CSS uses the combination of a family name with
   651    other style attributes to select an individual face. Using this selection
   652    mechanism, rather than selecting a face via the style name as is often
   653    done in design applications, allows some degree of regularity in textual
   654    display when fallback occurs.
   656   <p class=note>Designers should note that the CSS definition of font
   657    attributes used for selection are explicitly not intended to define a font
   658    taxonomy. A type designer's idea of a family may often extend to a set of
   659    faces that vary along axes other than just the standard axes of weight,
   660    width and slope. A family may extend to include both a set of serif faces
   661    and a set of sans-serif faces or vary along axes that are unique to that
   662    family. The CSS font selection mechanism merely provides a way to
   663    determine the “closest” substitute when substitution is necessary.
   665   <p>Unlike other CSS properties, component values are a comma-separated list
   666    indicating alternatives. A user agent iterates through the list of family
   667    names until it matches an available font that contains a glyph for the
   668    character to be rendered. This allows for differences in available fonts
   669    across platforms and for differences in the range of characters supported
   670    by individual fonts.
   672   <p>A font family name only specifies a name given to a set of font faces,
   673    it does not specify an individual face. For example, given the
   674    availability of the fonts below, Futura would match but Futura Medium
   675    would not:
   677   <div class=figure><img alt="family and face names"
   678    src=familyvsfacename.png>
   679    <p class=caption>Family and individual face names
   680   </div>
   682   <p>Consider the example below:
   684   <div class=example>
   685    <pre>body { 
   686     font-family: Helvetica, Verdana, sans-serif; 
   687 }</pre>
   689    <p>If Helvetica is available it will be used when rendering. If neither
   690     Helvetica nor Verdana is present, then the user-agent-defined sans serif
   691     font will be used.</p>
   692   </div>
   694   <p>There are two types of font family names:
   696   <dl>
   697    <dt><dfn id=family-name-value><var>&lt;family-name&gt;</var></dfn>
   699    <dd>The name of a font family of choice such as Helvetica or Verdana in
   700     the previous example.
   702    <dt><dfn id=generic-family-value><var>&lt;generic-family&gt;</var></dfn>
   704    <dd> The following generic family keywords are defined: ‘<a
   705     href="#serif"><code class=property>serif</code></a>’, ‘<a
   706     href="#sans-serif"><code class=property>sans-serif</code></a>’, ‘<a
   707     href="#cursive"><code class=property>cursive</code></a>’, ‘<a
   708     href="#fantasy"><code class=property>fantasy</code></a>’, and ‘<a
   709     href="#monospace"><code class=property>monospace</code></a>’. These
   710     keywords can be used as a general fallback mechanism when an author's
   711     desired font choices are not available. As keywords, they must not be
   712     quoted. Authors are encouraged to append a generic font family as a last
   713     alternative for improved robustness.
   714   </dl>
   716   <p>Font family names other than generic families must either be given
   717    quoted as <a
   718    href="//www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or unquoted
   719    as a sequence of one or more <a
   720    href="//www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
   721    This means most punctuation characters and digits at the start of each
   722    token must be escaped in unquoted font family names.
   724   <p>To illustrate this, the following declarations are invalid:
   726   <pre>
   727 font-family: Red/Black, sans-serif;
   728 font-family: "Lucida" Grande, sans-serif;
   729 font-family: Ahem!, sans-serif;
   730 font-family: test@foo, sans-serif;
   731 font-family: #POUND, sans-serif;
   732 font-family: Hawaii 5-0, sans-serif;
   733 </pre>
   735   <p>If a sequence of identifiers is given as a font family name, the
   736    computed value is the name converted to a string by joining all the
   737    identifiers in the sequence by single spaces.
   739   <p>To avoid mistakes in escaping, it is recommended to quote font family
   740    names that contain white space, digits, or punctuation characters other
   741    than hyphens:
   743   <pre>
   744 body { font-family: "New Century Schoolbook", serif }
   746 &lt;BODY STYLE="font-family: '21st Century', fantasy">
   747 </pre>
   749   <p>Font family <em>names</em> that happen to be the same as a keyword value
   750    (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
   751    class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
   752    class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
   753    class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
   754    class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
   755    class=property>cursive</code></a>’) must be quoted to prevent confusion
   756    with the keywords with the same names. The keywords ‘<code
   757    class=property>initial</code>’ and ‘<code
   758    class=property>default</code>’ are reserved for future use and must also
   759    be quoted when used as font names. UAs must not consider these keywords as
   760    matching the <a
   761    href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
   763   <p>The precise way a set of fonts are grouped into font families varies
   764    depending upon the platform font management API's. The Windows GDI API
   765    only allows four faces to be grouped into a family while the DirectWrite
   766    API and API's on OSX and other platforms support font families with a
   767    variety of weights, widths and slopes (see <a
   768    href="#platform-props-to-css">Appendix A</a> for more details).
   770   <p>Some font formats allow fonts to carry multiple localizations of the
   771    family name. User agents must recognize and correctly match all of these
   772    names independent of the underlying platform localization, system API used
   773    or document encoding:
   775   <div class=figure><img alt="examples of localized family names"
   776    src=localizedfamilynames.png>
   777    <p class=caption>Localized family names
   778   </div>
   780   <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
   781    families</h4>
   783   <p>All five generic font families are defined to exist in all CSS
   784    implementations (they need not necessarily map to five distinct actual
   785    fonts). User agents should provide reasonable default choices for the
   786    generic font families, which express the characteristics of each family as
   787    well as possible within the limits allowed by the underlying technology.
   788    User agents are encouraged to allow users to select alternative choices
   789    for the generic fonts.
   791   <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
   792    definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
   794   <p>Serif fonts represent the formal text style for a script. This often
   795    means but is not limited to glyphs that have finishing strokes, flared or
   796    tapering ends, or have actual serifed endings (including slab serifs).
   797    Serif fonts are typically proportionately-spaced. They often display a
   798    greater variation between thick and thin strokes than fonts from the ‘<a
   799    href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
   800    font family. CSS uses the term ‘<a href="#serif"><code
   801    class=property>serif</code></a>’ to apply to a font for any script,
   802    although other names may be more familiar for particular scripts, such as
   803    Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
   804    Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
   805    class=property>serif</code></a>’ more due to its typographic role rather
   806    than its actual design style. Any font that is so described may be used to
   807    represent the generic ‘<a href="#serif"><code
   808    class=property>serif</code></a>’ family.
   810   <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
   811    <p class=caption>Sample serif fonts
   812   </div>
   814   <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
   815    title="sans-serif, definition of"> <a name=sans-serif-def><dfn
   816    id=sans-serif>sans-serif</dfn></a></span></h5>
   818   <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
   819    low contrast (vertical and horizontal stems have the close to the same
   820    thickness) and have stroke endings that are plain -- without any flaring,
   821    cross stroke, or other ornamentation. Sans-serif fonts are typically
   822    proportionately-spaced. They often have little variation between thick and
   823    thin strokes, compared to fonts from the ‘<a href="#serif"><code
   824    class=property>serif</code></a>’ family. CSS uses the term ‘<a
   825    href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
   826    to a font for any script, although other names may be more familiar for
   827    particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
   828    (Korean). Any font that is so described may be used to represent the
   829    generic ‘<a href="#sans-serif"><code
   830    class=property>sans-serif</code></a>’ family.
   832   <div class=figure><img alt="sample sans-serif fonts"
   833    src=sansserifexamples.png>
   834    <p class=caption>Sample sans-serif fonts
   835   </div>
   837   <h5 class="no-num no-toc"> <span class=index-def id=cursive0
   838    title="cursive, definition of"> <a name=cursive-def><dfn
   839    id=cursive>cursive</dfn></a></span></h5>
   841   <p>Glyphs in cursive fonts generally use a more informal script style, and
   842    the result looks more like handwritten pen or brush writing than printed
   843    letterwork. CSS uses the term ‘<a href="#cursive"><code
   844    class=property>cursive</code></a>’ to apply to a font for any script,
   845    although other names such as Chancery, Brush, Swing and Script are also
   846    used in font names.
   848   <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
   849    <p class=caption>Sample cursive fonts
   850   </div>
   852   <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
   853    title="fantasy, definition of"> <a name=fantasy-def><dfn
   854    id=fantasy>fantasy</dfn></a></span></h5>
   856   <p>Fantasy fonts are primarily decorative or expressive fonts that contain
   857    playful representations of characters. These do not include Pi or Picture
   858    fonts which do not represent actual characters.
   860   <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
   861    <p class=caption>Sample fantasy fonts
   862   </div>
   864   <h5 class="no-num no-toc"> <span class=index-def id=monospace0
   865    title="monospace, definition of"> <a name=monospace-def><dfn
   866    id=monospace>monospace</dfn></a></span></h5>
   868   <p>The sole criterion of a monospace font is that all glyphs have the same
   869    fixed width. This is often used to render samples of computer code.
   871   <div class=figure><img alt="sample monospace fonts"
   872    src=monospaceexamples.png>
   873    <p class=caption>Sample monospace fonts
   874   </div>
   875   <!-- prop: font-weight -->
   877   <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
   878    href="#propdef-font-weight">font-weight</a> property</h3>
   880   <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
   881    <tbody>
   882     <tr>
   883      <td>Name:
   885      <td><dfn id=propdef-font-weight>font-weight</dfn>
   887     <tr>
   888      <td>Value:
   890      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
   891       | 700 | 800 | 900
   893     <tr>
   894      <td>Initial:
   896      <td>normal
   898     <tr>
   899      <td>Applies to:
   901      <td>all elements
   903     <tr>
   904      <td>Inherited:
   906      <td>yes
   908     <tr>
   909      <td>Percentages:
   911      <td>N/A
   913     <tr>
   914      <td>Media:
   916      <td>visual
   918     <tr>
   919      <td>Computed value:
   921      <td>numeric weight value (see description)
   923     <tr>
   924      <td>Animatable:
   926      <td>as <a
   927       href="http://dev.w3.org/csswg/css3-transitions/#animtype-font-weight">font
   928       weight</a>
   929   </table>
   931   <p>The <a class=noxref href="#font-weight-prop"><span
   932    class=property>‘<code class=property>font-weight</code>’</span></a>
   933    property specifies the weight of glyphs in the font, their degree of
   934    blackness or stroke thickness.
   936   <p>Values have the following meanings:
   938   <dl>
   939    <dt>100 to 900
   941    <dd>These values form an ordered sequence, where each number indicates a
   942     weight that is at least as dark as its predecessor. These roughly
   943     correspond to the commonly used weight names below:
   944   </dl>
   946   <ul>
   947    <li>100 - Thin
   949    <li>200 - Extra Light (Ultra Light)
   951    <li>300 - Light
   953    <li>400 - Normal
   955    <li>500 - Medium
   957    <li>600 - Semi Bold (Demi Bold)
   959    <li>700 - Bold
   961    <li>800 - Extra Bold (Ultra Bold)
   963    <li>900 - Black (Heavy)
   964   </ul>
   966   <dl>
   967    <dt><a href="#normal2"><strong>normal</strong></a>
   969    <dd>Same as ‘<code class=css>400</code>’.
   971    <dt><strong>bold</strong>
   973    <dd>Same as ‘<code class=css>700</code>’.
   975    <dt><strong>bolder</strong>
   977    <dd>Specifies a bolder weight than the inherited value.
   979    <dt><strong>lighter</strong>
   981    <dd>Specifies a lighter weight than the inherited value.
   982   </dl>
   984   <p>Font formats that use a scale other than a nine-step scale should map
   985    their scale onto the CSS scale so that 400 roughly corresponds with a face
   986    that would be labeled as Regular, Book, Roman and 700 roughly matches a
   987    face that would be labeled as Bold. Or weights may be inferred from the
   988    style names, ones that correspond roughly with the scale above. The scale
   989    is relative, so a face with a larger weight value must never appear
   990    lighter. If style names are used to infer weights, care should be taken to
   991    handle variations in style names across locales.
   993   <p>Quite often there are only a few weights available for a particular font
   994    family. When a weight is specified for which no face exists, a face with a
   995    nearby weight is used. In general, bold weights map to faces with heavier
   996    weights and light weights map to faces with lighter weights (see the <a
   997    href="#font-matching-algorithm">font matching section below</a> for a
   998    precise definition). The examples here illustrate which face is used for
   999    different weights, grey indicates a face for that weight does not exist so
  1000    a face with a nearby weight is used:
  1002   <div class=figure><img alt="weight mappings for a family with 400, 700 and
  1003    900 weights" src=optimaweights.png>
  1004    <p class=caption>Weight mappings for a font family with 400, 700 and 900
  1005     weight faces
  1006   </div>
  1008   <div class=figure><img alt="weight mappings for a family with 300, 600
  1009    weights" src=hiraginoweights.png>
  1010    <p class=caption>Weight mappings for a font family with 300 and 600 weight
  1011     faces
  1012   </div>
  1014   <p>Although the practice is not well-loved by typographers, bold faces are
  1015    often synthesized by user agents for faces that lack actual bold faces.
  1016    For the purposes of style matching, these faces must be treated as if they
  1017    exist within the family. Authors can explicitly avoid this behavior by
  1018    using the ‘<a href="#propdef-font-synthesis"><code
  1019    class=property>font-synthesis</code></a>’ property.
  1021   <p>Specified values of ‘<code class=property>bolder</code>’ and
  1022    ‘<code class=property>lighter</code>’ indicate weights relative to the
  1023    weight of the parent element. The computed weight is calculated based on
  1024    the inherited ‘<a href="#propdef-font-weight"><code
  1025    class=property>font-weight</code></a>’ value using the chart below.
  1027   <table class=data id=bolderlighter summary="Bolder/lighter mappings">
  1028    <thead>
  1029     <tr>
  1030      <th>Inherited value
  1032      <th>bolder
  1034      <th>lighter
  1036    <tbody>
  1037     <tr>
  1038      <th>100
  1040      <td>400
  1042      <td>100
  1044     <tr>
  1045      <th>200
  1047      <td>400
  1049      <td>100
  1051     <tr>
  1052      <th>300
  1054      <td>400
  1056      <td>100
  1058     <tr>
  1059      <th>400
  1061      <td>700
  1063      <td>100
  1065     <tr>
  1066      <th>500
  1068      <td>700
  1070      <td>100
  1072     <tr>
  1073      <th>600
  1075      <td>900
  1077      <td>400
  1079     <tr>
  1080      <th>700
  1082      <td>900
  1084      <td>400
  1086     <tr>
  1087      <th>800
  1089      <td>900
  1091      <td>700
  1093     <tr>
  1094      <th>900
  1096      <td>900
  1098      <td>700
  1099   </table>
  1101   <p>The table above is equivalent to selecting the next relative bolder or
  1102    lighter face, given a font family containing normal and bold faces along
  1103    with a thin and a heavy face. Authors who desire finer control over the
  1104    exact weight values used for a given element may use numerical values
  1105    instead of relative weights.</p>
  1106   <!-- prop: font-stretch -->
  1108   <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
  1109    href="#propdef-font-stretch">font-stretch</a> property</h3>
  1111   <table class=propdef id=namefont-stretchvaluenormal-ultra-conden>
  1112    <tbody>
  1113     <tr>
  1114      <td>Name:
  1116      <td><dfn id=propdef-font-stretch>font-stretch</dfn>
  1118     <tr>
  1119      <td>Value:
  1121      <td>normal | ultra-condensed | extra-condensed | condensed |
  1122       semi-condensed | semi-expanded | expanded | extra-expanded |
  1123       ultra-expanded
  1125     <tr>
  1126      <td>Initial:
  1128      <td>normal
  1130     <tr>
  1131      <td>Applies to:
  1133      <td>all elements
  1135     <tr>
  1136      <td>Inherited:
  1138      <td>yes
  1140     <tr>
  1141      <td>Percentages:
  1143      <td>N/A
  1145     <tr>
  1146      <td>Media:
  1148      <td>visual
  1150     <tr>
  1151      <td>Computed value:
  1153      <td>as specified
  1155     <tr>
  1156      <td>Animatable:
  1158      <td>as <a href="#font-stretch-animation">font stretch</a>
  1159   </table>
  1161   <p>The <a class=noxref href="#font-stretch-prop"><span
  1162    class=property>‘<code class=property>font-stretch</code>’</span></a>
  1163    property selects a normal, condensed, or expanded face from a font family.
  1164    Absolute keyword values have the following ordering, from narrowest to
  1165    widest:
  1167   <ul>
  1168    <li><code>ultra-condensed</code>
  1170    <li><code>extra-condensed</code>
  1172    <li><code>condensed</code>
  1174    <li><code>semi-condensed </code>
  1176    <li><code>normal</code>
  1178    <li><code>semi-expanded</code>
  1180    <li><code>expanded</code>
  1182    <li><code>extra-expanded</code>
  1184    <li><code>ultra-expanded</code>
  1185   </ul>
  1187   <p>When a face does not exist for a given width, normal or condensed values
  1188    map to a narrower face, otherwise a wider face. Conversely, expanded
  1189    values map to a wider face, otherwise a narrower face. The figure below
  1190    shows how the nine font-stretch property settings affect font selection
  1191    for font family containing a variety of widths, grey indicates a width for
  1192    which no face exists and a different width is substituted:
  1194   <div class=figure><img alt="width mappings for a family with condensed,
  1195    normal and expanded faces" src=universwidths.png>
  1196    <p class=caption>Width mappings for a font family with condensed, normal
  1197     and expanded width faces
  1198   </div>
  1200   <p id=font-stretch-animation>Animation of font stretch: Font stretch is
  1201    interpolated in discrete steps. The interpolation happens as though the
  1202    ordered values are equally spaced real numbers. The interpolation result
  1203    is rounded to the nearest value, with values exactly halfway between two
  1204    values rounded towards the later value in the list above.</p>
  1205   <!-- prop: font-style -->
  1207   <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
  1208    href="#propdef-font-style">font-style</a> property</h3>
  1210   <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
  1211    <tbody>
  1212     <tr>
  1213      <td>Name:
  1215      <td><dfn id=propdef-font-style>font-style</dfn>
  1217     <tr>
  1218      <td>Value:
  1220      <td>normal | italic | oblique
  1222     <tr>
  1223      <td>Initial:
  1225      <td>normal
  1227     <tr>
  1228      <td>Applies to:
  1230      <td>all elements
  1232     <tr>
  1233      <td>Inherited:
  1235      <td>yes
  1237     <tr>
  1238      <td>Percentages:
  1240      <td>N/A
  1242     <tr>
  1243      <td>Media:
  1245      <td>visual
  1247     <tr>
  1248      <td>Computed value:
  1250      <td>as specified
  1252     <tr>
  1253      <td>Animatable:
  1255      <td>no
  1256   </table>
  1258   <p>The <a class=noxref href="#font-style-prop"><span
  1259    class=property>‘<code class=property>font-style</code>’</span></a>
  1260    property allows italic or oblique faces to be selected. Italic forms are
  1261    generally cursive in nature while oblique faces are typically sloped
  1262    versions of the regular face. Oblique faces can be simulated by
  1263    artificially sloping the glyphs of the regular face. Compare the
  1264    artificially sloped renderings of Palatino ‘<code
  1265    class=property>a</code>’ and Baskerville ‘<code
  1266    class=property>N</code>’ in grey with the actual italic versions:
  1268   <div class=figure><img alt="artificial sloping vs. real italics"
  1269    src=realvsfakeitalics.png>
  1270    <p class=caption>Artificial sloping versus real italics
  1271   </div>
  1273   <p>A value of ‘<a href="#normal2"><code
  1274    class=property>normal</code></a>’ selects a face that is classified as
  1275    ‘<a href="#normal2"><code class=property>normal</code></a>’, while
  1276    ‘<code class=property>oblique</code>’ selects a font that is labeled
  1277    ‘<code class=property>oblique</code>’. A value of ‘<code
  1278    class=property>italic</code>’ selects a font that is labeled ‘<code
  1279    class=property>italic</code>’, or, if that is not available, one labeled
  1280    ‘<code class=property>oblique</code>’. If no italic or oblique face is
  1281    available, oblique faces can be synthesized by rendering non-obliqued
  1282    faces with a right sloping transformation applied. When synthesizing these
  1283    faces, the transformation should apply to all glyphs in the same way and
  1284    not vary based on codepoint or due to horizontal or vertical line
  1285    orientation.
  1287   <p>Many scripts lack the tradition of mixing a cursive form within text
  1288    rendered with a normal face. Chinese, Japanese and Korean fonts almost
  1289    always lack italic or oblique faces. Fonts that support a mixture of
  1290    scripts will sometimes omit specific scripts such as Arabic from the set
  1291    of glyphs supported in the italic face. User agents should be careful
  1292    about making <a href="#character-map"><em>character map</em></a>
  1293    assumptions across faces.
  1295   <p class=issue>For synthetic italics in vertical runs of Chinese, Japanese,
  1296    or Korean text, is there a need to define explicitly the direction of the
  1297    faux oblique for runs that include a mixture of ideographic and Latin
  1298    text?</p>
  1299   <!-- prop: font-size -->
  1301   <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
  1302    href="#propdef-font-size">font-size</a> property</h3>
  1304   <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
  1305    <tbody>
  1306     <tr>
  1307      <td>Name:
  1309      <td><dfn id=propdef-font-size>font-size</dfn>
  1311     <tr>
  1312      <td>Value:
  1314      <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
  1315       | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
  1316       <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
  1317       href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
  1319     <tr>
  1320      <td>Initial:
  1322      <td>medium
  1324     <tr>
  1325      <td>Applies to:
  1327      <td>all elements
  1329     <tr>
  1330      <td>Inherited:
  1332      <td>yes
  1334     <tr>
  1335      <td>Percentages:
  1337      <td>refer to parent element's font size
  1339     <tr>
  1340      <td>Media:
  1342      <td>visual
  1344     <tr>
  1345      <td>Computed value:
  1347      <td>absolute length
  1349     <tr>
  1350      <td>Animatable:
  1352      <td>as <a
  1353       href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
  1354   </table>
  1356   <p>This property indicates the desired height of glyphs from the font. For
  1357    scalable fonts, the font-size is a scale factor applied to the EM unit of
  1358    the font. (Note that certain glyphs may bleed outside their EM box.) For
  1359    non-scalable fonts, the font-size is converted into absolute units and
  1360    matched against the declared font-size of the font, using the same
  1361    absolute coordinate space for both of the matched values. Values have the
  1362    following meanings:
  1364   <dl>
  1365    <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
  1367    <dd> An <a
  1368     href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
  1369     refers to an entry in a table of font sizes computed and kept by the user
  1370     agent. Possible values are:
  1371     <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
  1373    <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
  1375    <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
  1376     keyword is interpreted relative to the table of font sizes and the
  1377     computed ‘<a href="#propdef-font-size"><code
  1378     class=property>font-size</code></a>’ of the parent element. Possible
  1379     values are:
  1380     <p> [ larger | smaller ]
  1382     <p> For example, if the parent element has a font size of ‘<code
  1383      class=property>medium</code>’, a value of ‘<code
  1384      class=property>larger</code>’ will make the font size of the current
  1385      element be ‘<code class=property>large</code>’. If the parent
  1386      element's size is not close to a table entry, the user agent is free to
  1387      interpolate between table entries or round off to the closest one. The
  1388      user agent may have to extrapolate table values if the numerical value
  1389      goes beyond the keywords.
  1391    <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
  1393    <dd>A length value specifies an absolute font size (independent of the
  1394     user agent's font table). Negative lengths are illegal.
  1396    <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
  1398    <dd>A percentage value specifies an absolute font size relative to the
  1399     parent element's font size. Use of percentage values, or values in
  1400     ‘<code class=property>em</code>’s, leads to more robust and
  1401     cascadable style sheets.
  1402   </dl>
  1404   <p>The following table provides user agent guidelines for the absolute-size
  1405    scaling factor and their mapping to HTML heading and absolute font-sizes.
  1406    The ‘<code class=property>medium</code>’ value is used as the
  1407    reference middle value. The user agent may fine-tune these values for
  1408    different fonts or different types of display devices.
  1410   <table class=data>
  1411    <thead>
  1412     <tr>
  1413      <th>CSS absolute-size values
  1415      <th>xx-small
  1417      <th>x-small
  1419      <th>small
  1421      <th>medium
  1423      <th>large
  1425      <th>x-large
  1427      <th>xx-large
  1429      <th> 
  1431    <tbody>
  1432     <tr>
  1433      <th>scaling factor
  1435      <td>3/5
  1437      <td>3/4
  1439      <td>8/9
  1441      <td>1
  1443      <td>6/5
  1445      <td>3/2
  1447      <td>2/1
  1449      <td>3/1
  1451     <tr>
  1452      <th>HTML headings
  1454      <td>h6
  1456      <td> 
  1458      <td>h5
  1460      <td>h4
  1462      <td>h3
  1464      <td>h2
  1466      <td>h1
  1468      <td> 
  1470     <tr>
  1471      <th>HTML font sizes
  1473      <td>1
  1475      <td> 
  1477      <td>2
  1479      <td>3
  1481      <td>4
  1483      <td>5
  1485      <td>6
  1487      <td>7
  1488   </table>
  1490   <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
  1491    applying these guidelines should nevertheless avoid creating font-size
  1492    resulting in less than 9 device pixels per EM unit on a computer
  1493    display.</em>
  1495   <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
  1496    factor between adjacent indexes was 1.5 which user experience proved to be
  1497    too large. In CSS2, the suggested scaling factor for computer screen
  1498    between adjacent indexes was 1.2 which still created issues for the small
  1499    sizes. The new scaling factor varies between each index to provide a
  1500    better readability.</em>
  1502   <p>The actual value of this property may differ from the computed value due
  1503    a numerical value on ‘<a href="#propdef-font-size-adjust"><code
  1504    class=property>font-size-adjust</code></a>’ and the unavailability of
  1505    certain font sizes.
  1507   <p>Child elements inherit the computed <a class=noxref
  1508    href="#font-size-prop"> <span class=property>‘<code
  1509    class=property>font-size</code>’</span></a> value (otherwise, the effect
  1510    of <a class=noxref href="#font-size-adjust-prop"><span
  1511    class=property>‘<code
  1512    class=property>font-size-adjust</code>’</span></a> would compound).
  1514   <div class=example>
  1515    <p style="display:none">Example(s):
  1517    <p>
  1519    <pre>p { font-size: 12pt; }
  1520 blockquote { font-size: larger }
  1521 em { font-size: 150% }
  1522 em { font-size: 1.5em }
  1523 </pre>
  1524   </div>
  1525   <!-- prop: font-size-adjust -->
  1527   <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
  1528    the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
  1530   <table class=propdef id=namefont-size-adjustvaluenone-auto-ltnum>
  1531    <tbody>
  1532     <tr>
  1533      <td>Name:
  1535      <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
  1537     <tr>
  1538      <td>Value:
  1540      <td>none | auto | <a
  1541       href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
  1543     <tr>
  1544      <td>Initial:
  1546      <td>none
  1548     <tr>
  1549      <td>Applies to:
  1551      <td>all elements
  1553     <tr>
  1554      <td>Inherited:
  1556      <td>yes
  1558     <tr>
  1559      <td>Percentages:
  1561      <td>N/A
  1563     <tr>
  1564      <td>Media:
  1566      <td>visual
  1568     <tr>
  1569      <td>Computed value:
  1571      <td>as specified
  1573     <tr>
  1574      <td>Animatable:
  1576      <td>as <a
  1577       href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a>
  1578   </table>
  1580   <p>For any given font size, the apparent size and legibility of text varies
  1581    across fonts. For scripts such as Latin or Cyrillic that distinguish
  1582    between upper and lowercase letters, the relative height of lowercase
  1583    letters compared to their uppercase counterparts is a determining factor
  1584    of legibility. This is commonly referred to as the <a class=index-def
  1585    href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
  1586    id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
  1587    the x-height of a font divided by the font size.
  1589   <p>In situations where font fallback occurs, fallback fonts may not share
  1590    the same aspect ratio as the desired font family and will thus appear less
  1591    readable. The font-size-adjust property is a way to preserve the
  1592    readability of text when font fallback occurs. It does this by adjusting
  1593    the font-size so that the x-height is the same regardless of the font
  1594    used.
  1596   <div class=example>
  1597    <p>The style defined below defines Verdana as the desired font family, but
  1598     if Verdana is not available Futura or Times will be used.</p>
  1600    <pre>p { 
  1601     font-family: Verdana, Futura, Times; 
  1604 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
  1605 </pre>
  1607    <p>Verdana has a relatively high aspect ratio, lowercase letters are
  1608     relatively tall compared to uppercase letters, so at small sizes text
  1609     appears legible. Times has a lower aspect ratio and so if fallback
  1610     occurs, the text will be less legible at small sizes than Verdana.</p>
  1611   </div>
  1613   <p>How text rendered in each of these fonts compares is shown below, the
  1614    columns show text rendered in Verdana, Futura and Times. The same
  1615    font-size value is used across cells within each row and red lines are
  1616    included to show the differences in x-height. In the upper half each row
  1617    is rendered in the same font-size value. The same is true for the lower
  1618    half but in this half the font-size-adjust property is also set so that
  1619    the actual font size is adjusted to preserve the x-height across each row.
  1620    Note how small text remains relatively legible across each row in the
  1621    lower half.
  1623   <div class=figure><img alt="text with and without font-size-adjust"
  1624    src=fontsizeadjust.png>
  1625    <p class=caption>Text with and without the use of font-size-adjust
  1626   </div>
  1628   <p>This property allows authors to specify an aspect value for an element
  1629    that will effectively preserve the x-height of the first choice font,
  1630    whether it is substituted or not. Values have the following meanings:
  1632   <dl>
  1633    <dt><a href="#font-variant-ligatures-none-value"><strong>none</strong></a>
  1636    <dd>Do not preserve the font's x-height.
  1638    <dt><strong>auto</strong>
  1640    <dd>Behaves just like &lt;number>, except the number used is the aspect
  1641     value calculated by user agents for the first font in the list of fonts
  1642     defined for the initial value of the ‘<a
  1643     href="#descdef-font-family"><code
  1644     class=property>font-family</code></a>’ property. Effectively this is
  1645     the default font used when ‘<a href="#descdef-font-family"><code
  1646     class=property>font-family</code></a>’ is not otherwise specified.
  1647     <p>Authors can use this value to specify that font size should be
  1648      normalized across fonts based on the x-height without the need to
  1649      specify the aspect ratio explicitly.</p>
  1651    <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
  1653    <dd>Specifies the aspect value used in the calculation below to calculate
  1654     the adjusted font size:
  1655     <pre>c  =  ( a / a' ) s 
  1656 </pre>
  1658     <p>where:</p>
  1660     <pre>s  =  font-size value
  1661 a  =  aspect value as specified by the font-size-adjust property
  1662 a' =  aspect value of actual font
  1663 c  =  adjusted font-size to use
  1664 </pre>
  1666     <p>This value applies to any font that is selected but in typical usage
  1667      it should be based on the aspect value of the first font in the
  1668      font-family list. If this is specified accurately, the <tt>(a/a')</tt>
  1669      term in the formula above is effectively 1 for the first font and no
  1670      adjustment occurs. If the value is specified inaccurately, text rendered
  1671      using the first font in the family list will display differently in
  1672      older user agents that don't support font-size-adjust.</p>
  1673   </dl>
  1675   <p>Authors can calculate the aspect value for a given font by comparing
  1676    spans with the same content but different font-size-adjust properties. If
  1677    the same font-size is used, the spans will match when the font-size-adjust
  1678    value is accurate for the given font.
  1680   <div class=example>
  1681    <p>Two spans with borders are used to determine the aspect value of a
  1682     font. The font-size is the same for both spans but the font-size-adjust
  1683     property is specified only for the right span. Starting with a value of
  1684     0.5, the aspect value can be adjusted until the borders around the two
  1685     letters line up.</p>
  1687    <pre>p {
  1688     font-family: Futura;
  1689     font-size: 500px;
  1692 span {
  1693     border: solid 1px red;
  1696 .adjust {
  1697     font-size-adjust: 0.5;
  1700 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
  1701 </pre>
  1703    <div class=figure><img alt="Futura with an aspect value of 0.5"
  1704     src=beforefontsizeadjust.png>
  1705     <p class=caption>Futura with an aspect value of 0.5
  1706    </div>
  1708    <p>The box on the right is a bit bigger than the one on the left, so the
  1709     aspect value of this font is something less than 0.5. Adjust the value
  1710     until the boxes align.</p>
  1711   </div>
  1712   <!-- prop: font -->
  1713   <!-- jtdfix, crap, preprocessor is inserting links to descriptors rather than properties.  bert, make it stop... -->
  1714   <!-- <a href="#font-stretch-prop" class="noxref"><span class="property">'font-stretch'</span></a> -->
  1716   <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
  1717    <a href="#propdef-font">font</a> property</h3>
  1719   <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
  1720    <tbody>
  1721     <tr>
  1722      <td>Name:
  1724      <td><dfn id=propdef-font>font</dfn>
  1726     <tr>
  1727      <td>Value:
  1729      <td>[ [ <var>&lt;‘<a href="#propdef-font-style"><code
  1730       class=property>font-style</code></a>’&gt;</var> || <a
  1731       href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
  1732       || <var>&lt;‘<a href="#propdef-font-weight"><code
  1733       class=property>font-weight</code></a>’&gt;</var> || <var>&lt;‘<a
  1734       href="#propdef-font-stretch"><code
  1735       class=property>font-stretch</code></a>’</var> ]? <var>&lt;‘<a
  1736       href="#propdef-font-size"><code
  1737       class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
  1738       class=property>line-height</code>’&gt;</var> ]? <var>&lt;‘<a
  1739       href="#descdef-font-family"><code
  1740       class=property>font-family</code></a>’&gt;</var> ] | caption | icon |
  1741       menu | message-box | small-caption | status-bar
  1743     <tr>
  1744      <td>Initial:
  1746      <td>see individual properties
  1748     <tr>
  1749      <td>Applies to:
  1751      <td>all elements
  1753     <tr>
  1754      <td>Inherited:
  1756      <td>yes
  1758     <tr>
  1759      <td>Percentages:
  1761      <td>see individual properties
  1763     <tr>
  1764      <td>Media:
  1766      <td>visual
  1768     <tr>
  1769      <td>Computed value:
  1771      <td>see individual properties
  1773     <tr>
  1774      <td>Animatable:
  1776      <td>see individual properties
  1777   </table>
  1779   <p>The <span class=property>‘<a href="#propdef-font"><code
  1780    class=property>font</code></a>’</span> property is, except as described
  1781    below, a shorthand property for setting ‘<a
  1782    href="#propdef-font-style"><code class=property>font-style</code></a>’,
  1783    <span class=property>‘<a href="#propdef-font-variant"><code
  1784    class=property>font-variant</code></a>’</span>, <span
  1785    class=property>‘<a href="#propdef-font-weight"><code
  1786    class=property>font-weight</code></a>’</span>, <span
  1787    class=property>‘<a href="#propdef-font-stretch"><code
  1788    class=property>font-stretch</code></a>’</span>, <span
  1789    class=property>‘<a href="#propdef-font-size"><code
  1790    class=property>font-size</code></a>’</span>, ‘<code
  1791    class=property>line-height</code>’, <span class=property>‘<a
  1792    href="#descdef-font-family"><code
  1793    class=property>font-family</code></a>’</span> at the same place in the
  1794    stylesheet. Values for the <span class=property>‘<a
  1795    href="#propdef-font-variant"><code
  1796    class=property>font-variant</code></a>’</span> property may also be
  1797    included but only those supported in CSS 2.1, none of the font-variant
  1798    values added in this specification can be used in the <span
  1799    class=property>‘<a href="#propdef-font"><code
  1800    class=property>font</code></a>’</span> shorthand:
  1802   <pre
  1803    class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
  1805   <p>The syntax of this property is based on a traditional typographical
  1806    shorthand notation to set multiple properties related to fonts.
  1808   <p>All subproperties of the ‘<a href="#propdef-font"><code
  1809    class=property>font</code></a>’ property are first reset to their
  1810    initial values, including those listed above plus <span
  1811    class=property>‘<a href="#propdef-font-size-adjust"><code
  1812    class=property>font-size-adjust</code></a>’</span>, <span
  1813    class=property>‘<a href="#propdef-font-kerning"><code
  1814    class=property>font-kerning</code></a>’</span>, subproperties of <span
  1815    class=property>‘<a href="#propdef-font-variant"><code
  1816    class=property>font-variant</code></a>’</span> and and <span
  1817    class=property>‘<a href="#propdef-font-language-override"><code
  1818    class=property>font-language-override</code></a>’</span>. Then, those
  1819    properties that are given explicit values in the <span
  1820    class=property>‘<a href="#propdef-font"><code
  1821    class=property>font</code></a>’</span> shorthand are set to those
  1822    values. For a definition of allowed and initial values, see the previously
  1823    defined properties. For reasons of backwards compatibility, it is not
  1824    possible to set <span class=property>‘<a
  1825    href="#propdef-font-size-adjust"><code
  1826    class=property>font-size-adjust</code></a>’</span> to anything other
  1827    than its initial value using the <span class=property>‘<a
  1828    href="#propdef-font"><code class=property>font</code></a>’</span>
  1829    shorthand property; instead, use the individual property.
  1831   <div class=example>
  1832    <p style="display:none">Example(s):
  1834    <p>
  1836    <pre>p { font: 12pt/14pt sans-serif }
  1837 p { font: 80% sans-serif }
  1838 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
  1839 p { font: bold italic large Palatino, serif }
  1840 p { font: normal small-caps 120%/120% fantasy }
  1841 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
  1842 </pre>
  1844    <p> In the second rule, the font size percentage value (‘<code
  1845     class=css>80%</code>’) refers to the computed ‘<a
  1846     href="#propdef-font-size"><code class=property>font-size</code></a>’ of
  1847     the parent element. In the third rule, the line height percentage
  1848     (‘<code class=css>110%</code>’) refers to the font size of the
  1849     element itself.
  1851    <p>The first three rules do not specify the <span class=property>‘<a
  1852     href="#propdef-font-variant"><code
  1853     class=property>font-variant</code></a>’</span> and <span
  1854     class=property>‘<a href="#propdef-font-weight"><code
  1855     class=property>font-weight</code></a>’</span> explicitly, so these
  1856     properties receive their initial values (‘<a href="#normal2"><code
  1857     class=property>normal</code></a>’). Notice that the font family name
  1858     "new century schoolbook", which contains spaces, is enclosed in quotes.
  1859     The fourth rule sets the <span class=property>‘<a
  1860     href="#propdef-font-weight"><code
  1861     class=property>font-weight</code></a>’</span> to ‘<code
  1862     class=property>bold</code>’, the <span class=property>‘<a
  1863     href="#propdef-font-style"><code
  1864     class=property>font-style</code></a>’</span> to ‘<code
  1865     class=property>italic</code>’, and implicitly sets <span
  1866     class=property>‘<a href="#propdef-font-variant"><code
  1867     class=property>font-variant</code></a>’</span> to ‘<a
  1868     href="#normal2"><code class=property>normal</code></a>’.
  1870    <p> The fifth rule sets the <span class=property>‘<a
  1871     href="#propdef-font-variant"><code
  1872     class=property>font-variant</code></a>’</span> (‘<a
  1873     href="#small-caps"><code class=property>small-caps</code></a>’), the
  1874     <span class=property>‘<a href="#propdef-font-size"><code
  1875     class=property>font-size</code></a>’</span> (120% of the parent's font
  1876     size), the <span class=property>‘<code
  1877     class=property>line-height</code>’</span> (120% of the font size) and
  1878     the <span class=property>‘<a href="#descdef-font-family"><code
  1879     class=property>font-family</code></a>’</span> (‘<a
  1880     href="#fantasy"><code class=property>fantasy</code></a>’). It follows
  1881     that the keyword ‘<a href="#normal2"><code
  1882     class=property>normal</code></a>’ applies to the two remaining
  1883     properties: <span class=property>‘<a href="#propdef-font-style"><code
  1884     class=property>font-style</code></a>’</span> and <span
  1885     class=property>‘<a href="#propdef-font-weight"><code
  1886     class=property>font-weight</code></a>’</span>.
  1888    <p>The sixth rule sets the <span class=property>‘<a
  1889     href="#propdef-font-style"><code
  1890     class=property>font-style</code></a>’</span>, <span
  1891     class=property>‘<a href="#propdef-font-stretch"><code
  1892     class=property>font-stretch</code></a>’</span>, <span
  1893     class=property>‘<a href="#propdef-font-size"><code
  1894     class=property>font-size</code></a>’</span>, and <span
  1895     class=property>‘<a href="#descdef-font-family"><code
  1896     class=property>font-family</code></a>’</span>, the other font
  1897     properties being set to their initial values.
  1898   </div>
  1900   <p>Since the ‘<a href="#propdef-font-stretch"><code
  1901    class=property>font-stretch</code></a>’ property was not defined in CSS
  1902    2.1, when using ‘<a href="#propdef-font-stretch"><code
  1903    class=property>font-stretch</code></a>’ values within ‘<a
  1904    href="#propdef-font"><code class=property>font</code></a>’ rules,
  1905    authors should include a extra version compatible with older user agents:
  1907   <pre>p {
  1908   font: 80% sans-serif;   /* for older user agents */
  1909   font: condensed 80% sans-serif;
  1910 }</pre>
  1912   <p>The following values refer to system fonts:
  1914   <dl>
  1915    <dt><strong>caption</strong>
  1917    <dd>The font used for captioned controls (e.g., buttons, drop-downs,
  1918     etc.).
  1920    <dt><strong>icon</strong>
  1922    <dd>The font used to label icons.
  1924    <dt><strong>menu</strong>
  1926    <dd>The font used in menus (e.g., dropdown menus and menu lists).
  1928    <dt><strong>message-box</strong>
  1930    <dd>The font used in dialog boxes.
  1932    <dt><strong>small-caption</strong>
  1934    <dd>The font used for labeling small controls.
  1936    <dt><strong>status-bar</strong>
  1938    <dd>The font used in window status bars.
  1939   </dl>
  1941   <p>System fonts may only be set as a whole; that is, the font family, size,
  1942    weight, style, etc. are all set at the same time. These values may then be
  1943    altered individually if desired. If no font with the indicated
  1944    characteristics exists on a given platform, the user agent should either
  1945    intelligently substitute (e.g., a smaller version of the ‘<code
  1946    class=property>caption</code>’ font might be used for the ‘<code
  1947    class=property>small-caption</code>’ font), or substitute a user agent
  1948    default font. As for regular fonts, if, for a system font, any of the
  1949    individual properties are not part of the operating system's available
  1950    user preferences, those properties should be set to their initial values.
  1952   <p>That is why this property is "almost" a shorthand property: system fonts
  1953    can only be specified with this property, not with <span
  1954    class=property>‘<a href="#descdef-font-family"><code
  1955    class=property>font-family</code></a>’</span> itself, so <span
  1956    class=property>‘<a href="#propdef-font"><code
  1957    class=property>font</code></a>’</span> allows authors to do more than
  1958    the sum of its subproperties. However, the individual properties such as
  1959    <span class=property>‘<a href="#propdef-font-weight"><code
  1960    class=property>font-weight</code></a>’</span> are still given values
  1961    taken from the system font, which can be independently varied.
  1963   <p>Note that the keywords used for the system fonts listed above are only
  1964    treated as keywords when they occur in the initial position, in other
  1965    positions the same string is treated as part of the font family name:
  1967   <pre>  font: menu;        /* use the font settings for system menus */
  1968   font: large menu;  /* use a font family named "menu" */</pre>
  1970   <div class=example>
  1971    <p style="display:none">Example(s):
  1973    <p>
  1975    <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
  1976 button p { font: menu }
  1977 button p em { font-weight: bolder }
  1978 </pre>
  1980    <p>If the font used for dropdown menus on a particular system happened to
  1981     be, for example, 9-point Charcoal, with a weight of 600, then P elements
  1982     that were descendants of BUTTON would be displayed as if this rule were
  1983     in effect:
  1985    <pre>button p { font: 600 9pt Charcoal }
  1986 </pre>
  1988    <p>Because the <span class=property>‘<a href="#propdef-font"><code
  1989     class=property>font</code></a>’</span> shorthand resets to its initial
  1990     value any property not explicitly given a value, this has the same effect
  1991     as this declaration:
  1993    <pre>button p {
  1994   font-style: normal;
  1995   font-variant: normal;
  1996   font-weight: 600;
  1997   font-size: 9pt;
  1998   line-height: normal;
  1999   font-family: Charcoal
  2001 </pre>
  2002   </div>
  2003   <!-- prop: font-synthesis -->
  2005   <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
  2006    synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
  2007    property</h3>
  2009   <table class=propdef id=namefont-synthesisvaluenone-weight-style>
  2010    <tbody>
  2011     <tr>
  2012      <td>Name:
  2014      <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
  2016     <tr>
  2017      <td>Value:
  2019      <td>none | [ weight || style ]
  2021     <tr>
  2022      <td>Initial:
  2024      <td>weight style
  2026     <tr>
  2027      <td>Applies to:
  2029      <td>all elements
  2031     <tr>
  2032      <td>Inherited:
  2034      <td>yes
  2036     <tr>
  2037      <td>Percentages:
  2039      <td>N/A
  2041     <tr>
  2042      <td>Media:
  2044      <td>visual
  2046     <tr>
  2047      <td>Computed value:
  2049      <td>as specified
  2051     <tr>
  2052      <td>Animatable:
  2054      <td>no
  2055   </table>
  2057   <p>This property controls whether user agents are allowed to synthesize
  2058    bold or oblique font faces when a font family lacks bold or italic faces.
  2059    If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
  2060    specified, user agents must not synthesize bold faces and if ‘<code
  2061    class=property>style</code>’ is not specified user agents must not
  2062    synthesize italic faces. A value of ‘<a
  2063    href="#font-variant-ligatures-none-value"><code
  2064    class=property>none</code></a>’ disallows all synthetic faces.
  2066   <div class=example>
  2067    <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
  2069    <pre>*:lang(ar) { font-synthesis: none; }
  2070 </pre>
  2071   </div>
  2073   <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
  2075   <h3 id=font-face-rule><span class=secno>4.1 </span>The
  2076    <code>@font-face</code> rule</h3>
  2078   <p>The <code>@font-face</code> rule allows for linking to fonts that are
  2079    automatically fetched and activated when needed. This allows authors to
  2080    select a font that closely matches the design goals for a given page
  2081    rather than limiting the font choice to a set of fonts available on all
  2082    platforms. A set of font descriptors define the location of a font
  2083    resource, either locally or externally, along with the style
  2084    characteristics of an individual face. Multiple <code>@font-face</code>
  2085    rules can be used to construct font families with a variety of faces.
  2086    Using CSS font matching rules, a user agent can selectively download only
  2087    those faces that are needed for a given piece of text.
  2089   <p>The @font-face rule consists of the @font-face at-keyword followed by a
  2090    block of descriptor declarations. In terms of the grammar, this
  2091    specification defines the following productions:
  2093   <pre><dfn id=fontfacerule>font_face_rule</dfn>
  2094   : <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>*
  2097 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
  2098   : <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>
  2099   ;</pre>
  2101   <p>The following new definitions are introduced:
  2103   <pre>-    -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
  2104 F    f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
  2106   <p>The following new token is introduced:
  2108   <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
  2110   <p>Each <span class=index-inst id=font-face
  2111    title="@font-face"><code>@font-face</code></span> rule specifies a value
  2112    for every font descriptor, either implicitly or explicitly. Those not
  2113    given explicit values in the rule take the initial value listed with each
  2114    descriptor in this specification. These descriptors apply solely within
  2115    the context of the <code>@font-face</code> rule in which they are defined,
  2116    and do not apply to document language elements. There is no notion of
  2117    which elements the descriptors apply to or whether the values are
  2118    inherited by child elements. When a given descriptor occurs multiple times
  2119    in a given <code>@font-face</code> rule, only the last descriptor
  2120    declaration is used and all prior declarations for that descriptor are
  2121    ignored.
  2123   <div class=example>
  2124    <p>To use a downloadable font called Gentium:</p>
  2126    <pre>
  2127 @font-face {
  2128   font-family: Gentium;
  2129   src: url(http://example.com/fonts/Gentium.ttf);
  2132 p { font-family: Gentium, serif; }
  2133 </pre>
  2135    <p>The user agent will download Gentium and use it when rendering text
  2136     within paragraph elements. If for some reason the site serving the font
  2137     is unavailable, the default serif font will be used.</p>
  2138   </div>
  2140   <p>A given set of <code>@font-face</code> rules define a set of fonts
  2141    available for use within the documents that contain these rules. When font
  2142    matching is done, fonts defined using these rules are considered before
  2143    other available fonts on a system.
  2145   <p>Downloaded fonts are only available to documents that reference them.
  2146    The process of activating these fonts must not make them available to
  2147    other applications or to documents that don't directly link to the same
  2148    font. User agent implementers might consider it convenient to use
  2149    downloaded fonts when rendering characters in other documents for which no
  2150    other available font exists as part of the system font fallback procedure.
  2151    However, this would cause a security leak since the contents of one page
  2152    would be able to affect other pages, something an attacker could use as an
  2153    attack vector. These restrictions do not affect caching behavior, fonts
  2154    are cached the same way other web resources are cached.
  2156   <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
  2157    properties in a declaration block, declarations of any descriptors that
  2158    are not supported by the user agent must be ignored.
  2159    <code>@font-face</code> rules require a font-family and src descriptor; if
  2160    either of these are missing, the <code>@font-face</code> rule is invalid
  2161    and must be ignored entirely.
  2163   <p>In cases where user agents have limited platform resources or implement
  2164    the ability to disable downloadable font resources,
  2165    <code>@font-face</code> rules must simply be ignored; the behavior of
  2166    individual descriptors as defined in this specification should not be
  2167    altered.
  2169   <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
  2170    href="#descdef-font-family">font-family</a> descriptor</h3>
  2172   <table class=descdef>
  2173    <tbody>
  2174     <tr>
  2175      <td>Name:
  2177      <td><dfn id=descdef-font-family>font-family</dfn>
  2179     <tr>
  2180      <td>Value:
  2182      <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
  2184     <tr>
  2185      <td><em>Initial:</em>
  2187      <td>N/A
  2188   </table>
  2190   <p>This descriptor defines the font family name that will be used in all
  2191    CSS font family name matching. It is required for the @font-face rule to
  2192    be valid. It overrides the font family names contained in the underlying
  2193    font data. If the font family name is the same as a font family available
  2194    in a given user's environment, it effectively hides the underlying font
  2195    for documents that use the stylesheet. This permits a web author to freely
  2196    choose font-family names without worrying about conflicts with font family
  2197    names present in a given user's environment. Likewise, platform
  2198    substitutions for a given font family name must not be used.
  2200   <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
  2201    href="#descdef-src">src</a> descriptor</h3>
  2203   <table class=descdef>
  2204    <tbody>
  2205     <tr>
  2206      <td>Name:
  2208      <td><dfn id=descdef-src>src</dfn>
  2210     <tr>
  2211      <td>Value:
  2213      <td>[ &lt;url> [format(&lt;string> #)]? | <a
  2214       href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
  2216     <tr>
  2217      <td><em>Initial:</em>
  2219      <td>N/A
  2220   </table>
  2222   <p>This descriptor specifies the resource containing font data. It is
  2223    required for the <code>@font-face</code> rule to be valid. Its value is a
  2224    prioritized, comma-separated list of external references or
  2225    locally-installed font face names. When a font is needed the user agent
  2226    iterates over the set of references listed, using the first one it can
  2227    successfully activate. Fonts containing invalid data or local font faces
  2228    that are not found are ignored and the user agent loads the next font in
  2229    the list.
  2231   <p>As with other URLs in CSS, the URL may be relative, in which case it is
  2232    resolved relative to the location of the style sheet containing the <span
  2233    class=index-inst id=font-face0
  2234    title="@font-face"><code>@font-face</code></span> rule. In the case of SVG
  2235    fonts, the URL points to an element within a document containing SVG font
  2236    definitions. If the element reference is omitted, a reference to the first
  2237    defined font is implied. Similarly, font container formats that can
  2238    contain more than one font must load one and only one of the fonts for a
  2239    given <code>@font-face</code> rule. Fragment identifiers are used to
  2240    indicate which font to load. If a container format lacks a defined
  2241    fragment identifier scheme, implementations should use a simple 1-based
  2242    indexing scheme (e.g. "font-collection#1" for the first font,
  2243    "font-collection#2" for the second font).
  2245   <pre>
  2246 src: url(fonts/simple.ttf);   /* load simple.ttf relative to stylesheet location */
  2247 src: url(/fonts/simple.ttf);  /* load simple.ttf from absolute location */
  2248 src: url(fonts.svg#simple);   /* load SVG font with id 'simple' */
  2249 </pre>
  2251   <p>External references consist of a URL, followed by an optional hint
  2252    describing the format of the font resource referenced by that URL. The
  2253    format hint contains a comma-separated list of format strings that denote
  2254    well-known font formats. Conformant user agents must skip downloading a
  2255    font resource if the format hints indicate only unsupported or unknown
  2256    font formats. If no format hints are supplied, the user agent should
  2257    download the font resource.
  2259   <pre>
  2260 /* load WOFF font if possible, otherwise use OpenType font */
  2261 @font-face {
  2262   font-family: bodytext;
  2263   src: url(ideal-sans-serif.woff) format("woff"),
  2264        url(basic-sans-serif.ttf) format("opentype");
  2266 </pre>
  2268   <p>Format strings defined by this specification:
  2270   <table class=data id=fontformats>
  2271    <thead>
  2272     <tr>
  2273      <th>String
  2275      <th>Font Format
  2277      <th>Common extensions
  2279    <tbody>
  2280     <tr>
  2281      <th>"woff"
  2283      <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
  2285      <td>.woff
  2287     <tr>
  2288      <th>"truetype"
  2290      <td><a
  2291       href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
  2293      <td>.ttf
  2295     <tr>
  2296      <th>"opentype"
  2298      <td><a
  2299       href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
  2301      <td>.ttf, .otf
  2303     <tr>
  2304      <th>"embedded-opentype"
  2306      <td><a
  2307       href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
  2308       OpenType</a>
  2310      <td>.eot
  2312     <tr>
  2313      <th>"svg"
  2315      <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
  2317      <td>.svg, .svgz
  2318   </table>
  2320   <p>Given the overlap in common usage between TrueType and OpenType, the
  2321    format hints "truetype" and "opentype" must be considered as synonymous; a
  2322    format hint of "opentype" does not imply that the font contains Postscript
  2323    CFF style glyph data or that it contains OpenType layout information (see
  2324    <a href="#platform-props-to-css">Appendix A</a> for more background on
  2325    this).
  2327   <p>When authors would prefer to use a locally available copy of a given
  2328    font and download it if it's not, <code>local()</code> can be used. The
  2329    locally-installed <dfn
  2330    id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
  2331    to <code>local()</code> is a format-specific string that uniquely
  2332    identifies a single font face within a larger family. The syntax for a <a
  2333    href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
  2334    unique font face name enclosed by "local(" and ")". The name can
  2335    optionally be enclosed in quotes. If unquoted, the unquoted font family
  2336    name processing conventions apply; the name must be a sequence of
  2337    identifiers separated by whitespace which is converted to a string by
  2338    joining the identifiers together separated by a single space.
  2340   <pre>
  2341 /* regular face of Gentium */
  2342 @font-face {
  2343   font-family: MyGentium;
  2344   src: local(Gentium),   /* use locally available Gentium */
  2345        url(Gentium.ttf); /* otherwise, download it */
  2347 </pre>
  2349   <p>For OpenType and TrueType fonts, this string is used to match only the
  2350    Postscript name or the full font name in the name table of locally
  2351    available fonts. Which type of name is used varies by platform and font,
  2352    so authors should include both of these names to assure proper matching
  2353    across platforms. Platform substitutions for a given font name must not be
  2354    used.
  2356   <pre>
  2357 /* bold face of Gentium */
  2358 @font-face {
  2359   font-family: MyGentium;
  2360   src: local(Gentium Bold),   /* full font name */
  2361        local(Gentium-Bold),   /* Postscript name */
  2362        url(GentiumBold.ttf);  /* otherwise, download it */
  2363   font-weight: bold;
  2365 </pre>
  2367   <p>Just as a <code>@font-face</code> rule specifies the characteristics of
  2368    a single font within a family, the unique name used with
  2369    <code>local()</code> specifies a single font, not an entire font family.
  2370    Defined in terms of OpenType font data, the Postscript name is found in
  2371    the font's <a
  2372    href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
  2373    in the name record with nameID = 6 (see <a href="#OPENTYPE"
  2374    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
  2375    Postscript name is the commonly used key for all fonts on OSX and for
  2376    Postscript CFF fonts under Windows. The full font name (nameID = 4) is
  2377    used as a unique key for fonts with TrueType glyphs on Windows.
  2379   <p>For OpenType fonts with multiple localizations of the full font name,
  2380    the US English version is used (language ID = 0x409 for Windows and
  2381    language ID = 0 for Macintosh) or the first localization when a US English
  2382    full font name is not available (the OpenType specification recommends
  2383    that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
  2384    fonts minimally include US English names</a>). User agents that also match
  2385    other full font names, e.g. matching the Dutch name when the current
  2386    system locale is set to Dutch, are considered non-conformant. This is done
  2387    not to prefer English but to avoid matching inconsistencies across font
  2388    versions and OS localizations, since font style names (e.g. "Bold") are
  2389    frequently localized into many languages and the set of localizations
  2390    available varies widely across platform and font version. User agents that
  2391    match a concatenation of family name (nameID = 1) with style name (nameID
  2392    = 2) are considered non-conformant.
  2394   <p>This also allows for referencing faces that belong to larger families
  2395    that cannot otherwise be referenced.
  2397   <div class=example>
  2398    <p>Use a local font or reference an SVG font in another document:</p>
  2400    <pre>
  2401 @font-face {
  2402   font-family: Headline;
  2403   src: local(Futura-Medium), 
  2404        url(fonts.svg#MyGeometricModern) format("svg");
  2406 </pre>
  2408    <p>Create an alias for local Japanese fonts on different platforms:</p>
  2410    <pre>
  2411 @font-face {
  2412   font-family: jpgothic;
  2413   src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
  2415 </pre>
  2417    <p>Reference a font face that cannot be matched within a larger family:</p>
  2419    <pre>
  2420 @font-face {
  2421   font-family: Hoefler Text Ornaments;
  2422   /* has the same font properties as Hoefler Text Regular */
  2423   src: local(HoeflerText-Ornaments); 
  2425 </pre>
  2427    <p>Since localized fullnames never match, a document with the header style
  2428     rules below would always render using the default serif font, regardless
  2429     whether a particular system locale parameter is set to Finnish or not:</p>
  2431    <pre>
  2432 @font-face {
  2433   font-family: SectionHeader;
  2434   src: local("Arial Lihavoitu");  /* Finnish fullname for Arial Bold, should fail */
  2435   font-weight: bold;
  2438 h2 { font-family: SectionHeader, serif; }
  2439 </pre>
  2441    <p>A conformant user agent would never load the font ‘<code
  2442     class=css>gentium.eot</code>’ in the example below, since it is
  2443     included in the first definition of the ‘<a href="#descdef-src"><code
  2444     class=property>src</code></a>’ descriptor which is overridden by the
  2445     second definition in the same <code>@font-face</code> rule:</p>
  2447    <pre>
  2448 @font-face {
  2449   font-family: MainText;
  2450   src: url(gentium.eot); /* for use with older non-conformant user agents */
  2451   src: local("Gentium"), url(gentium.ttf);  /* Overrides src definition */
  2453 </pre>
  2454   </div>
  2456   <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
  2457    descriptors: the <a href="#descdef-font-style">font-style</a>, <a
  2458    href="#descdef-font-weight">font-weight</a>, <a
  2459    href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
  2461   <table class=descdef>
  2462    <tbody>
  2463     <tr>
  2464      <td>Name:
  2466      <td><dfn id=descdef-font-style title="font-style
  2467       (descriptor)">font-style</dfn>
  2469     <tr>
  2470      <td>Value:
  2472      <td>normal | italic | oblique
  2474     <tr>
  2475      <td><em>Initial:</em>
  2477      <td>normal
  2478   </table>
  2480   <table class=descdef>
  2481    <tbody>
  2482     <tr>
  2483      <td>Name:
  2485      <td><dfn id=descdef-font-weight title="font-weight
  2486       (descriptor)">font-weight</dfn>
  2488     <tr>
  2489      <td>Value:
  2491      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  2493     <tr>
  2494      <td><em>Initial:</em>
  2496      <td>normal
  2497   </table>
  2499   <table class=descdef>
  2500    <tbody>
  2501     <tr>
  2502      <td>Name:
  2504      <td><dfn id=descdef-font-stretch title="font-stretch
  2505       (descriptor)">font-stretch</dfn>
  2507     <tr>
  2508      <td>Value:
  2510      <td>normal | ultra-condensed | extra-condensed | condensed |
  2511       semi-condensed | semi-expanded | expanded | extra-expanded |
  2512       ultra-expanded
  2514     <tr>
  2515      <td><em>Initial:</em>
  2517      <td>normal
  2518   </table>
  2520   <p>These descriptors define the characteristics of a font face and are used
  2521    in the process of matching styles to specific faces. For a font family
  2522    defined with several <code>@font-face</code> rules, user agents can either
  2523    download all faces in the family or use these descriptors to selectively
  2524    download font faces that match actual styles used in document. The values
  2525    for these descriptors are the same as those for the corresponding font
  2526    properties except that relative keywords are not allowed, ‘<code
  2527    class=property>bolder</code>’ and ‘<code
  2528    class=property>lighter</code>’. If these descriptors are omitted,
  2529    initial values are assumed.
  2531   <p>The value for these font face style attributes is used in place of the
  2532    style implied by the underlying font data. This allows authors to combine
  2533    faces in flexible combinations, even in situations where the original font
  2534    data was arranged differently. User agents that implement synthetic
  2535    bolding and obliquing must only apply synthetic styling in cases where the
  2536    font descriptors imply this is needed, rather than based on the style
  2537    attributes implied by the font data.
  2539   <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
  2540    <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
  2542   <table class=descdef>
  2543    <tbody>
  2544     <tr>
  2545      <td>Name:
  2547      <td><dfn id=descdef-unicode-range>unicode-range</dfn>
  2549     <tr>
  2550      <td>Value:
  2552      <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
  2554     <tr>
  2555      <td><em>Initial:</em>
  2557      <td>U+0-10FFFF
  2558   </table>
  2560   <p>This descriptor defines the set of Unicode codepoints that may be
  2561    supported by the font face for which it is declared. The descriptor value
  2562    is a comma-delimited list of Unicode range (<a
  2563    href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
  2564    these ranges defines the set of codepoints that serves as a hint for user
  2565    agents when deciding whether or not to download a font resource for a
  2566    given text run.
  2568   <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
  2569    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2570    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
  2571    "U+" or "u+" prefix followed by a codepoint range in one of the three
  2572    forms listed below. Ranges that do not fit one of the these forms are
  2573    invalid and cause the declaration to be ignored.
  2575   <dl>
  2576    <dt>single codepoint (e.g. U+416)
  2578    <dd>a valid Unicode codepoint, represented as one to six hexadecimal
  2579     digits
  2581    <dt>interval range (e.g. U+400-4ff)
  2583    <dd>represented as two hyphen-separated valid Unicode codepoints
  2584     indicating the inclusive start and end codepoints of a range
  2586    <dt>wildcard range (e.g. U+4??)
  2588    <dd>defined by the set of codepoints implied when trailing ‘<code
  2589     class=css>?</code>’ characters signify any hexadeximal digit
  2590   </dl>
  2592   <p>Individual codepoints are written using hexadecimal values that
  2593    correspond to <a href="http://www.unicode.org/charts/">Unicode character
  2594    codepoints</a>. Valid Unicode codepoint values vary between 0 and 10FFFF
  2595    inclusive. Digit values of codepoints are ASCII case-insensitive. For
  2596    interval ranges, the start and end codepoints must be valid Unicode values
  2597    and the end codepoint must be greater than or equal to the start
  2598    codepoint.
  2600   <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
  2601    "U+???") are valid and equivalent to a wildcard range with an initial zero
  2602    digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
  2603    the range of valid Unicode codepoints are invalid. Because of this, the
  2604    maximum number of trailing ‘<code class=css>?</code>’ wildcard
  2605    characters is five, even though the <a
  2606    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2607    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
  2609   <p>Within the comma-delimited list of Unicode ranges in a ‘<a
  2610    href="#descdef-unicode-range"><code
  2611    class=property>unicode-range</code></a>’ descriptor declaration, ranges
  2612    may overlap. The union of these ranges defines the set of codepoints for
  2613    which the corresponding font may be used. User agents must not download or
  2614    use the font for codepoints outside this set. User agents may normalize
  2615    the list of ranges into a list that is different but represents the same
  2616    set of codepoints.
  2618   <p>The associated font might not contain glyphs for the entire set of
  2619    codepoints defined by the ‘<a href="#descdef-unicode-range"><code
  2620    class=property>unicode-range</code></a>’ descriptor. When the font is
  2621    used the effective <a href="#character-map"><em>character map</em></a> is
  2622    the intersection of the codepoints defined by ‘<a
  2623    href="#descdef-unicode-range"><code
  2624    class=property>unicode-range</code></a>’ with the font's <a
  2625    href="#character-map"><em>character map</em></a>. This allows authors to
  2626    define supported ranges in terms of broad ranges without worrying about
  2627    the precise codepoint ranges supported by the underlying font.
  2629   <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
  2630    to define composite fonts</h3>
  2632   <p>Multiple <code>@font-face</code> rules with different unicode ranges for
  2633    the same family and style descriptor values can be used to create
  2634    composite fonts that mix the glyphs from different fonts for different
  2635    scripts. This can be used to combine fonts that only contain glyphs for a
  2636    single script (e.g. Latin, Greek, Cyrillic) or it can be used by authors
  2637    as a way of segmenting a font into fonts for commonly used characters and
  2638    less frequently used characters. Since the user agent will only pull down
  2639    the fonts it needs this helps reduce page bandwidth.
  2641   <p>If the unicode ranges overlap for a set of <code>@font-face</code> rules
  2642    with the same family and style descriptor values, the rules are ordered in
  2643    the reverse order they were defined; the last rule defined is the first to
  2644    be checked for a given character.
  2646   <p>Example ranges for specific languages or characters:
  2648   <dl>
  2649    <dt>unicode-range: U+A5;
  2651    <dd>a single code point, the yen/yuan symbol
  2653    <dt>unicode-range: U+0-7F;
  2655    <dd>code range for basic ASCII characters
  2657    <dt>unicode-range: U+590-5ff;
  2659    <dd>code range for Hebrew characters
  2661    <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
  2663    <dd>code range for Japanese kanji, hiragana and katakana characters plus
  2664     yen/yuan symbol
  2665   </dl>
  2667   <div class=example>
  2668    <p>The BBC provides news services in a wide variety of languages, many
  2669     that are not well supported across all platforms. Using an
  2670     <code>@font-face</code> rule, the BBC could provide a font for any of
  2671     these languages, as it already does via a manual font download.</p>
  2673    <pre>
  2674 @font-face {
  2675   font-family: BBCBengali;
  2676   src: url(fonts/BBCBengali.ttf) format("opentype");
  2677   unicode-range: U+00-FF, U+980-9FF;
  2679 </pre>
  2680   </div>
  2682   <div class=example>
  2683    <p>Technical documents often require a wide range of symbols. The STIX
  2684     Fonts project is one project aimed at providing fonts to support a wide
  2685     range of technical typesetting in a standardized way. The example below
  2686     shows the use of a font that provides glyphs for many of the mathematical
  2687     and technical symbol ranges within Unicode:</p>
  2689    <pre>
  2690 @font-face {
  2691   font-family: STIXGeneral;
  2692   src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
  2693   unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
  2695 </pre>
  2696   </div>
  2698   <div class=example>
  2699    <p>This example shows how an author can override the glyphs used for Latin
  2700     characters in a Japanese font with glyphs from a different font. The
  2701     first rule specifies no range so it defaults to the entire range. The
  2702     range specified in the second rule overlaps but takes precedence because
  2703     it is defined later.</p>
  2705    <pre>
  2706 @font-face {
  2707   font-family: JapaneseWithGentium;
  2708   src: local(MSMincho);
  2709   /* no range specified, defaults to entire range */
  2712 @font-face {
  2713   font-family: JapaneseWithGentium;
  2714   src: url(../fonts/Gentium.ttf);
  2715   unicode-range: U+0-2FF;
  2717 </pre>
  2718   </div>
  2720   <div class=example>
  2721    <p>Consider a family constructed to optimize bandwidth by separating out
  2722     Latin, Japanese and other characters into different font files:</p>
  2724    <pre>
  2725 /* fallback font - size: 4.5MB */
  2726 @font-face {
  2727   font-family: DroidSans;
  2728   src: url(DroidSansFallback.ttf);
  2729   /* no range specified, defaults to entire range */
  2732 /* Japanese glyphs - size: 1.2MB */
  2733 @font-face {
  2734   font-family: DroidSans;
  2735   src: url(DroidSansJapanese.ttf);
  2736   unicode-range: U+3000-9FFF, U+ff??;
  2739 /* Latin, Greek, Cyrillic along with some 
  2740    punctuation and symbols - size: 190KB */
  2741 @font-face {
  2742   font-family: DroidSans;
  2743   src: url(DroidSans.ttf);
  2744   unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
  2746 </pre>
  2748    <p>For simple Latin text, only the font for Latin characters is
  2749     downloaded:</p>
  2751    <pre>
  2752 body { font-family: DroidSans; }
  2754 &lt;p>This is that&lt;/p>
  2755 </pre>
  2757    <p>In this case the user agent first checks the unicode-range for the font
  2758     containing Latin characters (DroidSans.ttf). Since all the characters
  2759     above are in the range U+0-5FF, the user agent downloads the font and
  2760     renders the text with that font.</p>
  2762    <p>Next, consider text that makes use of an arrow character (⇨):</p>
  2764    <pre>
  2765 &lt;p>This &amp;#x21e8; that&lt;p>
  2766 </pre>
  2768    <p>The user agent again first checks the unicode-range of the font
  2769     containing Latin characters. Since U+2000-2300 includes the arrow code
  2770     point (U+21E8), the user agent downloads the font. For this character
  2771     however the Latin font does not have a matching glyph, so the effective
  2772     unicode-range used for font matching excludes this code point. Next, the
  2773     user agent evaluates the Japanese font. The unicode-range for the
  2774     Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
  2775     user agent does not download the Japanese font. Next the fallback font is
  2776     considered. The <code>@font-face</code> rule for the fallback font does
  2777     not define unicode-range so its value defaults to the range of all
  2778     Unicode code points. The fallback font is downloaded and used to render
  2779     the arrow character.</p>
  2780   </div>
  2782   <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
  2783    href="#descdef-font-variant">font-variant</a> and <a
  2784    href="#descdef-font-feature-settings">font-feature-settings</a>
  2785    descriptors</h3>
  2787   <table class=descdef>
  2788    <tbody>
  2789     <tr>
  2790      <td>Name:
  2792      <td><dfn id=descdef-font-variant title="font-variant
  2793       (descriptor)">font-variant</dfn>
  2795     <tr>
  2796      <td>Value:
  2798      <td>normal | none | [ <a
  2799       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  2800       <a
  2801       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  2802       || <a
  2803       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  2804       || <a
  2805       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  2806       || <a href="#stylistic"><var
  2807       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  2808       href="#historical-forms"><var>historical-forms</var></a> || <a
  2809       href="#styleset"><var
  2810       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  2811       href="#character-variant"><var
  2812       title=character-variant>character-variant(&lt;feature-value-name&gt;
  2813       #)</var></a> || <a href="#swash"><var
  2814       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  2815       href="#ornaments"><var
  2816       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  2817       href="#annotation"><var
  2818       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  2819       <a href="#small-caps"><i>small-caps</i></a> | <a
  2820       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  2821       href="#petite-caps"><i>petite-caps</i></a> | <a
  2822       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  2823       href="#unicase"><i>unicase</i></a> | <a
  2824       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  2825       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  2826       || <a
  2827       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  2828       || <a
  2829       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  2830       || <a href="#ordinal"><i>ordinal</i></a> || <a
  2831       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  2832       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  2833       || <a
  2834       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  2835       || <a href="#ruby"><i>ruby</i></a> ]
  2837     <tr>
  2838      <td><em>Initial:</em>
  2840      <td>normal
  2841   </table>
  2843   <table class=descdef>
  2844    <tbody>
  2845     <tr>
  2846      <td>Name:
  2848      <td><dfn id=descdef-font-feature-settings title="font-feature-settings
  2849       (descriptor)">font-feature-settings</dfn>
  2851     <tr>
  2852      <td>Value:
  2854      <td>normal | <a
  2855       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  2857     <tr>
  2858      <td><em>Initial:</em>
  2860      <td>normal
  2861   </table>
  2863   <p>These descriptors define initial settings that apply when the font
  2864    defined by an <code>@font-face</code> rule is rendered. They do not affect
  2865    font selection. Values are identical to those defined for the
  2866    corresponding ‘<a href="#propdef-font-variant"><code
  2867    class=property>font-variant</code></a>’ and ‘<a
  2868    href="#propdef-font-feature-settings"><code
  2869    class=property>font-feature-settings</code></a>’ properties defined
  2870    below except that the value ‘<code class=property>inherit</code>’ is
  2871    omitted. When multiple font feature descriptors or properties are used,
  2872    the cumulative effect on text rendering is detailed in the section <a
  2873    href="#font-feature-resolution">Font Feature Resolution</a> below. In
  2874    cases where specific values define synthesized fallback for certain ‘<a
  2875    href="#propdef-font-variant"><code
  2876    class=property>font-variant</code></a>’ subproperties, the same
  2877    synthesized fallback applies when used within those values are used with
  2878    the <a href="#descdef-font-variant">‘<code
  2879    class=property>font-variant</code>’</a> descriptor.
  2881   <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
  2882    guidelines</h3>
  2884   <p>The <code>@font-face</code> rule is designed to allow lazy loading of
  2885    font resources that are only downloaded when used within a document. A
  2886    stylesheet can include <code>@font-face</code> rules for a library of
  2887    fonts of which only a select set are used; user agents must only download
  2888    those fonts that are referred to within the style rules applicable to a
  2889    given page. User agents that download all fonts defined in
  2890    <code>@font-face</code> rules without considering whether those fonts are
  2891    in fact used within a page are considered non-conformant. In cases where a
  2892    font might be downloaded in character fallback cases, user agents may
  2893    download a font if it's listed in a font list but is not actually used for
  2894    a given text run.
  2896   <pre>
  2897 @font-face {
  2898   font-family: GeometricModern;
  2899   src: url(font.ttf);
  2902 p {
  2903   /* font will be downloaded for pages with p elements */
  2904   font-family: GeometricModern, sans-serif;
  2907 h2 {
  2908   /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
  2909   font-family: Futura, GeometricModern, sans-serif;
  2911 </pre>
  2913   <p>In cases where textual content is loaded before downloadable fonts are
  2914    available, user agents may render text as it would be rendered if
  2915    downloadable font resources are not available or they may render text
  2916    transparently with fallback fonts to avoid a flash of text using a
  2917    fallback font. In cases where the font download fails user agents must
  2918    display text, simply leaving transparent text is considered non-conformant
  2919    behavior. Authors are advised to use fallback fonts in their font lists
  2920    that closely match the vertical metrics of the downloadable fonts to avoid
  2921    large page reflows where possible.
  2923   <h3 id=same-origin-restriction><span class=secno>4.9 </span>Same-origin
  2924    restriction for fonts</h3>
  2926   <h4 id=default-same-origin-restriction><span class=secno>4.9.1
  2927    </span>Default same-origin restriction</h4>
  2928   <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
  2929   http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
  2930   http://www.w3.org/2011/10/31-webapps-minutes.html#item02
  2931 -->
  2933   <p>User agents must implement a same-origin restriction when loading fonts
  2934    via the <code>@font-face</code> mechanism. This restriction limits the
  2935    loading of fonts for a given document to fonts loaded from the same
  2936    origin. Fonts can only be loaded via the same host, port, and method
  2937    combination as the containing document, using the <a
  2938    href="http://www.w3.org/TR/html5/browsers.html#origin">origin matching
  2939    algorithm</a> described in the <a href="#HTML5"
  2940    rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification. The origin of
  2941    the stylesheet containing <code>@font-face</code> rules is not used when
  2942    deciding whether a font is same origin or not, only the origin of the
  2943    containing document is used. The restriction applies to all font types.
  2945   <p>Given a document located at http://example.com/page.html, fonts defined
  2946    with ‘<a href="#descdef-src"><code class=property>src</code></a>’
  2947    definitions considered cross origin must not be loaded:
  2949   <pre>
  2950 /* same origin (i.e. domain, protocol, port match document) */
  2951 src: url(fonts/simple.ttf);                     
  2952 src: url(//fonts/simple.ttf);                     
  2954 /* cross origin, different protocol */
  2955 src: url(https://example.com/fonts/simple.ttf);              
  2957 /* cross origin, different domain */
  2958 src: url(http://another.example.com/fonts/simple.ttf); 
  2959 </pre>
  2961   <h4 id=allowing-cross-origin-font-loading><span class=secno>4.9.2
  2962    </span>Allowing cross-origin font loading</h4>
  2964   <p>User agents must also implement the ability to relax this restriction
  2965    using cross-site origin controls <a href="#CORS"
  2966    rel=biblioentry>[CORS]<!--{{!CORS}}--></a> for fonts loaded via HTTP.
  2967    Sites can explicitly allow cross-site downloading of font data using the
  2968    <code>Access-Control-Allow-Origin</code> HTTP header. For other protocols,
  2969    no explicit relaxation mechanism is defined or required.
  2971   <p>For font loads over HTTP, cross-origin requests must be made with the
  2972    following parameter settings which are used in conjunction with the <a
  2973    href="http://www.w3.org/TR/cors/#cross-origin-request-0"> <em>cross-origin
  2974    request algorithm</em></a> <a href="#CORS"
  2975    rel=biblioentry>[CORS]<!--{{!CORS}}--></a>:
  2977   <ul>
  2978    <li><em>request URL</em> — the URL of the font resource in the <a
  2979     href="#descdef-src"><code>src</code></a> descriptor
  2981    <li><em>request method</em> — GET
  2983    <li><em>author request headers</em> — none
  2985    <li><em>request entity body</em> — empty
  2987    <li><em>source origin</em> — the origin of the page which linked to the
  2988     stylesheet
  2990    <li><em>manual redirect flag</em> — false
  2992    <li><em>omit credentials flag</em> — true
  2994    <li><em>force preflight flag</em> — false
  2995   </ul>
  2997   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
  2998    Algorithm</h2>
  3000   <p>The algorithm below describes how fonts are associated with individual
  3001    runs of text. For each character in the run a font family is chosen and a
  3002    particular font face is selected containing a glyph for that character.
  3004   <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
  3005    font family names</h3>
  3007   <p>As part of the font matching algorithm outlined below, user agents must
  3008    match font family names used in style rules with actual font family names
  3009    contained in fonts available in a given environment or defined via
  3010    <code>@font-face</code> rules. User agents must match these names case
  3011    insensitively, using the "Default Caseless Matching" algorithm outlined in
  3012    the Unicode specification <a href="#UNICODE6"
  3013    rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>. This algorithm is
  3014    detailed in section 3.13 entitled "Default Case Algorithms". Specifically,
  3015    the algorithm must be applied without normalizing the strings involved and
  3016    without applying any language-specific tailorings. The case folding method
  3017    specified by this algorithm uses the case mappings with status field
  3018    ‘<code class=property>C</code>’ or ‘<code class=property>F</code>’
  3019    in the CaseFolding.txt file of the Unicode Character Database.
  3021   <p class=note> Implementors should take care to verify that a given
  3022    caseless string comparison implementation uses this precise algorithm and
  3023    not assume that a given platform string matching routine follows it, as
  3024    many of these have locale-specific behavior or use some level of string
  3025    normalization.
  3027   <p class=note> For authors this means that font family names are matched
  3028    case insensitively, whether those names exist in a platform font or in the
  3029    <code>@font-face</code> rules contained in a stylesheet. Authors should
  3030    take care to ensure that names use a character sequence consistent with
  3031    the actual font family name, particularly when using combining characters
  3032    such as diacritical marks. For example, a family name that contains an
  3033    uppercase A (U+0041) followed by a combining ring (U+030A) will
  3034    <strong>not</strong> match a name that looks identical but which uses the
  3035    precomposed lowercase a-ring character (U+00E5) instead of the combining
  3036    sequence.
  3038   <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
  3039    styles</h3>
  3041   <p>The procedure for choosing fonts consists of iterating over the font
  3042    families determined by the font-family property, selecting a font face
  3043    with the appropriate style based on other font properties and then
  3044    determining whether a glyph exists for a given character. This is done
  3045    using the <dfn id=character-map>character map</dfn> of the font, data
  3046    which maps characters to the default glyph for that character. Codepoint
  3047    sequences consisting of a base character followed by a sequence of
  3048    combining characters are treated slightly differently, see the section on
  3049    <a href="#cluster-matching">cluster matching</a> below.
  3051   <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
  3052    given font family is defined to be the face that would be selected if all
  3053    font style properties were set to their initial value.
  3055   <ol id=fontmatchingalg>
  3056    <li>Using the computed font property values for a given element, the user
  3057     agent starts with the first family name in the fontlist specified by the
  3058     <span class=property>‘<a href="#descdef-font-family"><code
  3059     class=property>font-family</code></a>’</span> property.
  3061    <li>If the family name is unquoted and is a generic family name, the user
  3062     agent looks up the appropriate font family name to be used. User agents
  3063     may choose the generic font family to use based on the language of the
  3064     containing element or the Unicode range of the character.
  3066    <li>For other family names, the user agent attempts to find the family
  3067     name among fonts defined via <code>@font-face</code> rules and then among
  3068     available system fonts, matching names with a case-insensitive comparison
  3069     as outlined <a href="#font-family-casing">in the section above</a>. On
  3070     systems containing fonts with multiple localized font family names, user
  3071     agents must match any of these names independent of the underlying system
  3072     locale or platform API used. If the font resources defined for a given
  3073     face in an @font-face rule are either not available or contain invalid
  3074     font data, then the face should be treated as not present in the family.
  3075     If no faces are present for a family defined via @font-face rules, the
  3076     family should be treated as missing; matching a platform font with the
  3077     same name must not occur in this case.
  3079    <li>If a font family match occurs, the user agent assembles the set of
  3080     font faces in that family and then narrows the set to a single face using
  3081     other font properties in the order given below:
  3082     <ol id=fontstylematchingalg>
  3083      <li><span class=property>‘<a href="#propdef-font-stretch"><code
  3084       class=property>font-stretch</code></a>’</span> is tried first. If the
  3085       matching set contains faces with width values matching the ‘<a
  3086       href="#propdef-font-stretch"><code
  3087       class=property>font-stretch</code></a>’ value, faces with other width
  3088       values are removed from the matching set. If there is no face that
  3089       exactly matches the width value the nearest width is used instead. If
  3090       the value of ‘<a href="#propdef-font-stretch"><code
  3091       class=property>font-stretch</code></a>’ is ‘<a
  3092       href="#normal2"><code class=property>normal</code></a>’ or one of the
  3093       condensed values, narrower width values are checked first, then wider
  3094       values. If the value of ‘<a href="#propdef-font-stretch"><code
  3095       class=property>font-stretch</code></a>’ is one of the expanded
  3096       values, wider values are checked first, followed by narrower values.
  3097       Once the closest matching width has been determined by this process,
  3098       faces with other widths are removed from the matching set.
  3100      <li><span class=property>‘<a href="#propdef-font-style"><code
  3101       class=property>font-style</code></a>’</span> is tried next. If the
  3102       value of ‘<a href="#propdef-font-style"><code
  3103       class=property>font-style</code></a>’ is ‘<code
  3104       class=property>italic</code>’, italic faces are checked first, then
  3105       oblique, then normal faces. If the value is ‘<code
  3106       class=property>oblique</code>’, oblique faces are checked first, then
  3107       italic faces and then normal faces. If the value is ‘<a
  3108       href="#normal2"><code class=property>normal</code></a>’, normal faces
  3109       are checked first, then oblique faces, then italic faces. Faces with
  3110       other style values are excluded from the matching set. User agents are
  3111       permitted to distinguish between italic and oblique faces within
  3112       platform font families but this is not required, they may treat all
  3113       italic or oblique faces as italic faces. However, within font families
  3114       defined via <code>@font-face</code> rules, italic and oblique faces
  3115       must be distinguished using the value of the ‘<a
  3116       href="#propdef-font-style"><code
  3117       class=property>font-style</code></a>’ descriptor.
  3119      <li><span class=property>‘<a href="#propdef-font-weight"><code
  3120       class=property>font-weight</code></a>’</span> is matched next, it
  3121       will always reduce the matching set to a single font face. If
  3122       bolder/lighter relative weights are used, the effective weight is
  3123       calculated based on the inherited weight value, as described in the
  3124       definition of the ‘<a href="#propdef-font-weight"><code
  3125       class=property>font-weight</code></a>’ property. Given the desired
  3126       weight and the weights of faces in the matching set after the steps
  3127       above, if the desired weight is available that face matches. Otherwise,
  3128       a weight is chosen using the rules below:
  3129       <ul>
  3130        <li>If the desired weight is less than 400, weights below the desired
  3131         weight are checked in descending order followed by weights above the
  3132         desired weight in ascending order until a match is found.
  3134        <li>If the desired weight is greater than 500, weights above the
  3135         desired weight are checked in ascending order followed by weights
  3136         below the desired weight in descending order until a match is found.
  3138        <li>If the desired weight is 400, 500 is checked first and then the
  3139         rule for desired weights less than 400 is used.
  3141        <li>If the desired weight is 500, 400 is checked first and then the
  3142         rule for desired weights less than 400 is used.
  3143       </ul>
  3145      <li><span class=property>‘<a href="#propdef-font-size"><code
  3146       class=property>font-size</code></a>’</span> must be matched within a
  3147       UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
  3148       are rounded to the nearest whole pixel, while the tolerance for
  3149       bitmapped fonts could be as large as 20%.) Further computations, e.g.,
  3150       by ‘<code class=property>em</code>’ values in other properties, are
  3151       based on the <span class=property>‘<a href="#propdef-font-size"><code
  3152       class=property>font-size</code></a>’</span> value that is used, not
  3153       the one that is specified.
  3154     </ol>
  3156    <li>
  3157     <p>If no matching face exists or the matched face does not contain a
  3158      glyph for the character to be rendered, the next family name is selected
  3159      and the previous two steps repeated. Glyphs from other faces in the
  3160      family are not considered. The only exception is that user agents may
  3161      optionally substitute a synthetic version of the <a
  3162      href="#default-face"><em>default face</em></a> if that face supports a
  3163      given glyph (e.g. a synthetic italic version of the regular face may be
  3164      used if the italic face doesn't support glyphs for Arabic).</p>
  3165     <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
  3167     <p>If the matched font is defined via an <code>@font-face</code> rule and
  3168      needs to be downloaded, the font resource is downloaded. While the
  3169      download occurs, the user agent can either wait until the font is
  3170      downloaded or render once with substituted font metrics and render again
  3171      once the font is downloaded.</p>
  3173    <li>If there are no more font families to be evaluated and no matching
  3174     face has been found, then the user agent performs a <em>system font
  3175     fallback</em> procedure to find the best match for the character to be
  3176     rendered. The result of this procedure may vary across user agents.
  3178    <li>If a particular character cannot be displayed using any font, the user
  3179     agent should indicate by some means that a character is not being
  3180     displayed, displaying either a symbolic representation of the missing
  3181     glyph (e.g. using a <a
  3182     href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
  3183     Font</a>) or using the missing character glyph from a default font.
  3184   </ol>
  3186   <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
  3188   <p>When text contains characters such as combining diacritics, ideally the
  3189    base character should be rendered using the same font as the diacritic,
  3190    this assures proper placement of the diacritic. For this reason, the font
  3191    matching algorithm for clusters is more specialized than the general case
  3192    of matching a single character by itself. For sequences containing
  3193    variation selectors, which indicate the precise glyph to be used for a
  3194    given character, user agents always attempt system font fallback to find
  3195    the appropriate glyph before using the default glyph of the base
  3196    character.
  3198   <p>A font is considered to <em>support</em> a given character if (1) the
  3199    character is contained in the font's <a
  3200    href="#character-map"><em>character map</em></a> and (2) if required by
  3201    the containing script, shaping information is available for that
  3202    character. Some legacy fonts may include a given character in the <a
  3203    href="#character-map"><em>character map</em></a> but lack the shaping
  3204    information (e.g. <a
  3205    href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
  3206    layout tables</a> or <a
  3207    href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
  3208    tables</a>) necessary for correctly rendering text runs containing that
  3209    character.
  3211   <p>A sequence of codepoints containing combining diacritics or other
  3212    modifiers is termed a grapheme cluster (see <a href="#CSS3TEXT"
  3213    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
  3214    description). For a given cluster containing a base character, <em>b</em>
  3215    and a sequence of combining characters <em>c1, c2…</em>, the entire
  3216    cluster is matched using these steps:
  3218   <ol>
  3219    <li>For each family in the font list, a face is chosen using the style
  3220     selection rules defined in the previous section.
  3221     <ol>
  3222      <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
  3223       completely supported by the font, select this font for the sequence.
  3225      <li>If a sequence of multiple codepoints is canonically equivalent to a
  3226       single character and the font supports that character, select this font
  3227       for the sequence.
  3228     </ol>
  3230    <li>If no font was found in the font list in step 1:
  3231     <ol>
  3232      <li>If <em>c1</em> is a variation selector, system fallback must be used
  3233       to find a font that supports the full sequence of <em>b + c1</em>. If
  3234       no font on the system supports the full sequence, match the single
  3235       character <em>b</em> using the normal procedure for matching single
  3236       characters and ignore the variation selector. Note: a sequence with
  3237       more than one variation selector is treated as an encoding error and
  3238       the trailing selectors are ignored.
  3240      <li>Otherwise, the user agent may optionally use system font fallback to
  3241       match a font that supports the entire cluster.
  3242     </ol>
  3244    <li>If no font is found in step 2, use the matching sequence from step 1
  3245     to determine the longest sequence that is completely matched by a font in
  3246     the font list and attempt to match the remaining combining characters
  3247     separately using the rules for single characters.
  3248   </ol>
  3250   <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
  3251    issues</h3>
  3253   <p>The procedure above is always performed on text runs containing Unicode
  3254    characters, documents using legacy encodings are assumed to have been
  3255    transcoded before matching fonts. For fonts containing <a
  3256    href="#character-map"><em title="character map">character maps</em></a>
  3257    for both legacy encodings and Unicode, the contents of the legacy encoding
  3258    <a href="#character-map"><em>character map</em></a> must have no effect on
  3259    the results of the font matching process.
  3261   <p>The font matching process does not assume that text runs are in either
  3262    normalized or denormalized form (see <a href="#CHARMOD-NORM"
  3263    rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
  3264    details). Layout engines often convert base character plus combining
  3265    character sequences into precomposed characters if they exist. The font
  3266    matching algorithm outlined here supports both ways and fonts can
  3267    generally support either but variations can occur. Authors should always
  3268    tailor their choice of fonts to their content, including whether that
  3269    content contains normalized or denormalized character streams.
  3271   <p>If a given character is a Private-Use Area Unicode codepoint and none of
  3272    the fonts in the fontlist contain a glyph for that codepoint, user agents
  3273    must display some form of missing glyph symbol for that character rather
  3274    than attempting system font fallback for that codepoint. When matching the
  3275    replacement character U+FFFD, user agents may skip the font matching
  3276    process and immediately display some form of missing glyph symbol, they
  3277    are not required to display the glyph from the font that would be selected
  3278    by the font matching process.
  3280   <p>In general, the fonts for a given family will all have the same or
  3281    similar <a href="#character-map"><em title="character map">character
  3282    maps</em></a>. The process outlined here is designed to handle even font
  3283    families containing faces with widely variant <a href="#character-map"><em
  3284    title="character map">character maps</em></a>. However, authors are
  3285    cautioned that the use of such families can lead to unexpected results.
  3287   <p>Optimizations of this process are allowed provided that an
  3288    implementation behaves as if the algorithm had been followed exactly.
  3289    Matching occurs in a well-defined order to insure that the results are as
  3290    consistent as possible across user agents, given an identical set of
  3291    available fonts and rendering technology.
  3293   <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
  3294    changes since CSS 2.1</h3>
  3296   <p>The algorithm above is different from CSS 2.1 in a number of key places.
  3297    These changes were made to better reflect actual font matching behavior
  3298    across user agent implementations.
  3300   <p>Differences compared to the font matching algorithm in CSS 2.1:
  3302   <ul>
  3303    <li>The algorithm includes font-stretch matching.
  3305    <li>All possible font-style matching scenarios are delineated.
  3307    <li>Small-caps fonts are not matched as part of the font matching process,
  3308     they are now handled via font features.
  3310    <li>Unicode variation selector matching is required.
  3312    <li>Cluster sequences are matched as a unit.
  3313   </ul>
  3315   <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
  3316    examples</h3>
  3318   <div class=example>
  3319    <p>It's useful to note that the CSS selector syntax may be used to create
  3320     language-sensitive typography. For example, some Chinese and Japanese
  3321     characters are unified to have the same Unicode code point, although the
  3322     abstract glyphs are not the same in the two languages.
  3324    <pre>*:lang(ja-jp) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
  3325 *:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
  3326 </pre>
  3328    <p>This selects any element that has the given language - Japanese or
  3329     Traditional Chinese - and uses the appropriate font.
  3330   </div>
  3332   <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
  3334   <p>Modern font technologies support a variety of advanced typographic and
  3335    language-specific font features. Using these features, a single font can
  3336    provide glyphs for a wide range of ligatures, contextual and stylistic
  3337    alternates, tabular and old-style figures, small capitals, automatic
  3338    fractions, swashes, and alternates specific to a given language. To allow
  3339    authors control over these font capabilities, the font-variant property
  3340    has been expanded for CSS3, it now functions as a shorthand for a set of
  3341    properties that provide control over stylistic font features.
  3343   <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
  3344    selection and positioning</h3>
  3346   <p>Simple fonts used for displaying Latin text use a very basic processing
  3347    model, fonts contain a <a href="#character-map"><em>character map</em></a>
  3348    which maps a given character to a glyph for that character. Glyphs for
  3349    subsequent characters are simply placed next in line along a run of text.
  3350    Font formats such as OpenType and AAT (Apple Advanced Typography) use a
  3351    richer processing model, the glyph for a given character can be chosen and
  3352    positioned not just based on a single character, but also based on
  3353    surrounding characters along with the language, script, and features
  3354    enabled for the text. Font features may be required for specific scripts,
  3355    or recommended as enabled by default or they may be stylistic features
  3356    meant to be used under author control.
  3358   <p>For a good visual overview of these features, see the <a
  3359    href="#OPENTYPE-FONT-GUIDE"
  3360    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
  3361    For a detailed description of glyph processing for OpenType fonts, see <a
  3362    href="#WINDOWS-GLYPH-PROC"
  3363    rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
  3365   <p>Stylistic font features can be classified into two broad categories,
  3366    ones that affect the harmonization of glyph shapes with the surrounding
  3367    context, such as kerning and ligature features, and those such as the
  3368    small-caps, subscript/superscript and alternate features that affect shape
  3369    selection.
  3371   <p>The subproperties of font-variant listed below are used to control these
  3372    stylistic font features; they do not control features that are required
  3373    for displaying certain scripts, such as the OpenType features used when
  3374    displaying Arabic or Indic language text. They affect glyph selection and
  3375    positioning, they do not affect font selection as described in the font
  3376    matching section (except in cases required for compatibility with CSS
  3377    2.1).
  3379   <p>To assure consistent behavior across user agents, the equivalent
  3380    OpenType property settings are listed for individual properties and must
  3381    be considered normative. When using other font formats these should be
  3382    used as a guideline to map CSS font feature property values to specific
  3383    font features.
  3385   <h3 id=language-specific-support><span class=secno>6.2
  3386    </span>Language-specific display</h3>
  3388   <p>OpenType also supports language-specific glyph selection and
  3389    positioning, so that text can be displayed correctly in cases where the
  3390    language dictates a specific display behavior. Languages often share a
  3391    common script but the shape of certain letters may vary across those
  3392    languages, such as the variations in certain Cyrillic letters used in
  3393    Russian and Bulgarian text. In Latin text, it's common to render "fi" with
  3394    an explicit fi-ligature that lacks a dot on the "i". However, in languages
  3395    such as Turkish which uses both a dotted-i and a dotless-i, it's important
  3396    to not use this ligature or use a specialized version that contains a dot
  3397    over the "i". The example below shows language-specific variations based
  3398    on stylistic traditions found in Spanish, Italian and French orthography:
  3400   <div class=featex><img alt="language specific forms, spanish"
  3401    src=locl-1.png></div>
  3403   <div class=featex><img alt="language specific forms, italian"
  3404    src=locl-2.png></div>
  3406   <div class=featex><img alt="language specific forms, french"
  3407    src=locl-3.png></div>
  3409   <p>If the content language of the element is known, according to the rules
  3410    of the <a
  3411    href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
  3412    language</a>, user agents are required to infer the OpenType language
  3413    system from the content language and use that when selecting and
  3414    positioning glyphs using an OpenType font.
  3416   <p>For OpenType fonts, in some cases it may be necessary to explicitly
  3417    declare the OpenType language to be used, for example when displaying text
  3418    in a given language that uses the typographic conventions of another
  3419    language or when the font does not explicitly support a given language but
  3420    supports a language that shares common typographic conventions. The ‘<a
  3421    href="#propdef-font-language-override"><code
  3422    class=property>font-language-override</code></a>’ property is used for
  3423    this purpose.</p>
  3424   <!-- prop: font-kerning -->
  3426   <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
  3427    href="#propdef-font-kerning">font-kerning</a> property</h3>
  3429   <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
  3430    <tbody>
  3431     <tr>
  3432      <td>Name:
  3434      <td><dfn id=propdef-font-kerning>font-kerning</dfn>
  3436     <tr>
  3437      <td>Value:
  3439      <td>auto | normal | none
  3441     <tr>
  3442      <td>Initial:
  3444      <td>auto
  3446     <tr>
  3447      <td>Applies to:
  3449      <td>all elements
  3451     <tr>
  3452      <td>Inherited:
  3454      <td>yes
  3456     <tr>
  3457      <td>Percentages:
  3459      <td>N/A
  3461     <tr>
  3462      <td>Media:
  3464      <td>visual
  3466     <tr>
  3467      <td>Computed value:
  3469      <td>as specified
  3471     <tr>
  3472      <td>Animatable:
  3474      <td>no
  3475   </table>
  3477   <p>Kerning is the contextual adjustment of inter-glyph spacing. This
  3478    property controls metric kerning, kerning that utilizes adjustment data
  3479    contained in the font.
  3481   <dl>
  3482    <dt>auto
  3484    <dd>Specifies that kerning is applied at the discretion of the user agent
  3486    <dt>normal
  3488    <dd>Specifies that kerning is applied
  3490    <dt>none
  3492    <dd>Specifies that kerning is not applied
  3493   </dl>
  3495   <p>For fonts that do not include kerning data this property will have no
  3496    visible effect. When rendering with OpenType fonts, the <a
  3497    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
  3498    specification suggests that kerning be enabled by default. When kerning is
  3499    enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
  3500    vertical text runs the <span class=tag>vkrn</span> feature is enabled
  3501    instead). User agents must also support fonts that only support kerning
  3502    via data contained in a <span class=tag>kern</span> font table, as
  3503    detailed in the OpenType specification. If the ‘<code
  3504    class=property>letter-spacing</code>’ property is defined, kerning
  3505    adjustments are considered part of the default spacing and letter spacing
  3506    adjustments are made after kerning has been applied.
  3508   <p>When set to ‘<code class=property>auto</code>’, user agents can
  3509    determine whether to apply kerning or not based on a number of factors:
  3510    text size, script, or other factors that influence text processing speed.
  3511    Authors who want proper kerning should use ‘<a href="#normal2"><code
  3512    class=property>normal</code></a>’ to explicitly enable kerning.
  3513    Likewise, some authors may prefer to disable kerning in situations where
  3514    performance is more important than precise appearance. However, in
  3515    well-designed modern implementations the use of kerning generally does not
  3516    have a large impact on text rendering speed.</p>
  3517   <!-- prop: font-variant-ligatures -->
  3519   <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
  3520    the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  3521    property</h3>
  3523   <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
  3524    <tbody>
  3525     <tr>
  3526      <td>Name:
  3528      <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
  3530     <tr>
  3531      <td>Value:
  3533      <td>normal | none | [ <a
  3534       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  3535       <a
  3536       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  3537       || <a
  3538       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  3539       || <a
  3540       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  3543     <tr>
  3544      <td>Initial:
  3546      <td>normal
  3548     <tr>
  3549      <td>Applies to:
  3551      <td>all elements
  3553     <tr>
  3554      <td>Inherited:
  3556      <td>yes
  3558     <tr>
  3559      <td>Percentages:
  3561      <td>N/A
  3563     <tr>
  3564      <td>Media:
  3566      <td>visual
  3568     <tr>
  3569      <td>Computed value:
  3571      <td>as specified
  3573     <tr>
  3574      <td>Animatable:
  3576      <td>no
  3577   </table>
  3579   <p>Ligatures and contextual forms are ways of combining glyphs to produce
  3580    more harmonized forms.
  3582   <pre
  3583    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>
  3585   <pre
  3586    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>
  3588   <pre
  3589    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>
  3591   <pre
  3592    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>
  3594   <p>Individual values have the following meanings:
  3596   <dl>
  3597    <dt><dfn id=font-variant-ligatures-normal-value
  3598     title="font-variant-ligatures normal value">normal</dfn>
  3600    <dd>A value of ‘<a href="#normal2"><code
  3601     class=property>normal</code></a>’ specifies that common default
  3602     features are enabled, <a href="#font-feature-resolution">as described in
  3603     detail in the next section</a>. For OpenType fonts, common ligatures and
  3604     contextual forms are on by default, discretionary and historical
  3605     ligatures are not.
  3607    <dt><dfn id=font-variant-ligatures-none-value>none</dfn>
  3609    <dd>Specifies that all types of ligatures and contextual forms covered by
  3610     this property are explicitly disabled. In situations where ligatures are
  3611     not considered necessary, this may improve the speed of text rendering.
  3613    <dt><dfn id=common-ligatures>common-ligatures</dfn>
  3615    <dd>Enables display of common ligatures (OpenType features: <span
  3616     class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
  3617     enabled by default.
  3618   </dl>
  3620   <div class=featex><img alt="common ligature example" src=liga.png></div>
  3622   <dl>
  3623    <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
  3625    <dd>Disables display of common ligatures (OpenType features: <span
  3626     class=tag>liga, clig</span>).
  3628    <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
  3630    <dd>Enables display of discretionary ligatures (OpenType feature: <span
  3631     class=tag>dlig</span>). Which ligatures are discretionary, or optional,
  3632     is decided by the type designer so authors will need to refer to the
  3633     documentation of a given font to understand which ligatures are
  3634     considered discretionary.
  3635   </dl>
  3637   <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
  3639   <dl>
  3640    <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
  3642    <dd>Disables display of discretionary ligatures (OpenType feature: <span
  3643     class=tag>dlig</span>).
  3645    <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
  3647    <dd>Enables display of historical ligatures (OpenType feature: <span
  3648     class=tag>hlig</span>).
  3649   </dl>
  3651   <div class=featex><img alt="historical ligature example" src=hlig.png></div>
  3653   <dl>
  3654    <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
  3656    <dd>Disables display of historical ligatures (OpenType feature: <span
  3657     class=tag>hlig</span>).
  3659    <dt><dfn id=contextual>contextual</dfn>
  3661    <dd>Enables display of contextual alternates (OpenType feature: <span
  3662     class=tag>calt</span>). Although not strictly a ligature feature, like
  3663     ligatures this feature is commonly used to harmonize the shapes of glyphs
  3664     with the surrounding context. For OpenType fonts, this feature is on by
  3665     default.
  3666   </dl>
  3668   <div class=featex><img alt="contextual alternate example" src=calt.png></div>
  3670   <dl>
  3671    <dt><dfn id=no-contextual>no-contextual</dfn>
  3673    <dd>Disables display of contextual alternates (OpenType feature: <span
  3674     class=tag>calt</span>).
  3675   </dl>
  3677   <p>Required ligatures, needed for correctly rendering complex scripts, are
  3678    not affected by the settings above, including ‘<a
  3679    href="#font-variant-ligatures-none-value"><code
  3680    class=property>none</code></a>’ (OpenType feature: <span
  3681    class=tag>rlig</span>).</p>
  3682   <!-- prop: font-variant-position -->
  3684   <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
  3685    and superscript forms: the <a
  3686    href="#propdef-font-variant-position">font-variant-position</a> property</h3>
  3688   <table class=propdef id=namefont-variant-positionvaluenormal-sub>
  3689    <tbody>
  3690     <tr>
  3691      <td>Name:
  3693      <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
  3695     <tr>
  3696      <td>Value:
  3698      <td>normal | sub | super
  3700     <tr>
  3701      <td>Initial:
  3703      <td>normal
  3705     <tr>
  3706      <td>Applies to:
  3708      <td>all elements
  3710     <tr>
  3711      <td>Inherited:
  3713      <td>yes
  3715     <tr>
  3716      <td>Percentages:
  3718      <td>N/A
  3720     <tr>
  3721      <td>Media:
  3723      <td>visual
  3725     <tr>
  3726      <td>Computed value:
  3728      <td>as specified
  3730     <tr>
  3731      <td>Animatable:
  3733      <td>no
  3734   </table>
  3736   <p>This property is used to enable typographic subscript and superscript
  3737    glyphs. These are alternate glyphs designed within the same em-box as
  3738    default glyphs and are intended to be laid out on the same baseline as the
  3739    default glyphs, with no resizing or repositioning of the baseline. They
  3740    are explicitly designed to match the surrounding text and to be more
  3741    readable without affecting the line height.
  3743   <div class=figure><img alt="comparison between real subscript glyphs and
  3744    synthesized ones" src=realsubscripts.png>
  3745    <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
  3746     (bottom)
  3747   </div>
  3749   <p>The values ‘<code class=property>sub</code>’ and ‘<code
  3750    class=property>super</code>’ imply the appropriate variant glyph is
  3751    displayed when available in the font (OpenType features: <span
  3752    class=tag>subs, sups</span>). A value of ‘<a href="#normal2"><code
  3753    class=property>normal</code></a>’ specifies neither of these alternate
  3754    glyphs are substituted.
  3756   <p>Because of the semantic nature of subscripts and superscripts, when the
  3757    value is either ‘<code class=property>sub</code>’ or ‘<code
  3758    class=property>super</code>’ for a given contiguous run of text, if a
  3759    variant glyph is not available for all the characters in the run,
  3760    simulated glyphs must be synthesized for all characters using reduced
  3761    forms of the glyphs that would be used without this feature applied. This
  3762    is done to avoid a mixture of variant glyphs and synthesized ones that
  3763    would not align correctly.
  3765   <p>In the case of OpenType fonts that lack subscript or superscript glyphs
  3766    for a given character, user agents must use the appropriate subscript and
  3767    superscript metrics specified in the selected font's <a
  3768    href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
  3769    table</a> <a href="#OPENTYPE"
  3770    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
  3771    and offset of the synthesized substitutes.
  3773   <p>In the past, user agents have used font-size and vertical-align to
  3774    simulate subscripts and superscripts for the <span class=tag>sub</span>
  3775    and <span class=tag>sup</span> elements. To allow a backwards compatible
  3776    way of defining subscripts and superscripts, it is recommended that
  3777    authors use conditional rules <a href="#CSS3-CONDITIONAL"
  3778    rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
  3779    older user agents will still render subscripts and superscripts via the
  3780    older mechanism.
  3782   <p>Authors should note that fonts typically only provide subscript and
  3783    superscript glyphs for a subset of all characters supported by the font.
  3784    While subscript and superscript glyphs are often available for Latin
  3785    numbers, glyphs for punctuation and letter characters are less frequently
  3786    provided. The synthetic fallback rules defined for this property assure
  3787    that subscripts and superscripts will always appear but the appearance may
  3788    not match author expectations if the font used does not provide the
  3789    appropriate alternate glyph for all characters contained in a subscript or
  3790    superscript.
  3792   <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
  3793    using superscript metrics" src=superscript-alt-synth.png>
  3794    <p class=caption>Superscript alternate glyph (left), synthesized
  3795     superscript glyphs (middle), and incorrect mixture of the two (right)
  3796   </div>
  3798   <p>This property is not cumulative, applying it to subelements within a
  3799    subscript or superscript won't nest the placement of a subscript or
  3800    superscript glyph. Images contained within text runs where the value of
  3801    this property is ‘<code class=property>sub</code>’ or ‘<code
  3802    class=property>super</code>’ will be drawn just as they would if the
  3803    value was ‘<a href="#normal2"><code class=property>normal</code></a>’.
  3804    Likewise, text decorations such as underlines or emphasis marks will
  3805    render in the same position as they would for the default glyphs, since
  3806    this property does not affect the baseline position.
  3808   <p>Because of these limitations, font-variant-position is not recommended
  3809    for use in user agent stylesheets. Authors should use it in cases where
  3810    subscripts or superscripts will only contain the narrow range of
  3811    characters supported by the fonts specified.
  3813   <div class=example>
  3814    <p>A typical user agent default style for the <span class=tag>sub</span>
  3815     element:</p>
  3817    <pre>sub {
  3818   vertical-align: sub;
  3819   font-size: smaller;
  3820   line-height: normal;
  3822 </pre>
  3824    <p>Using font-variant-position to specify typographic subscripts in a way
  3825     that will still show subscripts in older user agents:</p>
  3827    <pre>@supports ( font-variant-position: sub ) {
  3829   sub {
  3830     vertical-align: inherit;
  3831     font-size: 100%;
  3832     line-height: inherit;
  3833     font-variant-position: sub;
  3837 </pre>
  3839    <p>User agents that support the ‘<a
  3840     href="#propdef-font-variant-position"><code
  3841     class=property>font-variant-position</code></a>’ property will select a
  3842     subscript variant glyph and render this without adjusting the baseline or
  3843     font-size. Older user agents will ignore the ‘<a
  3844     href="#propdef-font-variant-position"><code
  3845     class=property>font-variant-position</code></a>’ property definition
  3846     and use the standard defaults for subscripts.</p>
  3847   </div>
  3848   <!-- prop: font-variant-caps -->
  3850   <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
  3851    the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
  3853   <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
  3854    <tbody>
  3855     <tr>
  3856      <td>Name:
  3858      <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
  3860     <tr>
  3861      <td>Value:
  3863      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  3864       | unicase | titling-caps
  3866     <tr>
  3867      <td>Initial:
  3869      <td>normal
  3871     <tr>
  3872      <td>Applies to:
  3874      <td>all elements
  3876     <tr>
  3877      <td>Inherited:
  3879      <td>yes
  3881     <tr>
  3882      <td>Percentages:
  3884      <td>N/A
  3886     <tr>
  3887      <td>Media:
  3889      <td>visual
  3891     <tr>
  3892      <td>Computed value:
  3894      <td>as specified
  3896     <tr>
  3897      <td>Animatable:
  3899      <td>no
  3900   </table>
  3902   <p>Specifies control over capitalized forms.
  3904   <p>Individual values have the following meanings:
  3906   <dl>
  3907    <dt><dfn id=normal>normal</dfn>
  3909    <dd>None of the features listed below are enabled.
  3911    <dt><dfn id=small-caps>small-caps</dfn>
  3913    <dd>Enables display of small capitals (OpenType feature: <span
  3914     class=tag>smcp</span>). Small-caps glyphs typically use the form of
  3915     uppercase letters but are reduced to the size of lowercase letters.
  3916   </dl>
  3918   <div class=featex><img alt="small-caps example" src=smcp.png></div>
  3920   <dl>
  3921    <dt><dfn id=all-small-caps>all-small-caps</dfn>
  3923    <dd>Enables display of small capitals for both upper and lowercase letters
  3924     (OpenType features: <span class=tag>c2sc, smcp</span>).
  3926    <dt><dfn id=petite-caps>petite-caps</dfn>
  3928    <dd>Enables display of petite capitals (OpenType feature: <span
  3929     class=tag>pcap</span>).
  3931    <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
  3933    <dd>Enables display of petite capitals for both upper and lowercase
  3934     letters (OpenType features: <span class=tag>c2pc, pcap</span>).
  3936    <dt><dfn id=unicase>unicase</dfn>
  3938    <dd>Enables display of mixture of small capitals for uppercase letters
  3939     with normal lowercase letters (OpenType feature: <span
  3940     class=tag>unic</span>).
  3942    <dt><dfn id=titling-caps>titling-caps</dfn>
  3944    <dd>Enables display of titling capitals (OpenType feature: <span
  3945     class=tag>titl</span>). Uppercase letter glyphs are often designed for
  3946     use with lowercase letters. When used in all uppercase titling sequences
  3947     they can appear too strong. Titling capitals are designed specifically
  3948     for this situation.
  3949   </dl>
  3951   <p>This property allows the selection of alternate glyphs used for small or
  3952    petite capitals or for titling. These glyphs are specifically designed to
  3953    blend well with the surrounding normal glyphs, to maintain the weight and
  3954    readability which suffers when text is simply resized to fit this purpose.
  3956   <p>The availability of these glyphs is based on whether a given feature is
  3957    defined or not in the feature list of the font. User agents can optionally
  3958    decide this on a per-script basis but should explicitly not decide this on
  3959    a per-character basis.
  3961   <p>Some fonts may only support a subset or none of the features described
  3962    for this property. For backwards compatibility with CSS 2.1, if ‘<a
  3963    href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
  3964    href="#all-small-caps"><code class=property>all-small-caps</code></a>’
  3965    is specified but small-caps glyphs are not available for a given font,
  3966    user agents should simulate a small-caps font, for example by taking a
  3967    normal font and replacing the glyphs for lowercase letters with scaled
  3968    versions of the glyphs for uppercase characters (replacing the glyphs for
  3969    both upper and lowercase letters in the case of ‘<a
  3970    href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
  3972   <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
  3973    real small-caps" class=hires src=synthetic-vs-real-small-caps.png
  3974    width=512px>
  3975    <p class=caption>Synthetic vs. real small-caps
  3976   </div>
  3978   <p>To match the surrounding text, a font may provide alternate glyphs for
  3979    caseless characters when these features are enabled but when a user agent
  3980    simulates small capitals, it must not attempt to simulate alternates for
  3981    codepoints which are considered caseless.
  3983   <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
  3984    characters with small-caps, all-small-caps enabled" class=hires
  3985    src=small-capitals-variations.png width=418px>
  3986    <p class=caption>Caseless characters with small-caps, all-small-caps
  3987     enabled
  3988   </div>
  3990   <p>If either ‘<a href="#petite-caps"><code
  3991    class=property>petite-caps</code></a>’ or ‘<a
  3992    href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
  3993    is specified for a font that doesn't support these features, the property
  3994    behaves as if ‘<a href="#small-caps"><code
  3995    class=property>small-caps</code></a>’ or ‘<a
  3996    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  3997    respectively, had been specified. If ‘<a href="#unicase"><code
  3998    class=property>unicase</code></a>’ is specified for a font that doesn't
  3999    support that feature, the property behaves as if ‘<a
  4000    href="#small-caps"><code class=property>small-caps</code></a>’ was
  4001    applied only to lowercased uppercase letters. If ‘<a
  4002    href="#titling-caps"><code class=property>titling-caps</code></a>’ is
  4003    specified with a font that does not support this feature, this property
  4004    has no visible effect. When simulated small capital glyphs are used, for
  4005    scripts that lack uppercase and lowercase letters, ‘<a
  4006    href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
  4007    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4008    ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
  4009    ‘<a href="#all-petite-caps"><code
  4010    class=property>all-petite-caps</code></a>’ and ‘<a
  4011    href="#unicase"><code class=property>unicase</code></a>’ have no visible
  4012    effect.
  4014   <p>When casing transforms are used to simulate small capitals, the casing
  4015    transformations should match those used for the <span
  4016    class=property>‘<code class=property>text-transform</code>’</span>
  4017    property.
  4019   <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
  4020    replace glyphs in a small-caps font so that the text appears in all
  4021    uppercase letters.
  4023   <div class=figure style="padding: 0; margin: auto;"><img alt="using
  4024    all-small-caps in acronym-laden text" class=hires
  4025    src=acronym-laden-text.png width=596px>
  4026    <p class=caption>Using small capitals to improve readability in
  4027     acronym-laden text
  4028   </div>
  4030   <div class=example>
  4031    <p>Quotes rendered italicised, with small-caps on the first line:</p>
  4033    <pre>blockquote            { font-style: italic; }
  4034 blockquote:first-line { font-variant: small-caps; }
  4036 &lt;blockquote><a href="http://lists.w3.org/Archives/Public/www-style/2009Dec/0036.html" style="text-decoration: none">I'll be honor-bound to slap them like a haddock.</a>&lt;/blockquote>
  4037 </pre>
  4038   </div>
  4039   <!-- prop: font-variant-numeric -->
  4041   <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
  4042    formatting: the <a
  4043    href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
  4045   <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
  4046    <tbody>
  4047     <tr>
  4048      <td>Name:
  4050      <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
  4052     <tr>
  4053      <td>Value:
  4055      <td>normal | [ <a
  4056       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4057       || <a
  4058       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4059       || <a
  4060       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4061       || <a href="#ordinal">ordinal</a> || <a
  4062       href="#slashed-zero">slashed-zero</a> ]
  4064     <tr>
  4065      <td>Initial:
  4067      <td>normal
  4069     <tr>
  4070      <td>Applies to:
  4072      <td>all elements
  4074     <tr>
  4075      <td>Inherited:
  4077      <td>yes
  4079     <tr>
  4080      <td>Percentages:
  4082      <td>N/A
  4084     <tr>
  4085      <td>Media:
  4087      <td>visual
  4089     <tr>
  4090      <td>Computed value:
  4092      <td>as specified
  4094     <tr>
  4095      <td>Animatable:
  4097      <td>no
  4098   </table>
  4100   <p>Specifies control over numerical forms.
  4102   <pre
  4103    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>
  4105   <pre
  4106    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>
  4108   <pre
  4109    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>
  4111   <p>Individual values have the following meanings:
  4113   <dl>
  4114    <dt><dfn id=normal0>normal</dfn>
  4116    <dd>None of the features listed below are enabled.
  4118    <dt><dfn id=lining-nums>lining-nums</dfn>
  4120    <dd>Enables display of lining numerals (OpenType feature: <span
  4121     class=tag>lnum</span>).
  4123    <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
  4125    <dd>Enables display of old-style numerals (OpenType feature: <span
  4126     class=tag>onum</span>).
  4128    <dt><dfn id=proportional-nums>proportional-nums</dfn>
  4130    <dd>Enables display of proportional numerals (OpenType feature: <span
  4131     class=tag>pnum</span>).
  4133    <dt><dfn id=tabular-nums>tabular-nums</dfn>
  4135    <dd>Enables display of tabular numerals (OpenType feature: <span
  4136     class=tag>tnum</span>).
  4137   </dl>
  4139   <p>The example below shows how these different properties can be combined
  4140    to influence the rendering of tabular data with fonts that support these
  4141    features. Within normal paragraph text, proportional numbers are used
  4142    while tabular numbers are used so that columns of numbers line up
  4143    properly:
  4145   <div class=figure style="padding: 0; margin: auto;"><img alt="combining
  4146    number styles" src=numberstyles.png>
  4147    <p class=caption>Using number styles
  4148   </div>
  4150   <dl>
  4151    <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
  4153    <dd>Enables display of lining diagonal fractions (OpenType feature: <span
  4154     class=tag>frac</span>).
  4155   </dl>
  4157   <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
  4159   <dl>
  4160    <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
  4162    <dd>Enables display of lining stacked fractions (OpenType feature: <span
  4163     class=tag>afrc</span>).
  4164   </dl>
  4166   <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
  4168   <dl>
  4169    <dt><dfn id=ordinal>ordinal</dfn>
  4171    <dd>Enables display of forms used with ordinal numbers (OpenType feature:
  4172     <span class=tag>ordn</span>).
  4174    <dt><dfn id=slashed-zero>slashed-zero</dfn>
  4176    <dd>Enables display of slashed zeros (OpenType feature: <span
  4177     class=tag>zero</span>).
  4178   </dl>
  4180   <div class=featex><img alt="slashed zero example" src=zero.png></div>
  4182   <div class=example id=steak-marinade>
  4183    <p>A simple flank steak marinade recipe, rendered with automatic fractions
  4184     and old-style numerals:</p>
  4186    <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
  4188 &lt;h4>Steak marinade:&lt;/h4>
  4189 &lt;ul>
  4190   &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
  4191   &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
  4192   &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
  4193   &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
  4194   &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
  4195   &lt;li>Salt &amp;amp; pepper&lt;/li>
  4196 &lt;/ul>
  4198 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
  4199 for a few hours or overnight.&lt;/p>
  4200 </pre>
  4201   </div>
  4202   <!-- prop: font-variant-alternates -->
  4204   <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
  4205    and swashes: the <a
  4206    href="#propdef-font-variant-alternates">font-variant-alternates</a>
  4207    property</h3>
  4209   <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
  4210    <tbody>
  4211     <tr>
  4212      <td>Name:
  4214      <td><dfn
  4215       id=propdef-font-variant-alternates>font-variant-alternates</dfn>
  4217     <tr>
  4218      <td>Value:
  4220      <td>normal | [ <a href="#stylistic"
  4221       title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
  4222       href="#historical-forms">historical-forms</a> || <a href="#styleset"
  4223       title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
  4224       href="#character-variant"
  4225       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4226       #)</a> || <a href="#swash"
  4227       title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
  4228       href="#ornaments"
  4229       title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
  4230       href="#annotation"
  4231       title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
  4233     <tr>
  4234      <td>Initial:
  4236      <td>normal
  4238     <tr>
  4239      <td>Applies to:
  4241      <td>all elements
  4243     <tr>
  4244      <td>Inherited:
  4246      <td>yes
  4248     <tr>
  4249      <td>Percentages:
  4251      <td>N/A
  4253     <tr>
  4254      <td>Media:
  4256      <td>visual
  4258     <tr>
  4259      <td>Computed value:
  4261      <td>as specified
  4263     <tr>
  4264      <td>Animatable:
  4266      <td>no
  4267   </table>
  4269   <p>For any given character, fonts can provide a variety of alternate glyphs
  4270    in addition to the default glyph for that character. This property
  4271    provides control over the selection of these alternate glyphs.
  4273   <p>In cases where multiple alternates are possible, authors define a
  4274    <code>&lt;feature-value-name&gt;</code> using the
  4275    <code>@font-feature-values</code> rule described below to indicate the
  4276    specific alternate to be used. The nature of these alternates is font
  4277    specific, so the rule defines values for a specific font family or set of
  4278    families. When a particular value has not been defined for a given family,
  4279    the named value is treated as if the feature had omitted from the style
  4280    rule. If a given value is outside the range supported by a given font, the
  4281    value is ignored. These values never apply to generic font families, nor
  4282    to families selected as part of system font fallback. Values that behave
  4283    this way are marked as <em>font specific</em>.
  4285   <p>Individual values have the following meanings:
  4287   <dl>
  4288    <dt><dfn id=normal1>normal</dfn>
  4290    <dd>None of the features listed below are enabled.
  4292    <dt><dfn id=stylistic
  4293     title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
  4295    <dd>Enables display of stylistic alternates (<em>font specific</em>,
  4296     OpenType feature: <span class=tag>salt
  4297     &lt;feature-value-name&gt;</span>).
  4298   </dl>
  4300   <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
  4302   <dl>
  4303    <dt><dfn id=historical-forms>historical-forms</dfn>
  4305    <dd>Enables display of historical forms (OpenType feature: <span
  4306     class=tag>hist</span>).
  4307   </dl>
  4309   <div class=featex><img alt="historical form example" src=hist.png></div>
  4311   <dl>
  4312    <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
  4313     #)</dfn>
  4315    <dd>Enables display with stylistic sets (<em>font specific</em>, OpenType
  4316     feature: <span class=tag>ss&lt;feature-index&gt;</span> OpenType
  4317     currently defines <span class=tag>ss01</span> through <span
  4318     class=tag>ss20</span>).
  4319   </dl>
  4321   <div class=featex><img alt="styleset example" src=ssnn.png></div>
  4323   <dl>
  4324    <dt><dfn id=character-variant
  4325     title=character-variant>character-variant(&lt;feature-value-name&gt;
  4326     #)</dfn>
  4328    <dd>Enables display of specific character variants (<em>font
  4329     specific</em>, OpenType feature: <span
  4330     class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
  4331     class=tag>cv01</span> through <span class=tag>cv99</span>).
  4333    <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
  4335    <dd>Enables display of swash glyphs (<em>font specific</em>, OpenType
  4336     feature: <span class=tag>swsh &lt;feature-index&gt;, cswh
  4337     &lt;feature-index&gt;</span>).
  4338   </dl>
  4340   <div class=featex><img alt="swash example" src=swsh.png></div>
  4342   <dl>
  4343    <dt><dfn id=ornaments
  4344     title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
  4346    <dd>Enables replacement of default glyphs with ornaments, if provided in
  4347     the font (<em>font specific</em>, OpenType feature: <span class=tag>ornm
  4348     &lt;feature-index&gt;</span>). Some fonts may offer ornament glyphs as
  4349     alternates for a wide collection of characters; however, displaying
  4350     arbitrary characters (e.g., alphanumerics) as ornaments is poor practice
  4351     as it distorts the semantics of the data. Font designers are encouraged
  4352     to encode all ornaments (except those explicitly encoded in the Unicode
  4353     Dingbats blocks, etc.) as alternates for the bullet character (U+2022) to
  4354     allow authors to select the desired glyph using
  4355     &lt;feature-value-name&gt;.
  4356   </dl>
  4358   <div class=featex><img alt="ornaments example" src=ornm.png></div>
  4360   <dl>
  4361    <dt><dfn id=annotation
  4362     title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
  4364    <dd>Enables display of alternate annotation forms (<em>font specific</em>,
  4365     OpenType feature: <span class=tag>nalt &lt;feature-index&gt;</span>).
  4366   </dl>
  4368   <div class=featex><img alt="alternate annotation form example"
  4369    src=nalt.png></div>
  4371   <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
  4372    specific alternates: the <code>@font-feature-values</code> rule</h3>
  4374   <p>Several of the possible values of ‘<a
  4375    href="#propdef-font-variant-alternates"><code
  4376    class=property>font-variant-alternates</code></a>’ listed above are
  4377    labeled as "font specific". For these features fonts may define not just a
  4378    single glyph but a set of alternate glyphs with an index to select a given
  4379    alternate. Since these are font family specific, the
  4380    <code>@font-feature-values</code> rule is used to define named-values for
  4381    these indices for a given family.
  4383   <p>In the case of the swash Q in the example shown above, the swash could
  4384    be specified using these style rules:
  4386   <pre>
  4388 @font-feature-values Jupiter Sans {
  4389   @swash {
  4390     delicate: 1;
  4391     flowing: 2;
  4395 h2 { font-family: Jupiter Sans, sans-serif; }
  4397 /* show the second swash variant in h2 headings */
  4398 h2:first-letter { font-variant-alternates: swash(flowing); }
  4400 &lt;h2>Quick&lt;/h2></pre>
  4402   <p>When Jupiter Sans is present, the second alternate swash alternate will
  4403    be displayed. When not present, no swash character will be shown, since
  4404    the specific named-value "flowing" is only defined for the Jupiter Sans
  4405    family. The @-mark indicates the name of the property value for which a
  4406    named-value can be used. The name "flowing" is chosen by the author, the
  4407    values specified within a given font's data.
  4409   <p>In terms of the grammar, this specification defines the following
  4410    productions:</p>
  4411   <!--
  4412 <pre><dfn>supports_rule</dfn>
  4413   : <i>SUPPORTS_SYM</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <i>supports_condition</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <i>group_rule_body</i>
  4416 <dfn>supports_condition</dfn>
  4417   : <i>supports_negation</i> | <i>supports_conjunction</i> | <i>supports_disjunction</i> |
  4418     <i>supports_condition_in_parens</i>
  4421 <dfn>supports_condition_in_parens</dfn>
  4422   : ( '(' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <i>supports_condition</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* ')' ) | <i>supports_declaration_condition</i> |
  4423     <i>general_enclosed</i>
  4426 <dfn>supports_negation</dfn>
  4427   : <a href="http://www.w3.org/TR/css3-mediaqueries/#syntax"><i>NOT</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>supports_condition_in_parens</i>
  4430 <dfn>supports_conjunction</dfn>
  4431   : <i>supports_condition_in_parens</i> ( <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a href="http://www.w3.org/TR/css3-mediaqueries/#syntax"><i>AND</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>supports_condition_in_parens</i> )+
  4434 <dfn>supports_disjunction</dfn>
  4435   : <i>supports_condition_in_parens</i> ( <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>OR</i> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <i>supports_condition_in_parens</i> )+
  4438 <dfn>supports_declaration_condition</dfn>
  4439   : '(' <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>declaration</i></a> ')'
  4442 <dfn>general_enclosed</dfn>
  4443   : ( <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>FUNCTION</i></a> | '(' ) ( <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>any</i></a> | <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>unused</i></a> )* ')'
  4445 </pre>
  4447 -->
  4449   <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
  4450   : <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>*
  4451     '{' <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>*
  4454 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
  4455   : <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> ]*
  4458 <dfn id=fontfamilyname>font_family_name</dfn>
  4459   : <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> ]* ]
  4462 <dfn id=featurevalueblock>feature_value_block</dfn>
  4463   : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4464     '{' <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>*
  4467 <dfn id=featuretype>feature_type</dfn>:
  4468   <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
  4471 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
  4472   : <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> ]*
  4474 </pre>
  4476   <p>The following new token is introduced:
  4478   <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>;}
  4479 </pre>
  4481   <p>Feature value blocks are treated <a
  4482    href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">similar to
  4483    at-rules</a>, they consist of everything up to the next block or
  4484    semi-colon, whichever comes first.
  4486   <p>Font feature values rules define a set of values for a specific font
  4487    feature as used for a given set of families. Effectively, they define a
  4488    mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
  4489    ⟨values⟩ are the indices used for specific features defined for a
  4490    given font.
  4492   <p>The font family list uses the same syntax as that used for the ‘<a
  4493    href="#descdef-font-family"><code class=property>font-family</code></a>’
  4494    property. Within feature value blocks, the feature type is ‘<code
  4495    class=css>@</code>’ followed by the name of the font-specific property
  4496    value (e.g. <a href="#swash"><code>@swash</code></a>). The feature type
  4497    must match, using an ASCII case-insensitive comparison, one of the
  4498    <em>font specific</em> values of the <a
  4499    href="#propdef-font-variant-alternates"><code>font-variant-alternates</code></a>
  4500    property. The values associated with a given idenitifier are limited to
  4501    integer values 0 or greater.
  4503   <p>If syntax errors occur within the font family list, the entire rule must
  4504    be ignored. When syntax errors occur within a feature value definition,
  4505    such as invalid identifiers or values, the entire feature value definition
  4506    must be omitted, similar to the way syntax errors in style declarations
  4507    are handled. When the <code>&lt;feature-type></code> is invalid, the
  4508    entire associated feature value block must be ignored.
  4510   <pre>@font-feature-values Bongo {
  4511   @swash { ornate: 1; }
  4512   annotation { boxed: 4; } /* should be @annotation! */
  4513   @swash { double-loops: 1; flowing: -1; } /* negative value */
  4514   @ornaments ; /* incomplete definition */
  4515   @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
  4516   <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none;">redrum</a>  /* random editing mistake */
  4517 }</pre>
  4519   <p>The example above is equivalent to:
  4521   <pre>@font-feature-values Bongo {
  4522   @swash { ornate: 1; }
  4523   @swash { double-loops: 1; }
  4524   @styleset { double-W: 14; sharp-terminals: 16 1; }
  4525 }</pre>
  4527   <p>If multiple <code>@font-feature-values</code> rules are defined for a
  4528    given family, the resulting values defined are the union of these rules.
  4529    This allows a set of named-values to be defined for a given font family
  4530    globally for a site and specific additions made per-page. If the same
  4531    &lt;feature-value-name&gt; is defined mulitple times for a given
  4532    font-variant value, the last defined value is used.
  4534   <pre>
  4535 site.css:
  4537   @font-feature-values Mercury Serif {
  4538     @styleset {
  4539       stacked-g: 3; /* "two-storey" versions of g, a */
  4540       stacked-a: 4;
  4544 page.css:
  4546   @font-feature-values Mercury Serif {
  4547     @styleset {
  4548       geometric-m: 7; /* alternate version of m */
  4552   body {
  4553     font-family: Mercury Serif, serif;
  4555     /* enable both the use of stacked g and alternate m */
  4556     font-variant-alternates: styleset(stacked-g, geometric-m);
  4557   }</pre>
  4559   <p>Only named font families are allowed for &lt;font-family&gt;, rules that
  4560    include generic or system fonts in the list of font families are
  4561    considered syntax errors and the contents of the rules are ignored.
  4562    However, if a user agent defines a generic font to be a specific named
  4563    font (e.g. Helvetica), the settings associated with that family name will
  4564    be used.
  4566   <p>For &lt;font-variant-property-value>, only font specific property value
  4567    names supported by the ‘<a href="#propdef-font-variant"><code
  4568    class=property>font-variant</code></a>’ property are recognized,
  4569    definitions for other value names cause a syntax error and are ignored.
  4570    Each property value that is font specific is clearly marked as such.
  4571    Feature value names follow the rules of CSS user identifiers and are
  4572    case-sensitive. They are unique only for a given set of font families and
  4573    font-variant property value; the same identifier used with a different
  4574    font-variant property value is treated as a separate and distinct value.
  4576   <p>Using a commonly named value allows authors to use a single style rule
  4577    to cover a set of fonts for which the underlying selector is different for
  4578    each font. If either font in the example below is found, a circled number
  4579    glyph will be used:
  4581   <pre>@font-feature-values Taisho Gothic {
  4582   @annotation { boxed: 1; circled: 4; }
  4585 @font-feature-values Otaru Kisa {
  4586   @annotation { circled: 1; black-boxed: 3; }
  4589 h3.title {
  4590   /* circled form defined for both fonts */
  4591   font-family: Taisho Gothic, Otaru Kisa;
  4592   font-variant: annotation(circled);
  4593 }</pre>
  4595   <p>Most font specific font-variant property values take a single value
  4596    (e.g. swash). The character-variant property value allows two values and
  4597    styleset allows an unlimited number. If a larger number of values are
  4598    assigned to a given name, a syntax error occurs and the entire
  4599    &lt;font-feature-values-declaration&gt; is ignored.
  4601   <p>For the styleset property value, multiple values indicate the style sets
  4602    to be enabled. Values between 1 and 99 enable OpenType features <span
  4603    class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
  4604    OpenType standard only officially defines <span class=tag>ss01</span>
  4605    through <span class=tag>ss20</span>. Values greater than 99 or equal to 0
  4606    are ignored but do not generate a syntax error when parsed.
  4608   <pre>@font-feature-values Mars Serif {
  4609   @styleset { 
  4610     alt-g: 1;        /* implies ss01 = 1 */
  4611     curly-quotes: 3; /* implies ss03 = 1 */
  4612     code: 4 5;       /* implies ss04 = 1, ss05 = 1 */
  4615   @styleset {
  4616     dumb: 125;        /* &gt;99, ignored */
  4619   @swash {
  4620     swishy: 3 5;     /* more than 1 value for swash, syntax error */
  4624 p.codeblock {
  4625   /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
  4626   font-variant-alternates: styleset(curly-quotes, code);
  4627 }</pre>
  4629   <p>For character-variant, a single value between 1 and 99 indicates the
  4630    enabling of OpenType feature <span class=tag>cv01</span> through <span
  4631    class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
  4632    to 0 are ignored but do not generate a syntax error when parsed. When two
  4633    values are listed, the first value indicates the feature used and the
  4634    second the value passed for that feature. When two value names imply
  4635    different settings for the same underlying feature the last setting is
  4636    used.
  4638   <pre>@font-feature-values MM Greek {
  4639   @character-variant { alpha-2: 1 2; }   /* implies cv01 = 2 */
  4640   @character-variant { beta-3: 2 3; }    /* implies cv02 = 3 */
  4641   @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, ignored */
  4642   @character-variant { gamma: 12; }      /* implies cv12 = 1 */
  4643   @character-variant { zeta:   20 3; }   /* implies cv20 = 3 */
  4644   @character-variant { zeta-2: 20 2; }   /* implies cv20 = 2 */
  4645   @character-variant { silly: 105; }     /* &gt;99, ignored */
  4646   @character-variant { dumb: 323 3; }    /* &gt;99, ignored */
  4649 #title {
  4650   /* use the third alternate beta, first alternate gamma */
  4651   font-variant-alternates: character-variant(beta-3, gamma);
  4654 p {
  4655   /* zeta-2 follows zeta, implies cv20 = 2  */
  4656   font-variant-alternates: character-variant(zeta, zeta-2);
  4659 .special {
  4660   /* zeta follows zeta-2, implies cv20 = 3  */
  4661   font-variant-alternates: character-variant(zeta-2, zeta);
  4662 }</pre>
  4664   <p>See the <a href="#om-fontfeaturevalues">object model reference
  4665    section</a> for a description of the interfaces used to modify these rules
  4666    via the CSS Object Model.
  4668   <div class=figure><img alt="Matching text on Byzantine seals using
  4669    character variants" src=byzantineseal.png>
  4670    <p class=caption>Byzantine seal text displayed with character variants
  4671   </div>
  4673   <div class=example>
  4674    <p>In the figure above, the text in red is rendered using a font
  4675     containing character variants that mimic the character forms found on a
  4676     Byzantine seal from the 8th century A.D. Two lines below is the same text
  4677     displayed in a font without variants. Note the two variants for U and N
  4678     used on the seal.</p>
  4680    <pre>@font-feature-values Athena Ruby {
  4681   @character-variant {
  4682     leo-B: 2 1;
  4683     leo-M: 13 3;
  4684     leo-alt-N: 14 1;
  4685     leo-N: 14 2;
  4686     leo-T: 20 1; 
  4687     leo-U: 21 2;
  4688     leo-alt-U: 21 4;
  4692 p {
  4693   font-variant: discretionary-ligatures,
  4694                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
  4697 span.alt-N { 
  4698   font-variant-alternates: character-variant(leo-alt-N);
  4701 span.alt-U {
  4702   font-variant-alternates: character-variant(leo-alt-U);
  4705 &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>
  4707 &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> 
  4708 </pre>
  4709   </div>
  4711   <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
  4712    Asian text rendering: the <a
  4713    href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  4714    property</h3>
  4716   <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
  4717    <tbody>
  4718     <tr>
  4719      <td>Name:
  4721      <td><dfn
  4722       id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
  4724     <tr>
  4725      <td>Value:
  4727      <td>normal | [ <a
  4728       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4729       || <a
  4730       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4731       || <a href="#ruby">ruby</a> ]
  4733     <tr>
  4734      <td>Initial:
  4736      <td>normal
  4738     <tr>
  4739      <td>Applies to:
  4741      <td>all elements
  4743     <tr>
  4744      <td>Inherited:
  4746      <td>yes
  4748     <tr>
  4749      <td>Percentages:
  4751      <td>N/A
  4753     <tr>
  4754      <td>Media:
  4756      <td>visual
  4758     <tr>
  4759      <td>Computed value:
  4761      <td>as specified
  4763     <tr>
  4764      <td>Animatable:
  4766      <td>no
  4767   </table>
  4769   <p>Allows control of glyph substitution and sizing in East Asian text.
  4771   <pre
  4772    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>
  4774   <pre
  4775    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>
  4777   <p>Individual values have the following meanings:
  4779   <dl>
  4780    <dt><dfn id=normal2>normal</dfn>
  4782    <dd>None of the features listed below are enabled.
  4784    <dt><dfn id=jis78>jis78</dfn>
  4786    <dd>Enables rendering of JIS78 forms (OpenType feature: <span
  4787     class=tag>jp78</span>).
  4788   </dl>
  4790   <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
  4792   <dl>
  4793    <dt><dfn id=jis83>jis83</dfn>
  4795    <dd>Enables rendering of JIS83 forms (OpenType feature: <span
  4796     class=tag>jp83</span>).
  4798    <dt><dfn id=jis90>jis90</dfn>
  4800    <dd>Enables rendering of JIS90 forms (OpenType feature: <span
  4801     class=tag>jp90</span>).
  4803    <dt><dfn id=jis04>jis04</dfn>
  4805    <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
  4806     class=tag>jp04</span>).
  4807     <p>The various JIS variants reflect the glyph forms defined in different
  4808      Japanese national standards. Fonts generally include glyphs defined by
  4809      the most recent national standard but it's sometimes necessary to use
  4810      older variants, to match signage for example.</p>
  4812    <dt><dfn id=simplified>simplified</dfn>
  4814    <dd>Enables rendering of simplified forms (OpenType feature: <span
  4815     class=tag>smpl</span>).
  4816     <p>The ‘<a href="#simplified"><code
  4817      class=property>simplified</code></a>’ and ‘<a
  4818      href="#traditional"><code class=property>traditional</code></a>’
  4819      values allow control over the glyph forms for characters which have been
  4820      simplified over time but for which the older, traditional form is still
  4821      used in some contexts. The exact set of characters and glyph forms will
  4822      vary to some degree by context for which a given font was designed.</p>
  4824    <dt><dfn id=traditional>traditional</dfn>
  4826    <dd>Enables rendering of traditional forms (OpenType feature: <span
  4827     class=tag>trad</span>).
  4828   </dl>
  4830   <div class=featex><img alt="tradtional form example" src=trad.png></div>
  4832   <dl>
  4833    <dt><dfn id=full-width>full-width</dfn>
  4835    <dd>Enables rendering of full-width variants (OpenType feature: <span
  4836     class=tag>fwid</span>).
  4838    <dt><dfn id=proportional-width>proportional-width</dfn>
  4840    <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
  4841     <span class=tag>pwid</span>).
  4842   </dl>
  4844   <div class=featex><img alt="proportionally spaced Japanese example"
  4845    src=pwid.png></div>
  4847   <dl>
  4848    <dt><dfn id=ruby>ruby</dfn>
  4850    <dd>Enables display of ruby variant glyphs (OpenType feature: <span
  4851     class=tag>ruby</span>). Since ruby text is generally smaller than the
  4852     associated body text, font designers can design special glyphs for use
  4853     with ruby that are more readable than scaled down versions of the default
  4854     glyphs. Only glyph selection is affected, there is no associated font
  4855     scaling or other change that affects line layout. The red ruby text below
  4856     is shown with default glyphs (top) and with ruby variant glyphs (bottom).
  4857     Note the slight difference in stroke thickness.
  4858   </dl>
  4860   <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
  4862   <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
  4863    for font rendering: the <a href="#propdef-font-variant">font-variant</a>
  4864    property</h3>
  4866   <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
  4867    <tbody>
  4868     <tr>
  4869      <td>Name:
  4871      <td><dfn id=propdef-font-variant>font-variant</dfn>
  4873     <tr>
  4874      <td>Value:
  4876      <td>normal | none | [ <a
  4877       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  4878       <a
  4879       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  4880       || <a
  4881       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  4882       || <a
  4883       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  4884       || <a href="#stylistic"><var
  4885       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  4886       href="#historical-forms"><var>historical-forms</var></a> || <a
  4887       href="#styleset"><var
  4888       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  4889       href="#character-variant"><var
  4890       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4891       #)</var></a> || <a href="#swash"><var
  4892       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  4893       href="#ornaments"><var
  4894       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  4895       href="#annotation"><var
  4896       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  4897       <a href="#small-caps"><i>small-caps</i></a> | <a
  4898       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  4899       href="#petite-caps"><i>petite-caps</i></a> | <a
  4900       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  4901       href="#unicase"><i>unicase</i></a> | <a
  4902       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  4903       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4904       || <a
  4905       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4906       || <a
  4907       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4908       || <a href="#ordinal"><i>ordinal</i></a> || <a
  4909       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  4910       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4911       || <a
  4912       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4913       || <a href="#ruby"><i>ruby</i></a> ]
  4915     <tr>
  4916      <td>Initial:
  4918      <td>normal
  4920     <tr>
  4921      <td>Applies to:
  4923      <td>all elements
  4925     <tr>
  4926      <td>Inherited:
  4928      <td>yes
  4930     <tr>
  4931      <td>Percentages:
  4933      <td>see individual properties
  4935     <tr>
  4936      <td>Media:
  4938      <td>visual
  4940     <tr>
  4941      <td>Computed value:
  4943      <td>see individual properties
  4945     <tr>
  4946      <td>Animatable:
  4948      <td>see individual properties
  4949   </table>
  4951   <p>The value ‘<a href="#normal2"><code
  4952    class=property>normal</code></a>’ resets all other font feature
  4953    properties to their inital value. The ‘<a
  4954    href="#font-variant-ligatures-none-value"><code
  4955    class=property>none</code></a>’ value sets ‘<a
  4956    href="#propdef-font-variant-ligatures"><code
  4957    class=property>font-variant-ligatures</code></a>’ to ‘<a
  4958    href="#font-variant-ligatures-none-value"><code
  4959    class=property>none</code></a>’ and resets all other font feature
  4960    properties to their initial value. Like other shorthands, using ‘<a
  4961    href="#propdef-font-variant"><code
  4962    class=property>font-variant</code></a>’ resets unspecified font-variant
  4963    subproperties to their initial values. It does not reset the values of
  4964    either ‘<a href="#propdef-font-language-override"><code
  4965    class=property>font-language-override</code></a>’ or ‘<a
  4966    href="#propdef-font-feature-settings"><code
  4967    class=property>font-feature-settings</code></a>’.
  4969   <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
  4970    font feature settings control: the <a
  4971    href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
  4973   <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
  4974    <tbody>
  4975     <tr>
  4976      <td>Name:
  4978      <td><dfn id=propdef-font-feature-settings>font-feature-settings</dfn>
  4980     <tr>
  4981      <td>Value:
  4983      <td>normal | <a
  4984       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  4986     <tr>
  4987      <td>Initial:
  4989      <td>normal
  4991     <tr>
  4992      <td>Applies to:
  4994      <td>all elements
  4996     <tr>
  4997      <td>Inherited:
  4999      <td>yes
  5001     <tr>
  5002      <td>Percentages:
  5004      <td>N/A
  5006     <tr>
  5007      <td>Media:
  5009      <td>visual
  5011     <tr>
  5012      <td>Computed value:
  5014      <td>as specified
  5016     <tr>
  5017      <td>Animatable:
  5019      <td>no
  5020   </table>
  5022   <p>This property provides low-level control over OpenType font features. It
  5023    is intended as a way of providing access to font features that are not
  5024    widely used but are needed for a particular use case. A value of ‘<a
  5025    href="#normal2"><code class=property>normal</code></a>’ means that no
  5026    change in glyph selection or positioning occurs due to this property.
  5028   <p>
  5030   <pre>/* enable small caps and use second swash alternate */
  5031 font-feature-settings: "smcp", "swsh" 2;</pre>
  5033   <p>Feature tag values have the following syntax:
  5035   <pre
  5036    class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
  5038   <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
  5039    specified in the OpenType specification, feature tags contain four ASCII
  5040    characters. Tag strings longer or shorter than four characters, or
  5041    containing characters outside the U+20–7E codepoint range are invalid.
  5042    User agents must not use a feature tag created by truncating or padding
  5043    the string to four characters. Feature tags need only match a feature tag
  5044    defined in the font, they are not limited to explicitly registered
  5045    OpenType features. Fonts defining custom feature tags should follow the <a
  5046    href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
  5047    rules</a> defined in the OpenType specification <a
  5048    href="#OPENTYPE-FEATURES"
  5049    rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
  5050    Feature tags not present in the font are ignored; a user agent must not
  5051    attempt to synthesize fallback behavior based on these feature tags.
  5053   <p>This means that explicitly disabling the <span class=tag>kern</span>
  5054    feature will not affect the application of kerning data found in the
  5055    ‘<code class=property>kern</code>’ table (as opposed to kerning data
  5056    associated with the <span class=tag>kern</span> feature in the ‘<code
  5057    class=property>GPOS</code>’ table). Authors should use the ‘<a
  5058    href="#propdef-font-kerning"><code
  5059    class=property>font-kerning</code></a>’ property to explictly enable or
  5060    disable kerning since this property affects both types of kerning.
  5062   <p>If present, a value indicates an index used for glyph selection. An
  5063    &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
  5064    the feature is disabled. For boolean features, a value of 1 enables the
  5065    feature. For non-boolean features, a value of 1 or greater enables the
  5066    feature and indicates the feature selection index. A value of ‘<code
  5067    class=property>on</code>’ is synonymous with 1 and ‘<code
  5068    class=property>off</code>’ is synonymous with 0. If the value is
  5069    omitted, a value of 1 is assumed.
  5071   <pre>
  5072 font-feature-settings: "dlig" 1;       /* dlig=1 enable discretionary ligatures */
  5073 font-feature-settings: "smcp" on;      /* smcp=1 enable small caps */
  5074 font-feature-settings: 'c2sc';         /* c2sc=1 enable caps to small caps */
  5075 font-feature-settings: "liga" off;     /* liga=0 no common ligatures */
  5076 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
  5077 font-feature-settings: "tnum" "hist";  /* invalid, need a comma-delimited list */
  5078 font-feature-settings: "palin" off;    /* good idea but invalid tagname */
  5079 font-feature-settings: "PKRN";         /* PKRN=1 enable custom feature */
  5080 font-feature-settings: dlig;           /* invalid, tag must be a string */
  5081 </pre>
  5083   <p>When values greater than the range supported by the font are specified,
  5084    the behavior is explicitly undefined. For boolean features, in general
  5085    these will enable the feature. For non-boolean features, out of range
  5086    values will in general be equivalent to a 0 value. However, in both cases
  5087    the exact behavior will depend upon the way the font is designed
  5088    (specifically, which type of lookup is used to define the feature).
  5090   <p>Authors should generally use ‘<a href="#propdef-font-variant"><code
  5091    class=property>font-variant</code></a>’ and its related subproperties
  5092    whenever possible and only use this property for special cases where its
  5093    use is the only way of accessing a particular infrequently used font
  5094    feature.
  5096   <p>Although specifically defined for OpenType feature tags, feature tags
  5097    for other modern font formats that support font features may be added in
  5098    the future. Where possible, features defined for other font formats should
  5099    attempt to follow the pattern of registered OpenType tags.
  5101   <div class=example>
  5102    <p>The Japanese text below will be rendered with half-width kana
  5103     characters:</p>
  5105    <pre lang=ja>
  5106 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
  5108 &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>
  5109 </pre>
  5110   </div>
  5112   <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
  5113    language override: the <a
  5114    href="#propdef-font-language-override">font-language-override</a> property</h3>
  5116   <table class=propdef id=namefont-language-overridevaluenormal-lt>
  5117    <tbody>
  5118     <tr>
  5119      <td>Name:
  5121      <td><dfn id=propdef-font-language-override>font-language-override</dfn>
  5123     <tr>
  5124      <td>Value:
  5126      <td>normal | &lt;string&gt;
  5128     <tr>
  5129      <td>Initial:
  5131      <td>normal
  5133     <tr>
  5134      <td>Applies to:
  5136      <td>all elements
  5138     <tr>
  5139      <td>Inherited:
  5141      <td>yes
  5143     <tr>
  5144      <td>Percentages:
  5146      <td>N/A
  5148     <tr>
  5149      <td>Media:
  5151      <td>visual
  5153     <tr>
  5154      <td>Computed value:
  5156      <td>as specified
  5158     <tr>
  5159      <td>Animatable:
  5161      <td>no
  5162   </table>
  5164   <p>The value of ‘<a href="#normal2"><code
  5165    class=property>normal</code></a>’ specifies that when rendering with
  5166    OpenType fonts the content language of the element is used to infer the
  5167    OpenType language system. The value of the &lt;string&gt; is a single
  5168    three-letter OpenType <a
  5169    href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
  5170    system tag</a>, defined in the layout tag registry of the OpenType
  5171    specification. It indicates the OpenType language system to be used
  5172    instead of the language system implied by the language of the element.
  5174   <div class=example>
  5175    <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
  5176     Declaration of Human Rights</a> has been translated into a wide variety
  5177     of languages. In Turkish, Article 9 of this document might be marked up
  5178     as below:</p>
  5180    <pre lang=tr>&lt;body lang="tr">
  5182 &lt;h4>Madde 9&lt;/h4>
  5183 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
  5184 </pre>
  5186    <p>Here the user agent uses the value of the ‘<code
  5187     class=property>lang</code>’ attribute when rendering text and
  5188     appropriately renders this text without ‘<code
  5189     class=property>fi</code>’ ligatures. There is no need to use the ‘<a
  5190     href="#propdef-font-language-override"><code
  5191     class=property>font-language-override</code></a>’ property.</p>
  5193    <p>However, a given font may lack support for a specific language. In this
  5194     situation authors may need to use the typographic conventions of a
  5195     related language that are supported by that font:</p>
  5197    <pre lang=mk>&lt;body lang="mk">     &lt;!-- Macedonian lang code --&gt;
  5199 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
  5201 &lt;h4>Члeн 9&lt;/h4>
  5202 &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>
  5204 </pre>
  5206    <p>The Macedonian text here will be rendered using Serbian typographic
  5207     conventions, with the assumption that the font specified supports
  5208     Serbian.</p>
  5209   </div>
  5211   <p><a id=rendering-considerations></a>
  5213   <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
  5214    Resolution</h2>
  5216   <p>As described in the previous section, font features can be enabled in a
  5217    variety of ways, either via the use of ‘<a
  5218    href="#propdef-font-variant"><code
  5219    class=property>font-variant</code></a>’ or ‘<a
  5220    href="#propdef-font-feature-settings"><code
  5221    class=property>font-feature-settings</code></a>’ in a style rule or
  5222    within an <code>@font-face</code> rule. The resolution order for the union
  5223    of these settings is defined below. Features defined via CSS properties
  5224    are applied on top of layout engine default features.
  5226   <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
  5228   <p>For OpenType fonts, user agents must enable the default features defined
  5229    in the OpenType documentation for a given script and writing mode.
  5230    Required ligatures, common ligatures and contextual forms must be enabled
  5231    by default (OpenType features: <span class=tag>rlig, liga, clig,
  5232    calt</span>), along with localized forms (OpenType feature: <span
  5233    class=tag>locl</span>), and features required for proper display of
  5234    composed characters and marks (OpenType features: <span class=tag>ccmp,
  5235    mark, mkmk</span>). These features must always be enabled, even when the
  5236    value of the ‘<a href="#propdef-font-variant"><code
  5237    class=property>font-variant</code></a>’ and ‘<a
  5238    href="#propdef-font-feature-settings"><code
  5239    class=property>font-feature-settings</code></a>’ properties is ‘<a
  5240    href="#normal2"><code class=property>normal</code></a>’. Individual
  5241    features are only disabled when explicitly overridden by the author, as
  5242    when ‘<a href="#propdef-font-variant-ligatures"><code
  5243    class=property>font-variant-ligatures</code></a>’ is set to ‘<a
  5244    href="#no-common-ligatures"><code
  5245    class=property>no-common-ligatures</code></a>’. For handling complex
  5246    scripts such as <a
  5247    href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
  5248    <a
  5249    href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
  5250    or <a
  5251    href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
  5252    additional features are required. For upright text within vertical text
  5253    runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
  5254    must be enabled.
  5256   <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
  5258   <p>General and font specific font feature property settings are resolved in
  5259    the order below, in ascending precedence order. This ordering is used to
  5260    construct a combined list of font features that affect a given text run.
  5262   <ol>
  5263    <li>Font features enabled by default, including features required for a
  5264     given script.
  5266    <li>If the font is defined via an <code>@font-face</code> rule, the font
  5267     features implied by the font-variant descriptor in the
  5268     <code>@font-face</code> rule.
  5270    <li>If the font is defined via an <code>@font-face</code> rule, the font
  5271     features implied by the font-feature-settings descriptor in the
  5272     <code>@font-face</code> rule.
  5274    <li>Feature settings determined by properties other than ‘<a
  5275     href="#propdef-font-variant"><code
  5276     class=property>font-variant</code></a>’ or ‘<a
  5277     href="#propdef-font-feature-settings"><code
  5278     class=property>font-feature-settings</code></a>’. For example, setting
  5279     a non-default value for the ‘<code
  5280     class=property>letter-spacing</code>’ property disables ligatures.
  5282    <li>Font features implied by the value of the ‘<a
  5283     href="#propdef-font-variant"><code
  5284     class=property>font-variant</code></a>’ property, the related
  5285     font-variant subproperties and any other CSS property that may use
  5286     OpenType features (e.g. the ‘<a href="#propdef-font-kerning"><code
  5287     class=property>font-kerning</code></a>’ property).
  5289    <li>Font features implied by the value of ‘<a
  5290     href="#propdef-font-feature-settings"><code
  5291     class=property>font-feature-settings</code></a>’ property.
  5292   </ol>
  5294   <p>This ordering allows authors to set up a general set of defaults for
  5295    fonts within their <code>@font-face</code> rules, then override them with
  5296    property settings for specific elements. General property settings
  5297    override the settings in <code>@font-face</code> rules and low-level font
  5298    feature settings override ‘<a href="#propdef-font-variant"><code
  5299    class=property>font-variant</code></a>’ property settings.
  5301   <p>For situations where the combined list of font feature settings contains
  5302    more than one value for the same feature, the last value is used. When a
  5303    font lacks support for a given underlying font feature, text is simply
  5304    rendered as if that font feature was not enabled; font fallback does not
  5305    occur and no attempt is made to synthesize the feature except where
  5306    explicitly noted for specific properties.
  5308   <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
  5309    precedence examples</h3>
  5311   <div class=example>
  5312    <p>With the styles below, numbers are rendered proportionally when used
  5313     within a paragraph but are shown in tabular form within tables of prices:</p>
  5315    <pre>body { 
  5316   font-variant-numeric: proportional-nums; 
  5319 table.prices td {
  5320   font-variant-numeric: tabular-nums; 
  5322 </pre>
  5323   </div>
  5325   <div class=example>
  5326    <p>When the font-variant descriptor is used within an
  5327     <code>@font-face</code> rule, it only applies to the font defined by that
  5328     rule.</p>
  5330    <pre>@font-face {
  5331   font-family: MainText;
  5332   src: url(http://example.com/font.ttf);
  5333   font-variant: oldstyle-nums proportional-nums styleset(1,3);
  5336 body {
  5337   font-family: MainText, Helvetica;
  5340 table.prices td {
  5341   font-variant-numeric: tabular-nums; 
  5343 </pre>
  5345    <p>In this case, old-style numerals will be used throughout but only where
  5346     the font "MainText" is used. Just as in the previous example, tabular
  5347     values will be used in price tables since ‘<a
  5348     href="#tabular-nums"><code class=property>tabular-nums</code></a>’
  5349     appears in a general style rule and its use is mutually exclusive with
  5350     ‘<a href="#proportional-nums"><code
  5351     class=property>proportional-nums</code></a>’. Stylistic alternate sets
  5352     will only be used where MainText is used.</p>
  5353   </div>
  5355   <div class=example>
  5356    <p>The <code>@font-face</code> rule can also be used to access font
  5357     features in locally available fonts via the use of <code>local()</code>
  5358     in the ‘<a href="#descdef-src"><code class=property>src</code></a>’
  5359     descriptor of the <code>@font-face</code> definition:</p>
  5361    <pre>@font-face {
  5362   font-family: BodyText;
  5363   src: local("HiraMaruPro-W4");
  5364   font-variant: proportional-width;
  5365   font-feature-settings: "ital"; /* Latin italics within CJK text feature */
  5368 body { font-family: BodyText, serif; }
  5369 </pre>
  5371    <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
  5372     text rendering occurs, Japanese kana will be proportionally spaced and
  5373     Latin text will be italicised. Text rendered with the fallback serif font
  5374     will use default rendering properties.</p>
  5375   </div>
  5377   <div class=example>
  5378    <p>In the example below, discretionary ligatures are enabled only for a
  5379     downloadable font but are disabled within spans of class "special":</p>
  5381    <pre>@font-face {
  5382   font-family: main;
  5383   src: url(fonts/ffmeta.woff) format("woff");
  5384   font-variant: discretionary-ligatures;
  5387 body         { font-family: main, Helvetica; }
  5388 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5389 </pre>
  5391    <p>Adding an discretionary style rule with the <code>@font-face</code>
  5392     above:</p>
  5394    <pre>body         { font-family: main, Helvetica; }
  5395 span         { font-feature-settings: "dlig"; }
  5396 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5397 </pre>
  5399    <p>Within spans of class "special", discretionary ligatures <em>will</em>
  5400     be rendered. This is because both the ‘<a
  5401     href="#propdef-font-feature-settings"><code
  5402     class=property>font-feature-settings</code></a>’ and ‘<a
  5403     href="#propdef-font-variant-ligatures"><code
  5404     class=property>font-variant-ligatures</code></a>’ properties apply to
  5405     these spans. Although the ‘<code class=css>no-discretionary
  5406     ligatures</code>’ setting of ‘<a
  5407     href="#propdef-font-variant-ligatures"><code
  5408     class=property>font-variant-ligatures</code></a>’ effectively disables
  5409     the OpenType <span class=tag>dlig</span> feature, because the ‘<a
  5410     href="#propdef-font-feature-settings"><code
  5411     class=property>font-feature-settings</code></a>’ is resolved after
  5412     that, the ‘<code class=property>dlig</code>’ value reenables
  5413     discretionary ligatures.</p>
  5414   </div>
  5416   <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
  5418   <p>The contents of <code>@font-face</code> and
  5419    <code>@font-feature-values</code> rules can be accessed via the following
  5420    extensions to the CSS Object Model.
  5422   <h3 id=om-fontface><span class=secno>8.1 </span>The <a
  5423    href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
  5425   <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
  5426    <code>@font-face</code> rule.
  5428   <pre class=idl>
  5429 interface CSSFontFaceRule : CSSRule {
  5430   attribute DOMString family;
  5431   attribute DOMString src;
  5432   attribute DOMString style;
  5433   attribute DOMString weight;
  5434   attribute DOMString stretch;
  5435   attribute DOMString unicodeRange;
  5436   attribute DOMString variant;
  5437   attribute DOMString featureSettings;
  5438 }</pre>
  5440   <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
  5441    rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
  5442    defined a different variant of this rule. This definition supercedes that
  5443    one.
  5445   <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
  5446    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5447    interface</h3>
  5449   <p>The <code>CSSRule</code> interface is extended as follows:
  5451   <pre class=idl>partial interface CSSRule {
  5452   const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  5453 }</pre>
  5455   <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
  5456    interface represents a <code>@font-feature-values</code> rule.
  5458   <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
  5459   readonly attribute DOMString familyList;
  5460   readonly attribute DOMString valueText;
  5461 };</pre>
  5463   <dl class=idl-attributes>
  5464    <dt><var>familyList</var> of type <code>DOMString</code>, readonly
  5466    <dd>The list of one or more font families for which a given set of feature
  5467     values is defined.
  5469    <dt><var>valueText</var> of type <code>DOMString</code>, readonly
  5471    <dd>Serialized set of feature values.
  5472   </dl>
  5474   <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
  5475    properties to CSS properties</h2>
  5477   <p><em>This appendix is included as background for some of the problems and
  5478    situations that are described in other sections. It should be viewed as
  5479    informative only.</em>
  5481   <p>Font properties in CSS are designed to be independent of the underlying
  5482    font formats used; they can be used to specify bitmap fonts, Type1 fonts,
  5483    SVG fonts in addition to the common TrueType and OpenType fonts. But there
  5484    are facets of the TrueType and OpenType formats that often cause confusion
  5485    for authors and present challenges to implementers on different platforms.
  5487   <p>Originally developed at Apple, TrueType was designed as an outline font
  5488    format for both screen and print. Microsoft joined Apple in developing the
  5489    TrueType format and both platforms have supported TrueType fonts since
  5490    then. Font data in the TrueType format consists of a set of tables
  5491    distinguished with common four-letter tag names, each containing a
  5492    specific type of data. For example, naming information, including
  5493    copyright and license information, is stored in the ‘<code
  5494    class=property>name</code>’ table. The <a
  5495    href="#character-map"><em>character map</em></a> (‘<code
  5496    class=property>cmap</code>’) table contains a mapping of character
  5497    encodings to glyphs. Apple later added additional tables for supporting
  5498    enhanced typographic functionality; these are now called Apple Advanced
  5499    Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
  5500    tables for advanced typography and called their format OpenType <a
  5501    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
  5503   <p>In many cases the font data used under Microsoft Windows or Linux is
  5504    slightly different from the data used under Apple's Mac OS X because the
  5505    TrueType format allowed for explicit variation across platforms. This
  5506    includes font metrics, names and <a href="#character-map"><em>character
  5507    map</em></a> data.
  5509   <p>Specifically, font family name data is handled differently across
  5510    platforms. For TrueType and OpenType fonts these names are contained in
  5511    the ‘<code class=property>name</code>’ table, in name records with
  5512    name ID 1. Mulitple names can be stored for different locales, but
  5513    Microsoft recommends fonts always include at least a US English version of
  5514    the name. On Windows, Microsoft made the decision for backwards
  5515    compatibility to limit this family name to a maximum of four faces; for
  5516    larger groupings the "preferred family" (name ID 16) or "WWS family" (name
  5517    ID 21) can be used. Other platforms such as OSX don't have this
  5518    limitation, so the family name is used to define all possible groupings.
  5520   <p>Other name table data provides names used to uniquely identify a
  5521    specific face within a family. The full font name (name ID 4) and the
  5522    Postscript name (name ID 6) describe a single face uniquely. For example,
  5523    the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
  5524    and a Postscript name of "GillSans-Bold". There can be multiple localized
  5525    versions of the fullname for a given face, but the Postscript name is
  5526    always a unique name made from a limited set of ASCII characters.
  5528   <p>On various platforms, different names are used to search for a font. For
  5529    example, with the Windows GDI CreateIndirectFont API, either a family or
  5530    fullname can be used to lookup a face, while on Mac OS X the
  5531    CTFontCreateWithName API call is used to lookup a given face using the
  5532    fullname and Postscript name. Under Linux, the fontconfig API allows fonts
  5533    to be searched using any of these names. In situations where platform
  5534    API's automatically substitute other font choices, it may be necessary to
  5535    verify a returned font matches a given name.
  5537   <p>The weight of a given face can be determined via the usWeightClass field
  5538    of the OS/2 table or inferred from the style name (name ID 2). Likewise,
  5539    the width can be determined via the usWidthClass of the OS/2 table or
  5540    inferred from the style name. For historical reasons related to synthetic
  5541    bolding at weights 200 or lower with the Windows GDI API, font designers
  5542    have sometimes skewed values in the OS/2 table to avoid these weights.
  5544   <p>Rendering complex scripts that use contextual shaping such as Thai,
  5545    Arabic and Devanagari requires features present only in OpenType or AAT
  5546    fonts. Currently, complex script rendering is supported on Windows and
  5547    Linux using OpenType font features while both OpenType and AAT font
  5548    features are used under Mac OS X.
  5550   <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
  5552   <h3 class=no-num id=recent-changes> Changes from the <a
  5553    href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">February 2013
  5554    CSS3 Fonts Working Draft</a></h3>
  5556   <p>Major changes include:
  5558   <ul>
  5559    <li>Moved font load events into a separate <a
  5560     href="http://dev.w3.org/csswg/css3-font-load-events/">spec</a>
  5562    <li>Tightened error handling rules for <code>@font-feature-values</code>
  5563     rules
  5565    <li>Added grammar productions for <code>@font-face</code> and
  5566     <code>@font-feature-values</code> rules
  5568    <li>Tightened definition of synthetic oblique
  5570    <li>Revised definition of ‘<a href="#descdef-unicode-range"><code
  5571     class=property>unicode-range</code></a>’ descriptor
  5572   </ul>
  5574   <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
  5576   <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
  5577    their help and feedback. John Hudson was kind enough to take the time to
  5578    explain the subtleties of OpenType language tags and provided the example
  5579    of character variant usage for displaying text on Byzantine seals. Ken
  5580    Lunde and Eric Muller provided valuable feedback on CJK OpenType features
  5581    and Unicode variation selectors. The idea for supporting font features by
  5582    using font-variant subproperties originated with Håkon Wium Lie, Adam
  5583    Twardoch and Tal Leming. Elika Etemad supplied some of the initial design
  5584    ideas for the <code>@font-feature-values</code> rule. Thanks also to House
  5585    Industries for allowing the use of Ed Interlock in the discretionary
  5586    ligatures example.
  5588   <p>A special thanks to Robert Bringhurst for the sublime mind expansion
  5589    that is <em>The Elements of Typographic Style</em>.
  5591   <h2 class=no-num id=conformance> Conformance</h2>
  5593   <h3 class=no-num id=conventions> Document Conventions</h3>
  5595   <p>Conformance requirements are expressed with a combination of descriptive
  5596    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  5597    NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  5598    “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  5599    normative parts of this document are to be interpreted as described in RFC
  5600    2119. However, for readability, these words do not appear in all uppercase
  5601    letters in this specification.
  5603   <p>All of the text of this specification is normative except sections
  5604    explicitly marked as non-normative, examples, and notes. <a
  5605    href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  5607   <p>Examples in this specification are introduced with the words “for
  5608    example” or are set apart from the normative text with
  5609    <code>class="example"</code>, like this:
  5611   <div class=example>
  5612    <p>This is an example of an informative example.
  5613   </div>
  5615   <p>Informative notes begin with the word “Note” and are set apart from
  5616    the normative text with <code>class="note"</code>, like this:
  5618   <p class=note>Note, this is an informative note.
  5620   <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
  5622   <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
  5623    classes:
  5625   <dl>
  5626    <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  5627     sheet</dfn>
  5629    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  5630     style sheet</a>.
  5632    <dt><dfn id=renderer>renderer</dfn>
  5634    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5635     that interprets the semantics of a style sheet and renders documents that
  5636     use them.
  5638    <dt><dfn id=authoring-tool>authoring tool</dfn>
  5640    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5641     that writes a style sheet.
  5642   </dl>
  5644   <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
  5645    declarations that use properties defined in this module have values that
  5646    are valid according to the generic CSS grammar and the individual grammars
  5647    of each property as given in this module.
  5649   <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
  5650    interpreting the style sheet as defined by the appropriate specifications,
  5651    it supports all the features defined by CSS Fonts Level 3 Module by
  5652    parsing them correctly and rendering the document accordingly. However,
  5653    the inability of a UA to correctly render a document due to limitations of
  5654    the device does not make the UA non-conformant. (For example, a UA is not
  5655    required to render color on a monochrome monitor.)
  5657   <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
  5658    style sheets that are syntactically correct according to the generic CSS
  5659    grammar and the individual grammars of each feature in this module, and
  5660    meet all other conformance requirements of style sheets as described in
  5661    this module.
  5663   <h3 class=no-num id=partial> Partial Implementations</h3>
  5665   <p>So that authors can exploit the forward-compatible parsing rules to
  5666    assign fallback values, CSS renderers <strong>must</strong> treat as
  5667    invalid (and <a
  5668    href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  5669    appropriate</a>) any at-rules, properties, property values, keywords, and
  5670    other syntactic constructs for which they have no usable level of support.
  5671    In particular, user agents <strong>must not</strong> selectively ignore
  5672    unsupported component values and honor supported values in a single
  5673    multi-value property declaration: if any value is considered invalid (as
  5674    unsupported values must be), CSS requires that the entire declaration be
  5675    ignored.
  5677   <h3 class=no-num id=experimental> Experimental Implementations</h3>
  5679   <p>To avoid clashes with future CSS features, the CSS2.1 specification
  5680    reserves a <a
  5681    href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  5682    syntax</a> for proprietary and experimental extensions to CSS.
  5684   <p>Prior to a specification reaching the Candidate Recommendation stage in
  5685    the W3C process, all implementations of a CSS feature are considered
  5686    experimental. The CSS Working Group recommends that implementations use a
  5687    vendor-prefixed syntax for such features, including those in W3C Working
  5688    Drafts. This avoids incompatibilities with future changes in the draft.
  5690   <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
  5692   <p>Once a specification reaches the Candidate Recommendation stage,
  5693    non-experimental implementations are possible, and implementors should
  5694    release an unprefixed implementation of any CR-level feature they can
  5695    demonstrate to be correctly implemented according to spec.
  5697   <p>To establish and maintain the interoperability of CSS across
  5698    implementations, the CSS Working Group requests that non-experimental CSS
  5699    renderers submit an implementation report (and, if necessary, the
  5700    testcases used for that implementation report) to the W3C before releasing
  5701    an unprefixed implementation of any CSS features. Testcases submitted to
  5702    W3C are subject to review and correction by the CSS Working Group.
  5704   <p>Further information on submitting testcases and implementation reports
  5705    can be found from on the CSS Working Group's website at <a
  5706    href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  5707    Questions should be directed to the <a
  5708    href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  5709    mailing list.
  5711   <h2 class=no-num id=references>References</h2>
  5713   <h3 class=no-num id=normative-references>Normative References</h3>
  5714   <!--begin-normative-->
  5715   <!-- Sorted by label -->
  5717   <dl class=bibliography>
  5718    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  5719     <!---->
  5721    <dt id=CHARMOD>[CHARMOD]
  5723    <dd>Martin J. Dürst; et al. <a
  5724     href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
  5725     Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
  5726     2005. W3C Recommendation. URL: <a
  5727     href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
  5728     </dd>
  5729    <!---->
  5731    <dt id=CORS>[CORS]
  5733    <dd>Anne van Kesteren. <a
  5734     href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
  5735     Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
  5736     Recommendation. (Work in progress.) URL: <a
  5737     href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
  5738     </dd>
  5739    <!---->
  5741    <dt id=CSS21>[CSS21]
  5743    <dd>Bert Bos; et al. <a
  5744     href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  5745     Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  5746     2011. W3C Recommendation. URL: <a
  5747     href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  5748     </dd>
  5749    <!---->
  5751    <dt id=CSS3VAL>[CSS3VAL]
  5753    <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  5754     href="http://www.w3.org/TR/2012/CR-css3-values-20120828/"><cite>CSS
  5755     Values and Units Module Level 3.</cite></a> 28 August 2012. W3C Candidate
  5756     Recommendation. (Work in progress.) URL: <a
  5757     href="http://www.w3.org/TR/2012/CR-css3-values-20120828/">http://www.w3.org/TR/2012/CR-css3-values-20120828/</a>
  5758     </dd>
  5759    <!---->
  5761    <dt id=HTML5>[HTML5]
  5763    <dd>Ian Hickson. <a
  5764     href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
  5765     17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
  5766     <a
  5767     href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
  5768     </dd>
  5769    <!---->
  5771    <dt id=OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
  5773    <dd><a
  5774     href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip"><cite>Information
  5775     technology — Coding of audio-visual objects — Part 22: Open Font
  5776     Format.</cite></a> International Organization for Standardization.
  5777     ISO/IEC 14496-22:2009. URL: <a
  5778     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>
  5779     </dd>
  5780    <!---->
  5782    <dt id=OPENTYPE>[OPENTYPE]
  5784    <dd><a
  5785     href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
  5786     specification.</cite></a> Microsoft. URL: <a
  5787     href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
  5788     </dd>
  5789    <!---->
  5791    <dt id=OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
  5793    <dd><a
  5794     href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
  5795     feature registry.</cite></a> Microsoft. URL: <a
  5796     href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
  5797     </dd>
  5798    <!---->
  5800    <dt id=RFC2119>[RFC2119]
  5802    <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  5803     words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  5804     RFC 2119. URL: <a
  5805     href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  5806     </dd>
  5807    <!---->
  5809    <dt id=UAX15>[UAX15]
  5811    <dd>Mark Davis; Ken Whistler. <a
  5812     href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
  5813     Forms.</cite></a> 31 August 2012. Unicode Standard Annex #15. URL: <a
  5814     href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
  5815     </dd>
  5816    <!---->
  5818    <dt id=UAX29>[UAX29]
  5820    <dd>Mark Davis. <a
  5821     href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
  5822     Segmentation.</cite></a> 12 September 2012. Unicode Standard Annex #29.
  5823     URL: <a
  5824     href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
  5825     </dd>
  5826    <!---->
  5828    <dt id=UNICODE6>[UNICODE6]
  5830    <dd>The Unicode Consortium. <a
  5831     href="http://www.unicode.org/versions/Unicode6.2.0/"><cite>The Unicode
  5832     Standard, Version 6.2.0.</cite></a> Defined by: The Unicode Standard,
  5833     Version 6.2.0 URL: <a
  5834     href="http://www.unicode.org/versions/Unicode6.2.0/">http://www.unicode.org/versions/Unicode6.2.0/</a>
  5835     </dd>
  5836    <!---->
  5837   </dl>
  5838   <!--end-normative-->
  5839   <!--{{!CSS21}}-->
  5840   <!--{{!CSS3VAL}}-->
  5841   <!--{{!OPENTYPE}}-->
  5842   <!--{{!OPENTYPE-FEATURES}}-->
  5843   <!--{{!OPEN-FONT-FORMAT}}-->
  5844   <!--{{!UNICODE6}}-->
  5845   <!--{{!UAX15}}-->
  5846   <!--{{!UAX29}}-->
  5847   <!--{{!CORS}}-->
  5848   <!--{{!HTML5}}-->
  5849   <!--{{!CHARMOD}}-->
  5851   <h3 class=no-num id=other-references>Other References</h3>
  5852   <!--begin-informative-->
  5853   <!-- Sorted by label -->
  5855   <dl class=bibliography>
  5856    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  5857     <!---->
  5859    <dt id=AAT-FEATURES>[AAT-FEATURES]
  5861    <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
  5862     Advanced Typography font feature registry.</cite></a> Apple. URL: <a
  5863     href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
  5864     </dd>
  5865    <!---->
  5867    <dt id=ARABIC-TYPO>[ARABIC-TYPO]
  5869    <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
  5870     Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
  5871    <!---->
  5873    <dt id=CHARMOD-NORM>[CHARMOD-NORM]
  5875    <dd>François Yergeau; et al. <a
  5876     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
  5877     Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
  5878     W3C Working Draft. (Work in progress.) URL: <a
  5879     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
  5880     </dd>
  5881    <!---->
  5883    <dt id=CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
  5885    <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
  5886     O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
  5887    <!---->
  5889    <dt id=CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
  5891    <dd>L. David Baron. <a
  5892     href="http://www.w3.org/TR/2012/WD-css3-conditional-20121213/"><cite>CSS
  5893     Conditional Rules Module Level 3.</cite></a> 13 December 2012. W3C
  5894     Working Draft. (Work in progress.) URL: <a
  5895     href="http://www.w3.org/TR/2012/WD-css3-conditional-20121213/">http://www.w3.org/TR/2012/WD-css3-conditional-20121213/</a>
  5896     </dd>
  5897    <!---->
  5899    <dt id=CSS3TEXT>[CSS3TEXT]
  5901    <dd>Elika J. Etemad; Koji Ishii. <a
  5902     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
  5903     Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
  5904     progress.) URL: <a
  5905     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
  5906     </dd>
  5907    <!---->
  5909    <dt id=DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
  5911    <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
  5912     and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
  5913     ISBN 0-201-17633-5.</dd>
  5914    <!---->
  5916    <dt id=DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
  5918    <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
  5919     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
  5920     Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
  5921     2000. W3C Recommendation. URL: <a
  5922     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>
  5923     </dd>
  5924    <!---->
  5926    <dt id=ELEMTYPO>[ELEMTYPO]
  5928    <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
  5929     4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
  5930    <!---->
  5932    <dt id=LANGCULTTYPE>[LANGCULTTYPE]
  5934    <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
  5935     ISBN 1-932026-01-0.</dd>
  5936    <!---->
  5938    <dt id=OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
  5940    <dd><a
  5941     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
  5942     User Guide.</cite></a> FontShop International. URL: <a
  5943     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
  5944     </dd>
  5945    <!---->
  5947    <dt id=RASTER-TRAGEDY>[RASTER-TRAGEDY]
  5949    <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
  5950     Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
  5951     href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
  5952    <!---->
  5954    <dt id=WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
  5956    <dd>John Hudson. <a
  5957     href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
  5958     Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
  5959     href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
  5960     </dd>
  5961    <!---->
  5962   </dl>
  5963   <!--end-informative-->
  5964   <!--{{ARABIC-TYPO}}-->
  5965   <!--{{CJKV-INFO-PROCESSING}}-->
  5966   <!--{{DIGITAL-TYPOGRAPHY}}-->
  5967   <!--{{DOM-LEVEL-2-STYLE}}-->
  5968   <!--{{ELEMTYPO}}-->
  5969   <!--{{LANGCULTTYPE}}-->
  5970   <!--{{OPENTYPE-FONT-GUIDE}}-->
  5971   <!--{{RASTER-TRAGEDY}}-->
  5972   <!--{{WINDOWS-GLYPH-PROC}}-->
  5973   <!--{{CHARMOD-NORM}}-->
  5974   <!--{{AAT-FEATURES}}-->
  5975   <!--{{CSS3-CONDITIONAL}}-->
  5976   <!--{{CSS3TEXT}}-->
  5978   <h2 class=no-num id=index>Index</h2>
  5979   <!--begin-index-->
  5981   <ul class=indexlist>
  5982    <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
  5983     title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
  5985    <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
  5986     title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
  5988    <li><var>&lt;contextual-alt-values&gt;</var>, <a
  5989     href="#contextual-alt-values"
  5990     title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
  5992    <li><var>&lt;discretionary-lig-values&gt;</var>, <a
  5993     href="#discretionary-lig-values"
  5994     title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
  5996    <li><var>&lt;east-asian-variant-values&gt;</var>, <a
  5997     href="#east-asian-variant-values"
  5998     title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
  6000    <li><var>&lt;east-asian-width-values&gt;</var>, <a
  6001     href="#east-asian-width-values"
  6002     title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
  6004    <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
  6005     title="&lt;family-name&gt;"><strong>3.1</strong></a>
  6007    <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
  6008     title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
  6010    <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
  6011     title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
  6013    <li><var>&lt;font-variant-css21&gt;</var>, <a
  6014     href="#font-variant-css21-values"
  6015     title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
  6017    <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
  6018     title="&lt;generic-family&gt;"><strong>3.1</strong></a>
  6020    <li><var>&lt;historical-lig-values&gt;</var>, <a
  6021     href="#historical-lig-values"
  6022     title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
  6024    <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
  6025     title="&lt;length&gt;"><strong>3.5</strong></a>
  6027    <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
  6028     title="&lt;number&gt;"><strong>3.6</strong></a>
  6030    <li><var>&lt;numeric-figure-values&gt;</var>, <a
  6031     href="#numeric-figure-values"
  6032     title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
  6034    <li><var>&lt;numeric-fraction-values&gt;</var>, <a
  6035     href="#numeric-fraction-values"
  6036     title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
  6038    <li><var>&lt;numeric-spacing-values&gt;</var>, <a
  6039     href="#numeric-spacing-values"
  6040     title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
  6042    <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
  6043     title="&lt;percentage&gt;"><strong>3.5</strong></a>
  6045    <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
  6046     title="&lt;relative-size&gt;"><strong>3.5</strong></a>
  6048    <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
  6049     title="&lt;urange&gt;"><strong>4.5</strong></a>
  6051    <li>@font-face, <a href="#font-face" title="@font-face">4.1</a>, <a
  6052     href="#font-face0" title="@font-face">4.3</a>
  6054    <li>all-petite-caps, <a href="#all-petite-caps"
  6055     title=all-petite-caps><strong>6.6</strong></a>
  6057    <li>all-small-caps, <a href="#all-small-caps"
  6058     title=all-small-caps><strong>6.6</strong></a>
  6060    <li>annotation, <a href="#annotation"
  6061     title=annotation><strong>6.8</strong></a>
  6063    <li>aspect value, <a href="#aspect-value0" title="aspect
  6064     value"><strong>3.6</strong></a>
  6066    <li>authoring tool, <a href="#authoring-tool" title="authoring
  6067     tool"><strong>#</strong></a>
  6069    <li>character map, <a href="#character-map" title="character
  6070     map"><strong>5.2</strong></a>
  6072    <li>character-variant, <a href="#character-variant"
  6073     title=character-variant><strong>6.8</strong></a>
  6075    <li>common-ligatures, <a href="#common-ligatures"
  6076     title=common-ligatures><strong>6.4</strong></a>
  6078    <li>contextual, <a href="#contextual"
  6079     title=contextual><strong>6.4</strong></a>
  6081    <li>CSSFontFaceRule, <a href="#cssfontfacerule"
  6082     title=CSSFontFaceRule><strong>8.1</strong></a>
  6084    <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
  6085     title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
  6087    <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
  6088     of"><strong>#</strong></a>
  6090    <li>default face, <a href="#default-face" title="default
  6091     face"><strong>5.2</strong></a>
  6093    <li>descriptor_declaration, <a href="#descriptordeclaration"
  6094     title="descriptor_declaration"><strong>4.1</strong></a>
  6096    <li>diagonal-fractions, <a href="#diagonal-fractions"
  6097     title=diagonal-fractions><strong>6.7</strong></a>
  6099    <li>discretionary-ligatures, <a href="#discretionary-ligatures"
  6100     title=discretionary-ligatures><strong>6.4</strong></a>
  6102    <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
  6103     of"><strong>#</strong></a>
  6105    <li>feature_type, <a href="#featuretype"
  6106     title="feature_type"><strong>6.9</strong></a>
  6108    <li>feature_value_block, <a href="#featurevalueblock"
  6109     title="feature_value_block"><strong>6.9</strong></a>
  6111    <li>feature_value_definition, <a href="#featurevaluedefinition"
  6112     title="feature_value_definition"><strong>6.9</strong></a>
  6114    <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
  6116    <li>font-family, <a href="#descdef-font-family"
  6117     title=font-family><strong>4.2</strong></a>, <a
  6118     href="#propdef-font-family" title=font-family><strong>3.1</strong></a>
  6120    <li>font-feature-settings, <a href="#propdef-font-feature-settings"
  6121     title=font-feature-settings><strong>6.12</strong></a>
  6123    <li>font-feature-settings (descriptor), <a
  6124     href="#descdef-font-feature-settings" title="font-feature-settings
  6125     (descriptor)"><strong>4.7</strong></a>
  6127    <li>font-kerning, <a href="#propdef-font-kerning"
  6128     title=font-kerning><strong>6.3</strong></a>
  6130    <li>font-language-override, <a href="#propdef-font-language-override"
  6131     title=font-language-override><strong>6.13</strong></a>
  6133    <li>font-size, <a href="#propdef-font-size"
  6134     title=font-size><strong>3.5</strong></a>
  6136    <li>font-size-adjust, <a href="#propdef-font-size-adjust"
  6137     title=font-size-adjust><strong>3.6</strong></a>
  6139    <li>font-stretch, <a href="#propdef-font-stretch"
  6140     title=font-stretch><strong>3.3</strong></a>
  6142    <li>font-stretch (descriptor), <a href="#descdef-font-stretch"
  6143     title="font-stretch (descriptor)"><strong>4.4</strong></a>
  6145    <li>font-style, <a href="#propdef-font-style"
  6146     title=font-style><strong>3.4</strong></a>
  6148    <li>font-style (descriptor), <a href="#descdef-font-style"
  6149     title="font-style (descriptor)"><strong>4.4</strong></a>
  6151    <li>font-synthesis, <a href="#propdef-font-synthesis"
  6152     title=font-synthesis><strong>3.8</strong></a>
  6154    <li>font-variant, <a href="#propdef-font-variant"
  6155     title=font-variant><strong>6.11</strong></a>
  6157    <li>font-variant (descriptor), <a href="#descdef-font-variant"
  6158     title="font-variant (descriptor)"><strong>4.7</strong></a>
  6160    <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
  6161     title=font-variant-alternates><strong>6.8</strong></a>
  6163    <li>font-variant-caps, <a href="#propdef-font-variant-caps"
  6164     title=font-variant-caps><strong>6.6</strong></a>
  6166    <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
  6167     title=font-variant-east-asian><strong>6.10</strong></a>
  6169    <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
  6170     title=font-variant-ligatures><strong>6.4</strong></a>
  6172    <li>font-variant-ligatures normal value, <a
  6173     href="#font-variant-ligatures-normal-value" title="font-variant-ligatures
  6174     normal value"><strong>6.4</strong></a>
  6176    <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
  6177     title=font-variant-numeric><strong>6.7</strong></a>
  6179    <li>font-variant-position, <a href="#propdef-font-variant-position"
  6180     title=font-variant-position><strong>6.5</strong></a>
  6182    <li>font-weight, <a href="#propdef-font-weight"
  6183     title=font-weight><strong>3.2</strong></a>
  6185    <li>font-weight (descriptor), <a href="#descdef-font-weight"
  6186     title="font-weight (descriptor)"><strong>4.4</strong></a>
  6188    <li>font_face_rule, <a href="#fontfacerule"
  6189     title="font_face_rule"><strong>4.1</strong></a>
  6191    <li>FONT_FACE_SYM, <a href="#fontfacesym"
  6192     title="FONT_FACE_SYM"><strong>4.1</strong></a>
  6194    <li>font_family_name, <a href="#fontfamilyname"
  6195     title="font_family_name"><strong>6.9</strong></a>
  6197    <li>font_family_name_list, <a href="#fontfamilynamelist"
  6198     title="font_family_name_list"><strong>6.9</strong></a>
  6200    <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
  6201     title="font_feature_values_rule"><strong>6.9</strong></a>
  6203    <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
  6204     title="FONT_FEATURE_VALUES_SYM"><strong>6.9</strong></a>
  6206    <li>full-width, <a href="#full-width"
  6207     title=full-width><strong>6.10</strong></a>
  6209    <li>historical-forms, <a href="#historical-forms"
  6210     title=historical-forms><strong>6.8</strong></a>
  6212    <li>historical-ligatures, <a href="#historical-ligatures"
  6213     title=historical-ligatures><strong>6.4</strong></a>
  6215    <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
  6217    <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
  6219    <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
  6221    <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
  6223    <li>lining-nums, <a href="#lining-nums"
  6224     title=lining-nums><strong>6.7</strong></a>
  6226    <li>monospace, definition of, <a href="#monospace0" title="monospace,
  6227     definition of"><strong>#</strong></a>
  6229    <li>no-common-ligatures, <a href="#no-common-ligatures"
  6230     title=no-common-ligatures><strong>6.4</strong></a>
  6232    <li>no-contextual, <a href="#no-contextual"
  6233     title=no-contextual><strong>6.4</strong></a>
  6235    <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
  6236     title=no-discretionary-ligatures><strong>6.4</strong></a>
  6238    <li>no-historical-ligatures, <a href="#no-historical-ligatures"
  6239     title=no-historical-ligatures><strong>6.4</strong></a>
  6241    <li>none, <a href="#font-variant-ligatures-none-value"
  6242     title=none><strong>6.4</strong></a>
  6244    <li>normal, <a href="#normal" title=normal><strong>6.6</strong></a>, <a
  6245     href="#normal0" title=normal><strong>6.7</strong></a>, <a href="#normal1"
  6246     title=normal><strong>6.8</strong></a>, <a href="#normal2"
  6247     title=normal><strong>6.10</strong></a>
  6249    <li>oldstyle-nums, <a href="#oldstyle-nums"
  6250     title=oldstyle-nums><strong>6.7</strong></a>
  6252    <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
  6254    <li>ornaments, <a href="#ornaments"
  6255     title=ornaments><strong>6.8</strong></a>
  6257    <li>petite-caps, <a href="#petite-caps"
  6258     title=petite-caps><strong>6.6</strong></a>
  6260    <li>proportional-nums, <a href="#proportional-nums"
  6261     title=proportional-nums><strong>6.7</strong></a>
  6263    <li>proportional-width, <a href="#proportional-width"
  6264     title=proportional-width><strong>6.10</strong></a>
  6266    <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
  6268    <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
  6270    <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
  6271     definition of"><strong>#</strong></a>
  6273    <li>serif, definition of, <a href="#serif0" title="serif, definition
  6274     of"><strong>#</strong></a>
  6276    <li>simplified, <a href="#simplified"
  6277     title=simplified><strong>6.10</strong></a>
  6279    <li>slashed-zero, <a href="#slashed-zero"
  6280     title=slashed-zero><strong>6.7</strong></a>
  6282    <li>small-caps, <a href="#small-caps"
  6283     title=small-caps><strong>6.6</strong></a>
  6285    <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
  6287    <li>stacked-fractions, <a href="#stacked-fractions"
  6288     title=stacked-fractions><strong>6.7</strong></a>
  6290    <li>style sheet
  6291     <ul>
  6292      <li>as conformance class, <a href="#style-sheet" title="style sheet, as
  6293       conformance class"><strong>#</strong></a>
  6294     </ul>
  6296    <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
  6298    <li>stylistic, <a href="#stylistic"
  6299     title=stylistic><strong>6.8</strong></a>
  6301    <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
  6303    <li>tabular-nums, <a href="#tabular-nums"
  6304     title=tabular-nums><strong>6.7</strong></a>
  6306    <li>titling-caps, <a href="#titling-caps"
  6307     title=titling-caps><strong>6.6</strong></a>
  6309    <li>traditional, <a href="#traditional"
  6310     title=traditional><strong>6.10</strong></a>
  6312    <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
  6314    <li>unicode-range, <a href="#descdef-unicode-range"
  6315     title=unicode-range><strong>4.5</strong></a>
  6317    <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
  6319    <li>width, <a href="#width" title=width><strong>2</strong></a>
  6320   </ul>
  6321   <!--end-index-->
  6323   <h2 class=no-num id=property-index>Property index</h2>
  6324   <!--begin-properties-->
  6326   <table class=proptable>
  6327    <thead>
  6328     <tr>
  6329      <th>Property
  6331      <th>Values
  6333      <th>Initial
  6335      <th>Applies to
  6337      <th>Inh.
  6339      <th>Percentages
  6341      <th>Media
  6343    <tbody>
  6344     <tr>
  6345      <th><a class=property href="#propdef-font">font</a>
  6347      <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
  6348       &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
  6349       &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
  6350       &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
  6351       small-caption | status-bar
  6353      <td>see individual properties
  6355      <td>all elements
  6357      <td>yes
  6359      <td>see individual properties
  6361      <td>visual
  6363     <tr>
  6364      <th><a class=property href="#descdef-font-family">font-family</a>
  6366      <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
  6368      <td>depends on user agent
  6370      <td>all elements
  6372      <td>yes
  6374      <td>N/A
  6376      <td>visual
  6378     <tr>
  6379      <th><a class=property
  6380       href="#propdef-font-feature-settings">font-feature-settings</a>
  6382      <td>normal | &lt;feature-tag-value&gt; #
  6384      <td>normal
  6386      <td>all elements
  6388      <td>yes
  6390      <td>N/A
  6392      <td>visual
  6394     <tr>
  6395      <th><a class=property href="#propdef-font-kerning">font-kerning</a>
  6397      <td>auto | normal | none
  6399      <td>auto
  6401      <td>all elements
  6403      <td>yes
  6405      <td>N/A
  6407      <td>visual
  6409     <tr>
  6410      <th><a class=property
  6411       href="#propdef-font-language-override">font-language-override</a>
  6413      <td>normal | &lt;string&gt;
  6415      <td>normal
  6417      <td>all elements
  6419      <td>yes
  6421      <td>N/A
  6423      <td>visual
  6425     <tr>
  6426      <th><a class=property href="#propdef-font-size">font-size</a>
  6428      <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
  6429       &lt;percentage&gt;
  6431      <td>medium
  6433      <td>all elements
  6435      <td>yes
  6437      <td>refer to parent element's font size
  6439      <td>visual
  6441     <tr>
  6442      <th><a class=property
  6443       href="#propdef-font-size-adjust">font-size-adjust</a>
  6445      <td>none | auto | &lt;number&gt;
  6447      <td>none
  6449      <td>all elements
  6451      <td>yes
  6453      <td>N/A
  6455      <td>visual
  6457     <tr>
  6458      <th><a class=property href="#propdef-font-stretch">font-stretch</a>
  6460      <td>normal | ultra-condensed | extra-condensed | condensed |
  6461       semi-condensed | semi-expanded | expanded | extra-expanded |
  6462       ultra-expanded
  6464      <td>normal
  6466      <td>all elements
  6468      <td>yes
  6470      <td>N/A
  6472      <td>visual
  6474     <tr>
  6475      <th><a class=property href="#propdef-font-style">font-style</a>
  6477      <td>normal | italic | oblique
  6479      <td>normal
  6481      <td>all elements
  6483      <td>yes
  6485      <td>N/A
  6487      <td>visual
  6489     <tr>
  6490      <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
  6492      <td>none | [ weight || style ]
  6494      <td>weight style
  6496      <td>all elements
  6498      <td>yes
  6500      <td>N/A
  6502      <td>visual
  6504     <tr>
  6505      <th><a class=property href="#propdef-font-variant">font-variant</a>
  6507      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6508       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6509       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  6510       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  6511       character-variant(&lt;feature-value-name&gt; #) ||
  6512       swash(&lt;feature-value-name&gt;) ||
  6513       ornaments(&lt;feature-value-name&gt;) ||
  6514       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  6515       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  6516       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  6517       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  6518       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  6519       ruby ]
  6521      <td>normal
  6523      <td>all elements
  6525      <td>yes
  6527      <td>see individual properties
  6529      <td>visual
  6531     <tr>
  6532      <th><a class=property
  6533       href="#propdef-font-variant-alternates">font-variant-alternates</a>
  6535      <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
  6536       || styleset(&lt;feature-value-name&gt; #) ||
  6537       character-variant(&lt;feature-value-name&gt; #) ||
  6538       swash(&lt;feature-value-name&gt;) ||
  6539       ornaments(&lt;feature-value-name&gt;) ||
  6540       annotation(&lt;feature-value-name&gt;) ]
  6542      <td>normal
  6544      <td>all elements
  6546      <td>yes
  6548      <td>N/A
  6550      <td>visual
  6552     <tr>
  6553      <th><a class=property
  6554       href="#propdef-font-variant-caps">font-variant-caps</a>
  6556      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  6557       | unicase | titling-caps
  6559      <td>normal
  6561      <td>all elements
  6563      <td>yes
  6565      <td>N/A
  6567      <td>visual
  6569     <tr>
  6570      <th><a class=property
  6571       href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  6573      <td>normal | [ &lt;east-asian-variant-values&gt; ||
  6574       &lt;east-asian-width-values&gt; || ruby ]
  6576      <td>normal
  6578      <td>all elements
  6580      <td>yes
  6582      <td>N/A
  6584      <td>visual
  6586     <tr>
  6587      <th><a class=property
  6588       href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  6590      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6591       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6592       &lt;contextual-alt-values&gt; ]
  6594      <td>normal
  6596      <td>all elements
  6598      <td>yes
  6600      <td>N/A
  6602      <td>visual
  6604     <tr>
  6605      <th><a class=property
  6606       href="#propdef-font-variant-numeric">font-variant-numeric</a>
  6608      <td>normal | [ &lt;numeric-figure-values&gt; ||
  6609       &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
  6610       ordinal || slashed-zero ]
  6612      <td>normal
  6614      <td>all elements
  6616      <td>yes
  6618      <td>N/A
  6620      <td>visual
  6622     <tr>
  6623      <th><a class=property
  6624       href="#propdef-font-variant-position">font-variant-position</a>
  6626      <td>normal | sub | super
  6628      <td>normal
  6630      <td>all elements
  6632      <td>yes
  6634      <td>N/A
  6636      <td>visual
  6638     <tr>
  6639      <th><a class=property href="#propdef-font-weight">font-weight</a>
  6641      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
  6642       | 700 | 800 | 900
  6644      <td>normal
  6646      <td>all elements
  6648      <td>yes
  6650      <td>N/A
  6652      <td>visual
  6653   </table>
  6654   <!--end-properties-->
  6655   <!--begin-descriptors-->
  6657   <table class=proptable>
  6658    <thead>
  6659     <tr>
  6660      <th>Descriptor
  6662      <th>Value
  6664      <th>Initial
  6666      <th>Percentages
  6668      <th>Media
  6670    <tbody>
  6671     <tr>
  6672      <th><a class=property href="#descdef-font-family">font-family</a>
  6674      <td>&lt;family-name&gt;
  6676      <td>N/A
  6678     <tr>
  6679      <th><a class=property
  6680       href="#propdef-font-feature-settings">font-feature-settings</a>
  6682      <td>normal | &lt;feature-tag-value&gt; #
  6684      <td>normal
  6686     <tr>
  6687      <th><a class=property href="#propdef-font-stretch">font-stretch</a>
  6689      <td>normal | ultra-condensed | extra-condensed | condensed |
  6690       semi-condensed | semi-expanded | expanded | extra-expanded |
  6691       ultra-expanded
  6693      <td>normal
  6695     <tr>
  6696      <th><a class=property href="#propdef-font-style">font-style</a>
  6698      <td>normal | italic | oblique
  6700      <td>normal
  6702     <tr>
  6703      <th><a class=property href="#propdef-font-variant">font-variant</a>
  6705      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6706       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6707       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  6708       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  6709       character-variant(&lt;feature-value-name&gt; #) ||
  6710       swash(&lt;feature-value-name&gt;) ||
  6711       ornaments(&lt;feature-value-name&gt;) ||
  6712       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  6713       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  6714       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  6715       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  6716       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  6717       ruby ]
  6719      <td>normal
  6721     <tr>
  6722      <th><a class=property href="#propdef-font-weight">font-weight</a>
  6724      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  6726      <td>normal
  6728     <tr>
  6729      <th><a class=property href="#descdef-src">src</a>
  6731      <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
  6733      <td>N/A
  6735     <tr>
  6736      <th><a class=property href="#descdef-unicode-range">unicode-range</a>
  6738      <td>&lt;urange&gt; #
  6740      <td>U+0-10FFFF
  6741   </table>
  6742   <!--end-descriptors-->
  6743   <script type="text/javascript">
  6744 window.onload = function () {
  6745   if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
  6746   var i, hiresElements = document.getElementsByClassName("hires");
  6747   for (i = 0; i < hiresElements.length; i++) {
  6748     var h = hiresElements[i];
  6749     if (h.tagName != "IMG") continue;
  6750     var src = h.getAttribute("src");
  6751     var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
  6752     h.src = src2x;
  6755 </script>
  6756 </html>
  6757 <!-- Keep this comment at the end of the file
  6758 Local variables:
  6759 mode: sgml
  6760 sgml-declaration:"~/SGML/HTML4.decl"
  6761 sgml-default-doctype-name:"html"
  6762 sgml-minimize-attributes:t
  6763 sgml-nofill-elements:("pre" "style" "br")
  6764 sgml-live-element-indicator:t
  6765 sgml-omittag:nil
  6766 sgml-shorttag:nil
  6767 sgml-namecase-general:t
  6768 sgml-general-insert-case:lower
  6769 sgml-always-quote-attributes:t
  6770 sgml-indent-step:nil
  6771 sgml-indent-data:t
  6772 sgml-parent-document:nil
  6773 sgml-exposed-tags:nil
  6774 sgml-local-catalogs:nil
  6775 sgml-local-ecat-files:nil
  6776 End:
  6777 -->
  6778 <!-- 
  6780 to do:
  6782 - wording of OpenType family name handling
  6783 - handling combining sequences in the font matching algorithm
  6784 - fix-up fi ligature example
  6786 -->

mercurial