css-fonts/Fonts.html

Wed, 22 May 2013 17:51:04 +0800

author
John Daggett <jdaggett@mozilla.com>
date
Wed, 22 May 2013 17:51:04 +0800
changeset 8225
351f9086c29d
parent 8213
6fc1fa06eae3
child 8241
267e6c547d6d
permissions
-rw-r--r--

[css-fonts] more unicode-range revisions and link fixup

     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-22-may-2013>Editor's Draft 22
   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-20130522/">http://www.w3.org/TR/2013/ED-css3-fonts-20130522/</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 must either be given quoted as <a
   717    href="//www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or unquoted
   718    as a sequence of one or more <a
   719    href="//www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
   720    This means most punctuation characters and digits at the start of each
   721    token must be escaped in unquoted font family names.
   723   <p>To illustrate this, the following declarations are invalid:
   725   <pre>
   726 font-family: Red/Black, sans-serif;
   727 font-family: "Lucida" Grande, sans-serif;
   728 font-family: Ahem!, sans-serif;
   729 font-family: test@foo, sans-serif;
   730 font-family: #POUND, sans-serif;
   731 font-family: Hawaii 5-0, sans-serif;
   732 </pre>
   734   <p>If a sequence of identifiers is given as a font family name, the
   735    computed value is the name converted to a string by joining all the
   736    identifiers in the sequence by single spaces.
   738   <p>To avoid mistakes in escaping, it is recommended to quote font family
   739    names that contain white space, digits, or punctuation characters other
   740    than hyphens:
   742   <pre>
   743 body { font-family: "New Century Schoolbook", serif }
   745 &lt;BODY STYLE="font-family: '21st Century', fantasy">
   746 </pre>
   748   <p>Font family <em>names</em> that happen to be the same as a keyword value
   749    (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
   750    class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
   751    class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
   752    class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
   753    class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
   754    class=property>cursive</code></a>’) must be quoted to prevent confusion
   755    with the keywords with the same names. The keywords ‘<code
   756    class=property>initial</code>’ and ‘<code
   757    class=property>default</code>’ are reserved for future use and must also
   758    be quoted when used as font names. UAs must not consider these keywords as
   759    matching the <a
   760    href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
   762   <p>The precise way a set of fonts are grouped into font families varies
   763    depending upon the platform font management API's. The Windows GDI API
   764    only allows four faces to be grouped into a family while the DirectWrite
   765    API and API's on OSX and other platforms support font families with a
   766    variety of weights, widths and slopes (see <a
   767    href="#platform-props-to-css">Appendix A</a> for more details).
   769   <p>Some font formats allow fonts to carry multiple localizations of the
   770    family name. User agents must recognize and correctly match all of these
   771    names independent of the underlying platform localization, system API used
   772    or document encoding:
   774   <div class=figure><img alt="examples of localized family names"
   775    src=localizedfamilynames.png>
   776    <p class=caption>Localized family names
   777   </div>
   779   <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
   780    families</h4>
   782   <p>All five generic font families are defined to exist in all CSS
   783    implementations (they need not necessarily map to five distinct actual
   784    fonts). User agents should provide reasonable default choices for the
   785    generic font families, which express the characteristics of each family as
   786    well as possible within the limits allowed by the underlying technology.
   787    User agents are encouraged to allow users to select alternative choices
   788    for the generic fonts.
   790   <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
   791    definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
   793   <p>Serif fonts represent the formal text style for a script. This often
   794    means but is not limited to glyphs that have finishing strokes, flared or
   795    tapering ends, or have actual serifed endings (including slab serifs).
   796    Serif fonts are typically proportionately-spaced. They often display a
   797    greater variation between thick and thin strokes than fonts from the ‘<a
   798    href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
   799    font family. CSS uses the term ‘<a href="#serif"><code
   800    class=property>serif</code></a>’ to apply to a font for any script,
   801    although other names may be more familiar for particular scripts, such as
   802    Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
   803    Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
   804    class=property>serif</code></a>’ more due to its typographic role rather
   805    than its actual design style. Any font that is so described may be used to
   806    represent the generic ‘<a href="#serif"><code
   807    class=property>serif</code></a>’ family.
   809   <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
   810    <p class=caption>Sample serif fonts
   811   </div>
   813   <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
   814    title="sans-serif, definition of"> <a name=sans-serif-def><dfn
   815    id=sans-serif>sans-serif</dfn></a></span></h5>
   817   <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
   818    low contrast (vertical and horizontal stems have the close to the same
   819    thickness) and have stroke endings that are plain -- without any flaring,
   820    cross stroke, or other ornamentation. Sans-serif fonts are typically
   821    proportionately-spaced. They often have little variation between thick and
   822    thin strokes, compared to fonts from the ‘<a href="#serif"><code
   823    class=property>serif</code></a>’ family. CSS uses the term ‘<a
   824    href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
   825    to a font for any script, although other names may be more familiar for
   826    particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
   827    (Korean). Any font that is so described may be used to represent the
   828    generic ‘<a href="#sans-serif"><code
   829    class=property>sans-serif</code></a>’ family.
   831   <div class=figure><img alt="sample sans-serif fonts"
   832    src=sansserifexamples.png>
   833    <p class=caption>Sample sans-serif fonts
   834   </div>
   836   <h5 class="no-num no-toc"> <span class=index-def id=cursive0
   837    title="cursive, definition of"> <a name=cursive-def><dfn
   838    id=cursive>cursive</dfn></a></span></h5>
   840   <p>Glyphs in cursive fonts generally use a more informal script style, and
   841    the result looks more like handwritten pen or brush writing than printed
   842    letterwork. CSS uses the term ‘<a href="#cursive"><code
   843    class=property>cursive</code></a>’ to apply to a font for any script,
   844    although other names such as Chancery, Brush, Swing and Script are also
   845    used in font names.
   847   <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
   848    <p class=caption>Sample cursive fonts
   849   </div>
   851   <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
   852    title="fantasy, definition of"> <a name=fantasy-def><dfn
   853    id=fantasy>fantasy</dfn></a></span></h5>
   855   <p>Fantasy fonts are primarily decorative or expressive fonts that contain
   856    playful representations of characters. These do not include Pi or Picture
   857    fonts which do not represent actual characters.
   859   <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
   860    <p class=caption>Sample fantasy fonts
   861   </div>
   863   <h5 class="no-num no-toc"> <span class=index-def id=monospace0
   864    title="monospace, definition of"> <a name=monospace-def><dfn
   865    id=monospace>monospace</dfn></a></span></h5>
   867   <p>The sole criterion of a monospace font is that all glyphs have the same
   868    fixed width. This is often used to render samples of computer code.
   870   <div class=figure><img alt="sample monospace fonts"
   871    src=monospaceexamples.png>
   872    <p class=caption>Sample monospace fonts
   873   </div>
   874   <!-- prop: font-weight -->
   876   <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
   877    href="#propdef-font-weight">font-weight</a> property</h3>
   879   <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
   880    <tbody>
   881     <tr>
   882      <td>Name:
   884      <td><dfn id=propdef-font-weight>font-weight</dfn>
   886     <tr>
   887      <td>Value:
   889      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
   890       | 700 | 800 | 900
   892     <tr>
   893      <td>Initial:
   895      <td>normal
   897     <tr>
   898      <td>Applies to:
   900      <td>all elements
   902     <tr>
   903      <td>Inherited:
   905      <td>yes
   907     <tr>
   908      <td>Percentages:
   910      <td>N/A
   912     <tr>
   913      <td>Media:
   915      <td>visual
   917     <tr>
   918      <td>Computed value:
   920      <td>numeric weight value (see description)
   922     <tr>
   923      <td>Animatable:
   925      <td>as <a
   926       href="http://dev.w3.org/csswg/css3-transitions/#animtype-font-weight">font
   927       weight</a>
   928   </table>
   930   <p>The <a class=noxref href="#font-weight-prop"><span
   931    class=property>‘<code class=property>font-weight</code>’</span></a>
   932    property specifies the weight of glyphs in the font, their degree of
   933    blackness or stroke thickness.
   935   <p>Values have the following meanings:
   937   <dl>
   938    <dt>100 to 900
   940    <dd>These values form an ordered sequence, where each number indicates a
   941     weight that is at least as dark as its predecessor. These roughly
   942     correspond to the commonly used weight names below:
   943   </dl>
   945   <ul>
   946    <li>100 - Thin
   948    <li>200 - Extra Light (Ultra Light)
   950    <li>300 - Light
   952    <li>400 - Normal
   954    <li>500 - Medium
   956    <li>600 - Semi Bold (Demi Bold)
   958    <li>700 - Bold
   960    <li>800 - Extra Bold (Ultra Bold)
   962    <li>900 - Black (Heavy)
   963   </ul>
   965   <dl>
   966    <dt><a href="#normal2"><strong>normal</strong></a>
   968    <dd>Same as ‘<code class=css>400</code>’.
   970    <dt><strong>bold</strong>
   972    <dd>Same as ‘<code class=css>700</code>’.
   974    <dt><strong>bolder</strong>
   976    <dd>Specifies a bolder weight than the inherited value.
   978    <dt><strong>lighter</strong>
   980    <dd>Specifies a lighter weight than the inherited value.
   981   </dl>
   983   <p>Font formats that use a scale other than a nine-step scale should map
   984    their scale onto the CSS scale so that 400 roughly corresponds with a face
   985    that would be labeled as Regular, Book, Roman and 700 roughly matches a
   986    face that would be labeled as Bold. Or weights may be inferred from the
   987    style names, ones that correspond roughly with the scale above. The scale
   988    is relative, so a face with a larger weight value must never appear
   989    lighter. If style names are used to infer weights, care should be taken to
   990    handle variations in style names across locales.
   992   <p>Quite often there are only a few weights available for a particular font
   993    family. When a weight is specified for which no face exists, a face with a
   994    nearby weight is used. In general, bold weights map to faces with heavier
   995    weights and light weights map to faces with lighter weights (see the <a
   996    href="#font-matching-algorithm">font matching section below</a> for a
   997    precise definition). The examples here illustrate which face is used for
   998    different weights, grey indicates a face for that weight does not exist so
   999    a face with a nearby weight is used:
  1001   <div class=figure><img alt="weight mappings for a family with 400, 700 and
  1002    900 weights" src=optimaweights.png>
  1003    <p class=caption>Weight mappings for a font family with 400, 700 and 900
  1004     weight faces
  1005   </div>
  1007   <div class=figure><img alt="weight mappings for a family with 300, 600
  1008    weights" src=hiraginoweights.png>
  1009    <p class=caption>Weight mappings for a font family with 300 and 600 weight
  1010     faces
  1011   </div>
  1013   <p>Although the practice is not well-loved by typographers, bold faces are
  1014    often synthesized by user agents for faces that lack actual bold faces.
  1015    For the purposes of style matching, these faces must be treated as if they
  1016    exist within the family. Authors can explicitly avoid this behavior by
  1017    using the ‘<a href="#propdef-font-synthesis"><code
  1018    class=property>font-synthesis</code></a>’ property.
  1020   <p>Specified values of ‘<code class=property>bolder</code>’ and
  1021    ‘<code class=property>lighter</code>’ indicate weights relative to the
  1022    weight of the parent element. The computed weight is calculated based on
  1023    the inherited ‘<a href="#propdef-font-weight"><code
  1024    class=property>font-weight</code></a>’ value using the chart below.
  1026   <table class=data id=bolderlighter summary="Bolder/lighter mappings">
  1027    <thead>
  1028     <tr>
  1029      <th>Inherited value
  1031      <th>bolder
  1033      <th>lighter
  1035    <tbody>
  1036     <tr>
  1037      <th>100
  1039      <td>400
  1041      <td>100
  1043     <tr>
  1044      <th>200
  1046      <td>400
  1048      <td>100
  1050     <tr>
  1051      <th>300
  1053      <td>400
  1055      <td>100
  1057     <tr>
  1058      <th>400
  1060      <td>700
  1062      <td>100
  1064     <tr>
  1065      <th>500
  1067      <td>700
  1069      <td>100
  1071     <tr>
  1072      <th>600
  1074      <td>900
  1076      <td>400
  1078     <tr>
  1079      <th>700
  1081      <td>900
  1083      <td>400
  1085     <tr>
  1086      <th>800
  1088      <td>900
  1090      <td>700
  1092     <tr>
  1093      <th>900
  1095      <td>900
  1097      <td>700
  1098   </table>
  1100   <p>The table above is equivalent to selecting the next relative bolder or
  1101    lighter face, given a font family containing normal and bold faces along
  1102    with a thin and a heavy face. Authors who desire finer control over the
  1103    exact weight values used for a given element may use numerical values
  1104    instead of relative weights.</p>
  1105   <!-- prop: font-stretch -->
  1107   <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
  1108    href="#propdef-font-stretch">font-stretch</a> property</h3>
  1110   <table class=propdef id=namefont-stretchvaluenormal-ultra-conden>
  1111    <tbody>
  1112     <tr>
  1113      <td>Name:
  1115      <td><dfn id=propdef-font-stretch>font-stretch</dfn>
  1117     <tr>
  1118      <td>Value:
  1120      <td>normal | ultra-condensed | extra-condensed | condensed |
  1121       semi-condensed | semi-expanded | expanded | extra-expanded |
  1122       ultra-expanded
  1124     <tr>
  1125      <td>Initial:
  1127      <td>normal
  1129     <tr>
  1130      <td>Applies to:
  1132      <td>all elements
  1134     <tr>
  1135      <td>Inherited:
  1137      <td>yes
  1139     <tr>
  1140      <td>Percentages:
  1142      <td>N/A
  1144     <tr>
  1145      <td>Media:
  1147      <td>visual
  1149     <tr>
  1150      <td>Computed value:
  1152      <td>as specified
  1154     <tr>
  1155      <td>Animatable:
  1157      <td>as <a href="#font-stretch-animation">font stretch</a>
  1158   </table>
  1160   <p>The <a class=noxref href="#font-stretch-prop"><span
  1161    class=property>‘<code class=property>font-stretch</code>’</span></a>
  1162    property selects a normal, condensed, or expanded face from a font family.
  1163    Absolute keyword values have the following ordering, from narrowest to
  1164    widest:
  1166   <ul>
  1167    <li><code>ultra-condensed</code>
  1169    <li><code>extra-condensed</code>
  1171    <li><code>condensed</code>
  1173    <li><code>semi-condensed </code>
  1175    <li><code>normal</code>
  1177    <li><code>semi-expanded</code>
  1179    <li><code>expanded</code>
  1181    <li><code>extra-expanded</code>
  1183    <li><code>ultra-expanded</code>
  1184   </ul>
  1186   <p>When a face does not exist for a given width, normal or condensed values
  1187    map to a narrower face, otherwise a wider face. Conversely, expanded
  1188    values map to a wider face, otherwise a narrower face. The figure below
  1189    shows how the nine font-stretch property settings affect font selection
  1190    for font family containing a variety of widths, grey indicates a width for
  1191    which no face exists and a different width is substituted:
  1193   <div class=figure><img alt="width mappings for a family with condensed,
  1194    normal and expanded faces" src=universwidths.png>
  1195    <p class=caption>Width mappings for a font family with condensed, normal
  1196     and expanded width faces
  1197   </div>
  1199   <p id=font-stretch-animation>Animation of font stretch: Font stretch is
  1200    interpolated in discrete steps. The interpolation happens as though the
  1201    ordered values are equally spaced real numbers. The interpolation result
  1202    is rounded to the nearest value, with values exactly halfway between two
  1203    values rounded towards the later value in the list above.</p>
  1204   <!-- prop: font-style -->
  1206   <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
  1207    href="#propdef-font-style">font-style</a> property</h3>
  1209   <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
  1210    <tbody>
  1211     <tr>
  1212      <td>Name:
  1214      <td><dfn id=propdef-font-style>font-style</dfn>
  1216     <tr>
  1217      <td>Value:
  1219      <td>normal | italic | oblique
  1221     <tr>
  1222      <td>Initial:
  1224      <td>normal
  1226     <tr>
  1227      <td>Applies to:
  1229      <td>all elements
  1231     <tr>
  1232      <td>Inherited:
  1234      <td>yes
  1236     <tr>
  1237      <td>Percentages:
  1239      <td>N/A
  1241     <tr>
  1242      <td>Media:
  1244      <td>visual
  1246     <tr>
  1247      <td>Computed value:
  1249      <td>as specified
  1251     <tr>
  1252      <td>Animatable:
  1254      <td>no
  1255   </table>
  1257   <p>The <a class=noxref href="#font-style-prop"><span
  1258    class=property>‘<code class=property>font-style</code>’</span></a>
  1259    property allows italic or oblique faces to be selected. Italic forms are
  1260    generally cursive in nature while oblique faces are typically sloped
  1261    versions of the regular face. Oblique faces can be simulated by
  1262    artificially sloping the glyphs of the regular face. Compare the
  1263    artificially sloped renderings of Palatino ‘<code
  1264    class=property>a</code>’ and Baskerville ‘<code
  1265    class=property>N</code>’ in grey with the actual italic versions:
  1267   <div class=figure><img alt="artificial sloping vs. real italics"
  1268    src=realvsfakeitalics.png>
  1269    <p class=caption>Artificial sloping versus real italics
  1270   </div>
  1272   <p>A value of ‘<a href="#normal2"><code
  1273    class=property>normal</code></a>’ selects a face that is classified as
  1274    ‘<a href="#normal2"><code class=property>normal</code></a>’, while
  1275    ‘<code class=property>oblique</code>’ selects a font that is labeled
  1276    ‘<code class=property>oblique</code>’. A value of ‘<code
  1277    class=property>italic</code>’ selects a font that is labeled ‘<code
  1278    class=property>italic</code>’, or, if that is not available, one labeled
  1279    ‘<code class=property>oblique</code>’. If no italic or oblique face is
  1280    available, oblique faces can be synthesized by rendering non-obliqued
  1281    faces with a right sloping transformation applied. When synthesizing these
  1282    faces, the transformation should apply to all glyphs in the same way and
  1283    not vary based on codepoint or due to horizontal or vertical line
  1284    orientation.
  1286   <p>Many scripts lack the tradition of mixing a cursive form within text
  1287    rendered with a normal face. Chinese, Japanese and Korean fonts almost
  1288    always lack italic or oblique faces. Fonts that support a mixture of
  1289    scripts will sometimes omit specific scripts such as Arabic from the set
  1290    of glyphs supported in the italic face. User agents should be careful
  1291    about making <a href="#character-map"><em>character map</em></a>
  1292    assumptions across faces.
  1294   <p class=issue>For synthetic italics in vertical runs of Chinese, Japanese,
  1295    or Korean text, is there a need to define explicitly the direction of the
  1296    faux oblique for runs that include a mixture of ideographic and Latin
  1297    text?</p>
  1298   <!-- prop: font-size -->
  1300   <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
  1301    href="#propdef-font-size">font-size</a> property</h3>
  1303   <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
  1304    <tbody>
  1305     <tr>
  1306      <td>Name:
  1308      <td><dfn id=propdef-font-size>font-size</dfn>
  1310     <tr>
  1311      <td>Value:
  1313      <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
  1314       | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
  1315       <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
  1316       href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
  1318     <tr>
  1319      <td>Initial:
  1321      <td>medium
  1323     <tr>
  1324      <td>Applies to:
  1326      <td>all elements
  1328     <tr>
  1329      <td>Inherited:
  1331      <td>yes
  1333     <tr>
  1334      <td>Percentages:
  1336      <td>refer to parent element's font size
  1338     <tr>
  1339      <td>Media:
  1341      <td>visual
  1343     <tr>
  1344      <td>Computed value:
  1346      <td>absolute length
  1348     <tr>
  1349      <td>Animatable:
  1351      <td>as <a
  1352       href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
  1353   </table>
  1355   <p>This property indicates the desired height of glyphs from the font. For
  1356    scalable fonts, the font-size is a scale factor applied to the EM unit of
  1357    the font. (Note that certain glyphs may bleed outside their EM box.) For
  1358    non-scalable fonts, the font-size is converted into absolute units and
  1359    matched against the declared font-size of the font, using the same
  1360    absolute coordinate space for both of the matched values. Values have the
  1361    following meanings:
  1363   <dl>
  1364    <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
  1366    <dd> An <a
  1367     href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
  1368     refers to an entry in a table of font sizes computed and kept by the user
  1369     agent. Possible values are:
  1370     <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
  1372    <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
  1374    <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
  1375     keyword is interpreted relative to the table of font sizes and the
  1376     computed ‘<a href="#propdef-font-size"><code
  1377     class=property>font-size</code></a>’ of the parent element. Possible
  1378     values are:
  1379     <p> [ larger | smaller ]
  1381     <p> For example, if the parent element has a font size of ‘<code
  1382      class=property>medium</code>’, a value of ‘<code
  1383      class=property>larger</code>’ will make the font size of the current
  1384      element be ‘<code class=property>large</code>’. If the parent
  1385      element's size is not close to a table entry, the user agent is free to
  1386      interpolate between table entries or round off to the closest one. The
  1387      user agent may have to extrapolate table values if the numerical value
  1388      goes beyond the keywords.
  1390    <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
  1392    <dd>A length value specifies an absolute font size (independent of the
  1393     user agent's font table). Negative lengths are illegal.
  1395    <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
  1397    <dd>A percentage value specifies an absolute font size relative to the
  1398     parent element's font size. Use of percentage values, or values in
  1399     ‘<code class=property>em</code>’s, leads to more robust and
  1400     cascadable style sheets.
  1401   </dl>
  1403   <p>The following table provides user agent guidelines for the absolute-size
  1404    scaling factor and their mapping to HTML heading and absolute font-sizes.
  1405    The ‘<code class=property>medium</code>’ value is used as the
  1406    reference middle value. The user agent may fine-tune these values for
  1407    different fonts or different types of display devices.
  1409   <table class=data>
  1410    <thead>
  1411     <tr>
  1412      <th>CSS absolute-size values
  1414      <th>xx-small
  1416      <th>x-small
  1418      <th>small
  1420      <th>medium
  1422      <th>large
  1424      <th>x-large
  1426      <th>xx-large
  1428      <th> 
  1430    <tbody>
  1431     <tr>
  1432      <th>scaling factor
  1434      <td>3/5
  1436      <td>3/4
  1438      <td>8/9
  1440      <td>1
  1442      <td>6/5
  1444      <td>3/2
  1446      <td>2/1
  1448      <td>3/1
  1450     <tr>
  1451      <th>HTML headings
  1453      <td>h6
  1455      <td> 
  1457      <td>h5
  1459      <td>h4
  1461      <td>h3
  1463      <td>h2
  1465      <td>h1
  1467      <td> 
  1469     <tr>
  1470      <th>HTML font sizes
  1472      <td>1
  1474      <td> 
  1476      <td>2
  1478      <td>3
  1480      <td>4
  1482      <td>5
  1484      <td>6
  1486      <td>7
  1487   </table>
  1489   <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
  1490    applying these guidelines should nevertheless avoid creating font-size
  1491    resulting in less than 9 device pixels per EM unit on a computer display
  1492    .</em>
  1494   <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
  1495    factor between adjacent indexes was 1.5 which user experience proved to be
  1496    too large. In CSS2, the suggested scaling factor for computer screen
  1497    between adjacent indexes was 1.2 which still created issues for the small
  1498    sizes. The new scaling factor varies between each index to provide a
  1499    better readability.</em>
  1501   <p>The actual value of this property may differ from the computed value due
  1502    a numerical value on ‘<a href="#propdef-font-size-adjust"><code
  1503    class=property>font-size-adjust</code></a>’ and the unavailability of
  1504    certain font sizes.
  1506   <p>Child elements inherit the computed <a class=noxref
  1507    href="#font-size-prop"> <span class=property>‘<code
  1508    class=property>font-size</code>’</span></a> value (otherwise, the effect
  1509    of <a class=noxref href="#font-size-adjust-prop"><span
  1510    class=property>‘<code
  1511    class=property>font-size-adjust</code>’</span></a> would compound).
  1513   <div class=example>
  1514    <p style="display:none">Example(s):
  1516    <p>
  1518    <pre>p { font-size: 12pt; }
  1519 blockquote { font-size: larger }
  1520 em { font-size: 150% }
  1521 em { font-size: 1.5em }
  1522 </pre>
  1523   </div>
  1524   <!-- prop: font-size-adjust -->
  1526   <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
  1527    the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
  1529   <table class=propdef id=namefont-size-adjustvaluenone-auto-ltnum>
  1530    <tbody>
  1531     <tr>
  1532      <td>Name:
  1534      <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
  1536     <tr>
  1537      <td>Value:
  1539      <td>none | auto | <a
  1540       href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
  1542     <tr>
  1543      <td>Initial:
  1545      <td>none
  1547     <tr>
  1548      <td>Applies to:
  1550      <td>all elements
  1552     <tr>
  1553      <td>Inherited:
  1555      <td>yes
  1557     <tr>
  1558      <td>Percentages:
  1560      <td>N/A
  1562     <tr>
  1563      <td>Media:
  1565      <td>visual
  1567     <tr>
  1568      <td>Computed value:
  1570      <td>as specified
  1572     <tr>
  1573      <td>Animatable:
  1575      <td>as <a
  1576       href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a>
  1577   </table>
  1579   <p>For any given font size, the apparent size and legibility of text varies
  1580    across fonts. For scripts such as Latin or Cyrillic that distinguish
  1581    between upper and lowercase letters, the relative height of lowercase
  1582    letters compared to their uppercase counterparts is a determining factor
  1583    of legibility. This is commonly referred to as the <a class=index-def
  1584    href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
  1585    id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
  1586    the x-height of a font divided by the font size.
  1588   <p>In situations where font fallback occurs, fallback fonts may not share
  1589    the same aspect ratio as the desired font family and will thus appear less
  1590    readable. The font-size-adjust property is a way to preserve the
  1591    readability of text when font fallback occurs. It does this by adjusting
  1592    the font-size so that the x-height is the same regardless of the font
  1593    used.
  1595   <div class=example>
  1596    <p>The style defined below defines Verdana as the desired font family, but
  1597     if Verdana is not available Futura or Times will be used.</p>
  1599    <pre>p { 
  1600     font-family: Verdana, Futura, Times; 
  1603 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
  1604 </pre>
  1606    <p>Verdana has a relatively high aspect ratio, lowercase letters are
  1607     relatively tall compared to uppercase letters, so at small sizes text
  1608     appears legible. Times has a lower aspect ratio and so if fallback
  1609     occurs, the text will be less legible at small sizes than Verdana.</p>
  1610   </div>
  1612   <p>How text rendered in each of these fonts compares is shown below, the
  1613    columns show text rendered in Verdana, Futura and Times. The same
  1614    font-size value is used across cells within each row and red lines are
  1615    included to show the differences in x-height. In the upper half each row
  1616    is rendered in the same font-size value. The same is true for the lower
  1617    half but in this half the font-size-adjust property is also set so that
  1618    the actual font size is adjusted to preserve the x-height across each row.
  1619    Note how small text remains relatively legible across each row in the
  1620    lower half.
  1622   <div class=figure><img alt="text with and without font-size-adjust"
  1623    src=fontsizeadjust.png>
  1624    <p class=caption>Text with and without the use of font-size-adjust
  1625   </div>
  1627   <p>This property allows authors to specify an aspect value for an element
  1628    that will effectively preserve the x-height of the first choice font,
  1629    whether it is substituted or not. Values have the following meanings:
  1631   <dl>
  1632    <dt><strong>none</strong>
  1634    <dd>Do not preserve the font's x-height.
  1636    <dt><strong>auto</strong>
  1638    <dd>Behaves just like &lt;number>, except the number used is the aspect
  1639     value calculated by user agents for the first font in the list of fonts
  1640     defined for the initial value of the ‘<a
  1641     href="#descdef-font-family"><code
  1642     class=property>font-family</code></a>’ property. Effectively this is
  1643     the default font used when ‘<a href="#descdef-font-family"><code
  1644     class=property>font-family</code></a>’ is not otherwise specified.
  1645     <p>Authors can use this value to specify that font size should be
  1646      normalized across fonts based on the x-height without the need to
  1647      specify the aspect ratio explicitly.</p>
  1649    <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
  1651    <dd>Specifies the aspect value used in the calculation below to calculate
  1652     the adjusted font size:
  1653     <pre>c  =  ( a / a' ) s 
  1654 </pre>
  1656     <p>where:</p>
  1658     <pre>s  =  font-size value
  1659 a  =  aspect value as specified by the font-size-adjust property
  1660 a' =  aspect value of actual font
  1661 c  =  adjusted font-size to use
  1662 </pre>
  1664     <p>This value applies to any font that is selected but in typical usage
  1665      it should be based on the aspect value of the first font in the
  1666      font-family list. If this is specified accurately, the <tt>(a/a')</tt>
  1667      term in the formula above is effectively 1 for the first font and no
  1668      adjustment occurs. If the value is specified inaccurately, text rendered
  1669      using the first font in the family list will display differently in
  1670      older user agents that don't support font-size-adjust.</p>
  1671   </dl>
  1673   <p>Authors can calculate the aspect value for a given font by comparing
  1674    spans with the same content but different font-size-adjust properties. If
  1675    the same font-size is used, the spans will match when the font-size-adjust
  1676    value is accurate for the given font.
  1678   <div class=example>
  1679    <p>Two spans with borders are used to determine the aspect value of a
  1680     font. The font-size is the same for both spans but the font-size-adjust
  1681     property is specified only for the right span. Starting with a value of
  1682     0.5, the aspect value can be adjusted until the borders around the two
  1683     letters line up.</p>
  1685    <pre>p {
  1686     font-family: Futura;
  1687     font-size: 500px;
  1690 span {
  1691     border: solid 1px red;
  1694 .adjust {
  1695     font-size-adjust: 0.5;
  1698 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
  1699 </pre>
  1701    <div class=figure><img alt="Futura with an aspect value of 0.5"
  1702     src=beforefontsizeadjust.png>
  1703     <p class=caption>Futura with an aspect value of 0.5
  1704    </div>
  1706    <p>The box on the right is a bit bigger than the one on the left, so the
  1707     aspect value of this font is something less than 0.5. Adjust the value
  1708     until the boxes align.</p>
  1709   </div>
  1710   <!-- prop: font -->
  1711   <!-- jtdfix, crap, preprocessor is inserting links to descriptors rather than properties.  bert, make it stop... -->
  1712   <!-- <a href="#font-stretch-prop" class="noxref"><span class="property">'font-stretch'</span></a> -->
  1714   <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
  1715    <a href="#propdef-font">font</a> property</h3>
  1717   <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
  1718    <tbody>
  1719     <tr>
  1720      <td>Name:
  1722      <td><dfn id=propdef-font>font</dfn>
  1724     <tr>
  1725      <td>Value:
  1727      <td>[ [ <var>&lt;‘<a href="#propdef-font-style"><code
  1728       class=property>font-style</code></a>’&gt;</var> || <a
  1729       href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
  1730       || <var>&lt;‘<a href="#propdef-font-weight"><code
  1731       class=property>font-weight</code></a>’&gt;</var> || <var>&lt;‘<a
  1732       href="#propdef-font-stretch"><code
  1733       class=property>font-stretch</code></a>’</var> ]? <var>&lt;‘<a
  1734       href="#propdef-font-size"><code
  1735       class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
  1736       class=property>line-height</code>’&gt;</var> ]? <var>&lt;‘<a
  1737       href="#descdef-font-family"><code
  1738       class=property>font-family</code></a>’&gt;</var> ] | caption | icon |
  1739       menu | message-box | small-caption | status-bar
  1741     <tr>
  1742      <td>Initial:
  1744      <td>see individual properties
  1746     <tr>
  1747      <td>Applies to:
  1749      <td>all elements
  1751     <tr>
  1752      <td>Inherited:
  1754      <td>yes
  1756     <tr>
  1757      <td>Percentages:
  1759      <td>see individual properties
  1761     <tr>
  1762      <td>Media:
  1764      <td>visual
  1766     <tr>
  1767      <td>Computed value:
  1769      <td>see individual properties
  1771     <tr>
  1772      <td>Animatable:
  1774      <td>see individual properties
  1775   </table>
  1777   <p>The <span class=property>‘<a href="#propdef-font"><code
  1778    class=property>font</code></a>’</span> property is, except as described
  1779    below, a shorthand property for setting ‘<a
  1780    href="#propdef-font-style"><code class=property>font-style</code></a>’,
  1781    <span class=property>‘<a href="#propdef-font-variant"><code
  1782    class=property>font-variant</code></a>’</span>, <span
  1783    class=property>‘<a href="#propdef-font-weight"><code
  1784    class=property>font-weight</code></a>’</span>, <span
  1785    class=property>‘<a href="#propdef-font-stretch"><code
  1786    class=property>font-stretch</code></a>’</span>, <span
  1787    class=property>‘<a href="#propdef-font-size"><code
  1788    class=property>font-size</code></a>’</span>, ‘<code
  1789    class=property>line-height</code>’, <span class=property>‘<a
  1790    href="#descdef-font-family"><code
  1791    class=property>font-family</code></a>’</span> at the same place in the
  1792    stylesheet. Values for the <span class=property>‘<a
  1793    href="#propdef-font-variant"><code
  1794    class=property>font-variant</code></a>’</span> property may also be
  1795    included but only those supported in CSS 2.1, none of the font-variant
  1796    values added in this specification can be used in the <span
  1797    class=property>‘<a href="#propdef-font"><code
  1798    class=property>font</code></a>’</span> shorthand:
  1800   <pre
  1801    class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
  1803   <p>The syntax of this property is based on a traditional typographical
  1804    shorthand notation to set multiple properties related to fonts.
  1806   <p>All subproperties of the ‘<a href="#propdef-font"><code
  1807    class=property>font</code></a>’ property are first reset to their
  1808    initial values, including those listed above plus <span
  1809    class=property>‘<a href="#propdef-font-size-adjust"><code
  1810    class=property>font-size-adjust</code></a>’</span>, <span
  1811    class=property>‘<a href="#propdef-font-kerning"><code
  1812    class=property>font-kerning</code></a>’</span>, subproperties of <span
  1813    class=property>‘<a href="#propdef-font-variant"><code
  1814    class=property>font-variant</code></a>’</span> and and <span
  1815    class=property>‘<a href="#propdef-font-language-override"><code
  1816    class=property>font-language-override</code></a>’</span>. Then, those
  1817    properties that are given explicit values in the <span
  1818    class=property>‘<a href="#propdef-font"><code
  1819    class=property>font</code></a>’</span> shorthand are set to those
  1820    values. For a definition of allowed and initial values, see the previously
  1821    defined properties. For reasons of backwards compatibility, it is not
  1822    possible to set <span class=property>‘<a
  1823    href="#propdef-font-size-adjust"><code
  1824    class=property>font-size-adjust</code></a>’</span> to anything other
  1825    than its initial value using the <span class=property>‘<a
  1826    href="#propdef-font"><code class=property>font</code></a>’</span>
  1827    shorthand property; instead, use the individual property.
  1829   <div class=example>
  1830    <p style="display:none">Example(s):
  1832    <p>
  1834    <pre>p { font: 12pt/14pt sans-serif }
  1835 p { font: 80% sans-serif }
  1836 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
  1837 p { font: bold italic large Palatino, serif }
  1838 p { font: normal small-caps 120%/120% fantasy }
  1839 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
  1840 </pre>
  1842    <p> In the second rule, the font size percentage value (‘<code
  1843     class=css>80%</code>’) refers to the computed ‘<a
  1844     href="#propdef-font-size"><code class=property>font-size</code></a>’ of
  1845     the parent element. In the third rule, the line height percentage
  1846     (‘<code class=css>110%</code>’) refers to the font size of the
  1847     element itself.
  1849    <p>The first three rules do not specify the <span class=property>‘<a
  1850     href="#propdef-font-variant"><code
  1851     class=property>font-variant</code></a>’</span> and <span
  1852     class=property>‘<a href="#propdef-font-weight"><code
  1853     class=property>font-weight</code></a>’</span> explicitly, so these
  1854     properties receive their initial values (‘<a href="#normal2"><code
  1855     class=property>normal</code></a>’). Notice that the font family name
  1856     "new century schoolbook", which contains spaces, is enclosed in quotes.
  1857     The fourth rule sets the <span class=property>‘<a
  1858     href="#propdef-font-weight"><code
  1859     class=property>font-weight</code></a>’</span> to ‘<code
  1860     class=property>bold</code>’, the <span class=property>‘<a
  1861     href="#propdef-font-style"><code
  1862     class=property>font-style</code></a>’</span> to ‘<code
  1863     class=property>italic</code>’, and implicitly sets <span
  1864     class=property>‘<a href="#propdef-font-variant"><code
  1865     class=property>font-variant</code></a>’</span> to ‘<a
  1866     href="#normal2"><code class=property>normal</code></a>’.
  1868    <p> The fifth rule sets the <span class=property>‘<a
  1869     href="#propdef-font-variant"><code
  1870     class=property>font-variant</code></a>’</span> (‘<a
  1871     href="#small-caps"><code class=property>small-caps</code></a>’), the
  1872     <span class=property>‘<a href="#propdef-font-size"><code
  1873     class=property>font-size</code></a>’</span> (120% of the parent's font
  1874     size), the <span class=property>‘<code
  1875     class=property>line-height</code>’</span> (120% of the font size) and
  1876     the <span class=property>‘<a href="#descdef-font-family"><code
  1877     class=property>font-family</code></a>’</span> (‘<a
  1878     href="#fantasy"><code class=property>fantasy</code></a>’). It follows
  1879     that the keyword ‘<a href="#normal2"><code
  1880     class=property>normal</code></a>’ applies to the two remaining
  1881     properties: <span class=property>‘<a href="#propdef-font-style"><code
  1882     class=property>font-style</code></a>’</span> and <span
  1883     class=property>‘<a href="#propdef-font-weight"><code
  1884     class=property>font-weight</code></a>’</span>.
  1886    <p>The sixth rule sets the <span class=property>‘<a
  1887     href="#propdef-font-style"><code
  1888     class=property>font-style</code></a>’</span>, <span
  1889     class=property>‘<a href="#propdef-font-stretch"><code
  1890     class=property>font-stretch</code></a>’</span>, <span
  1891     class=property>‘<a href="#propdef-font-size"><code
  1892     class=property>font-size</code></a>’</span>, and <span
  1893     class=property>‘<a href="#descdef-font-family"><code
  1894     class=property>font-family</code></a>’</span>, the other font
  1895     properties being set to their initial values.
  1896   </div>
  1898   <p>Since the ‘<a href="#propdef-font-stretch"><code
  1899    class=property>font-stretch</code></a>’ property was not defined in CSS
  1900    2.1, when using ‘<a href="#propdef-font-stretch"><code
  1901    class=property>font-stretch</code></a>’ values within ‘<a
  1902    href="#propdef-font"><code class=property>font</code></a>’ rules,
  1903    authors should include a extra version compatible with older user agents:
  1905   <pre>p {
  1906   font: 80% sans-serif;   /* for older user agents */
  1907   font: condensed 80% sans-serif;
  1908 }</pre>
  1910   <p>The following values refer to system fonts:
  1912   <dl>
  1913    <dt><strong>caption</strong>
  1915    <dd>The font used for captioned controls (e.g., buttons, drop-downs,
  1916     etc.).
  1918    <dt><strong>icon</strong>
  1920    <dd>The font used to label icons.
  1922    <dt><strong>menu</strong>
  1924    <dd>The font used in menus (e.g., dropdown menus and menu lists).
  1926    <dt><strong>message-box</strong>
  1928    <dd>The font used in dialog boxes.
  1930    <dt><strong>small-caption</strong>
  1932    <dd>The font used for labeling small controls.
  1934    <dt><strong>status-bar</strong>
  1936    <dd>The font used in window status bars.
  1937   </dl>
  1939   <p>System fonts may only be set as a whole; that is, the font family, size,
  1940    weight, style, etc. are all set at the same time. These values may then be
  1941    altered individually if desired. If no font with the indicated
  1942    characteristics exists on a given platform, the user agent should either
  1943    intelligently substitute (e.g., a smaller version of the ‘<code
  1944    class=property>caption</code>’ font might be used for the ‘<code
  1945    class=property>small-caption</code>’ font), or substitute a user agent
  1946    default font. As for regular fonts, if, for a system font, any of the
  1947    individual properties are not part of the operating system's available
  1948    user preferences, those properties should be set to their initial values.
  1950   <p>That is why this property is "almost" a shorthand property: system fonts
  1951    can only be specified with this property, not with <span
  1952    class=property>‘<a href="#descdef-font-family"><code
  1953    class=property>font-family</code></a>’</span> itself, so <span
  1954    class=property>‘<a href="#propdef-font"><code
  1955    class=property>font</code></a>’</span> allows authors to do more than
  1956    the sum of its subproperties. However, the individual properties such as
  1957    <span class=property>‘<a href="#propdef-font-weight"><code
  1958    class=property>font-weight</code></a>’</span> are still given values
  1959    taken from the system font, which can be independently varied.
  1961   <p>Note that the keywords used for the system fonts listed above are only
  1962    treated as keywords when they occur in the initial position, in other
  1963    positions the same string is treated as part of the font family name:
  1965   <pre>  font: menu;        /* use the font settings for system menus */
  1966   font: large menu;  /* use a font family named "menu" */</pre>
  1968   <div class=example>
  1969    <p style="display:none">Example(s):
  1971    <p>
  1973    <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
  1974 button p { font: menu }
  1975 button p em { font-weight: bolder }
  1976 </pre>
  1978    <p>If the font used for dropdown menus on a particular system happened to
  1979     be, for example, 9-point Charcoal, with a weight of 600, then P elements
  1980     that were descendants of BUTTON would be displayed as if this rule were
  1981     in effect:
  1983    <pre>button p { font: 600 9pt Charcoal }
  1984 </pre>
  1986    <p>Because the <span class=property>‘<a href="#propdef-font"><code
  1987     class=property>font</code></a>’</span> shorthand resets to its initial
  1988     value any property not explicitly given a value, this has the same effect
  1989     as this declaration:
  1991    <pre>button p {
  1992   font-style: normal;
  1993   font-variant: normal;
  1994   font-weight: 600;
  1995   font-size: 9pt;
  1996   line-height: normal;
  1997   font-family: Charcoal
  1999 </pre>
  2000   </div>
  2001   <!-- prop: font-synthesis -->
  2003   <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
  2004    synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
  2005    property</h3>
  2007   <table class=propdef id=namefont-synthesisvaluenone-weight-style>
  2008    <tbody>
  2009     <tr>
  2010      <td>Name:
  2012      <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
  2014     <tr>
  2015      <td>Value:
  2017      <td>none | [ weight || style ]
  2019     <tr>
  2020      <td>Initial:
  2022      <td>weight style
  2024     <tr>
  2025      <td>Applies to:
  2027      <td>all elements
  2029     <tr>
  2030      <td>Inherited:
  2032      <td>yes
  2034     <tr>
  2035      <td>Percentages:
  2037      <td>N/A
  2039     <tr>
  2040      <td>Media:
  2042      <td>visual
  2044     <tr>
  2045      <td>Computed value:
  2047      <td>as specified
  2049     <tr>
  2050      <td>Animatable:
  2052      <td>no
  2053   </table>
  2055   <p>This property controls whether user agents are allowed to synthesize
  2056    bold or oblique font faces when a font family lacks bold or italic faces.
  2057    If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
  2058    specified, user agents must not synthesize bold faces and if ‘<code
  2059    class=property>style</code>’ is not specified user agents must not
  2060    synthesize italic faces. A value of ‘<code class=property>none</code>’
  2061    disallows all synthetic faces.
  2063   <div class=example>
  2064    <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
  2066    <pre>*:lang(ar) { font-synthesis: none; }
  2067 </pre>
  2068   </div>
  2070   <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
  2072   <h3 id=font-face-rule><span class=secno>4.1 </span>The
  2073    <code>@font-face</code> rule</h3>
  2075   <p>The <code>@font-face</code> rule allows for linking to fonts that are
  2076    automatically fetched and activated when needed. This allows authors to
  2077    select a font that closely matches the design goals for a given page
  2078    rather than limiting the font choice to a set of fonts available on all
  2079    platforms. A set of font descriptors define the location of a font
  2080    resource, either locally or externally, along with the style
  2081    characteristics of an individual face. Multiple <code>@font-face</code>
  2082    rules can be used to construct font families with a variety of faces.
  2083    Using CSS font matching rules, a user agent can selectively download only
  2084    those faces that are needed for a given piece of text.
  2086   <p>The @font-face rule consists of the @font-face at-keyword followed by a
  2087    block of descriptor declarations. In terms of the grammar, this
  2088    specification defines the following productions:
  2090   <pre><dfn id=fontfacerule>font_face_rule</dfn>
  2091   : <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>*
  2094 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
  2095   : <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>
  2096   ;</pre>
  2098   <p>The following new definitions are introduced:
  2100   <pre>-    -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
  2101 F    f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
  2103   <p>The following new token is introduced:
  2105   <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
  2107   <p>Each <span class=index-inst id=font-face
  2108    title="@font-face"><code>@font-face</code></span> rule specifies a value
  2109    for every font descriptor, either implicitly or explicitly. Those not
  2110    given explicit values in the rule take the initial value listed with each
  2111    descriptor in this specification. These descriptors apply solely within
  2112    the context of the <code>@font-face</code> rule in which they are defined,
  2113    and do not apply to document language elements. There is no notion of
  2114    which elements the descriptors apply to or whether the values are
  2115    inherited by child elements. When a given descriptor occurs multiple times
  2116    in a given <code>@font-face</code> rule, only the last descriptor
  2117    declaration is used and all prior declarations for that descriptor are
  2118    ignored.
  2120   <div class=example>
  2121    <p>To use a downloadable font called Gentium:</p>
  2123    <pre>
  2124 @font-face {
  2125   font-family: Gentium;
  2126   src: url(http://example.com/fonts/Gentium.ttf);
  2129 p { font-family: Gentium, serif; }
  2130 </pre>
  2132    <p>The user agent will download Gentium and use it when rendering text
  2133     within paragraph elements. If for some reason the site serving the font
  2134     is unavailable, the default serif font will be used.</p>
  2135   </div>
  2137   <p>A given set of <code>@font-face</code> rules define a set of fonts
  2138    available for use within the documents that contain these rules. When font
  2139    matching is done, fonts defined using these rules are considered before
  2140    other available fonts on a system.
  2142   <p>Downloaded fonts are only available to documents that reference them.
  2143    The process of activating these fonts must not make them available to
  2144    other applications or to documents that don't directly link to the same
  2145    font. User agent implementers might consider it convenient to use
  2146    downloaded fonts when rendering characters in other documents for which no
  2147    other available font exists as part of the system font fallback procedure.
  2148    However, this would cause a security leak since the contents of one page
  2149    would be able to affect other pages, something an attacker could use as an
  2150    attack vector. These restrictions do not affect caching behavior, fonts
  2151    are cached the same way other web resources are cached.
  2153   <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
  2154    properties in a declaration block, declarations of any descriptors that
  2155    are not supported by the user agent must be ignored.
  2156    <code>@font-face</code> rules require a font-family and src descriptor; if
  2157    either of these are missing, the <code>@font-face</code> rule is invalid
  2158    and must be ignored entirely.
  2160   <p>In cases where user agents have limited platform resources or implement
  2161    the ability to disable downloadable font resources,
  2162    <code>@font-face</code> rules must simply be ignored; the behavior of
  2163    individual descriptors as defined in this specification should not be
  2164    altered.
  2166   <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
  2167    href="#descdef-font-family">font-family</a> descriptor</h3>
  2169   <table class=descdef>
  2170    <tbody>
  2171     <tr>
  2172      <td>Name:
  2174      <td><dfn id=descdef-font-family>font-family</dfn>
  2176     <tr>
  2177      <td>Value:
  2179      <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
  2181     <tr>
  2182      <td><em>Initial:</em>
  2184      <td>N/A
  2185   </table>
  2187   <p>This descriptor defines the font family name that will be used in all
  2188    CSS font family name matching. It is required for the @font-face rule to
  2189    be valid. It overrides the font family names contained in the underlying
  2190    font data. If the font family name is the same as a font family available
  2191    in a given user's environment, it effectively hides the underlying font
  2192    for documents that use the stylesheet. This permits a web author to freely
  2193    choose font-family names without worrying about conflicts with font family
  2194    names present in a given user's environment. Likewise, platform
  2195    substitutions for a given font family name must not be used.
  2197   <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
  2198    href="#descdef-src">src</a> descriptor</h3>
  2200   <table class=descdef>
  2201    <tbody>
  2202     <tr>
  2203      <td>Name:
  2205      <td><dfn id=descdef-src>src</dfn>
  2207     <tr>
  2208      <td>Value:
  2210      <td>[ &lt;url> [format(&lt;string> #)]? | <a
  2211       href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
  2213     <tr>
  2214      <td><em>Initial:</em>
  2216      <td>N/A
  2217   </table>
  2219   <p>This descriptor specifies the resource containing font data. It is
  2220    required for the <code>@font-face</code> rule to be valid. Its value is a
  2221    prioritized, comma-separated list of external references or locally
  2222    installed font face names. When a font is needed the user agent iterates
  2223    over the set of references listed, using the first one it can successfully
  2224    activate. Fonts containing invalid data or local font faces that are not
  2225    found are ignored and the user agent loads the next font in the list.
  2227   <p>As with other URLs in CSS, the URL may be partial, in which case it is
  2228    resolved relative to the location of the style sheet containing the <span
  2229    class=index-inst id=font-face0
  2230    title="@font-face"><code>@font-face</code></span> rule. In the case of SVG
  2231    fonts, the URL points to an element within a document containing SVG font
  2232    definitions. If the element reference is omitted, a reference to the first
  2233    defined font is implied. Similarly, font container formats that can
  2234    contain more than one font must load one and only one of the fonts for a
  2235    given <code>@font-face</code> rule. Fragment identifiers are used to
  2236    indicate which font to load. If a container format lacks a defined
  2237    fragment identifier scheme, implementations should use a simple 1-based
  2238    indexing scheme (e.g. "font-collection#1" for the first font,
  2239    "font-collection#2" for the second font).
  2241   <pre>
  2242 src: url(fonts/simple.ttf);   /* load simple.ttf relative to stylesheet location */
  2243 src: url(/fonts/simple.ttf);  /* load simple.ttf from absolute location */
  2244 src: url(fonts.svg#simple);   /* load SVG font with id 'simple' */
  2245 </pre>
  2247   <p>External references consist of a URL, followed by an optional hint
  2248    describing the format of the font resource referenced by that URL. The
  2249    format hint contains a comma-separated list of format strings that denote
  2250    well-known font formats. Conformant user agents must skip downloading a
  2251    font resource if the format hints indicate only unsupported or unknown
  2252    font formats. If no format hints are supplied, the user agent should
  2253    download the font resource.
  2255   <pre>
  2256 /* load WOFF font if possible, otherwise use OpenType font */
  2257 @font-face {
  2258   font-family: bodytext;
  2259   src: url(ideal-sans-serif.woff) format("woff"),
  2260        url(basic-sans-serif.ttf) format("opentype");
  2262 </pre>
  2264   <p>Format strings defined by this specification:
  2266   <table class=data id=fontformats>
  2267    <thead>
  2268     <tr>
  2269      <th>String
  2271      <th>Font Format
  2273      <th>Common extensions
  2275    <tbody>
  2276     <tr>
  2277      <th>"woff"
  2279      <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
  2281      <td>.woff
  2283     <tr>
  2284      <th>"truetype"
  2286      <td><a
  2287       href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
  2289      <td>.ttf
  2291     <tr>
  2292      <th>"opentype"
  2294      <td><a
  2295       href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
  2297      <td>.ttf, .otf
  2299     <tr>
  2300      <th>"embedded-opentype"
  2302      <td><a
  2303       href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
  2304       OpenType</a>
  2306      <td>.eot
  2308     <tr>
  2309      <th>"svg"
  2311      <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
  2313      <td>.svg, .svgz
  2314   </table>
  2316   <p>Given the overlap in common usage between TrueType and OpenType, the
  2317    format hints "truetype" and "opentype" must be considered as synonymous; a
  2318    format hint of "opentype" does not imply that the font contains Postscript
  2319    CFF style glyph data or that it contains OpenType layout information (see
  2320    <a href="#platform-props-to-css">Appendix A</a> for more background on
  2321    this).
  2323   <p>When authors would prefer to use a locally available copy of a given
  2324    font and download it if it's not, <code>local()</code> can be used. The
  2325    locally-installed <dfn
  2326    id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
  2327    is a format-specific string that uniquely identifies a single font face
  2328    within a larger family. The syntax for a <a
  2329    href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
  2330    unique font face name enclosed by "local(" and ")".
  2332   <pre>
  2333 /* regular face of Gentium */
  2334 @font-face {
  2335   font-family: MyGentium;
  2336   src: local(Gentium),   /* use locally available Gentium */
  2337        url(Gentium.ttf); /* otherwise, download it */
  2339 </pre>
  2341   <p>The name can optionally be enclosed in quotes. For OpenType and TrueType
  2342    fonts, this string is used to match only the Postscript name or the full
  2343    font name in the name table of locally available fonts. Which type of name
  2344    is used varies by platform and font, so authors should include both of
  2345    these names to assure proper matching across platforms. Platform
  2346    substitutions for a given font name must not be used.
  2348   <pre>
  2349 /* bold face of Gentium */
  2350 @font-face {
  2351   font-family: MyGentium;
  2352   src: local(Gentium Bold),   /* full font name */
  2353        local(Gentium-Bold),   /* Postscript name */
  2354        url(GentiumBold.ttf);  /* otherwise, download it */
  2355   font-weight: bold;
  2357 </pre>
  2359   <p>Just as a <code>@font-face</code> rule specifies the characteristics of
  2360    a single font within a family, the unique name used with
  2361    <code>local()</code> specifies a single font, not an entire font family.
  2362    Defined in terms of OpenType font data, the Postscript name is found in
  2363    the font's <a
  2364    href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
  2365    in the name record with nameID = 6 (see <a href="#OPENTYPE"
  2366    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
  2367    Postscript name is the commonly used key for all fonts on OSX and for
  2368    Postscript CFF fonts under Windows. The full font name (nameID = 4) is
  2369    used as a unique key for fonts with TrueType glyphs on Windows.
  2371   <p>For OpenType fonts with multiple localizations of the full font name,
  2372    the US English version is used (language ID = 0x409 for Windows and
  2373    language ID = 0 for Macintosh) or the first localization when a US English
  2374    full font name is not available (the OpenType specification recommends
  2375    that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
  2376    fonts minimally include US English names</a>). User agents that also match
  2377    other full font names, e.g. matching the Dutch name when the current
  2378    system locale is set to Dutch, are considered non-conformant. This is done
  2379    not to prefer English but to avoid matching inconsistencies across font
  2380    versions and OS localizations, since font style names (e.g. "Bold") are
  2381    frequently localized into many languages and the set of localizations
  2382    available varies widely across platform and font version. User agents that
  2383    match a concatenation of family name (nameID = 1) with style name (nameID
  2384    = 2) are considered non-conformant.
  2386   <p>This also allows for referencing faces that belong to larger families
  2387    that cannot otherwise be referenced.
  2389   <div class=example>
  2390    <p>Use a local font or reference an SVG font in another document:</p>
  2392    <pre>
  2393 @font-face {
  2394   font-family: Headline;
  2395   src: local(Futura-Medium), 
  2396        url(fonts.svg#MyGeometricModern) format("svg");
  2398 </pre>
  2400    <p>Create an alias for local Japanese fonts on different platforms:</p>
  2402    <pre>
  2403 @font-face {
  2404   font-family: jpgothic;
  2405   src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
  2407 </pre>
  2409    <p>Reference a font face that cannot be matched within a larger family:</p>
  2411    <pre>
  2412 @font-face {
  2413   font-family: Hoefler Text Ornaments;
  2414   /* has the same font properties as Hoefler Text Regular */
  2415   src: local(HoeflerText-Ornaments); 
  2417 </pre>
  2419    <p>Since localized fullnames never match, a document with the header style
  2420     rules below would always render using the default serif font, regardless
  2421     whether a particular system locale parameter is set to Finnish or not:</p>
  2423    <pre>
  2424 @font-face {
  2425   font-family: SectionHeader;
  2426   src: local("Arial Lihavoitu");  /* Finnish fullname for Arial Bold, should fail */
  2427   font-weight: bold;
  2430 h2 { font-family: SectionHeader, serif; }
  2431 </pre>
  2433    <p>A conformant user agent would never load the font ‘<code
  2434     class=css>gentium.eot</code>’ in the example below, since it is
  2435     included in the first definition of the ‘<a href="#descdef-src"><code
  2436     class=property>src</code></a>’ descriptor which is overridden by the
  2437     second definition in the same <code>@font-face</code> rule:</p>
  2439    <pre>
  2440 @font-face {
  2441   font-family: MainText;
  2442   src: url(gentium.eot); /* for use with older non-conformant user agents */
  2443   src: local("Gentium"), url(gentium.ttf);  /* Overrides src definition */
  2445 </pre>
  2446   </div>
  2448   <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
  2449    descriptors: the <a href="#descdef-font-style">font-style</a>, <a
  2450    href="#descdef-font-weight">font-weight</a>, <a
  2451    href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
  2453   <table class=descdef>
  2454    <tbody>
  2455     <tr>
  2456      <td>Name:
  2458      <td><dfn id=descdef-font-style title="font-style
  2459       (descriptor)">font-style</dfn>
  2461     <tr>
  2462      <td>Value:
  2464      <td>normal | italic | oblique
  2466     <tr>
  2467      <td><em>Initial:</em>
  2469      <td>normal
  2470   </table>
  2472   <table class=descdef>
  2473    <tbody>
  2474     <tr>
  2475      <td>Name:
  2477      <td><dfn id=descdef-font-weight title="font-weight
  2478       (descriptor)">font-weight</dfn>
  2480     <tr>
  2481      <td>Value:
  2483      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  2485     <tr>
  2486      <td><em>Initial:</em>
  2488      <td>normal
  2489   </table>
  2491   <table class=descdef>
  2492    <tbody>
  2493     <tr>
  2494      <td>Name:
  2496      <td><dfn id=descdef-font-stretch title="font-stretch
  2497       (descriptor)">font-stretch</dfn>
  2499     <tr>
  2500      <td>Value:
  2502      <td>normal | ultra-condensed | extra-condensed | condensed |
  2503       semi-condensed | semi-expanded | expanded | extra-expanded |
  2504       ultra-expanded
  2506     <tr>
  2507      <td><em>Initial:</em>
  2509      <td>normal
  2510   </table>
  2512   <p>These descriptors define the characteristics of a font face and are used
  2513    in the process of matching styles to specific faces. For a font family
  2514    defined with several <code>@font-face</code> rules, user agents can either
  2515    download all faces in the family or use these descriptors to selectively
  2516    download font faces that match actual styles used in document. The values
  2517    for these descriptors are the same as those for the corresponding font
  2518    properties except that relative keywords are not allowed, ‘<code
  2519    class=property>bolder</code>’ and ‘<code
  2520    class=property>lighter</code>’. If these descriptors are omitted,
  2521    initial values are assumed.
  2523   <p>The value for these font face style attributes is used in place of the
  2524    style implied by the underlying font data. This allows authors to combine
  2525    faces in flexible combinations, even in situations where the original font
  2526    data was arranged differently. User agents that implement synthetic
  2527    bolding and obliqueing must only apply synthetic styling in cases where
  2528    the font descriptors imply this is needed, rather than based on the style
  2529    attributes implied by the font data.
  2531   <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
  2532    <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
  2534   <table class=descdef>
  2535    <tbody>
  2536     <tr>
  2537      <td>Name:
  2539      <td><dfn id=descdef-unicode-range>unicode-range</dfn>
  2541     <tr>
  2542      <td>Value:
  2544      <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
  2546     <tr>
  2547      <td><em>Initial:</em>
  2549      <td>U+0-10FFFF
  2550   </table>
  2552   <p>This descriptor defines the set of Unicode codepoints that may be
  2553    supported by the font face for which it is declared. The descriptor value
  2554    is a comma-delimited list of Unicode range (<a
  2555    href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
  2556    these ranges defines the set of codepoints that serves as a hint for user
  2557    agents when deciding whether or not to download a font resource for a
  2558    given text run.
  2560   <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
  2561    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2562    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
  2563    "U+" or "u+" prefix followed by a codepoint range in one of the three
  2564    forms listed below:
  2566   <ul>
  2567    <li>a single codepoint (e.g. U+416)
  2569    <li>an interval value range defined by two hyphen-separated codepoints
  2570     that indicate the inclusive start and end codepoints of a range (e.g.
  2571     U+400-4ff)
  2573    <li>a wildcard value range defined by the set of codepoints implied when
  2574     trailing ‘<code class=css>?</code>’ characters signify ‘<code
  2575     class=css>any digit value</code>’ (e.g. U+4??)
  2576   </ul>
  2578   <p>Individual codepoints are written using hexadecimal values that
  2579    correspond to <a href="http://www.unicode.org/charts/">Unicode character
  2580    codepoints</a>. Valid Unicode codepoint values vary between 0 and 10FFFF
  2581    inclusive. Digit values of codepoints are ASCII case-insensitive. For
  2582    interval ranges, the start and end codepoints must be valid Unicode values
  2583    and the end codepoint must be greater than or equal to the start
  2584    codepoint.
  2586   <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
  2587    "U+???") are valid and equivalent to a wildcard range with an initial zero
  2588    digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
  2589    the range of valid Unicode codepoints are invalid. Because of this, the
  2590    maximum number of trailing ‘<code class=css>?</code>’ wildcard
  2591    characters is four, even though the <a
  2592    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2593    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
  2595   <p>Within the comma-delimited list of Unicode ranges in a ‘<a
  2596    href="#descdef-unicode-range"><code
  2597    class=property>unicode-range</code></a>’ descriptor declaration, ranges
  2598    may overlap. Whitespace before or after commas is ignored. The union of
  2599    these ranges defines the set of codepoints for which the corresponding
  2600    font may be used. User agents must not download or use the font for
  2601    codepoints outside this set. User agents may normalize the list of ranges
  2602    into a list that is different but represents the same set of codepoints.
  2604   <p>The associated font may not contain glyphs for the entire set of
  2605    codepoints defined by the ‘<a href="#descdef-unicode-range"><code
  2606    class=property>unicode-range</code></a>’ descriptor. When the font is
  2607    used the effective <a href="#character-map"><em>character map</em></a> is
  2608    the intersection of the codepoints defined by ‘<a
  2609    href="#descdef-unicode-range"><code
  2610    class=property>unicode-range</code></a>’ with the font's <a
  2611    href="#character-map"><em>character map</em></a>. This allows authors to
  2612    define supported ranges in terms of broad ranges without worrying about
  2613    the precise codepoint ranges supported by the underlying font.
  2615   <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
  2616    to define composite fonts</h3>
  2618   <p>Multiple <code>@font-face</code> rules with different unicode ranges for
  2619    the same family and style descriptor values can be used to create
  2620    composite fonts that mix the glyphs from different fonts for different
  2621    scripts. This can be used to combine fonts that only contain glyphs for a
  2622    single script (e.g. Latin, Greek, Cyrillic) or it can be used by authors
  2623    as a way of segmenting a font into fonts for commonly used characters and
  2624    less frequently used characters. Since the user agent will only pull down
  2625    the fonts it needs this helps reduce page bandwidth.
  2627   <p>If the unicode ranges overlap for a set of <code>@font-face</code> rules
  2628    with the same family and style descriptor values, the rules are ordered in
  2629    the reverse order they were defined; the last rule defined is the first to
  2630    be checked for a given character.
  2632   <p>Example ranges for specific languages or characters:
  2634   <dl>
  2635    <dt>unicode-range: U+A5;
  2637    <dd>a single code point, the yen/yuan symbol
  2639    <dt>unicode-range: U+0-7F;
  2641    <dd>code range for basic ASCII characters
  2643    <dt>unicode-range: U+590-5ff;
  2645    <dd>code range for Hebrew characters
  2647    <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
  2649    <dd>code range for Japanese kanji, hiragana and katakana characters plus
  2650     yen/yuan symbol
  2651   </dl>
  2653   <div class=example>
  2654    <p>The BBC provides news services in a wide variety of languages, many
  2655     that are not well supported across all platforms. Using an
  2656     <code>@font-face</code> rule, the BBC could provide a font for any of
  2657     these languages, as it already does via a manual font download.</p>
  2659    <pre>
  2660 @font-face {
  2661   font-family: BBCBengali;
  2662   src: url(fonts/BBCBengali.ttf) format("opentype");
  2663   unicode-range: U+00-FF, U+980-9FF;
  2665 </pre>
  2666   </div>
  2668   <div class=example>
  2669    <p>Technical documents often require a wide range of symbols. The STIX
  2670     Fonts project is one project aimed at providing fonts to support a wide
  2671     range of technical typesetting in a standardized way. The example below
  2672     shows the use of a font that provides glyphs for many of the mathematical
  2673     and technical symbol ranges within Unicode:</p>
  2675    <pre>
  2676 @font-face {
  2677   font-family: STIXGeneral;
  2678   src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
  2679   unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
  2681 </pre>
  2682   </div>
  2684   <div class=example>
  2685    <p>This example shows how an author can override the glyphs used for Latin
  2686     characters in a Japanese font with glyphs from a different font. The
  2687     first rule specifies no range so it defaults to the entire range. The
  2688     range specified in the second rule overlaps but takes precedence because
  2689     it is defined later.</p>
  2691    <pre>
  2692 @font-face {
  2693   font-family: JapaneseWithGentium;
  2694   src: local(MSMincho);
  2695   /* no range specified, defaults to entire range */
  2698 @font-face {
  2699   font-family: JapaneseWithGentium;
  2700   src: url(../fonts/Gentium.ttf);
  2701   unicode-range: U+0-2FF;
  2703 </pre>
  2704   </div>
  2706   <div class=example>
  2707    <p>Consider a family constructed to optimize bandwidth by separating out
  2708     Latin, Japanese and other characters into different font files:</p>
  2710    <pre>
  2711 /* fallback font - size: 4.5MB */
  2712 @font-face {
  2713   font-family: DroidSans;
  2714   src: url(DroidSansFallback.ttf);
  2715   /* no range specified, defaults to entire range */
  2718 /* Japanese glyphs - size: 1.2MB */
  2719 @font-face {
  2720   font-family: DroidSans;
  2721   src: url(DroidSansJapanese.ttf);
  2722   unicode-range: U+3000-9FFF, U+ff??;
  2725 /* Latin, Greek, Cyrillic along with some 
  2726    punctuation and symbols - size: 190KB */
  2727 @font-face {
  2728   font-family: DroidSans;
  2729   src: url(DroidSans.ttf);
  2730   unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
  2732 </pre>
  2734    <p>For simple Latin text, only the font for Latin characters is
  2735     downloaded:</p>
  2737    <pre>
  2738 body { font-family: DroidSans; }
  2740 &lt;p>This is that&lt;/p>
  2741 </pre>
  2743    <p>In this case the user agent first checks the unicode-range for the font
  2744     containing Latin characters (DroidSans.ttf). Since all the characters
  2745     above are in the range U+0-5FF, the user agent downloads the font and
  2746     renders the text with that font.</p>
  2748    <p>Next, consider text that makes use of an arrow character (⇨):</p>
  2750    <pre>
  2751 &lt;p>This &amp;#x21e8; that&lt;p>
  2752 </pre>
  2754    <p>The user agent again first checks the unicode-range of the font
  2755     containing Latin characters. Since U+2000-2300 includes the arrow code
  2756     point (U+21E8), the user agent downloads the font. For this character
  2757     however the Latin font does not have a matching glyph, so the effective
  2758     unicode-range used for font matching excludes this code point. Next, the
  2759     user agent evaluates the Japanese font. The unicode-range for the
  2760     Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
  2761     user agent does not download the Japanese font. Next the fallback font is
  2762     considered. The <code>@font-face</code> rule for the fallback font does
  2763     not define unicode-range so its value defaults to the range of all
  2764     Unicode code points. The fallback font is downloaded and used to render
  2765     the arrow character.</p>
  2766   </div>
  2768   <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
  2769    href="#descdef-font-variant">font-variant</a> and <a
  2770    href="#descdef-font-feature-settings">font-feature-settings</a>
  2771    descriptors</h3>
  2773   <table class=descdef>
  2774    <tbody>
  2775     <tr>
  2776      <td>Name:
  2778      <td><dfn id=descdef-font-variant title="font-variant
  2779       (descriptor)">font-variant</dfn>
  2781     <tr>
  2782      <td>Value:
  2784      <td>normal | none | [ <a
  2785       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  2786       <a
  2787       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  2788       || <a
  2789       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  2790       || <a
  2791       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  2792       || <a href="#stylistic"><var
  2793       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  2794       href="#historical-forms"><var>historical-forms</var></a> || <a
  2795       href="#styleset"><var
  2796       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  2797       href="#character-variant"><var
  2798       title=character-variant>character-variant(&lt;feature-value-name&gt;
  2799       #)</var></a> || <a href="#swash"><var
  2800       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  2801       href="#ornaments"><var
  2802       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  2803       href="#annotation"><var
  2804       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  2805       <a href="#small-caps"><i>small-caps</i></a> | <a
  2806       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  2807       href="#petite-caps"><i>petite-caps</i></a> | <a
  2808       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  2809       href="#unicase"><i>unicase</i></a> | <a
  2810       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  2811       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  2812       || <a
  2813       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  2814       || <a
  2815       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  2816       || <a href="#ordinal"><i>ordinal</i></a> || <a
  2817       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  2818       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  2819       || <a
  2820       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  2821       || <a href="#ruby"><i>ruby</i></a> ]
  2823     <tr>
  2824      <td><em>Initial:</em>
  2826      <td>normal
  2827   </table>
  2829   <table class=descdef>
  2830    <tbody>
  2831     <tr>
  2832      <td>Name:
  2834      <td><dfn id=descdef-font-feature-settings title="font-feature-settings
  2835       (descriptor)">font-feature-settings</dfn>
  2837     <tr>
  2838      <td>Value:
  2840      <td>normal | <a
  2841       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  2843     <tr>
  2844      <td><em>Initial:</em>
  2846      <td>normal
  2847   </table>
  2849   <p>These descriptors define initial settings that apply when the font
  2850    defined by an <code>@font-face</code> rule is rendered. They do not affect
  2851    font selection. Values are identical to those defined for the
  2852    corresponding ‘<a href="#propdef-font-variant"><code
  2853    class=property>font-variant</code></a>’ and ‘<a
  2854    href="#propdef-font-feature-settings"><code
  2855    class=property>font-feature-settings</code></a>’ properties defined
  2856    below except that the value ‘<code class=property>inherit</code>’ is
  2857    omitted. When multiple font feature descriptors or properties are used,
  2858    the cumulative effect on text rendering is detailed in the section <a
  2859    href="#font-feature-resolution">Font Feature Resolution</a> below. In
  2860    cases where specific values define synthesized fallback for certain ‘<a
  2861    href="#propdef-font-variant"><code
  2862    class=property>font-variant</code></a>’ subproperties, the same
  2863    synthesized fallback applies when used within those values are used with
  2864    the <a href="#descdef-font-variant">‘<code
  2865    class=property>font-variant</code>’</a> descriptor.
  2867   <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
  2868    guidelines</h3>
  2870   <p>The <code>@font-face</code> rule is designed to allow lazy loading of
  2871    fonts, fonts are only downloaded when needed for use within a document. A
  2872    stylesheet can include <code>@font-face</code> rules for a library of
  2873    fonts of which only a select set are used; user agents must only download
  2874    those fonts that are referred to within the style rules applicable to a
  2875    given page. User agents that download all fonts defined in
  2876    <code>@font-face</code> rules without considering whether those fonts are
  2877    in fact used within a page are considered non-conformant. In cases where a
  2878    font might be downloaded in character fallback cases, user agents may
  2879    download a font if it's listed in a font list but is not actually used for
  2880    a given text run.
  2882   <pre>
  2883 @font-face {
  2884   font-family: GeometricModern;
  2885   src: url(font.ttf);
  2888 p {
  2889   /* font will be downloaded for pages with p elements */
  2890   font-family: GeometricModern, sans-serif;
  2893 h2 {
  2894   /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
  2895   font-family: Futura, GeometricModern, sans-serif;
  2897 </pre>
  2899   <p>In cases where textual content is loaded before downloadable fonts are
  2900    available, user agents may render text as it would be rendered if
  2901    downloadable font resources are not available or they may render text
  2902    transparently with fallback fonts to avoid a flash of text using a
  2903    fallback font. In cases where the font download fails user agents must
  2904    display text, simply leaving transparent text is considered non-conformant
  2905    behavior. Authors are advised to use fallback fonts in their font lists
  2906    that closely match the vertical metrics of the downloadable fonts to avoid
  2907    large page reflows where possible.
  2909   <h3 id=same-origin-restriction><span class=secno>4.9 </span>Same-origin
  2910    restriction for fonts</h3>
  2912   <h4 id=default-same-origin-restriction><span class=secno>4.9.1
  2913    </span>Default same-origin restriction</h4>
  2914   <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
  2915   http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
  2916   http://www.w3.org/2011/10/31-webapps-minutes.html#item02
  2917 -->
  2919   <p>User agents must implement a same-origin restriction when loading fonts
  2920    via the <code>@font-face</code> mechanism. This restriction limits the
  2921    loading of fonts for a given document to fonts loaded from the same
  2922    origin. Fonts can only be loaded via the same host, port, and method
  2923    combination as the containing document, using the <a
  2924    href="http://www.w3.org/TR/html5/browsers.html#origin">origin matching
  2925    algorithm</a> described in the <a href="#HTML5"
  2926    rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification. The origin of
  2927    the stylesheet containing <code>@font-face</code> rules is not used when
  2928    deciding whether a font is same origin or not, only the origin of the
  2929    containing document is used. The restriction applies to all font types.
  2931   <p>Given a document located at http://example.com/page.html, fonts defined
  2932    with ‘<a href="#descdef-src"><code class=property>src</code></a>’
  2933    definitions considered cross origin must not be loaded:
  2935   <pre>
  2936 /* same origin (i.e. domain, protocol, port match document) */
  2937 src: url(fonts/simple.ttf);                     
  2938 src: url(//fonts/simple.ttf);                     
  2940 /* cross origin, different protocol */
  2941 src: url(https://example.com/fonts/simple.ttf);              
  2943 /* cross origin, different domain */
  2944 src: url(http://another.example.com/fonts/simple.ttf); 
  2945 </pre>
  2947   <h4 id=allowing-cross-origin-font-loading><span class=secno>4.9.2
  2948    </span>Allowing cross-origin font loading</h4>
  2950   <p>User agents must also implement the ability to relax this restriction
  2951    using cross-site origin controls <a href="#CORS"
  2952    rel=biblioentry>[CORS]<!--{{!CORS}}--></a> for fonts loaded via HTTP.
  2953    Sites can explicitly allow cross-site downloading of font data using the
  2954    <code>Access-Control-Allow-Origin</code> HTTP header. For other protocols,
  2955    no explicit relaxation mechanism is defined or required.
  2957   <p>For font loads over HTTP, cross-origin requests must be made with the
  2958    following parameter settings which are used in conjunction with the <a
  2959    href="http://www.w3.org/TR/cors/#cross-origin-request-0"> <em>cross-origin
  2960    request algorithm</em></a> <a href="#CORS"
  2961    rel=biblioentry>[CORS]<!--{{!CORS}}--></a>:
  2963   <ul>
  2964    <li><em>request URL</em> — the URL of the font resource in the <a
  2965     href="#descdef-src"><code>src</code></a> descriptor
  2967    <li><em>request method</em> — GET
  2969    <li><em>author request headers</em> — none
  2971    <li><em>request entity body</em> — empty
  2973    <li><em>source origin</em> — the origin of the page which linked to the
  2974     stylesheet
  2976    <li><em>manual redirect flag</em> — false
  2978    <li><em>omit credentials flag</em> — true
  2980    <li><em>force preflight flag</em> — false
  2981   </ul>
  2983   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
  2984    Algorithm</h2>
  2986   <p>The algorithm below describes how fonts are associated with individual
  2987    runs of text. For each character in the run a font family is chosen and a
  2988    particular font face is selected containing a glyph for that character.
  2990   <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
  2991    font family names</h3>
  2993   <p>As part of the font matching algorithm outlined below, user agents must
  2994    match font family names used in style rules with actual font family names
  2995    contained in fonts available in a given environment or defined via
  2996    <code>@font-face</code> rules. User agents must match these names case
  2997    insensitively, using the "Default Caseless Matching" algorithm outlined in
  2998    the Unicode specification <a href="#UNICODE6"
  2999    rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>. This algorithm is
  3000    detailed in section 3.13 entitled "Default Case Algorithms". Specifically,
  3001    the algorithm must be applied without normalizing the strings involved and
  3002    without applying any language-specific tailorings. The case folding method
  3003    specified by this algorithm uses the case mappings with status field
  3004    ‘<code class=property>C</code>’ or ‘<code class=property>F</code>’
  3005    in the CaseFolding.txt file of the Unicode Character Database.
  3007   <p class=note> Implementors should take care to verify that a given
  3008    caseless string comparison implementation uses this precise algorithm and
  3009    not assume that a given platform string matching routine follows it, as
  3010    many of these have locale-specific behavior or use some level of string
  3011    normalization.
  3013   <p class=note> For authors this means that font family names are matched
  3014    case insensitively, whether or not those names exist in a platform font or
  3015    in the <code>@font-face</code> rules contained in a stylesheet. Authors
  3016    should take care to ensure that names use a character sequence consistent
  3017    with the actual font family name, particularly when using combining
  3018    characters such as diacritical marks. For example, a family name that
  3019    contains an uppercase A (U+0041) followed by a combining ring (U+030A)
  3020    will <strong>not</strong> match a name that looks identical but which uses
  3021    the precomposed lowercase a-ring character (U+00E5) instead of the
  3022    combining sequence.
  3024   <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
  3025    styles</h3>
  3027   <p>The procedure for choosing fonts consists of iterating over the font
  3028    families determined by the font-family property, selecting a font face
  3029    with the appropriate style based on other font properties and then
  3030    determining whether a glyph exists for a given character. This is done
  3031    using the <dfn id=character-map>character map</dfn> of the font, data
  3032    which maps characters to the default glyph for that character. Codepoint
  3033    sequences consisting of a base character followed by a sequence of
  3034    combining characters are treated slightly differently, see the section on
  3035    <a href="#cluster-matching">cluster matching</a> below.
  3037   <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
  3038    given font family is defined to be the face that would be selected if all
  3039    font style properties were set to their initial value.
  3041   <ol id=fontmatchingalg>
  3042    <li>Using the computed font property values for a given element, the user
  3043     agent starts with the first family name in the fontlist specified by the
  3044     <span class=property>‘<a href="#descdef-font-family"><code
  3045     class=property>font-family</code></a>’</span> property.
  3047    <li>If the family name is unquoted and is a generic family name, the user
  3048     agent looks up the appropriate font family name to be used. User agents
  3049     may choose the generic font family to use based on the language of the
  3050     containing element or the Unicode range of the character.
  3052    <li>For other family names, the user agent attempts to find the family
  3053     name among fonts defined via <code>@font-face</code> rules and then among
  3054     available system fonts, matching names with a case-insensitive comparison
  3055     as outlined <a href="#font-family-casing">in the section above</a>. On
  3056     systems containing fonts with multiple localized font family names, user
  3057     agents must match any of these names independent of the underlying system
  3058     locale or platform API used. If the font resources defined for a given
  3059     face in an @font-face rule are either not available or contain invalid
  3060     font data, then the face should be treated as not present in the family.
  3061     If no faces are present for a family defined via @font-face rules, the
  3062     family should be treated as missing; matching a platform font with the
  3063     same name must not occur in this case.
  3065    <li>If a font family match occurs, the user agent assembles the set of
  3066     font faces in that family and then narrows the set to a single face using
  3067     other font properties in the order given below:
  3068     <ol id=fontstylematchingalg>
  3069      <li><span class=property>‘<a href="#propdef-font-stretch"><code
  3070       class=property>font-stretch</code></a>’</span> is tried first. If the
  3071       matching set contains faces with width values matching the ‘<a
  3072       href="#propdef-font-stretch"><code
  3073       class=property>font-stretch</code></a>’ value, faces with other width
  3074       values are removed from the matching set. If there is no face that
  3075       exactly matches the width value the nearest width is used instead. If
  3076       the value of ‘<a href="#propdef-font-stretch"><code
  3077       class=property>font-stretch</code></a>’ is ‘<a
  3078       href="#normal2"><code class=property>normal</code></a>’ or one of the
  3079       condensed values, narrower width values are checked first, then wider
  3080       values. If the value of ‘<a href="#propdef-font-stretch"><code
  3081       class=property>font-stretch</code></a>’ is one of the expanded
  3082       values, wider values are checked first, followed by narrower values.
  3083       Once the closest matching width has been determined by this process,
  3084       faces with other widths are removed from the matching set.
  3086      <li><span class=property>‘<a href="#propdef-font-style"><code
  3087       class=property>font-style</code></a>’</span> is tried next. If the
  3088       value of ‘<a href="#propdef-font-style"><code
  3089       class=property>font-style</code></a>’ is ‘<code
  3090       class=property>italic</code>’, italic faces are checked first, then
  3091       oblique, then normal faces. If the value is ‘<code
  3092       class=property>oblique</code>’, oblique faces are checked first, then
  3093       italic faces and then normal faces. If the value is ‘<a
  3094       href="#normal2"><code class=property>normal</code></a>’, normal faces
  3095       are checked first, then oblique faces, then italic faces. Faces with
  3096       other style values are excluded from the matching set. User agents are
  3097       permitted to distinguish between italic and oblique faces within
  3098       platform font families but this is not required, they may treat all
  3099       italic or oblique faces as italic faces. However, within font families
  3100       defined via <code>@font-face</code> rules, italic and oblique faces
  3101       must be distinguished using the value of the ‘<a
  3102       href="#propdef-font-style"><code
  3103       class=property>font-style</code></a>’ descriptor.
  3105      <li><span class=property>‘<a href="#propdef-font-weight"><code
  3106       class=property>font-weight</code></a>’</span> is matched next, it
  3107       will always reduce the matching set to a single font face. If
  3108       bolder/lighter relative weights are used, the effective weight is
  3109       calculated based on the inherited weight value, as described in the
  3110       definition of the ‘<a href="#propdef-font-weight"><code
  3111       class=property>font-weight</code></a>’ property. Given the desired
  3112       weight and the weights of faces in the matching set after the steps
  3113       above, if the desired weight is available that face matches. Otherwise,
  3114       a weight is chosen using the rules below:
  3115       <ul>
  3116        <li>If the desired weight is less than 400, weights below the desired
  3117         weight are checked in descending order followed by weights above the
  3118         desired weight in ascending order until a match is found.
  3120        <li>If the desired weight is greater than 500, weights above the
  3121         desired weight are checked in ascending order followed by weights
  3122         below the desired weight in descending order until a match is found.
  3124        <li>If the desired weight is 400, 500 is checked first and then the
  3125         rule for desired weights less than 400 is used.
  3127        <li>If the desired weight is 500, 400 is checked first and then the
  3128         rule for desired weights less than 400 is used.
  3129       </ul>
  3131      <li><span class=property>‘<a href="#propdef-font-size"><code
  3132       class=property>font-size</code></a>’</span> must be matched within a
  3133       UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
  3134       are rounded to the nearest whole pixel, while the tolerance for
  3135       bitmapped fonts could be as large as 20%.) Further computations, e.g.,
  3136       by ‘<code class=property>em</code>’ values in other properties, are
  3137       based on the <span class=property>‘<a href="#propdef-font-size"><code
  3138       class=property>font-size</code></a>’</span> value that is used, not
  3139       the one that is specified.
  3140     </ol>
  3142    <li>
  3143     <p>If no matching face exists or the matched face does not contain a
  3144      glyph for the character to be rendered, the next family name is selected
  3145      and the previous two steps repeated. Glyphs from other faces in the
  3146      family are not considered. The only exception is that user agents may
  3147      optionally substitute a synthetic version of the <a
  3148      href="#default-face"><em>default face</em></a> if that face supports a
  3149      given glyph (e.g. a synthetic italic version of the regular face may be
  3150      used if the italic face doesn't support glyphs for Arabic).</p>
  3151     <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
  3153     <p>If the matched font is defined via an <code>@font-face</code> rule and
  3154      needs to be downloaded, the font resource is downloaded. While the
  3155      download occurs, the user agent can either wait until the font is
  3156      downloaded or render once with substituted font metrics and render again
  3157      once the font is downloaded.</p>
  3159    <li>If there are no more font families to be evaluated and no matching
  3160     face has been found, then the user agent performs a <em>system font
  3161     fallback</em> procedure to find the best match for the character to be
  3162     rendered. The result of this procedure may vary across user agents.
  3164    <li>If a particular character cannot be displayed using any font, the user
  3165     agent should indicate by some means that a character is not being
  3166     displayed, displaying either a symbolic representation of the missing
  3167     glyph (e.g. using a <a
  3168     href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
  3169     Font</a>) or using the missing character glyph from a default font.
  3170   </ol>
  3172   <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
  3174   <p>When text contains characters such as combining diacritics, ideally the
  3175    base character should be rendered using the same font as the diacritic,
  3176    this assures proper placement of the diacritic. For this reason, the font
  3177    matching algorithm for clusters is more specialized than the general case
  3178    of matching a single character by itself. For sequences containing
  3179    variation selectors, which indicate the precise glyph to be used for a
  3180    given character, user agents always attempt system font fallback to find
  3181    the appropriate glyph before using the default glyph of the base
  3182    character.
  3184   <p>A font is considered to <em>support</em> a given character if (1) the
  3185    character is contained in the font's <a
  3186    href="#character-map"><em>character map</em></a> and (2) if required by
  3187    the containing script, shaping information is available for that
  3188    character. Some legacy fonts may include a given character in the <a
  3189    href="#character-map"><em>character map</em></a> but lack the shaping
  3190    information (e.g. <a
  3191    href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
  3192    layout tables</a> or <a
  3193    href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
  3194    tables</a>) necessary for correctly rendering text runs containing that
  3195    character.
  3197   <p>A sequence of codepoints containing combining diacritics or other
  3198    modifiers is termed a grapheme cluster (see <a href="#CSS3TEXT"
  3199    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
  3200    description). For a given cluster containing a base character, <em>b</em>
  3201    and a sequence of combining characters <em>c1, c2…</em>, the entire
  3202    cluster is matched using these steps:
  3204   <ol>
  3205    <li>For each family in the font list, a face is chosen using the style
  3206     selection rules defined in the previous section.
  3207     <ol>
  3208      <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
  3209       completely supported by the font, select this font for the sequence.
  3211      <li>If a sequence of multiple codepoints is canonically equivalent to a
  3212       single character and the font supports that character, select this font
  3213       for the sequence.
  3214     </ol>
  3216    <li>If no font was found in the font list in step 1:
  3217     <ol>
  3218      <li>If <em>c1</em> is a variation selector, system fallback must be used
  3219       to find a font that supports the full sequence of <em>b + c1</em>. If
  3220       no font on the system supports the full sequence, match the single
  3221       character <em>b</em> using the normal procedure for matching single
  3222       characters and ignore the variation selector. Note: a sequence with
  3223       more than one variation selector is treated as an encoding error and
  3224       the trailing selectors are ignored.
  3226      <li>Otherwise, the user agent may optionally use system font fallback to
  3227       match a font that supports the entire cluster.
  3228     </ol>
  3230    <li>If no font is found in step 2, use the matching sequence from step 1
  3231     to determine the longest sequence that is completely matched by a font in
  3232     the font list and attempt to match the remaining combining characters
  3233     separately using the rules for single characters.
  3234   </ol>
  3236   <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
  3237    issues</h3>
  3239   <p>The procedure above is always performed on text runs containing Unicode
  3240    characters, documents using legacy encodings are assumed to have been
  3241    transcoded before matching fonts. For fonts containing <a
  3242    href="#character-map"><em title="character map">character maps</em></a>
  3243    for both legacy encodings and Unicode, the contents of the legacy encoding
  3244    <a href="#character-map"><em>character map</em></a> must have no effect on
  3245    the results of the font matching process.
  3247   <p>The font matching process does not assume that text runs are in either
  3248    normalized or denormalized form (see <a href="#CHARMOD-NORM"
  3249    rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
  3250    details). Layout engines often convert base character plus combining
  3251    character sequences into precomposed characters if they exist. The font
  3252    matching algorithm outlined here supports both ways and fonts can
  3253    generally support either but variations can occur. Authors should always
  3254    tailor their choice of fonts to their content, including whether that
  3255    content contains normalized or denormalized character streams.
  3257   <p>If a given character is a Private-Use Area Unicode codepoint and none of
  3258    the fonts in the fontlist contain a glyph for that codepoint, user agents
  3259    must display some form of missing glyph symbol for that character rather
  3260    than attempting system font fallback for that codepoint. When matching the
  3261    replacement character U+FFFD, user agents may skip the font matching
  3262    process and immediately display some form of missing glyph symbol, they
  3263    are not required to display the glyph from the font that would be selected
  3264    by the font matching process.
  3266   <p>In general, the fonts for a given family will all have the same or
  3267    similar <a href="#character-map"><em title="character map">character
  3268    maps</em></a>. The process outlined here is designed to handle even font
  3269    families containing faces with widely variant <a href="#character-map"><em
  3270    title="character map">character maps</em></a>. However, authors are
  3271    cautioned that the use of such families can lead to unexpected results.
  3273   <p>Optimizations of this process are allowed provided that an
  3274    implementation behaves as if the algorithm had been followed exactly.
  3275    Matching occurs in a well-defined order to insure that the results are as
  3276    consistent as possible across user agents, given an identical set of
  3277    available fonts and rendering technology.
  3279   <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
  3280    changes since CSS 2.1</h3>
  3282   <p>The algorithm above is different from CSS 2.1 in a number of key places.
  3283    These changes were made to better reflect actual font matching behavior
  3284    across user agent implementations.
  3286   <p>Differences compared to the font matching algorithm in CSS 2.1:
  3288   <ul>
  3289    <li>The algorithm includes font-stretch matching.
  3291    <li>All possible font-style matching scenarios are delineated.
  3293    <li>Small-caps fonts are not matched as part of the font matching process,
  3294     they are now handled via font features.
  3296    <li>Unicode variation selector matching is required.
  3298    <li>Cluster sequences are matched as a unit.
  3299   </ul>
  3301   <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
  3302    examples</h3>
  3304   <div class=example>
  3305    <p>It's useful to note that the CSS selector syntax may be used to create
  3306     language-sensitive typography. For example, some Chinese and Japanese
  3307     characters are unified to have the same Unicode code point, although the
  3308     abstract glyphs are not the same in the two languages.
  3310    <pre>*:lang(ja-jp) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
  3311 *:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
  3312 </pre>
  3314    <p>This selects any element that has the given language - Japanese or
  3315     Traditional Chinese - and uses the appropriate font.
  3316   </div>
  3318   <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
  3320   <p>Modern font technologies support a variety of advanced typographic and
  3321    language-specific font features. Using these features, a single font can
  3322    provide glyphs for a wide range of ligatures, contextual and stylistic
  3323    alternates, tabular and old-style figures, small capitals, automatic
  3324    fractions, swashes, and alternates specific to a given language. To allow
  3325    authors control over these font capabilities, the font-variant property
  3326    has been expanded for CSS3, it now functions as a shorthand for a set of
  3327    properties that provide control over stylistic font features.
  3329   <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
  3330    selection and positioning</h3>
  3332   <p>Simple fonts used for displaying Latin text use a very basic processing
  3333    model, fonts contain a <a href="#character-map"><em>character map</em></a>
  3334    which maps a given character to a glyph for that character. Glyphs for
  3335    subsequent characters are simply placed next in line along a run of text.
  3336    Font formats such as OpenType and AAT (Apple Advanced Typography) use a
  3337    richer processing model, the glyph for a given character can be chosen and
  3338    positioned not just based on a single character, but also based on
  3339    surrounding characters along with the language, script, and features
  3340    enabled for the text. Font features may be required for specific scripts,
  3341    or recommended as enabled by default or they may be stylistic features
  3342    meant to be used under author control.
  3344   <p>For a good visual overview of these features, see the <a
  3345    href="#OPENTYPE-FONT-GUIDE"
  3346    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
  3347    For a detailed description of glyph processing for OpenType fonts, see <a
  3348    href="#WINDOWS-GLYPH-PROC"
  3349    rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
  3351   <p>Stylistic font features can be classified into two broad categories,
  3352    ones that affect the harmonization of glyph shapes with the surrounding
  3353    context, such as kerning and ligature features, and those such as the
  3354    small-caps, subscript/superscript and alternate features that affect shape
  3355    selection.
  3357   <p>The subproperties of font-variant listed below are used to control these
  3358    stylistic font features; they do not control features that are required
  3359    for displaying certain scripts, such as the OpenType features used when
  3360    displaying Arabic or Indic language text. They affect glyph selection and
  3361    positioning, they do not affect font selection as described in the font
  3362    matching section (except in cases required for compatibility with CSS
  3363    2.1).
  3365   <p>To assure consistent behavior across user agents, the equivalent
  3366    OpenType property settings are listed for individual properties and must
  3367    be considered normative. When using other font formats these should be
  3368    used as a guideline to map CSS font feature property values to specific
  3369    font features.
  3371   <h3 id=language-specific-support><span class=secno>6.2
  3372    </span>Language-specific display</h3>
  3374   <p>OpenType also supports language-specific glyph selection and
  3375    positioning, so that text can be displayed correctly in cases where the
  3376    language dictates a specific display behavior. Languages often share a
  3377    common script but the shape of certain letters may vary across those
  3378    languages, such as the variations in certain Cyrillic letters used in
  3379    Russian and Bulgarian text. In Latin text, it's common to render "fi" with
  3380    an explicit fi-ligature that lacks a dot on the "i". However, in languages
  3381    such as Turkish which uses both a dotted-i and a dotless-i, it's important
  3382    to not use this ligature or use a specialized version that contains a dot
  3383    over the "i". The example below shows language-specific variations based
  3384    on stylistic traditions found in Spanish, Italian and French orthography:
  3386   <div class=featex><img alt="language specific forms, spanish"
  3387    src=locl-1.png></div>
  3389   <div class=featex><img alt="language specific forms, italian"
  3390    src=locl-2.png></div>
  3392   <div class=featex><img alt="language specific forms, french"
  3393    src=locl-3.png></div>
  3395   <p>If the content language of the element is known, according to the rules
  3396    of the <a
  3397    href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
  3398    language</a>, user agents are required to infer the OpenType language
  3399    system from the content language and use that when selecting and
  3400    positioning glyphs using an OpenType font.
  3402   <p>For OpenType fonts, in some cases it may be necessary to explicitly
  3403    declare the OpenType language to be used, for example when displaying text
  3404    in a given language that uses the typographic conventions of another
  3405    language or when the font does not explicitly support a given language but
  3406    supports a language that shares common typographic conventions. The ‘<a
  3407    href="#propdef-font-language-override"><code
  3408    class=property>font-language-override</code></a>’ property is used for
  3409    this purpose.</p>
  3410   <!-- prop: font-kerning -->
  3412   <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
  3413    href="#propdef-font-kerning">font-kerning</a> property</h3>
  3415   <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
  3416    <tbody>
  3417     <tr>
  3418      <td>Name:
  3420      <td><dfn id=propdef-font-kerning>font-kerning</dfn>
  3422     <tr>
  3423      <td>Value:
  3425      <td>auto | normal | none
  3427     <tr>
  3428      <td>Initial:
  3430      <td>auto
  3432     <tr>
  3433      <td>Applies to:
  3435      <td>all elements
  3437     <tr>
  3438      <td>Inherited:
  3440      <td>yes
  3442     <tr>
  3443      <td>Percentages:
  3445      <td>N/A
  3447     <tr>
  3448      <td>Media:
  3450      <td>visual
  3452     <tr>
  3453      <td>Computed value:
  3455      <td>as specified
  3457     <tr>
  3458      <td>Animatable:
  3460      <td>no
  3461   </table>
  3463   <p>Kerning is the contextual adjustment of inter-glyph spacing. This
  3464    property controls metric kerning, kerning that utilizes adjustment data
  3465    contained in the font. The value ‘<a href="#normal2"><code
  3466    class=property>normal</code></a>’ implies that kerning is applied while
  3467    the value ‘<code class=property>none</code>’ implies that kerning is
  3468    not applied when rendering text. If the value is ‘<code
  3469    class=property>auto</code>’, a user agent is free to choose whether
  3470    kerning is enabled or not by default and to vary that default based on the
  3471    underlying text script.
  3473   <p>For fonts that do not include kerning data this property will have no
  3474    visible effect. When rendering with OpenType fonts, the <a
  3475    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
  3476    specification suggests that kerning be enabled by default. When kerning is
  3477    enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
  3478    vertical text runs the <span class=tag>vkrn</span> feature is enabled).
  3479    User agents must also support fonts that only support kerning via data
  3480    contained in a ‘<code class=property>kern</code>’ font table, as
  3481    detailed in the OpenType specification. Authors may prefer to disable
  3482    kerning in situations where performance is more important that precise
  3483    appearance. If the ‘<code class=property>letter-spacing</code>’
  3484    property is defined, kerning adjustments are considered part of the
  3485    default spacing, letter spacing adjustments are made after kerning has
  3486    been applied.</p>
  3487   <!-- prop: font-variant-ligatures -->
  3489   <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
  3490    the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  3491    property</h3>
  3493   <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
  3494    <tbody>
  3495     <tr>
  3496      <td>Name:
  3498      <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
  3500     <tr>
  3501      <td>Value:
  3503      <td>normal | none | [ <a
  3504       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  3505       <a
  3506       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  3507       || <a
  3508       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  3509       || <a
  3510       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  3513     <tr>
  3514      <td>Initial:
  3516      <td>normal
  3518     <tr>
  3519      <td>Applies to:
  3521      <td>all elements
  3523     <tr>
  3524      <td>Inherited:
  3526      <td>yes
  3528     <tr>
  3529      <td>Percentages:
  3531      <td>N/A
  3533     <tr>
  3534      <td>Media:
  3536      <td>visual
  3538     <tr>
  3539      <td>Computed value:
  3541      <td>as specified
  3543     <tr>
  3544      <td>Animatable:
  3546      <td>no
  3547   </table>
  3549   <p>Ligatures and contextual forms are ways of combining glyphs to produce
  3550    more harmonized forms. A value of ‘<a href="#normal2"><code
  3551    class=property>normal</code></a>’ implies that common default features
  3552    are enabled, <a href="#font-feature-resolution">as described in detail in
  3553    the next section</a>. For OpenType fonts, common ligatures and contextual
  3554    forms are on by default, discretionary and historical ligatures are not. A
  3555    value of ‘<code class=property>none</code>’ implies that all types of
  3556    ligatures and contextual forms covered by this property are explicitly
  3557    disabled. In situations where ligatures are not considered necessary, this
  3558    may improve the speed of text rendering.
  3560   <pre
  3561    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>
  3563   <pre
  3564    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>
  3566   <pre
  3567    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>
  3569   <pre
  3570    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>
  3572   <p>Individual values have the following meanings:
  3574   <dl>
  3575    <dt><dfn id=common-ligatures>common-ligatures</dfn>
  3577    <dd>Enables display of common ligatures (OpenType features: <span
  3578     class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
  3579     enabled by default.
  3580   </dl>
  3582   <div class=featex><img alt="common ligature example" src=liga.png></div>
  3584   <dl>
  3585    <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
  3587    <dd>Disables display of common ligatures (OpenType features: <span
  3588     class=tag>liga, clig</span>).
  3590    <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
  3592    <dd>Enables display of discretionary ligatures (OpenType feature: <span
  3593     class=tag>dlig</span>). Which ligatures are discretionary, or optional,
  3594     is decided by the type designer so authors will need to refer to the
  3595     documentation of a given font to understand which ligatures are
  3596     considered discretionary.
  3597   </dl>
  3599   <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
  3601   <dl>
  3602    <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
  3604    <dd>Disables display of discretionary ligatures (OpenType feature: <span
  3605     class=tag>dlig</span>).
  3607    <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
  3609    <dd>Enables display of historical ligatures (OpenType feature: <span
  3610     class=tag>hlig</span>).
  3611   </dl>
  3613   <div class=featex><img alt="historical ligature example" src=hlig.png></div>
  3615   <dl>
  3616    <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
  3618    <dd>Disables display of historical ligatures (OpenType feature: <span
  3619     class=tag>hlig</span>).
  3621    <dt><dfn id=contextual>contextual</dfn>
  3623    <dd>Enables display of contextual alternates (OpenType feature: <span
  3624     class=tag>calt</span>). Although not strictly a ligature feature, like
  3625     ligatures this feature is commonly used to harmonize the shapes of glyphs
  3626     with the surrounding context. For OpenType fonts, this feature is on by
  3627     default.
  3628   </dl>
  3630   <div class=featex><img alt="contextual alternate example" src=calt.png></div>
  3632   <dl>
  3633    <dt><dfn id=no-contextual>no-contextual</dfn>
  3635    <dd>Disables display of contextual alternates (OpenType feature: <span
  3636     class=tag>calt</span>).
  3637   </dl>
  3639   <p>Required ligatures, needed for correctly rendering complex scripts, are
  3640    not affected by the settings above, including ‘<code
  3641    class=property>none</code>’ (OpenType feature: <span
  3642    class=tag>rlig</span>).</p>
  3643   <!-- prop: font-variant-position -->
  3645   <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
  3646    and superscript forms: the <a
  3647    href="#propdef-font-variant-position">font-variant-position</a> property</h3>
  3649   <table class=propdef id=namefont-variant-positionvaluenormal-sub>
  3650    <tbody>
  3651     <tr>
  3652      <td>Name:
  3654      <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
  3656     <tr>
  3657      <td>Value:
  3659      <td>normal | sub | super
  3661     <tr>
  3662      <td>Initial:
  3664      <td>normal
  3666     <tr>
  3667      <td>Applies to:
  3669      <td>all elements
  3671     <tr>
  3672      <td>Inherited:
  3674      <td>yes
  3676     <tr>
  3677      <td>Percentages:
  3679      <td>N/A
  3681     <tr>
  3682      <td>Media:
  3684      <td>visual
  3686     <tr>
  3687      <td>Computed value:
  3689      <td>as specified
  3691     <tr>
  3692      <td>Animatable:
  3694      <td>no
  3695   </table>
  3697   <p>This property is used to enable typographic subscript and superscript
  3698    glyphs. These are alternate glyphs designed within the same em-box as
  3699    default glyphs and are intended to be laid out on the same baseline as the
  3700    default glyphs, with no resizing or repositioning of the baseline. They
  3701    are explicitly designed to match the surrounding text and to be more
  3702    readable without affecting the line height.
  3704   <div class=figure><img alt="comparison between real subscript glyphs and
  3705    synthesized ones" src=realsubscripts.png>
  3706    <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
  3707     (bottom)
  3708   </div>
  3710   <p>The values ‘<code class=property>sub</code>’ and ‘<code
  3711    class=property>super</code>’ imply the appropriate variant glyph is
  3712    displayed when available in the font (OpenType features: <span
  3713    class=tag>subs, sups</span>). A value of ‘<a href="#normal2"><code
  3714    class=property>normal</code></a>’ implies neither of these alternate
  3715    glyphs are substituted.
  3717   <p>Because of the semantic nature of subscripts and superscripts, when the
  3718    value is either ‘<code class=property>sub</code>’ or ‘<code
  3719    class=property>super</code>’ for a given contiguous run of text, if a
  3720    variant glyph is not available for all the characters in the run,
  3721    simulated glyphs must be synthesized for all characters using reduced
  3722    forms of the glyphs that would be used without this feature applied. This
  3723    is done to avoid a mixture of variant glyphs and synthesized ones that
  3724    would not align correctly.
  3726   <p>In the case of OpenType fonts that lack subscript or superscript glyphs
  3727    for a given character, user agents must use the appropriate subscript and
  3728    superscript metrics specified in the selected font's <a
  3729    href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
  3730    table</a> <a href="#OPENTYPE"
  3731    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
  3732    and offset of the synthesized substitutes.
  3734   <p>In the past, user agents have used font-size and vertical-align to
  3735    simulate subscripts and superscripts for the <span class=tag>sub</span>
  3736    and <span class=tag>sup</span> elements. To allow a backwards compatible
  3737    way of defining subscripts and superscripts, it is recommended that
  3738    authors use conditional rules <a href="#CSS3-CONDITIONAL"
  3739    rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
  3740    older user agents will still render subscripts and superscripts via the
  3741    older mechanism.
  3743   <p>Authors should note that fonts typically only provide subscript and
  3744    superscript glyphs for a subset of all characters supported by the font.
  3745    While subscript and superscript glyphs are often available for Latin
  3746    numbers, glyphs for punctuation and letter characters are less frequently
  3747    provided. The synthetic fallback rules defined for this property assure
  3748    that subscripts and superscripts will always appear but the appearance may
  3749    not match author expectations if the font used does not provide the
  3750    appropriate alternate glyph for all characters contained in a subscript or
  3751    superscript.
  3753   <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
  3754    using superscript metrics" src=superscript-alt-synth.png>
  3755    <p class=caption>Superscript alternate glyph (left), synthesized
  3756     superscript glyphs (middle), and incorrect mixture of the two (right)
  3757   </div>
  3759   <p>This property is not cumulative, applying it to subelements within a
  3760    subscript or superscript won't nest the placement of a subscript or
  3761    superscript glyph. Images contained within text runs where the value of
  3762    this property is ‘<code class=property>sub</code>’ or ‘<code
  3763    class=property>super</code>’ will be drawn just as they would if the
  3764    value was ‘<a href="#normal2"><code class=property>normal</code></a>’.
  3765    Likewise, text decorations such as underlines or emphasis marks will
  3766    render in the same position as they would for the default glyphs, since
  3767    this property does not affect the baseline position.
  3769   <p>Because of these limitations, font-variant-position is not recommended
  3770    for use in user agent stylesheets. Authors should use it in cases where
  3771    subscripts or superscripts will only contain the narrow range of
  3772    characters supported by the fonts specified.
  3774   <div class=example>
  3775    <p>A typical user agent default style for the <span class=tag>sub</span>
  3776     element:</p>
  3778    <pre>sub {
  3779   vertical-align: sub;
  3780   font-size: smaller;
  3781   line-height: normal;
  3783 </pre>
  3785    <p>Using font-variant-position to specify typographic subscripts in a way
  3786     that will still show subscripts in older user agents:</p>
  3788    <pre>@supports ( font-variant-position: sub ) {
  3790   sub {
  3791     vertical-align: inherit;
  3792     font-size: 100%;
  3793     line-height: inherit;
  3794     font-variant-position: sub;
  3798 </pre>
  3800    <p>User agents that support the ‘<a
  3801     href="#propdef-font-variant-position"><code
  3802     class=property>font-variant-position</code></a>’ property will select a
  3803     subscript variant glyph and render this without adjusting the baseline or
  3804     font-size. Older user agents will ignore the ‘<a
  3805     href="#propdef-font-variant-position"><code
  3806     class=property>font-variant-position</code></a>’ property definition
  3807     and use the standard defaults for subscripts.</p>
  3808   </div>
  3809   <!-- prop: font-variant-caps -->
  3811   <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
  3812    the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
  3814   <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
  3815    <tbody>
  3816     <tr>
  3817      <td>Name:
  3819      <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
  3821     <tr>
  3822      <td>Value:
  3824      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  3825       | unicase | titling-caps
  3827     <tr>
  3828      <td>Initial:
  3830      <td>normal
  3832     <tr>
  3833      <td>Applies to:
  3835      <td>all elements
  3837     <tr>
  3838      <td>Inherited:
  3840      <td>yes
  3842     <tr>
  3843      <td>Percentages:
  3845      <td>N/A
  3847     <tr>
  3848      <td>Media:
  3850      <td>visual
  3852     <tr>
  3853      <td>Computed value:
  3855      <td>as specified
  3857     <tr>
  3858      <td>Animatable:
  3860      <td>no
  3861   </table>
  3863   <p>Specifies control over capitalized forms.
  3865   <p>Individual values have the following meanings:
  3867   <dl>
  3868    <dt><dfn id=normal>normal</dfn>
  3870    <dd>None of the features listed below are enabled.
  3872    <dt><dfn id=small-caps>small-caps</dfn>
  3874    <dd>Enables display of small capitals (OpenType feature: <span
  3875     class=tag>smcp</span>). Small-caps glyphs typically use the form of
  3876     uppercase letters but are reduced to the size of lowercase letters.
  3877   </dl>
  3879   <div class=featex><img alt="small-caps example" src=smcp.png></div>
  3881   <dl>
  3882    <dt><dfn id=all-small-caps>all-small-caps</dfn>
  3884    <dd>Enables display of small capitals for both upper and lowercase letters
  3885     (OpenType features: <span class=tag>c2sc, smcp</span>).
  3887    <dt><dfn id=petite-caps>petite-caps</dfn>
  3889    <dd>Enables display of petite capitals (OpenType feature: <span
  3890     class=tag>pcap</span>).
  3892    <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
  3894    <dd>Enables display of petite capitals for both upper and lowercase
  3895     letters (OpenType features: <span class=tag>c2pc, pcap</span>).
  3897    <dt><dfn id=unicase>unicase</dfn>
  3899    <dd>Enables display of mixture of small capitals for uppercase letters
  3900     with normal lowercase letters (OpenType feature: <span
  3901     class=tag>unic</span>).
  3903    <dt><dfn id=titling-caps>titling-caps</dfn>
  3905    <dd>Enables display of titling capitals (OpenType feature: <span
  3906     class=tag>titl</span>). Uppercase letter glyphs are often designed for
  3907     use with lowercase letters. When used in all uppercase titling sequences
  3908     they can appear too strong. Titling capitals are designed specifically
  3909     for this situation.
  3910   </dl>
  3912   <p>This property allows the selection of alternate glyphs used for small or
  3913    petite capitals or for titling. These glyphs are specifically designed to
  3914    blend well with the surrounding normal glyphs, to maintain the weight and
  3915    readability which suffers when text is simply resized to fit this purpose.
  3917   <p>The availability of these glyphs is based on whether a given feature is
  3918    defined or not in the feature list of the font. User agents can optionally
  3919    decide this on a per-script basis but should explicitly not decide this on
  3920    a per-character basis.
  3922   <p>Some fonts may only support a subset or none of the features described
  3923    for this property. For backwards compatibility with CSS 2.1, if ‘<a
  3924    href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
  3925    href="#all-small-caps"><code class=property>all-small-caps</code></a>’
  3926    is specified but small-caps glyphs are not available for a given font,
  3927    user agents should simulate a small-caps font, for example by taking a
  3928    normal font and replacing the glyphs for lowercase letters with scaled
  3929    versions of the glyphs for uppercase characters (replacing the glyphs for
  3930    both upper and lowercase letters in the case of ‘<a
  3931    href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
  3933   <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
  3934    real small-caps" class=hires src=synthetic-vs-real-small-caps.png
  3935    width=512px>
  3936    <p class=caption>Synthetic vs. real small-caps
  3937   </div>
  3939   <p>To match the surrounding text, a font may provide alternate glyphs for
  3940    caseless characters when these features are enabled but when a user agent
  3941    simulates small capitals, it must not attempt to simulate alternates for
  3942    codepoints which are considered caseless.
  3944   <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
  3945    characters with small-caps, all-small-caps enabled" class=hires
  3946    src=small-capitals-variations.png width=418px>
  3947    <p class=caption>Caseless characters with small-caps, all-small-caps
  3948     enabled
  3949   </div>
  3951   <p>If either ‘<a href="#petite-caps"><code
  3952    class=property>petite-caps</code></a>’ or ‘<a
  3953    href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
  3954    is specified for a font that doesn't support these features, the property
  3955    behaves as if ‘<a href="#small-caps"><code
  3956    class=property>small-caps</code></a>’ or ‘<a
  3957    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  3958    respectively, had been specified. If ‘<a href="#unicase"><code
  3959    class=property>unicase</code></a>’ is specified for a font that doesn't
  3960    support that feature, the property behaves as if ‘<a
  3961    href="#small-caps"><code class=property>small-caps</code></a>’ was
  3962    applied only to lowercased uppercase letters. If ‘<a
  3963    href="#titling-caps"><code class=property>titling-caps</code></a>’ is
  3964    specified with a font that does not support this feature, this property
  3965    has no visible effect. When simulated small capital glyphs are used, for
  3966    scripts that lack uppercase and lowercase letters, ‘<a
  3967    href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
  3968    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  3969    ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
  3970    ‘<a href="#all-petite-caps"><code
  3971    class=property>all-petite-caps</code></a>’ and ‘<a
  3972    href="#unicase"><code class=property>unicase</code></a>’ have no visible
  3973    effect.
  3975   <p>When casing transforms are used to simulate small capitals, the casing
  3976    transformations should match those used for the <span
  3977    class=property>‘<code class=property>text-transform</code>’</span>
  3978    property.
  3980   <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
  3981    replace glyphs in a small-caps font so that the text appears in all
  3982    uppercase letters.
  3984   <div class=figure style="padding: 0; margin: auto;"><img alt="using
  3985    all-small-caps in acronym-laden text" class=hires
  3986    src=acronym-laden-text.png width=596px>
  3987    <p class=caption>Using small capitals to improve readability in
  3988     acronym-laden text
  3989   </div>
  3991   <div class=example>
  3992    <p>Quotes rendered italicised, with small-caps on the first line:</p>
  3994    <pre>blockquote            { font-style: italic; }
  3995 blockquote:first-line { font-variant: small-caps; }
  3997 &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>
  3998 </pre>
  3999   </div>
  4000   <!-- prop: font-variant-numeric -->
  4002   <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
  4003    formatting: the <a
  4004    href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
  4006   <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
  4007    <tbody>
  4008     <tr>
  4009      <td>Name:
  4011      <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
  4013     <tr>
  4014      <td>Value:
  4016      <td>normal | [ <a
  4017       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4018       || <a
  4019       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4020       || <a
  4021       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4022       || <a href="#ordinal">ordinal</a> || <a
  4023       href="#slashed-zero">slashed-zero</a> ]
  4025     <tr>
  4026      <td>Initial:
  4028      <td>normal
  4030     <tr>
  4031      <td>Applies to:
  4033      <td>all elements
  4035     <tr>
  4036      <td>Inherited:
  4038      <td>yes
  4040     <tr>
  4041      <td>Percentages:
  4043      <td>N/A
  4045     <tr>
  4046      <td>Media:
  4048      <td>visual
  4050     <tr>
  4051      <td>Computed value:
  4053      <td>as specified
  4055     <tr>
  4056      <td>Animatable:
  4058      <td>no
  4059   </table>
  4061   <p>Specifies control over numerical forms.
  4063   <pre
  4064    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>
  4066   <pre
  4067    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>
  4069   <pre
  4070    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>
  4072   <p>Individual values have the following meanings:
  4074   <dl>
  4075    <dt><dfn id=normal0>normal</dfn>
  4077    <dd>None of the features listed below are enabled.
  4079    <dt><dfn id=lining-nums>lining-nums</dfn>
  4081    <dd>Enables display of lining numerals (OpenType feature: <span
  4082     class=tag>lnum</span>).
  4084    <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
  4086    <dd>Enables display of old-style numerals (OpenType feature: <span
  4087     class=tag>onum</span>).
  4089    <dt><dfn id=proportional-nums>proportional-nums</dfn>
  4091    <dd>Enables display of proportional numerals (OpenType feature: <span
  4092     class=tag>pnum</span>).
  4094    <dt><dfn id=tabular-nums>tabular-nums</dfn>
  4096    <dd>Enables display of tabular numerals (OpenType feature: <span
  4097     class=tag>tnum</span>).
  4098   </dl>
  4100   <p>The example below shows how these different properties can be combined
  4101    to influence the rendering of tabular data with fonts that support these
  4102    features. Within normal paragraph text, proportional numbers are used
  4103    while tabular numbers are used so that columns of numbers line up
  4104    properly:
  4106   <div class=figure style="padding: 0; margin: auto;"><img alt="combining
  4107    number styles" src=numberstyles.png>
  4108    <p class=caption>Using number styles
  4109   </div>
  4111   <dl>
  4112    <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
  4114    <dd>Enables display of lining diagonal fractions (OpenType feature: <span
  4115     class=tag>frac</span>).
  4116   </dl>
  4118   <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
  4120   <dl>
  4121    <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
  4123    <dd>Enables display of lining stacked fractions (OpenType feature: <span
  4124     class=tag>afrc</span>).
  4125   </dl>
  4127   <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
  4129   <dl>
  4130    <dt><dfn id=ordinal>ordinal</dfn>
  4132    <dd>Enables display of forms used with ordinal numbers (OpenType feature:
  4133     <span class=tag>ordn</span>).
  4135    <dt><dfn id=slashed-zero>slashed-zero</dfn>
  4137    <dd>Enables display of slashed zeros (OpenType feature: <span
  4138     class=tag>zero</span>).
  4139   </dl>
  4141   <div class=featex><img alt="slashed zero example" src=zero.png></div>
  4143   <div class=example id=steak-marinade>
  4144    <p>A simple flank steak marinade recipe, rendered with automatic fractions
  4145     and old-style numerals:</p>
  4147    <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
  4149 &lt;h4>Steak marinade:&lt;/h4>
  4150 &lt;ul>
  4151   &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
  4152   &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
  4153   &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
  4154   &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
  4155   &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
  4156   &lt;li>Salt &amp;amp; pepper&lt;/li>
  4157 &lt;/ul>
  4159 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
  4160 for a few hours or overnight.&lt;/p>
  4161 </pre>
  4162   </div>
  4163   <!-- prop: font-variant-alternates -->
  4165   <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
  4166    and swashes: the <a
  4167    href="#propdef-font-variant-alternates">font-variant-alternates</a>
  4168    property</h3>
  4170   <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
  4171    <tbody>
  4172     <tr>
  4173      <td>Name:
  4175      <td><dfn
  4176       id=propdef-font-variant-alternates>font-variant-alternates</dfn>
  4178     <tr>
  4179      <td>Value:
  4181      <td>normal | [ <a href="#stylistic"
  4182       title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
  4183       href="#historical-forms">historical-forms</a> || <a href="#styleset"
  4184       title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
  4185       href="#character-variant"
  4186       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4187       #)</a> || <a href="#swash"
  4188       title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
  4189       href="#ornaments"
  4190       title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
  4191       href="#annotation"
  4192       title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
  4194     <tr>
  4195      <td>Initial:
  4197      <td>normal
  4199     <tr>
  4200      <td>Applies to:
  4202      <td>all elements
  4204     <tr>
  4205      <td>Inherited:
  4207      <td>yes
  4209     <tr>
  4210      <td>Percentages:
  4212      <td>N/A
  4214     <tr>
  4215      <td>Media:
  4217      <td>visual
  4219     <tr>
  4220      <td>Computed value:
  4222      <td>as specified
  4224     <tr>
  4225      <td>Animatable:
  4227      <td>no
  4228   </table>
  4230   <p>For any given character, fonts can provide a variety of alternate glyphs
  4231    in addition to the default glyph for that character. This property
  4232    provides control over the selection of these alternate glyphs.
  4234   <p>In cases where multiple alternates are possible, authors define a
  4235    <code>&lt;feature-value-name&gt;</code> using the
  4236    <code>@font-feature-values</code> rule described below to indicate the
  4237    specific alternate to be used. The nature of these alternates is font
  4238    specific, so the rule defines values for a specific font family or set of
  4239    families. When a particular value has not been defined for a given family,
  4240    the named value is treated as if the feature had omitted from the style
  4241    rule. If a given value is outside the range supported by a given font, the
  4242    value is ignored. These values never apply to generic font families, nor
  4243    to families selected as part of system font fallback. Values that behave
  4244    this way are marked as <em>font specific</em>.
  4246   <p>Individual values have the following meanings:
  4248   <dl>
  4249    <dt><dfn id=normal1>normal</dfn>
  4251    <dd>None of the features listed below are enabled.
  4253    <dt><dfn id=stylistic
  4254     title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
  4256    <dd>Enables display of stylistic alternates (<em>font specific</em>,
  4257     OpenType feature: <span class=tag>salt
  4258     &lt;feature-value-name&gt;</span>).
  4259   </dl>
  4261   <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
  4263   <dl>
  4264    <dt><dfn id=historical-forms>historical-forms</dfn>
  4266    <dd>Enables display of historical forms (OpenType feature: <span
  4267     class=tag>hist</span>).
  4268   </dl>
  4270   <div class=featex><img alt="historical form example" src=hist.png></div>
  4272   <dl>
  4273    <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
  4274     #)</dfn>
  4276    <dd>Enables display with stylistic sets (<em>font specific</em>, OpenType
  4277     feature: <span class=tag>ss&lt;feature-index&gt;</span> OpenType
  4278     currently defines <span class=tag>ss01</span> through <span
  4279     class=tag>ss20</span>).
  4280   </dl>
  4282   <div class=featex><img alt="styleset example" src=ssnn.png></div>
  4284   <dl>
  4285    <dt><dfn id=character-variant
  4286     title=character-variant>character-variant(&lt;feature-value-name&gt;
  4287     #)</dfn>
  4289    <dd>Enables display of specific character variants (<em>font
  4290     specific</em>, OpenType feature: <span
  4291     class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
  4292     class=tag>cv01</span> through <span class=tag>cv99</span>).
  4294    <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
  4296    <dd>Enables display of swash glyphs (<em>font specific</em>, OpenType
  4297     feature: <span class=tag>swsh &lt;feature-index&gt;, cswh
  4298     &lt;feature-index&gt;</span>).
  4299   </dl>
  4301   <div class=featex><img alt="swash example" src=swsh.png></div>
  4303   <dl>
  4304    <dt><dfn id=ornaments
  4305     title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
  4307    <dd>Enables replacement of default glyphs with ornaments, if provided in
  4308     the font (<em>font specific</em>, OpenType feature: <span class=tag>ornm
  4309     &lt;feature-index&gt;</span>). Some fonts may offer ornament glyphs as
  4310     alternates for a wide collection of characters; however, displaying
  4311     arbitrary characters (e.g., alphanumerics) as ornaments is poor practice
  4312     as it distorts the semantics of the data. Font designers are encouraged
  4313     to encode all ornaments (except those explicitly encoded in the Unicode
  4314     Dingbats blocks, etc.) as alternates for the bullet character (U+2022) to
  4315     allow authors to select the desired glyph using
  4316     &lt;feature-value-name&gt;.
  4317   </dl>
  4319   <div class=featex><img alt="ornaments example" src=ornm.png></div>
  4321   <dl>
  4322    <dt><dfn id=annotation
  4323     title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
  4325    <dd>Enables display of alternate annotation forms (<em>font specific</em>,
  4326     OpenType feature: <span class=tag>nalt &lt;feature-index&gt;</span>).
  4327   </dl>
  4329   <div class=featex><img alt="alternate annotation form example"
  4330    src=nalt.png></div>
  4332   <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
  4333    specific alternates: the <code>@font-feature-values</code> rule</h3>
  4335   <p>Several of the possible values of ‘<a
  4336    href="#propdef-font-variant-alternates"><code
  4337    class=property>font-variant-alternates</code></a>’ listed above are
  4338    labeled as "font specific". For these features fonts may define not just a
  4339    single glyph but a set of alternate glyphs with an index to select a given
  4340    alternate. Since these are font family specific, the
  4341    <code>@font-feature-values</code> rule is used to define named-values for
  4342    these indices for a given family.
  4344   <p>In the case of the swash Q in the example shown above, the swash could
  4345    be specified using these style rules:
  4347   <pre>
  4349 @font-feature-values Jupiter Sans {
  4350   @swash {
  4351     delicate: 1;
  4352     flowing: 2;
  4356 h2 { font-family: Jupiter Sans, sans-serif; }
  4358 /* show the second swash variant in h2 headings */
  4359 h2:first-letter { font-variant-alternates: swash(flowing); }
  4361 &lt;h2>Quick&lt;/h2></pre>
  4363   <p>When Jupiter Sans is present, the second alternate swash alternate will
  4364    be displayed. When not present, no swash character will be shown, since
  4365    the specific named-value "flowing" is only defined for the Jupiter Sans
  4366    family. The @-mark indicates the name of the property value for which a
  4367    named-value can be used. The name "flowing" is chosen by the author, the
  4368    values specified within a given font's data.
  4370   <p>In terms of the grammar, this specification defines the following
  4371    productions:</p>
  4372   <!--
  4373 <pre><dfn>supports_rule</dfn>
  4374   : <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>
  4377 <dfn>supports_condition</dfn>
  4378   : <i>supports_negation</i> | <i>supports_conjunction</i> | <i>supports_disjunction</i> |
  4379     <i>supports_condition_in_parens</i>
  4382 <dfn>supports_condition_in_parens</dfn>
  4383   : ( '(' <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> |
  4384     <i>general_enclosed</i>
  4387 <dfn>supports_negation</dfn>
  4388   : <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>
  4391 <dfn>supports_conjunction</dfn>
  4392   : <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> )+
  4395 <dfn>supports_disjunction</dfn>
  4396   : <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> )+
  4399 <dfn>supports_declaration_condition</dfn>
  4400   : '(' <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> ')'
  4403 <dfn>general_enclosed</dfn>
  4404   : ( <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> )* ')'
  4406 </pre>
  4408 -->
  4410   <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
  4411   : <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>*
  4412     '{' <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>*
  4415 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
  4416   : <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> ]*
  4419 <dfn id=fontfamilyname>font_family_name</dfn>
  4420   : <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> ]* ]
  4423 <dfn id=featurevalueblock>feature_value_block</dfn>
  4424   : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4425     '{' <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>*
  4428 <dfn id=featuretype>feature_type</dfn>:
  4429   <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
  4432 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
  4433   : <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> ]*
  4435 </pre>
  4437   <p>The following new token is introduced:
  4439   <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>;}
  4440 </pre>
  4442   <p>Feature value blocks are treated <a
  4443    href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">similar to
  4444    at-rules</a>, they consist of everything up to the next block or
  4445    semi-colon, whichever comes first.
  4447   <p>Font feature values rules define a set of values for a specific font
  4448    feature as used for a given set of families. Effectively, they define a
  4449    mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
  4450    ⟨values⟩ are the indices used for specific features defined for a
  4451    given font.
  4453   <p>The font family list uses the same syntax as that used for the ‘<a
  4454    href="#descdef-font-family"><code class=property>font-family</code></a>’
  4455    property. Within feature value blocks, the feature type is ‘<code
  4456    class=css>@</code>’ followed by the name of the font-specific property
  4457    value (e.g. <a href="#swash"><code>@swash</code></a>). The feature type
  4458    must match, using an ASCII case-insensitive comparison, one of the
  4459    <em>font specific</em> values of the <a
  4460    href="#propdef-font-variant-alternates"><code>font-variant-alternates</code></a>
  4461    property. The values associated with a given idenitifier are limited to
  4462    integer values 0 or greater.
  4464   <p>If syntax errors occur within the font family list, the entire rule must
  4465    be ignored. When syntax errors occur within a feature value definition,
  4466    such as invalid identifiers or values, the entire feature value definition
  4467    must be omitted, similar to the way syntax errors in style declarations
  4468    are handled. When the <code>&lt;feature-type></code> is invalid, the
  4469    entire associated feature value block must be ignored.
  4471   <pre>@font-feature-values Bongo {
  4472   @swash { ornate: 1; }
  4473   annotation { boxed: 4; } /* should be @annotation! */
  4474   @swash { double-loops: 1; flowing: -1; } /* negative value */
  4475   @ornaments ; /* incomplete definition */
  4476   @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
  4477   <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none;">redrum</a>  /* random editing mistake */
  4478 }</pre>
  4480   <p>The example above is equivalent to:
  4482   <pre>@font-feature-values Bongo {
  4483   @swash { ornate: 1; }
  4484   @swash { double-loops: 1; }
  4485   @styleset { double-W: 14; sharp-terminals: 16 1; }
  4486 }</pre>
  4488   <p>If multiple <code>@font-feature-values</code> rules are defined for a
  4489    given family, the resulting values defined are the union of these rules.
  4490    This allows a set of named-values to be defined for a given font family
  4491    globally for a site and specific additions made per-page. If the same
  4492    &lt;feature-value-name&gt; is defined mulitple times for a given
  4493    font-variant value, the last defined value is used.
  4495   <pre>
  4496 site.css:
  4498   @font-feature-values Mercury Serif {
  4499     @styleset {
  4500       stacked-g: 3; /* "two-storey" versions of g, a */
  4501       stacked-a: 4;
  4505 page.css:
  4507   @font-feature-values Mercury Serif {
  4508     @styleset {
  4509       geometric-m: 7; /* alternate version of m */
  4513   body {
  4514     font-family: Mercury Serif, serif;
  4516     /* enable both the use of stacked g and alternate m */
  4517     font-variant-alternates: styleset(stacked-g, geometric-m);
  4518   }</pre>
  4520   <p>Only named font families are allowed for &lt;font-family&gt;, rules that
  4521    include generic or system fonts in the list of font families are
  4522    considered syntax errors and the contents of the rules are ignored.
  4523    However, if a user agent defines a generic font to be a specific named
  4524    font (e.g. Helvetica), the settings associated with that family name will
  4525    be used.
  4527   <p>For &lt;font-variant-property-value>, only font specific property value
  4528    names supported by the ‘<a href="#propdef-font-variant"><code
  4529    class=property>font-variant</code></a>’ property are recognized,
  4530    definitions for other value names cause a syntax error and are ignored.
  4531    Each property value that is font specific is clearly marked as such.
  4532    Feature value names follow the rules of CSS user identifiers and are
  4533    case-sensitive. They are unique only for a given set of font families and
  4534    font-variant property value; the same identifier used with a different
  4535    font-variant property value is treated as a separate and distinct value.
  4537   <p>Using a commonly named value allows authors to use a single style rule
  4538    to cover a set of fonts for which the underlying selector is different for
  4539    each font. If either font in the example below is found, a circled number
  4540    glyph will be used:
  4542   <pre>@font-feature-values Taisho Gothic {
  4543   @annotation { boxed: 1; circled: 4; }
  4546 @font-feature-values Otaru Kisa {
  4547   @annotation { circled: 1; black-boxed: 3; }
  4550 h3.title {
  4551   /* circled form defined for both fonts */
  4552   font-family: Taisho Gothic, Otaru Kisa;
  4553   font-variant: annotation(circled);
  4554 }</pre>
  4556   <p>Most font specific font-variant property values take a single value
  4557    (e.g. swash). The character-variant property value allows two values and
  4558    styleset allows an unlimited number. If a larger number of values are
  4559    assigned to a given name, a syntax error occurs and the entire
  4560    &lt;font-feature-values-declaration&gt; is ignored.
  4562   <p>For the styleset property value, multiple values indicate the style sets
  4563    to be enabled. Values between 1 and 99 enable OpenType features <span
  4564    class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
  4565    OpenType standard only officially defines <span class=tag>ss01</span>
  4566    through <span class=tag>ss20</span>. Values greater than 99 or equal to 0
  4567    are ignored but do not generate a syntax error when parsed.
  4569   <pre>@font-feature-values Mars Serif {
  4570   @styleset { 
  4571     alt-g: 1;        /* implies ss01 = 1 */
  4572     curly-quotes: 3; /* implies ss03 = 1 */
  4573     code: 4 5;       /* implies ss04 = 1, ss05 = 1 */
  4576   @styleset {
  4577     dumb: 125;        /* &gt;99, ignored */
  4580   @swash {
  4581     swishy: 3 5;     /* more than 1 value for swash, syntax error */
  4585 p.codeblock {
  4586   /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
  4587   font-variant-alternates: styleset(curly-quotes, code);
  4588 }</pre>
  4590   <p>For character-variant, a single value between 1 and 99 indicates the
  4591    enabling of OpenType feature <span class=tag>cv01</span> through <span
  4592    class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
  4593    to 0 are ignored but do not generate a syntax error when parsed. When two
  4594    values are listed, the first value indicates the feature used and the
  4595    second the value passed for that feature. When two value names imply
  4596    different settings for the same underlying feature the last setting is
  4597    used.
  4599   <pre>@font-feature-values MM Greek {
  4600   @character-variant { alpha-2: 1 2; }   /* implies cv01 = 2 */
  4601   @character-variant { beta-3: 2 3; }    /* implies cv02 = 3 */
  4602   @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, ignored */
  4603   @character-variant { gamma: 12; }      /* implies cv12 = 1 */
  4604   @character-variant { zeta:   20 3; }   /* implies cv20 = 3 */
  4605   @character-variant { zeta-2: 20 2; }   /* implies cv20 = 2 */
  4606   @character-variant { silly: 105; }     /* &gt;99, ignored */
  4607   @character-variant { dumb: 323 3; }    /* &gt;99, ignored */
  4610 #title {
  4611   /* use the third alternate beta, first alternate gamma */
  4612   font-variant-alternates: character-variant(beta-3, gamma);
  4615 p {
  4616   /* zeta-2 follows zeta, implies cv20 = 2  */
  4617   font-variant-alternates: character-variant(zeta, zeta-2);
  4620 .special {
  4621   /* zeta follows zeta-2, implies cv20 = 3  */
  4622   font-variant-alternates: character-variant(zeta-2, zeta);
  4623 }</pre>
  4625   <p>See the <a href="#om-fontfeaturevalues">object model reference
  4626    section</a> for a description of the interfaces used to modify these rules
  4627    via the CSS Object Model.
  4629   <div class=figure><img alt="Matching text on Byzantine seals using
  4630    character variants" src=byzantineseal.png>
  4631    <p class=caption>Byzantine seal text displayed with character variants
  4632   </div>
  4634   <div class=example>
  4635    <p>In the figure above, the text in red is rendered using a font
  4636     containing character variants that mimic the character forms found on a
  4637     Byzantine seal from the 8th century A.D. Two lines below is the same text
  4638     displayed in a font without variants. Note the two variants for U and N
  4639     used on the seal.</p>
  4641    <pre>@font-feature-values Athena Ruby {
  4642   @character-variant {
  4643     leo-B: 2 1;
  4644     leo-M: 13 3;
  4645     leo-alt-N: 14 1;
  4646     leo-N: 14 2;
  4647     leo-T: 20 1; 
  4648     leo-U: 21 2;
  4649     leo-alt-U: 21 4;
  4653 p {
  4654   font-variant: discretionary-ligatures,
  4655                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
  4658 span.alt-N { 
  4659   font-variant-alternates: character-variant(leo-alt-N);
  4662 span.alt-U {
  4663   font-variant-alternates: character-variant(leo-alt-U);
  4666 &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>
  4668 &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> 
  4669 </pre>
  4670   </div>
  4672   <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
  4673    Asian text rendering: the <a
  4674    href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  4675    property</h3>
  4677   <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
  4678    <tbody>
  4679     <tr>
  4680      <td>Name:
  4682      <td><dfn
  4683       id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
  4685     <tr>
  4686      <td>Value:
  4688      <td>normal | [ <a
  4689       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4690       || <a
  4691       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4692       || <a href="#ruby">ruby</a> ]
  4694     <tr>
  4695      <td>Initial:
  4697      <td>normal
  4699     <tr>
  4700      <td>Applies to:
  4702      <td>all elements
  4704     <tr>
  4705      <td>Inherited:
  4707      <td>yes
  4709     <tr>
  4710      <td>Percentages:
  4712      <td>N/A
  4714     <tr>
  4715      <td>Media:
  4717      <td>visual
  4719     <tr>
  4720      <td>Computed value:
  4722      <td>as specified
  4724     <tr>
  4725      <td>Animatable:
  4727      <td>no
  4728   </table>
  4730   <p>Allows control of glyph substitution and sizing in East Asian text.
  4732   <pre
  4733    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>
  4735   <pre
  4736    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>
  4738   <p>Individual values have the following meanings:
  4740   <dl>
  4741    <dt><dfn id=normal2>normal</dfn>
  4743    <dd>None of the features listed below are enabled.
  4745    <dt><dfn id=jis78>jis78</dfn>
  4747    <dd>Enables rendering of JIS78 forms (OpenType feature: <span
  4748     class=tag>jp78</span>).
  4749   </dl>
  4751   <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
  4753   <dl>
  4754    <dt><dfn id=jis83>jis83</dfn>
  4756    <dd>Enables rendering of JIS83 forms (OpenType feature: <span
  4757     class=tag>jp83</span>).
  4759    <dt><dfn id=jis90>jis90</dfn>
  4761    <dd>Enables rendering of JIS90 forms (OpenType feature: <span
  4762     class=tag>jp90</span>).
  4764    <dt><dfn id=jis04>jis04</dfn>
  4766    <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
  4767     class=tag>jp04</span>).
  4768     <p>The various JIS variants reflect the glyph forms defined in different
  4769      Japanese national standards. Fonts generally include glyphs defined by
  4770      the most recent national standard but it's sometimes necessary to use
  4771      older variants, to match signage for example.</p>
  4773    <dt><dfn id=simplified>simplified</dfn>
  4775    <dd>Enables rendering of simplified forms (OpenType feature: <span
  4776     class=tag>smpl</span>).
  4777     <p>The ‘<a href="#simplified"><code
  4778      class=property>simplified</code></a>’ and ‘<a
  4779      href="#traditional"><code class=property>traditional</code></a>’
  4780      values allow control over the glyph forms for characters which have been
  4781      simplified over time but for which the older, traditional form is still
  4782      used in some contexts. The exact set of characters and glyph forms will
  4783      vary to some degree by context for which a given font was designed.</p>
  4785    <dt><dfn id=traditional>traditional</dfn>
  4787    <dd>Enables rendering of traditional forms (OpenType feature: <span
  4788     class=tag>trad</span>).
  4789   </dl>
  4791   <div class=featex><img alt="tradtional form example" src=trad.png></div>
  4793   <dl>
  4794    <dt><dfn id=full-width>full-width</dfn>
  4796    <dd>Enables rendering of full-width variants (OpenType feature: <span
  4797     class=tag>fwid</span>).
  4799    <dt><dfn id=proportional-width>proportional-width</dfn>
  4801    <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
  4802     <span class=tag>pwid</span>).
  4803   </dl>
  4805   <div class=featex><img alt="proportionally spaced Japanese example"
  4806    src=pwid.png></div>
  4808   <dl>
  4809    <dt><dfn id=ruby>ruby</dfn>
  4811    <dd>Enables display of ruby variant glyphs (OpenType feature: <span
  4812     class=tag>ruby</span>). Since ruby text is generally smaller than the
  4813     associated body text, font designers can design special glyphs for use
  4814     with ruby that are more readable than scaled down versions of the default
  4815     glyphs. Only glyph selection is affected, there is no associated font
  4816     scaling or other change that affects line layout. The red ruby text below
  4817     is shown with default glyphs (top) and with ruby variant glyphs (bottom).
  4818     Note the slight difference in stroke thickness.
  4819   </dl>
  4821   <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
  4823   <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
  4824    for font rendering: the <a href="#propdef-font-variant">font-variant</a>
  4825    property</h3>
  4827   <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
  4828    <tbody>
  4829     <tr>
  4830      <td>Name:
  4832      <td><dfn id=propdef-font-variant>font-variant</dfn>
  4834     <tr>
  4835      <td>Value:
  4837      <td>normal | none | [ <a
  4838       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  4839       <a
  4840       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  4841       || <a
  4842       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  4843       || <a
  4844       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  4845       || <a href="#stylistic"><var
  4846       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  4847       href="#historical-forms"><var>historical-forms</var></a> || <a
  4848       href="#styleset"><var
  4849       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  4850       href="#character-variant"><var
  4851       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4852       #)</var></a> || <a href="#swash"><var
  4853       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  4854       href="#ornaments"><var
  4855       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  4856       href="#annotation"><var
  4857       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  4858       <a href="#small-caps"><i>small-caps</i></a> | <a
  4859       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  4860       href="#petite-caps"><i>petite-caps</i></a> | <a
  4861       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  4862       href="#unicase"><i>unicase</i></a> | <a
  4863       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  4864       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4865       || <a
  4866       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4867       || <a
  4868       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4869       || <a href="#ordinal"><i>ordinal</i></a> || <a
  4870       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  4871       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4872       || <a
  4873       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4874       || <a href="#ruby"><i>ruby</i></a> ]
  4876     <tr>
  4877      <td>Initial:
  4879      <td>normal
  4881     <tr>
  4882      <td>Applies to:
  4884      <td>all elements
  4886     <tr>
  4887      <td>Inherited:
  4889      <td>yes
  4891     <tr>
  4892      <td>Percentages:
  4894      <td>see individual properties
  4896     <tr>
  4897      <td>Media:
  4899      <td>visual
  4901     <tr>
  4902      <td>Computed value:
  4904      <td>see individual properties
  4906     <tr>
  4907      <td>Animatable:
  4909      <td>see individual properties
  4910   </table>
  4912   <p>The value ‘<a href="#normal2"><code
  4913    class=property>normal</code></a>’ resets all other font feature
  4914    properties to their inital value. The ‘<code
  4915    class=property>none</code>’ value sets ‘<a
  4916    href="#propdef-font-variant-ligatures"><code
  4917    class=property>font-variant-ligatures</code></a>’ to ‘<code
  4918    class=property>none</code>’ and resets all other font feature properties
  4919    to their initial value. Like other shorthands, using ‘<a
  4920    href="#propdef-font-variant"><code
  4921    class=property>font-variant</code></a>’ resets unspecified font-variant
  4922    subproperties to their initial values. It does not reset the values of
  4923    either ‘<a href="#propdef-font-language-override"><code
  4924    class=property>font-language-override</code></a>’ or ‘<a
  4925    href="#propdef-font-feature-settings"><code
  4926    class=property>font-feature-settings</code></a>’.
  4928   <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
  4929    font feature settings control: the <a
  4930    href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
  4932   <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
  4933    <tbody>
  4934     <tr>
  4935      <td>Name:
  4937      <td><dfn id=propdef-font-feature-settings>font-feature-settings</dfn>
  4939     <tr>
  4940      <td>Value:
  4942      <td>normal | <a
  4943       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  4945     <tr>
  4946      <td>Initial:
  4948      <td>normal
  4950     <tr>
  4951      <td>Applies to:
  4953      <td>all elements
  4955     <tr>
  4956      <td>Inherited:
  4958      <td>yes
  4960     <tr>
  4961      <td>Percentages:
  4963      <td>N/A
  4965     <tr>
  4966      <td>Media:
  4968      <td>visual
  4970     <tr>
  4971      <td>Computed value:
  4973      <td>as specified
  4975     <tr>
  4976      <td>Animatable:
  4978      <td>no
  4979   </table>
  4981   <p>This property provides low-level control over OpenType font features. It
  4982    is intended as a way of providing access to font features that are not
  4983    widely used but are needed for a particular use case. A value of ‘<a
  4984    href="#normal2"><code class=property>normal</code></a>’ means that no
  4985    change in glyph selection or positioning occurs due to this property.
  4987   <p>
  4989   <pre>/* enable small caps and use second swash alternate */
  4990 font-feature-settings: "smcp", "swsh" 2;</pre>
  4992   <p>Feature tag values have the following syntax:
  4994   <pre
  4995    class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
  4997   <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
  4998    specified in the OpenType specification, feature tags contain four ASCII
  4999    characters. Tag strings longer or shorter than four characters, or
  5000    containing characters outside the U+20–7E codepoint range are invalid.
  5001    User agents must not use a feature tag created by truncating or padding
  5002    the string to four characters. Feature tags need only match a feature tag
  5003    defined in the font, they are not limited to explicitly registered
  5004    OpenType features. Fonts defining custom feature tags should follow the <a
  5005    href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
  5006    rules</a> defined in the OpenType specification <a
  5007    href="#OPENTYPE-FEATURES"
  5008    rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
  5009    Feature tags not present in the font are ignored; a user agent must not
  5010    attempt to synthesize fallback behavior based on these feature tags.
  5012   <p>This means that explicitly disabling the <span class=tag>kern</span>
  5013    feature will not affect the application of kerning data found in the
  5014    ‘<code class=property>kern</code>’ table (as opposed to kerning data
  5015    associated with the <span class=tag>kern</span> feature in the ‘<code
  5016    class=property>GPOS</code>’ table). Authors should use the ‘<a
  5017    href="#propdef-font-kerning"><code
  5018    class=property>font-kerning</code></a>’ property to explictly enable or
  5019    disable kerning since this property affects both types of kerning.
  5021   <p>If present, a value indicates an index used for glyph selection. An
  5022    &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
  5023    the feature is disabled. For boolean features, a value of 1 enables the
  5024    feature. For non-boolean features, a value of 1 or greater enables the
  5025    feature and indicates the feature selection index. A value of ‘<code
  5026    class=property>on</code>’ is synonymous with 1 and ‘<code
  5027    class=property>off</code>’ is synonymous with 0. If the value is
  5028    omitted, a value of 1 is assumed.
  5030   <pre>
  5031 font-feature-settings: "dlig" 1;       /* dlig=1 enable discretionary ligatures */
  5032 font-feature-settings: "smcp" on;      /* smcp=1 enable small caps */
  5033 font-feature-settings: 'c2sc';         /* c2sc=1 enable caps to small caps */
  5034 font-feature-settings: "liga" off;     /* liga=0 no common ligatures */
  5035 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
  5036 font-feature-settings: "tnum" "hist";  /* invalid, need a comma-delimited list */
  5037 font-feature-settings: "palin" off;    /* good idea but invalid tagname */
  5038 font-feature-settings: "PKRN";         /* PKRN=1 enable custom feature */
  5039 font-feature-settings: dlig;           /* invalid, tag must be a string */
  5040 </pre>
  5042   <p>Authors should generally use ‘<a href="#propdef-font-variant"><code
  5043    class=property>font-variant</code></a>’ and its related subproperties
  5044    whenever possible and only use this property for special cases where its
  5045    use is the only way of accessing a particular infrequently used font
  5046    feature.
  5048   <p>Although specifically defined for OpenType feature tags, feature tags
  5049    for other modern font formats that support font features may be added in
  5050    the future. Where possible, features defined for other font formats should
  5051    attempt to follow the pattern of registered OpenType tags.
  5053   <div class=example>
  5054    <p>The Japanese text below will be rendered with half-width kana
  5055     characters:</p>
  5057    <pre lang=ja>
  5058 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
  5060 &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>
  5061 </pre>
  5062   </div>
  5064   <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
  5065    language override: the <a
  5066    href="#propdef-font-language-override">font-language-override</a> property</h3>
  5068   <table class=propdef id=namefont-language-overridevaluenormal-lt>
  5069    <tbody>
  5070     <tr>
  5071      <td>Name:
  5073      <td><dfn id=propdef-font-language-override>font-language-override</dfn>
  5075     <tr>
  5076      <td>Value:
  5078      <td>normal | &lt;string&gt;
  5080     <tr>
  5081      <td>Initial:
  5083      <td>normal
  5085     <tr>
  5086      <td>Applies to:
  5088      <td>all elements
  5090     <tr>
  5091      <td>Inherited:
  5093      <td>yes
  5095     <tr>
  5096      <td>Percentages:
  5098      <td>N/A
  5100     <tr>
  5101      <td>Media:
  5103      <td>visual
  5105     <tr>
  5106      <td>Computed value:
  5108      <td>as specified
  5110     <tr>
  5111      <td>Animatable:
  5113      <td>no
  5114   </table>
  5116   <p>The value of ‘<a href="#normal2"><code
  5117    class=property>normal</code></a>’ implies that when rendering with
  5118    OpenType fonts the language of the document is used to infer the OpenType
  5119    language system, used to select language specific features when rendering.
  5120    The value of the &lt;string&gt; is a single three-letter OpenType <a
  5121    href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
  5122    system tag</a>, defined in the layout tag registry of the OpenType
  5123    specification.
  5125   <div class=example>
  5126    <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
  5127     Declaration of Human Rights</a> has been translated into a wide variety
  5128     of languages. In Turkish, Article 9 of this document might be marked up
  5129     as below:</p>
  5131    <pre lang=tr>&lt;body lang="tr">
  5133 &lt;h4>Madde 9&lt;/h4>
  5134 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
  5135 </pre>
  5137    <p>Here the user agent uses the value of the ‘<code
  5138     class=property>lang</code>’ attribute when rendering text and
  5139     appropriately renders this text without ‘<code
  5140     class=property>fi</code>’ ligatures. There is no need to use the ‘<a
  5141     href="#propdef-font-language-override"><code
  5142     class=property>font-language-override</code></a>’ property.</p>
  5144    <p>However, a given font may lack support for a specific language. In this
  5145     situation authors may need to use the typographic conventions of a
  5146     related language that are supported by that font:</p>
  5148    <pre lang=mk>&lt;body lang="mk">     &lt;!-- Macedonian lang code --&gt;
  5150 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
  5152 &lt;h4>Члeн 9&lt;/h4>
  5153 &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>
  5155 </pre>
  5157    <p>The Macedonian text here will be rendered using Serbian typographic
  5158     conventions, with the assumption that the font specified supports
  5159     Serbian.</p>
  5160   </div>
  5162   <p><a id=rendering-considerations></a>
  5164   <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
  5165    Resolution</h2>
  5167   <p>As described in the previous section, font features can be enabled in a
  5168    variety of ways, either via the use of ‘<a
  5169    href="#propdef-font-variant"><code
  5170    class=property>font-variant</code></a>’ or ‘<a
  5171    href="#propdef-font-feature-settings"><code
  5172    class=property>font-feature-settings</code></a>’ in a style rule or
  5173    within an <code>@font-face</code> rule. The resolution order for the union
  5174    of these settings is defined below. Features defined via CSS properties
  5175    are applied on top of layout engine default features.
  5177   <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
  5179   <p>For OpenType fonts, user agents must enable the default features defined
  5180    in the OpenType documentation for a given script and writing mode.
  5181    Required ligatures, common ligatures and contextual forms must be enabled
  5182    by default (OpenType features: <span class=tag>rlig, liga, clig,
  5183    calt</span>), along with localized forms (OpenType feature: <span
  5184    class=tag>locl</span>), and features required for proper display of
  5185    composed characters and marks (OpenType features: <span class=tag>ccmp,
  5186    mark, mkmk</span>). These features must always be enabled, even when the
  5187    value of the ‘<a href="#propdef-font-variant"><code
  5188    class=property>font-variant</code></a>’ and ‘<a
  5189    href="#propdef-font-feature-settings"><code
  5190    class=property>font-feature-settings</code></a>’ properties is ‘<a
  5191    href="#normal2"><code class=property>normal</code></a>’. Individual
  5192    features are only disabled when explicitly overridden by the author, as
  5193    when ‘<a href="#propdef-font-variant-ligatures"><code
  5194    class=property>font-variant-ligatures</code></a>’ is set to ‘<a
  5195    href="#no-common-ligatures"><code
  5196    class=property>no-common-ligatures</code></a>’. For handling complex
  5197    scripts such as <a
  5198    href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
  5199    <a
  5200    href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
  5201    or <a
  5202    href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
  5203    additional features are required. For upright text within vertical text
  5204    runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
  5205    must be enabled.
  5207   <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
  5209   <p>General and font specific font feature property settings are resolved in
  5210    the order below, in ascending precedence order. This ordering is used to
  5211    construct a combined list of font features that affect a given text run.
  5213   <ol>
  5214    <li>Font features enabled by default, including features required for a
  5215     given script.
  5217    <li>If the font is defined via an <code>@font-face</code> rule, the font
  5218     features implied by the font-variant descriptor in the
  5219     <code>@font-face</code> rule.
  5221    <li>If the font is defined via an <code>@font-face</code> rule, the font
  5222     features implied by the font-feature-settings descriptor in the
  5223     <code>@font-face</code> rule.
  5225    <li>Feature settings determined by properties other than ‘<a
  5226     href="#propdef-font-variant"><code
  5227     class=property>font-variant</code></a>’ or ‘<a
  5228     href="#propdef-font-feature-settings"><code
  5229     class=property>font-feature-settings</code></a>’. For example, setting
  5230     a non-default value for the ‘<code
  5231     class=property>letter-spacing</code>’ property disables ligatures.
  5233    <li>Font features implied by the value of the ‘<a
  5234     href="#propdef-font-variant"><code
  5235     class=property>font-variant</code></a>’ property, the related
  5236     font-variant subproperties and any other CSS property that may use
  5237     OpenType features (e.g. the ‘<a href="#propdef-font-kerning"><code
  5238     class=property>font-kerning</code></a>’ property).
  5240    <li>Font features implied by the value of ‘<a
  5241     href="#propdef-font-feature-settings"><code
  5242     class=property>font-feature-settings</code></a>’ property.
  5243   </ol>
  5245   <p>This ordering allows authors to set up a general set of defaults for
  5246    fonts within their <code>@font-face</code> rules, then override them with
  5247    property settings for specific elements. General property settings
  5248    override the settings in <code>@font-face</code> rules and low-level font
  5249    feature settings override ‘<a href="#propdef-font-variant"><code
  5250    class=property>font-variant</code></a>’ property settings.
  5252   <p>For situations where the combined list of font feature settings contains
  5253    more than one value for the same feature, the last value is used. When a
  5254    font lacks support for a given underlying font feature, text is simply
  5255    rendered as if that font feature was not enabled; font fallback does not
  5256    occur and no attempt is made to synthesize the feature except where
  5257    explicitly noted for specific properties.
  5259   <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
  5260    precedence examples</h3>
  5262   <div class=example>
  5263    <p>With the styles below, numbers are rendered proportionally when used
  5264     within a paragraph but are shown in tabular form within tables of prices:</p>
  5266    <pre>body { 
  5267   font-variant-numeric: proportional-nums; 
  5270 table.prices td {
  5271   font-variant-numeric: tabular-nums; 
  5273 </pre>
  5274   </div>
  5276   <div class=example>
  5277    <p>When the font-variant descriptor is used within an
  5278     <code>@font-face</code> rule, it only applies to the font defined by that
  5279     rule.</p>
  5281    <pre>@font-face {
  5282   font-family: MainText;
  5283   src: url(http://example.com/font.ttf);
  5284   font-variant: oldstyle-nums proportional-nums styleset(1,3);
  5287 body {
  5288   font-family: MainText, Helvetica;
  5291 table.prices td {
  5292   font-variant-numeric: tabular-nums; 
  5294 </pre>
  5296    <p>In this case, old-style numerals will be used throughout but only where
  5297     the font "MainText" is used. Just as in the previous example, tabular
  5298     values will be used in price tables since ‘<a
  5299     href="#tabular-nums"><code class=property>tabular-nums</code></a>’
  5300     appears in a general style rule and its use is mutually exclusive with
  5301     ‘<a href="#proportional-nums"><code
  5302     class=property>proportional-nums</code></a>’. Stylistic alternate sets
  5303     will only be used where MainText is used.</p>
  5304   </div>
  5306   <div class=example>
  5307    <p>The <code>@font-face</code> rule can also be used to access font
  5308     features in locally available fonts via the use of <code>local()</code>
  5309     in the ‘<a href="#descdef-src"><code class=property>src</code></a>’
  5310     descriptor of the <code>@font-face</code> definition:</p>
  5312    <pre>@font-face {
  5313   font-family: BodyText;
  5314   src: local("HiraMaruPro-W4");
  5315   font-variant: proportional-width;
  5316   font-feature-settings: "ital"; /* Latin italics within CJK text feature */
  5319 body { font-family: BodyText, serif; }
  5320 </pre>
  5322    <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
  5323     text rendering occurs, Japanese kana will be proportionally spaced and
  5324     Latin text will be italicised. Text rendered with the fallback serif font
  5325     will use default rendering properties.</p>
  5326   </div>
  5328   <div class=example>
  5329    <p>In the example below, discretionary ligatures are enabled only for a
  5330     downloadable font but are disabled within spans of class "special":</p>
  5332    <pre>@font-face {
  5333   font-family: main;
  5334   src: url(fonts/ffmeta.woff) format("woff");
  5335   font-variant: discretionary-ligatures;
  5338 body         { font-family: main, Helvetica; }
  5339 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5340 </pre>
  5342    <p>Adding an discretionary style rule with the <code>@font-face</code>
  5343     above:</p>
  5345    <pre>body         { font-family: main, Helvetica; }
  5346 span         { font-feature-settings: "dlig"; }
  5347 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5348 </pre>
  5350    <p>Within spans of class "special", discretionary ligatures <em>will</em>
  5351     be rendered. This is because both the ‘<a
  5352     href="#propdef-font-feature-settings"><code
  5353     class=property>font-feature-settings</code></a>’ and ‘<a
  5354     href="#propdef-font-variant-ligatures"><code
  5355     class=property>font-variant-ligatures</code></a>’ properties apply to
  5356     these spans. Although the ‘<code class=css>no-discretionary
  5357     ligatures</code>’ setting of ‘<a
  5358     href="#propdef-font-variant-ligatures"><code
  5359     class=property>font-variant-ligatures</code></a>’ effectively disables
  5360     the OpenType <span class=tag>dlig</span> feature, because the ‘<a
  5361     href="#propdef-font-feature-settings"><code
  5362     class=property>font-feature-settings</code></a>’ is resolved after
  5363     that, the ‘<code class=property>dlig</code>’ value reenables
  5364     discretionary ligatures.</p>
  5365   </div>
  5367   <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
  5369   <p>The contents of <code>@font-face</code> and
  5370    <code>@font-feature-values</code> rules can be accessed via the following
  5371    extensions to the CSS Object Model.
  5373   <h3 id=om-fontface><span class=secno>8.1 </span>The <a
  5374    href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
  5376   <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
  5377    <code>@font-face</code> rule.
  5379   <pre class=idl>
  5380 interface CSSFontFaceRule : CSSRule {
  5381   attribute DOMString family;
  5382   attribute DOMString src;
  5383   attribute DOMString style;
  5384   attribute DOMString weight;
  5385   attribute DOMString stretch;
  5386   attribute DOMString unicodeRange;
  5387   attribute DOMString variant;
  5388   attribute DOMString featureSettings;
  5389 }</pre>
  5391   <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
  5392    rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
  5393    defined a different variant of this rule. This definition supercedes that
  5394    one.
  5396   <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
  5397    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5398    interface</h3>
  5400   <p>The <code>CSSRule</code> interface is extended as follows:
  5402   <pre class=idl>partial interface CSSRule {
  5403   const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  5404 }</pre>
  5406   <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
  5407    interface represents a <code>@font-feature-values</code> rule.
  5409   <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
  5410   readonly attribute DOMString familyList;
  5411   readonly attribute DOMString valueText;
  5412 };</pre>
  5414   <dl class=idl-attributes>
  5415    <dt><var>familyList</var> of type <code>DOMString</code>, readonly
  5417    <dd>The list of one or more font families for which a given set of feature
  5418     values is defined.
  5420    <dt><var>valueText</var> of type <code>DOMString</code>, readonly
  5422    <dd>Serialized set of feature values.
  5423   </dl>
  5425   <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
  5426    properties to CSS properties</h2>
  5428   <p><em>This appendix is included as background for some of the problems and
  5429    situations that are described in other sections. It should be viewed as
  5430    informative only.</em>
  5432   <p>Font properties in CSS are designed to be independent of the underlying
  5433    font formats used; they can be used to specify bitmap fonts, Type1 fonts,
  5434    SVG fonts in addition to the common TrueType and OpenType fonts. But there
  5435    are facets of the TrueType and OpenType formats that often cause confusion
  5436    for authors and present challenges to implementers on different platforms.
  5438   <p>Originally developed at Apple, TrueType was designed as an outline font
  5439    format for both screen and print. Microsoft joined Apple in developing the
  5440    TrueType format and both platforms have supported TrueType fonts since
  5441    then. Font data in the TrueType format consists of a set of tables
  5442    distinguished with common four-letter tag names, each containing a
  5443    specific type of data. For example, naming information, including
  5444    copyright and license information, is stored in the ‘<code
  5445    class=property>name</code>’ table. The <a
  5446    href="#character-map"><em>character map</em></a> (‘<code
  5447    class=property>cmap</code>’) table contains a mapping of character
  5448    encodings to glyphs. Apple later added additional tables for supporting
  5449    enhanced typographic functionality; these are now called Apple Advanced
  5450    Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
  5451    tables for advanced typography and called their format OpenType <a
  5452    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
  5454   <p>In many cases the font data used under Microsoft Windows or Linux is
  5455    slightly different from the data used under Apple's Mac OS X because the
  5456    TrueType format allowed for explicit variation across platforms. This
  5457    includes font metrics, names and <a href="#character-map"><em>character
  5458    map</em></a> data.
  5460   <p>Specifically, font family name data is handled differently across
  5461    platforms. For TrueType and OpenType fonts these names are contained in
  5462    the ‘<code class=property>name</code>’ table, in name records with
  5463    name ID 1. Mulitple names can be stored for different locales but
  5464    Microsoft recommends fonts always include at least a US English version of
  5465    the name. On Windows, Microsoft made the decision for backwards
  5466    compatibility to limit this family name to a maximum of four faces; for
  5467    larger groupings the "preferred family" (name ID 16) or "WWS family" (name
  5468    ID 21) can be used. Other platforms such as OSX don't have this
  5469    limitation, the family name is used to define all possible groupings.
  5471   <p>Other name table data provides names used to uniquely identify a
  5472    specific face within a family. The full font name (name ID 4) and the
  5473    Postscript name (name ID 6) describe a single face uniquely. The bold face
  5474    of the Gill Sans family has a fullname of "Gill Sans Bold" and a
  5475    Postscript name of "GillSans-Bold". There can be multiple localized
  5476    versions of the fullname for a given face but the Postscript name is
  5477    always a unique name made from a limited set of ASCII characters.
  5479   <p>On various platforms, different names are used to search for a font. For
  5480    example, with the Windows GDI CreateIndirectFont API, either a family or
  5481    fullname can be used to lookup a face while on Mac OS X the
  5482    CTFontCreateWithName API call is used to lookup a given face using the
  5483    fullname and Postscript name. Under Linux, the fontconfig API allows fonts
  5484    to be searched using any of these names. In situations where platform
  5485    API's automatically substitute other font choices, it may be necessary to
  5486    verify a returned font matches a given name.
  5488   <p>The weight of a given face can be determined via the usWeightClass field
  5489    of the OS/2 table or inferred from the style name (name ID 2). Likewise,
  5490    the width can be determined via the usWidthClass of the OS/2 table or
  5491    inferred from the style name. For historical reasons related to synthetic
  5492    bolding at weights 200 or lower with the Windows GDI API, font designers
  5493    have sometimes skewed values in the OS/2 table to avoid these weights.
  5495   <p>Rendering complex scripts that use contextual shaping such as Thai,
  5496    Arabic and Devanagari requires features present only in OpenType or AAT
  5497    fonts. Currently, complex script rendering is supported on Windows and
  5498    Linux using OpenType font features while both OpenType and AAT font
  5499    features are used under Mac OS X.
  5501   <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
  5503   <h3 class=no-num id=recent-changes> Changes from the <a
  5504    href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">February 2013
  5505    CSS3 Fonts Working Draft</a></h3>
  5507   <p>Major changes include:
  5509   <ul>
  5510    <li>Moved font load events into a separate <a
  5511     href="http://dev.w3.org/csswg/css3-font-load-events/">spec</a>
  5513    <li>Tightened error handling rules for <code>@font-feature-values</code>
  5514     rules
  5516    <li>Added grammar productions for <code>@font-face</code> and
  5517     <code>@font-feature-values</code> rules
  5519    <li>Tightened definition of synthetic oblique
  5521    <li>Revised definition of ‘<a href="#descdef-unicode-range"><code
  5522     class=property>unicode-range</code></a>’ descriptor
  5523   </ul>
  5525   <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
  5527   <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
  5528    their help and feedback. John Hudson was kind enough to take the time to
  5529    explain the subtleties of OpenType language tags and provided the example
  5530    of character variant usage for displaying text on Byzantine seals. Ken
  5531    Lunde and Eric Muller provided valuable feedback on CJK OpenType features
  5532    and Unicode variation selectors. The idea for supporting font features by
  5533    using font-variant subproperties originated with Håkon Wium Lie, Adam
  5534    Twardoch and Tal Leming. Elika Etemad supplied some of the initial design
  5535    ideas for the <code>@font-feature-values</code> rule. Thanks also to House
  5536    Industries for allowing the use of Ed Interlock in the discretionary
  5537    ligatures example.
  5539   <p>A special thanks to Robert Bringhurst for the sublime mind expansion
  5540    that is <em>The Elements of Typographic Style</em>.
  5542   <h2 class=no-num id=conformance> Conformance</h2>
  5544   <h3 class=no-num id=conventions> Document Conventions</h3>
  5546   <p>Conformance requirements are expressed with a combination of descriptive
  5547    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  5548    NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  5549    “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  5550    normative parts of this document are to be interpreted as described in RFC
  5551    2119. However, for readability, these words do not appear in all uppercase
  5552    letters in this specification.
  5554   <p>All of the text of this specification is normative except sections
  5555    explicitly marked as non-normative, examples, and notes. <a
  5556    href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  5558   <p>Examples in this specification are introduced with the words “for
  5559    example” or are set apart from the normative text with
  5560    <code>class="example"</code>, like this:
  5562   <div class=example>
  5563    <p>This is an example of an informative example.
  5564   </div>
  5566   <p>Informative notes begin with the word “Note” and are set apart from
  5567    the normative text with <code>class="note"</code>, like this:
  5569   <p class=note>Note, this is an informative note.
  5571   <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
  5573   <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
  5574    classes:
  5576   <dl>
  5577    <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  5578     sheet</dfn>
  5580    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  5581     style sheet</a>.
  5583    <dt><dfn id=renderer>renderer</dfn>
  5585    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5586     that interprets the semantics of a style sheet and renders documents that
  5587     use them.
  5589    <dt><dfn id=authoring-tool>authoring tool</dfn>
  5591    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5592     that writes a style sheet.
  5593   </dl>
  5595   <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
  5596    declarations that use properties defined in this module have values that
  5597    are valid according to the generic CSS grammar and the individual grammars
  5598    of each property as given in this module.
  5600   <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
  5601    interpreting the style sheet as defined by the appropriate specifications,
  5602    it supports all the features defined by CSS Fonts Level 3 Module by
  5603    parsing them correctly and rendering the document accordingly. However,
  5604    the inability of a UA to correctly render a document due to limitations of
  5605    the device does not make the UA non-conformant. (For example, a UA is not
  5606    required to render color on a monochrome monitor.)
  5608   <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
  5609    style sheets that are syntactically correct according to the generic CSS
  5610    grammar and the individual grammars of each feature in this module, and
  5611    meet all other conformance requirements of style sheets as described in
  5612    this module.
  5614   <h3 class=no-num id=partial> Partial Implementations</h3>
  5616   <p>So that authors can exploit the forward-compatible parsing rules to
  5617    assign fallback values, CSS renderers <strong>must</strong> treat as
  5618    invalid (and <a
  5619    href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  5620    appropriate</a>) any at-rules, properties, property values, keywords, and
  5621    other syntactic constructs for which they have no usable level of support.
  5622    In particular, user agents <strong>must not</strong> selectively ignore
  5623    unsupported component values and honor supported values in a single
  5624    multi-value property declaration: if any value is considered invalid (as
  5625    unsupported values must be), CSS requires that the entire declaration be
  5626    ignored.
  5628   <h3 class=no-num id=experimental> Experimental Implementations</h3>
  5630   <p>To avoid clashes with future CSS features, the CSS2.1 specification
  5631    reserves a <a
  5632    href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  5633    syntax</a> for proprietary and experimental extensions to CSS.
  5635   <p>Prior to a specification reaching the Candidate Recommendation stage in
  5636    the W3C process, all implementations of a CSS feature are considered
  5637    experimental. The CSS Working Group recommends that implementations use a
  5638    vendor-prefixed syntax for such features, including those in W3C Working
  5639    Drafts. This avoids incompatibilities with future changes in the draft.
  5641   <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
  5643   <p>Once a specification reaches the Candidate Recommendation stage,
  5644    non-experimental implementations are possible, and implementors should
  5645    release an unprefixed implementation of any CR-level feature they can
  5646    demonstrate to be correctly implemented according to spec.
  5648   <p>To establish and maintain the interoperability of CSS across
  5649    implementations, the CSS Working Group requests that non-experimental CSS
  5650    renderers submit an implementation report (and, if necessary, the
  5651    testcases used for that implementation report) to the W3C before releasing
  5652    an unprefixed implementation of any CSS features. Testcases submitted to
  5653    W3C are subject to review and correction by the CSS Working Group.
  5655   <p>Further information on submitting testcases and implementation reports
  5656    can be found from on the CSS Working Group's website at <a
  5657    href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  5658    Questions should be directed to the <a
  5659    href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  5660    mailing list.
  5662   <h2 class=no-num id=references>References</h2>
  5664   <h3 class=no-num id=normative-references>Normative References</h3>
  5665   <!--begin-normative-->
  5666   <!-- Sorted by label -->
  5668   <dl class=bibliography>
  5669    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  5670     <!---->
  5672    <dt id=CHARMOD>[CHARMOD]
  5674    <dd>Martin J. Dürst; et al. <a
  5675     href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
  5676     Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
  5677     2005. W3C Recommendation. URL: <a
  5678     href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
  5679     </dd>
  5680    <!---->
  5682    <dt id=CORS>[CORS]
  5684    <dd>Anne van Kesteren. <a
  5685     href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
  5686     Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
  5687     Recommendation. (Work in progress.) URL: <a
  5688     href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
  5689     </dd>
  5690    <!---->
  5692    <dt id=CSS21>[CSS21]
  5694    <dd>Bert Bos; et al. <a
  5695     href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  5696     Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  5697     2011. W3C Recommendation. URL: <a
  5698     href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  5699     </dd>
  5700    <!---->
  5702    <dt id=CSS3VAL>[CSS3VAL]
  5704    <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  5705     href="http://www.w3.org/TR/2012/CR-css3-values-20120828/"><cite>CSS
  5706     Values and Units Module Level 3.</cite></a> 28 August 2012. W3C Candidate
  5707     Recommendation. (Work in progress.) URL: <a
  5708     href="http://www.w3.org/TR/2012/CR-css3-values-20120828/">http://www.w3.org/TR/2012/CR-css3-values-20120828/</a>
  5709     </dd>
  5710    <!---->
  5712    <dt id=HTML5>[HTML5]
  5714    <dd>Ian Hickson. <a
  5715     href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
  5716     17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
  5717     <a
  5718     href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
  5719     </dd>
  5720    <!---->
  5722    <dt id=OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
  5724    <dd><a
  5725     href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip"><cite>Information
  5726     technology — Coding of audio-visual objects — Part 22: Open Font
  5727     Format.</cite></a> International Organization for Standardization.
  5728     ISO/IEC 14496-22:2009. URL: <a
  5729     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>
  5730     </dd>
  5731    <!---->
  5733    <dt id=OPENTYPE>[OPENTYPE]
  5735    <dd><a
  5736     href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
  5737     specification.</cite></a> Microsoft. URL: <a
  5738     href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
  5739     </dd>
  5740    <!---->
  5742    <dt id=OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
  5744    <dd><a
  5745     href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
  5746     feature registry.</cite></a> Microsoft. URL: <a
  5747     href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
  5748     </dd>
  5749    <!---->
  5751    <dt id=RFC2119>[RFC2119]
  5753    <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  5754     words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  5755     RFC 2119. URL: <a
  5756     href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  5757     </dd>
  5758    <!---->
  5760    <dt id=UAX15>[UAX15]
  5762    <dd>Mark Davis; Ken Whistler. <a
  5763     href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
  5764     Forms.</cite></a> 31 August 2012. Unicode Standard Annex #15. URL: <a
  5765     href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
  5766     </dd>
  5767    <!---->
  5769    <dt id=UAX29>[UAX29]
  5771    <dd>Mark Davis. <a
  5772     href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
  5773     Segmentation.</cite></a> 12 September 2012. Unicode Standard Annex #29.
  5774     URL: <a
  5775     href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
  5776     </dd>
  5777    <!---->
  5779    <dt id=UNICODE6>[UNICODE6]
  5781    <dd>The Unicode Consortium. <a
  5782     href="http://www.unicode.org/versions/Unicode6.2.0/"><cite>The Unicode
  5783     Standard, Version 6.2.0.</cite></a> Defined by: The Unicode Standard,
  5784     Version 6.2.0 URL: <a
  5785     href="http://www.unicode.org/versions/Unicode6.2.0/">http://www.unicode.org/versions/Unicode6.2.0/</a>
  5786     </dd>
  5787    <!---->
  5788   </dl>
  5789   <!--end-normative-->
  5790   <!--{{!CSS21}}-->
  5791   <!--{{!CSS3VAL}}-->
  5792   <!--{{!OPENTYPE}}-->
  5793   <!--{{!OPENTYPE-FEATURES}}-->
  5794   <!--{{!OPEN-FONT-FORMAT}}-->
  5795   <!--{{!UNICODE6}}-->
  5796   <!--{{!UAX15}}-->
  5797   <!--{{!UAX29}}-->
  5798   <!--{{!CORS}}-->
  5799   <!--{{!HTML5}}-->
  5800   <!--{{!CHARMOD}}-->
  5802   <h3 class=no-num id=other-references>Other References</h3>
  5803   <!--begin-informative-->
  5804   <!-- Sorted by label -->
  5806   <dl class=bibliography>
  5807    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  5808     <!---->
  5810    <dt id=AAT-FEATURES>[AAT-FEATURES]
  5812    <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
  5813     Advanced Typography font feature registry.</cite></a> Apple. URL: <a
  5814     href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
  5815     </dd>
  5816    <!---->
  5818    <dt id=ARABIC-TYPO>[ARABIC-TYPO]
  5820    <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
  5821     Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
  5822    <!---->
  5824    <dt id=CHARMOD-NORM>[CHARMOD-NORM]
  5826    <dd>François Yergeau; et al. <a
  5827     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
  5828     Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
  5829     W3C Working Draft. (Work in progress.) URL: <a
  5830     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
  5831     </dd>
  5832    <!---->
  5834    <dt id=CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
  5836    <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
  5837     O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
  5838    <!---->
  5840    <dt id=CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
  5842    <dd>L. David Baron. <a
  5843     href="http://www.w3.org/TR/2012/WD-css3-conditional-20121213/"><cite>CSS
  5844     Conditional Rules Module Level 3.</cite></a> 13 December 2012. W3C
  5845     Working Draft. (Work in progress.) URL: <a
  5846     href="http://www.w3.org/TR/2012/WD-css3-conditional-20121213/">http://www.w3.org/TR/2012/WD-css3-conditional-20121213/</a>
  5847     </dd>
  5848    <!---->
  5850    <dt id=CSS3TEXT>[CSS3TEXT]
  5852    <dd>Elika J. Etemad; Koji Ishii. <a
  5853     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
  5854     Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
  5855     progress.) URL: <a
  5856     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
  5857     </dd>
  5858    <!---->
  5860    <dt id=DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
  5862    <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
  5863     and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
  5864     ISBN 0-201-17633-5.</dd>
  5865    <!---->
  5867    <dt id=DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
  5869    <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
  5870     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
  5871     Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
  5872     2000. W3C Recommendation. URL: <a
  5873     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>
  5874     </dd>
  5875    <!---->
  5877    <dt id=ELEMTYPO>[ELEMTYPO]
  5879    <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
  5880     4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
  5881    <!---->
  5883    <dt id=LANGCULTTYPE>[LANGCULTTYPE]
  5885    <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
  5886     ISBN 1-932026-01-0.</dd>
  5887    <!---->
  5889    <dt id=OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
  5891    <dd><a
  5892     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
  5893     User Guide.</cite></a> FontShop International. URL: <a
  5894     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
  5895     </dd>
  5896    <!---->
  5898    <dt id=RASTER-TRAGEDY>[RASTER-TRAGEDY]
  5900    <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
  5901     Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
  5902     href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
  5903    <!---->
  5905    <dt id=WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
  5907    <dd>John Hudson. <a
  5908     href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
  5909     Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
  5910     href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
  5911     </dd>
  5912    <!---->
  5913   </dl>
  5914   <!--end-informative-->
  5915   <!--{{ARABIC-TYPO}}-->
  5916   <!--{{CJKV-INFO-PROCESSING}}-->
  5917   <!--{{DIGITAL-TYPOGRAPHY}}-->
  5918   <!--{{DOM-LEVEL-2-STYLE}}-->
  5919   <!--{{ELEMTYPO}}-->
  5920   <!--{{LANGCULTTYPE}}-->
  5921   <!--{{OPENTYPE-FONT-GUIDE}}-->
  5922   <!--{{RASTER-TRAGEDY}}-->
  5923   <!--{{WINDOWS-GLYPH-PROC}}-->
  5924   <!--{{CHARMOD-NORM}}-->
  5925   <!--{{AAT-FEATURES}}-->
  5926   <!--{{CSS3-CONDITIONAL}}-->
  5927   <!--{{CSS3TEXT}}-->
  5929   <h2 class=no-num id=index>Index</h2>
  5930   <!--begin-index-->
  5932   <ul class=indexlist>
  5933    <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
  5934     title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
  5936    <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
  5937     title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
  5939    <li><var>&lt;contextual-alt-values&gt;</var>, <a
  5940     href="#contextual-alt-values"
  5941     title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
  5943    <li><var>&lt;discretionary-lig-values&gt;</var>, <a
  5944     href="#discretionary-lig-values"
  5945     title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
  5947    <li><var>&lt;east-asian-variant-values&gt;</var>, <a
  5948     href="#east-asian-variant-values"
  5949     title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
  5951    <li><var>&lt;east-asian-width-values&gt;</var>, <a
  5952     href="#east-asian-width-values"
  5953     title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
  5955    <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
  5956     title="&lt;family-name&gt;"><strong>3.1</strong></a>
  5958    <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
  5959     title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
  5961    <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
  5962     title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
  5964    <li><var>&lt;font-variant-css21&gt;</var>, <a
  5965     href="#font-variant-css21-values"
  5966     title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
  5968    <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
  5969     title="&lt;generic-family&gt;"><strong>3.1</strong></a>
  5971    <li><var>&lt;historical-lig-values&gt;</var>, <a
  5972     href="#historical-lig-values"
  5973     title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
  5975    <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
  5976     title="&lt;length&gt;"><strong>3.5</strong></a>
  5978    <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
  5979     title="&lt;number&gt;"><strong>3.6</strong></a>
  5981    <li><var>&lt;numeric-figure-values&gt;</var>, <a
  5982     href="#numeric-figure-values"
  5983     title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
  5985    <li><var>&lt;numeric-fraction-values&gt;</var>, <a
  5986     href="#numeric-fraction-values"
  5987     title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
  5989    <li><var>&lt;numeric-spacing-values&gt;</var>, <a
  5990     href="#numeric-spacing-values"
  5991     title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
  5993    <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
  5994     title="&lt;percentage&gt;"><strong>3.5</strong></a>
  5996    <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
  5997     title="&lt;relative-size&gt;"><strong>3.5</strong></a>
  5999    <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
  6000     title="&lt;urange&gt;"><strong>4.5</strong></a>
  6002    <li>@font-face, <a href="#font-face" title="@font-face">4.1</a>, <a
  6003     href="#font-face0" title="@font-face">4.3</a>
  6005    <li>all-petite-caps, <a href="#all-petite-caps"
  6006     title=all-petite-caps><strong>6.6</strong></a>
  6008    <li>all-small-caps, <a href="#all-small-caps"
  6009     title=all-small-caps><strong>6.6</strong></a>
  6011    <li>annotation, <a href="#annotation"
  6012     title=annotation><strong>6.8</strong></a>
  6014    <li>aspect value, <a href="#aspect-value0" title="aspect
  6015     value"><strong>3.6</strong></a>
  6017    <li>authoring tool, <a href="#authoring-tool" title="authoring
  6018     tool"><strong>#</strong></a>
  6020    <li>character map, <a href="#character-map" title="character
  6021     map"><strong>5.2</strong></a>
  6023    <li>character-variant, <a href="#character-variant"
  6024     title=character-variant><strong>6.8</strong></a>
  6026    <li>common-ligatures, <a href="#common-ligatures"
  6027     title=common-ligatures><strong>6.4</strong></a>
  6029    <li>contextual, <a href="#contextual"
  6030     title=contextual><strong>6.4</strong></a>
  6032    <li>CSSFontFaceRule, <a href="#cssfontfacerule"
  6033     title=CSSFontFaceRule><strong>8.1</strong></a>
  6035    <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
  6036     title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
  6038    <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
  6039     of"><strong>#</strong></a>
  6041    <li>default face, <a href="#default-face" title="default
  6042     face"><strong>5.2</strong></a>
  6044    <li>descriptor_declaration, <a href="#descriptordeclaration"
  6045     title="descriptor_declaration"><strong>4.1</strong></a>
  6047    <li>diagonal-fractions, <a href="#diagonal-fractions"
  6048     title=diagonal-fractions><strong>6.7</strong></a>
  6050    <li>discretionary-ligatures, <a href="#discretionary-ligatures"
  6051     title=discretionary-ligatures><strong>6.4</strong></a>
  6053    <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
  6054     of"><strong>#</strong></a>
  6056    <li>feature_type, <a href="#featuretype"
  6057     title="feature_type"><strong>6.9</strong></a>
  6059    <li>feature_value_block, <a href="#featurevalueblock"
  6060     title="feature_value_block"><strong>6.9</strong></a>
  6062    <li>feature_value_definition, <a href="#featurevaluedefinition"
  6063     title="feature_value_definition"><strong>6.9</strong></a>
  6065    <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
  6067    <li>font-family, <a href="#descdef-font-family"
  6068     title=font-family><strong>4.2</strong></a>, <a
  6069     href="#propdef-font-family" title=font-family><strong>3.1</strong></a>
  6071    <li>font-feature-settings, <a href="#propdef-font-feature-settings"
  6072     title=font-feature-settings><strong>6.12</strong></a>
  6074    <li>font-feature-settings (descriptor), <a
  6075     href="#descdef-font-feature-settings" title="font-feature-settings
  6076     (descriptor)"><strong>4.7</strong></a>
  6078    <li>font-kerning, <a href="#propdef-font-kerning"
  6079     title=font-kerning><strong>6.3</strong></a>
  6081    <li>font-language-override, <a href="#propdef-font-language-override"
  6082     title=font-language-override><strong>6.13</strong></a>
  6084    <li>font-size, <a href="#propdef-font-size"
  6085     title=font-size><strong>3.5</strong></a>
  6087    <li>font-size-adjust, <a href="#propdef-font-size-adjust"
  6088     title=font-size-adjust><strong>3.6</strong></a>
  6090    <li>font-stretch, <a href="#propdef-font-stretch"
  6091     title=font-stretch><strong>3.3</strong></a>
  6093    <li>font-stretch (descriptor), <a href="#descdef-font-stretch"
  6094     title="font-stretch (descriptor)"><strong>4.4</strong></a>
  6096    <li>font-style, <a href="#propdef-font-style"
  6097     title=font-style><strong>3.4</strong></a>
  6099    <li>font-style (descriptor), <a href="#descdef-font-style"
  6100     title="font-style (descriptor)"><strong>4.4</strong></a>
  6102    <li>font-synthesis, <a href="#propdef-font-synthesis"
  6103     title=font-synthesis><strong>3.8</strong></a>
  6105    <li>font-variant, <a href="#propdef-font-variant"
  6106     title=font-variant><strong>6.11</strong></a>
  6108    <li>font-variant (descriptor), <a href="#descdef-font-variant"
  6109     title="font-variant (descriptor)"><strong>4.7</strong></a>
  6111    <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
  6112     title=font-variant-alternates><strong>6.8</strong></a>
  6114    <li>font-variant-caps, <a href="#propdef-font-variant-caps"
  6115     title=font-variant-caps><strong>6.6</strong></a>
  6117    <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
  6118     title=font-variant-east-asian><strong>6.10</strong></a>
  6120    <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
  6121     title=font-variant-ligatures><strong>6.4</strong></a>
  6123    <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
  6124     title=font-variant-numeric><strong>6.7</strong></a>
  6126    <li>font-variant-position, <a href="#propdef-font-variant-position"
  6127     title=font-variant-position><strong>6.5</strong></a>
  6129    <li>font-weight, <a href="#propdef-font-weight"
  6130     title=font-weight><strong>3.2</strong></a>
  6132    <li>font-weight (descriptor), <a href="#descdef-font-weight"
  6133     title="font-weight (descriptor)"><strong>4.4</strong></a>
  6135    <li>font_face_rule, <a href="#fontfacerule"
  6136     title="font_face_rule"><strong>4.1</strong></a>
  6138    <li>FONT_FACE_SYM, <a href="#fontfacesym"
  6139     title="FONT_FACE_SYM"><strong>4.1</strong></a>
  6141    <li>font_family_name, <a href="#fontfamilyname"
  6142     title="font_family_name"><strong>6.9</strong></a>
  6144    <li>font_family_name_list, <a href="#fontfamilynamelist"
  6145     title="font_family_name_list"><strong>6.9</strong></a>
  6147    <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
  6148     title="font_feature_values_rule"><strong>6.9</strong></a>
  6150    <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
  6151     title="FONT_FEATURE_VALUES_SYM"><strong>6.9</strong></a>
  6153    <li>full-width, <a href="#full-width"
  6154     title=full-width><strong>6.10</strong></a>
  6156    <li>historical-forms, <a href="#historical-forms"
  6157     title=historical-forms><strong>6.8</strong></a>
  6159    <li>historical-ligatures, <a href="#historical-ligatures"
  6160     title=historical-ligatures><strong>6.4</strong></a>
  6162    <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
  6164    <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
  6166    <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
  6168    <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
  6170    <li>lining-nums, <a href="#lining-nums"
  6171     title=lining-nums><strong>6.7</strong></a>
  6173    <li>monospace, definition of, <a href="#monospace0" title="monospace,
  6174     definition of"><strong>#</strong></a>
  6176    <li>no-common-ligatures, <a href="#no-common-ligatures"
  6177     title=no-common-ligatures><strong>6.4</strong></a>
  6179    <li>no-contextual, <a href="#no-contextual"
  6180     title=no-contextual><strong>6.4</strong></a>
  6182    <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
  6183     title=no-discretionary-ligatures><strong>6.4</strong></a>
  6185    <li>no-historical-ligatures, <a href="#no-historical-ligatures"
  6186     title=no-historical-ligatures><strong>6.4</strong></a>
  6188    <li>normal, <a href="#normal" title=normal><strong>6.6</strong></a>, <a
  6189     href="#normal0" title=normal><strong>6.7</strong></a>, <a href="#normal1"
  6190     title=normal><strong>6.8</strong></a>, <a href="#normal2"
  6191     title=normal><strong>6.10</strong></a>
  6193    <li>oldstyle-nums, <a href="#oldstyle-nums"
  6194     title=oldstyle-nums><strong>6.7</strong></a>
  6196    <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
  6198    <li>ornaments, <a href="#ornaments"
  6199     title=ornaments><strong>6.8</strong></a>
  6201    <li>petite-caps, <a href="#petite-caps"
  6202     title=petite-caps><strong>6.6</strong></a>
  6204    <li>proportional-nums, <a href="#proportional-nums"
  6205     title=proportional-nums><strong>6.7</strong></a>
  6207    <li>proportional-width, <a href="#proportional-width"
  6208     title=proportional-width><strong>6.10</strong></a>
  6210    <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
  6212    <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
  6214    <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
  6215     definition of"><strong>#</strong></a>
  6217    <li>serif, definition of, <a href="#serif0" title="serif, definition
  6218     of"><strong>#</strong></a>
  6220    <li>simplified, <a href="#simplified"
  6221     title=simplified><strong>6.10</strong></a>
  6223    <li>slashed-zero, <a href="#slashed-zero"
  6224     title=slashed-zero><strong>6.7</strong></a>
  6226    <li>small-caps, <a href="#small-caps"
  6227     title=small-caps><strong>6.6</strong></a>
  6229    <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
  6231    <li>stacked-fractions, <a href="#stacked-fractions"
  6232     title=stacked-fractions><strong>6.7</strong></a>
  6234    <li>style sheet
  6235     <ul>
  6236      <li>as conformance class, <a href="#style-sheet" title="style sheet, as
  6237       conformance class"><strong>#</strong></a>
  6238     </ul>
  6240    <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
  6242    <li>stylistic, <a href="#stylistic"
  6243     title=stylistic><strong>6.8</strong></a>
  6245    <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
  6247    <li>tabular-nums, <a href="#tabular-nums"
  6248     title=tabular-nums><strong>6.7</strong></a>
  6250    <li>titling-caps, <a href="#titling-caps"
  6251     title=titling-caps><strong>6.6</strong></a>
  6253    <li>traditional, <a href="#traditional"
  6254     title=traditional><strong>6.10</strong></a>
  6256    <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
  6258    <li>unicode-range, <a href="#descdef-unicode-range"
  6259     title=unicode-range><strong>4.5</strong></a>
  6261    <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
  6263    <li>width, <a href="#width" title=width><strong>2</strong></a>
  6264   </ul>
  6265   <!--end-index-->
  6267   <h2 class=no-num id=property-index>Property index</h2>
  6268   <!--begin-properties-->
  6270   <table class=proptable>
  6271    <thead>
  6272     <tr>
  6273      <th>Property
  6275      <th>Values
  6277      <th>Initial
  6279      <th>Applies to
  6281      <th>Inh.
  6283      <th>Percentages
  6285      <th>Media
  6287    <tbody>
  6288     <tr>
  6289      <th><a class=property href="#propdef-font">font</a>
  6291      <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
  6292       &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
  6293       &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
  6294       &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
  6295       small-caption | status-bar
  6297      <td>see individual properties
  6299      <td>all elements
  6301      <td>yes
  6303      <td>see individual properties
  6305      <td>visual
  6307     <tr>
  6308      <th><a class=property href="#descdef-font-family">font-family</a>
  6310      <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
  6312      <td>depends on user agent
  6314      <td>all elements
  6316      <td>yes
  6318      <td>N/A
  6320      <td>visual
  6322     <tr>
  6323      <th><a class=property
  6324       href="#propdef-font-feature-settings">font-feature-settings</a>
  6326      <td>normal | &lt;feature-tag-value&gt; #
  6328      <td>normal
  6330      <td>all elements
  6332      <td>yes
  6334      <td>N/A
  6336      <td>visual
  6338     <tr>
  6339      <th><a class=property href="#propdef-font-kerning">font-kerning</a>
  6341      <td>auto | normal | none
  6343      <td>auto
  6345      <td>all elements
  6347      <td>yes
  6349      <td>N/A
  6351      <td>visual
  6353     <tr>
  6354      <th><a class=property
  6355       href="#propdef-font-language-override">font-language-override</a>
  6357      <td>normal | &lt;string&gt;
  6359      <td>normal
  6361      <td>all elements
  6363      <td>yes
  6365      <td>N/A
  6367      <td>visual
  6369     <tr>
  6370      <th><a class=property href="#propdef-font-size">font-size</a>
  6372      <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
  6373       &lt;percentage&gt;
  6375      <td>medium
  6377      <td>all elements
  6379      <td>yes
  6381      <td>refer to parent element's font size
  6383      <td>visual
  6385     <tr>
  6386      <th><a class=property
  6387       href="#propdef-font-size-adjust">font-size-adjust</a>
  6389      <td>none | auto | &lt;number&gt;
  6391      <td>none
  6393      <td>all elements
  6395      <td>yes
  6397      <td>N/A
  6399      <td>visual
  6401     <tr>
  6402      <th><a class=property href="#propdef-font-stretch">font-stretch</a>
  6404      <td>normal | ultra-condensed | extra-condensed | condensed |
  6405       semi-condensed | semi-expanded | expanded | extra-expanded |
  6406       ultra-expanded
  6408      <td>normal
  6410      <td>all elements
  6412      <td>yes
  6414      <td>N/A
  6416      <td>visual
  6418     <tr>
  6419      <th><a class=property href="#propdef-font-style">font-style</a>
  6421      <td>normal | italic | oblique
  6423      <td>normal
  6425      <td>all elements
  6427      <td>yes
  6429      <td>N/A
  6431      <td>visual
  6433     <tr>
  6434      <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
  6436      <td>none | [ weight || style ]
  6438      <td>weight style
  6440      <td>all elements
  6442      <td>yes
  6444      <td>N/A
  6446      <td>visual
  6448     <tr>
  6449      <th><a class=property href="#propdef-font-variant">font-variant</a>
  6451      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6452       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6453       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  6454       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  6455       character-variant(&lt;feature-value-name&gt; #) ||
  6456       swash(&lt;feature-value-name&gt;) ||
  6457       ornaments(&lt;feature-value-name&gt;) ||
  6458       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  6459       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  6460       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  6461       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  6462       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  6463       ruby ]
  6465      <td>normal
  6467      <td>all elements
  6469      <td>yes
  6471      <td>see individual properties
  6473      <td>visual
  6475     <tr>
  6476      <th><a class=property
  6477       href="#propdef-font-variant-alternates">font-variant-alternates</a>
  6479      <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
  6480       || styleset(&lt;feature-value-name&gt; #) ||
  6481       character-variant(&lt;feature-value-name&gt; #) ||
  6482       swash(&lt;feature-value-name&gt;) ||
  6483       ornaments(&lt;feature-value-name&gt;) ||
  6484       annotation(&lt;feature-value-name&gt;) ]
  6486      <td>normal
  6488      <td>all elements
  6490      <td>yes
  6492      <td>N/A
  6494      <td>visual
  6496     <tr>
  6497      <th><a class=property
  6498       href="#propdef-font-variant-caps">font-variant-caps</a>
  6500      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  6501       | unicase | titling-caps
  6503      <td>normal
  6505      <td>all elements
  6507      <td>yes
  6509      <td>N/A
  6511      <td>visual
  6513     <tr>
  6514      <th><a class=property
  6515       href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  6517      <td>normal | [ &lt;east-asian-variant-values&gt; ||
  6518       &lt;east-asian-width-values&gt; || ruby ]
  6520      <td>normal
  6522      <td>all elements
  6524      <td>yes
  6526      <td>N/A
  6528      <td>visual
  6530     <tr>
  6531      <th><a class=property
  6532       href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  6534      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6535       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6536       &lt;contextual-alt-values&gt; ]
  6538      <td>normal
  6540      <td>all elements
  6542      <td>yes
  6544      <td>N/A
  6546      <td>visual
  6548     <tr>
  6549      <th><a class=property
  6550       href="#propdef-font-variant-numeric">font-variant-numeric</a>
  6552      <td>normal | [ &lt;numeric-figure-values&gt; ||
  6553       &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
  6554       ordinal || slashed-zero ]
  6556      <td>normal
  6558      <td>all elements
  6560      <td>yes
  6562      <td>N/A
  6564      <td>visual
  6566     <tr>
  6567      <th><a class=property
  6568       href="#propdef-font-variant-position">font-variant-position</a>
  6570      <td>normal | sub | super
  6572      <td>normal
  6574      <td>all elements
  6576      <td>yes
  6578      <td>N/A
  6580      <td>visual
  6582     <tr>
  6583      <th><a class=property href="#propdef-font-weight">font-weight</a>
  6585      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
  6586       | 700 | 800 | 900
  6588      <td>normal
  6590      <td>all elements
  6592      <td>yes
  6594      <td>N/A
  6596      <td>visual
  6597   </table>
  6598   <!--end-properties-->
  6599   <!--begin-descriptors-->
  6601   <table class=proptable>
  6602    <thead>
  6603     <tr>
  6604      <th>Descriptor
  6606      <th>Value
  6608      <th>Initial
  6610      <th>Percentages
  6612      <th>Media
  6614    <tbody>
  6615     <tr>
  6616      <th><a class=property href="#descdef-font-family">font-family</a>
  6618      <td>&lt;family-name&gt;
  6620      <td>N/A
  6622     <tr>
  6623      <th><a class=property
  6624       href="#propdef-font-feature-settings">font-feature-settings</a>
  6626      <td>normal | &lt;feature-tag-value&gt; #
  6628      <td>normal
  6630     <tr>
  6631      <th><a class=property href="#propdef-font-stretch">font-stretch</a>
  6633      <td>normal | ultra-condensed | extra-condensed | condensed |
  6634       semi-condensed | semi-expanded | expanded | extra-expanded |
  6635       ultra-expanded
  6637      <td>normal
  6639     <tr>
  6640      <th><a class=property href="#propdef-font-style">font-style</a>
  6642      <td>normal | italic | oblique
  6644      <td>normal
  6646     <tr>
  6647      <th><a class=property href="#propdef-font-variant">font-variant</a>
  6649      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6650       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6651       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  6652       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  6653       character-variant(&lt;feature-value-name&gt; #) ||
  6654       swash(&lt;feature-value-name&gt;) ||
  6655       ornaments(&lt;feature-value-name&gt;) ||
  6656       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  6657       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  6658       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  6659       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  6660       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  6661       ruby ]
  6663      <td>normal
  6665     <tr>
  6666      <th><a class=property href="#propdef-font-weight">font-weight</a>
  6668      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  6670      <td>normal
  6672     <tr>
  6673      <th><a class=property href="#descdef-src">src</a>
  6675      <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
  6677      <td>N/A
  6679     <tr>
  6680      <th><a class=property href="#descdef-unicode-range">unicode-range</a>
  6682      <td>&lt;urange&gt; #
  6684      <td>U+0-10FFFF
  6685   </table>
  6686   <!--end-descriptors-->
  6687   <script type="text/javascript">
  6688 window.onload = function () {
  6689   if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
  6690   var i, hiresElements = document.getElementsByClassName("hires");
  6691   for (i = 0; i < hiresElements.length; i++) {
  6692     var h = hiresElements[i];
  6693     if (h.tagName != "IMG") continue;
  6694     var src = h.getAttribute("src");
  6695     var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
  6696     h.src = src2x;
  6699 </script>
  6700 </html>
  6701 <!-- Keep this comment at the end of the file
  6702 Local variables:
  6703 mode: sgml
  6704 sgml-declaration:"~/SGML/HTML4.decl"
  6705 sgml-default-doctype-name:"html"
  6706 sgml-minimize-attributes:t
  6707 sgml-nofill-elements:("pre" "style" "br")
  6708 sgml-live-element-indicator:t
  6709 sgml-omittag:nil
  6710 sgml-shorttag:nil
  6711 sgml-namecase-general:t
  6712 sgml-general-insert-case:lower
  6713 sgml-always-quote-attributes:t
  6714 sgml-indent-step:nil
  6715 sgml-indent-data:t
  6716 sgml-parent-document:nil
  6717 sgml-exposed-tags:nil
  6718 sgml-local-catalogs:nil
  6719 sgml-local-ecat-files:nil
  6720 End:
  6721 -->
  6722 <!-- 
  6724 to do:
  6726 - wording of OpenType family name handling
  6727 - handling combining sequences in the font matching algorithm
  6728 - fix-up fi ligature example
  6730 -->

mercurial