css-fonts/Fonts.html

Fri, 31 May 2013 15:40:35 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Fri, 31 May 2013 15:40:35 +0900
changeset 8313
f7084873c602
parent 8312
4fb97110e8dc
child 8356
46cef6470f58
permissions
-rw-r--r--

[css-fonts] font feature properties copyedits

     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-31-may-2013>Editor's Draft 31
   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-20130531/">http://www.w3.org/TR/2013/ED-css3-fonts-20130531/</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
   604       title="font-family!!property">font-family</dfn>
   606     <tr>
   607      <td>Value:
   609      <td>[ <a href="#family-name-value"><var>&lt;family-name&gt;</var></a> |
   610       <a href="#generic-family-value"><var>&lt;generic-family&gt;</var></a> ]
   611       #
   613     <tr>
   614      <td>Initial:
   616      <td>depends on user agent
   618     <tr>
   619      <td>Applies to:
   621      <td>all elements
   623     <tr>
   624      <td>Inherited:
   626      <td>yes
   628     <tr>
   629      <td>Percentages:
   631      <td>N/A
   633     <tr>
   634      <td>Media:
   636      <td>visual
   638     <tr>
   639      <td>Computed value:
   641      <td>as specified
   643     <tr>
   644      <td>Animatable:
   646      <td>no
   647   </table>
   649   <p>This property specifies a prioritized list of font family names or
   650    generic family names. A font family defines a set of faces that vary in
   651    weight, width or slope. CSS uses the combination of a family name with
   652    other style attributes to select an individual face. Using this selection
   653    mechanism, rather than selecting a face via the style name as is often
   654    done in design applications, allows some degree of regularity in textual
   655    display when fallback occurs.
   657   <p class=note>Designers should note that the CSS definition of font
   658    attributes used for selection are explicitly not intended to define a font
   659    taxonomy. A type designer's idea of a family may often extend to a set of
   660    faces that vary along axes other than just the standard axes of weight,
   661    width and slope. A family may extend to include both a set of serif faces
   662    and a set of sans-serif faces or vary along axes that are unique to that
   663    family. The CSS font selection mechanism merely provides a way to
   664    determine the “closest” substitute when substitution is necessary.
   666   <p>Unlike other CSS properties, component values are a comma-separated list
   667    indicating alternatives. A user agent iterates through the list of family
   668    names until it matches an available font that contains a glyph for the
   669    character to be rendered. This allows for differences in available fonts
   670    across platforms and for differences in the range of characters supported
   671    by individual fonts.
   673   <p>A font family name only specifies a name given to a set of font faces,
   674    it does not specify an individual face. For example, given the
   675    availability of the fonts below, Futura would match but Futura Medium
   676    would not:
   678   <div class=figure><img alt="family and face names"
   679    src=familyvsfacename.png>
   680    <p class=caption>Family and individual face names
   681   </div>
   683   <p>Consider the example below:
   685   <div class=example>
   686    <pre>body {
   687     font-family: Helvetica, Verdana, sans-serif;
   688 }</pre>
   690    <p>If Helvetica is available it will be used when rendering. If neither
   691     Helvetica nor Verdana is present, then the user-agent-defined sans serif
   692     font will be used.</p>
   693   </div>
   695   <p>There are two types of font family names:
   697   <dl>
   698    <dt><dfn id=family-name-value><var>&lt;family-name&gt;</var></dfn>
   700    <dd>The name of a font family of choice such as Helvetica or Verdana in
   701     the previous example.
   703    <dt><dfn id=generic-family-value><var>&lt;generic-family&gt;</var></dfn>
   705    <dd> The following generic family keywords are defined: ‘<a
   706     href="#serif"><code class=property>serif</code></a>’, ‘<a
   707     href="#sans-serif"><code class=property>sans-serif</code></a>’, ‘<a
   708     href="#cursive"><code class=property>cursive</code></a>’, ‘<a
   709     href="#fantasy"><code class=property>fantasy</code></a>’, and ‘<a
   710     href="#monospace"><code class=property>monospace</code></a>’. These
   711     keywords can be used as a general fallback mechanism when an author's
   712     desired font choices are not available. As keywords, they must not be
   713     quoted. Authors are encouraged to append a generic font family as a last
   714     alternative for improved robustness.
   715   </dl>
   717   <p>Font family names other than generic families must either be given
   718    quoted as <a
   719    href="//www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or unquoted
   720    as a sequence of one or more <a
   721    href="//www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
   722    This means most punctuation characters and digits at the start of each
   723    token must be escaped in unquoted font family names.
   725   <p>To illustrate this, the following declarations are invalid:
   727   <pre>
   728 font-family: Red/Black, sans-serif;
   729 font-family: "Lucida" Grande, sans-serif;
   730 font-family: Ahem!, sans-serif;
   731 font-family: test@foo, sans-serif;
   732 font-family: #POUND, sans-serif;
   733 font-family: Hawaii 5-0, sans-serif;
   734 </pre>
   736   <p>If a sequence of identifiers is given as a font family name, the
   737    computed value is the name converted to a string by joining all the
   738    identifiers in the sequence by single spaces.
   740   <p>To avoid mistakes in escaping, it is recommended to quote font family
   741    names that contain white space, digits, or punctuation characters other
   742    than hyphens:
   744   <pre>
   745 body { font-family: "New Century Schoolbook", serif }
   747 &lt;BODY STYLE="font-family: '21st Century', fantasy">
   748 </pre>
   750   <p>Font family <em>names</em> that happen to be the same as a keyword value
   751    (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
   752    class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
   753    class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
   754    class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
   755    class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
   756    class=property>cursive</code></a>’) must be quoted to prevent confusion
   757    with the keywords with the same names. The keywords ‘<code
   758    class=property>initial</code>’ and ‘<code
   759    class=property>default</code>’ are reserved for future use and must also
   760    be quoted when used as font names. UAs must not consider these keywords as
   761    matching the <a
   762    href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
   764   <p>The precise way a set of fonts are grouped into font families varies
   765    depending upon the platform font management API's. The Windows GDI API
   766    only allows four faces to be grouped into a family while the DirectWrite
   767    API and API's on OSX and other platforms support font families with a
   768    variety of weights, widths and slopes (see <a
   769    href="#platform-props-to-css">Appendix A</a> for more details).
   771   <p>Some font formats allow fonts to carry multiple localizations of the
   772    family name. User agents must recognize and correctly match all of these
   773    names independent of the underlying platform localization, system API used
   774    or document encoding:
   776   <div class=figure><img alt="examples of localized family names"
   777    src=localizedfamilynames.png>
   778    <p class=caption>Localized family names
   779   </div>
   781   <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
   782    families</h4>
   784   <p>All five generic font families are defined to exist in all CSS
   785    implementations (they need not necessarily map to five distinct actual
   786    fonts). User agents should provide reasonable default choices for the
   787    generic font families, which express the characteristics of each family as
   788    well as possible within the limits allowed by the underlying technology.
   789    User agents are encouraged to allow users to select alternative choices
   790    for the generic fonts.
   792   <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
   793    definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
   795   <p>Serif fonts represent the formal text style for a script. This often
   796    means but is not limited to glyphs that have finishing strokes, flared or
   797    tapering ends, or have actual serifed endings (including slab serifs).
   798    Serif fonts are typically proportionately-spaced. They often display a
   799    greater variation between thick and thin strokes than fonts from the ‘<a
   800    href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
   801    font family. CSS uses the term ‘<a href="#serif"><code
   802    class=property>serif</code></a>’ to apply to a font for any script,
   803    although other names may be more familiar for particular scripts, such as
   804    Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
   805    Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
   806    class=property>serif</code></a>’ more due to its typographic role rather
   807    than its actual design style. Any font that is so described may be used to
   808    represent the generic ‘<a href="#serif"><code
   809    class=property>serif</code></a>’ family.
   811   <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
   812    <p class=caption>Sample serif fonts
   813   </div>
   815   <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
   816    title="sans-serif, definition of"> <a name=sans-serif-def><dfn
   817    id=sans-serif>sans-serif</dfn></a></span></h5>
   819   <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
   820    low contrast (vertical and horizontal stems have the close to the same
   821    thickness) and have stroke endings that are plain -- without any flaring,
   822    cross stroke, or other ornamentation. Sans-serif fonts are typically
   823    proportionately-spaced. They often have little variation between thick and
   824    thin strokes, compared to fonts from the ‘<a href="#serif"><code
   825    class=property>serif</code></a>’ family. CSS uses the term ‘<a
   826    href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
   827    to a font for any script, although other names may be more familiar for
   828    particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
   829    (Korean). Any font that is so described may be used to represent the
   830    generic ‘<a href="#sans-serif"><code
   831    class=property>sans-serif</code></a>’ family.
   833   <div class=figure><img alt="sample sans-serif fonts"
   834    src=sansserifexamples.png>
   835    <p class=caption>Sample sans-serif fonts
   836   </div>
   838   <h5 class="no-num no-toc"> <span class=index-def id=cursive0
   839    title="cursive, definition of"> <a name=cursive-def><dfn
   840    id=cursive>cursive</dfn></a></span></h5>
   842   <p>Glyphs in cursive fonts generally use a more informal script style, and
   843    the result looks more like handwritten pen or brush writing than printed
   844    letterwork. CSS uses the term ‘<a href="#cursive"><code
   845    class=property>cursive</code></a>’ to apply to a font for any script,
   846    although other names such as Chancery, Brush, Swing and Script are also
   847    used in font names.
   849   <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
   850    <p class=caption>Sample cursive fonts
   851   </div>
   853   <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
   854    title="fantasy, definition of"> <a name=fantasy-def><dfn
   855    id=fantasy>fantasy</dfn></a></span></h5>
   857   <p>Fantasy fonts are primarily decorative or expressive fonts that contain
   858    playful representations of characters. These do not include Pi or Picture
   859    fonts which do not represent actual characters.
   861   <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
   862    <p class=caption>Sample fantasy fonts
   863   </div>
   865   <h5 class="no-num no-toc"> <span class=index-def id=monospace0
   866    title="monospace, definition of"> <a name=monospace-def><dfn
   867    id=monospace>monospace</dfn></a></span></h5>
   869   <p>The sole criterion of a monospace font is that all glyphs have the same
   870    fixed width. This is often used to render samples of computer code.
   872   <div class=figure><img alt="sample monospace fonts"
   873    src=monospaceexamples.png>
   874    <p class=caption>Sample monospace fonts
   875   </div>
   876   <!-- prop: font-weight -->
   878   <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
   879    href="#propdef-font-weight">font-weight</a> property</h3>
   881   <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
   882    <tbody>
   883     <tr>
   884      <td>Name:
   886      <td><dfn id=propdef-font-weight
   887       title="font-weight!!property">font-weight</dfn>
   889     <tr>
   890      <td>Value:
   892      <td><a href="#font-weight-normal-value"
   893       title="normal!!font-weight">normal</a> | <a href="#bold">bold</a> | <a
   894       href="#bolder">bolder</a> | <a href="#lighter">lighter</a> | <a
   895       href="#font-weight-numeric-values" title="100...900 weight
   896       values">100</a> | <a href="#font-weight-numeric-values"
   897       title="100...900 weight values">200</a> | <a
   898       href="#font-weight-numeric-values" title="100...900 weight
   899       values">300</a> | <a href="#font-weight-numeric-values"
   900       title="100...900 weight values">400</a> | <a
   901       href="#font-weight-numeric-values" title="100...900 weight
   902       values">500</a> | <a href="#font-weight-numeric-values"
   903       title="100...900 weight values">600</a> | <a
   904       href="#font-weight-numeric-values" title="100...900 weight
   905       values">700</a> | <a href="#font-weight-numeric-values"
   906       title="100...900 weight values">800</a> | <a
   907       href="#font-weight-numeric-values" title="100...900 weight
   908       values">900</a>
   910     <tr>
   911      <td>Initial:
   913      <td>normal
   915     <tr>
   916      <td>Applies to:
   918      <td>all elements
   920     <tr>
   921      <td>Inherited:
   923      <td>yes
   925     <tr>
   926      <td>Percentages:
   928      <td>N/A
   930     <tr>
   931      <td>Media:
   933      <td>visual
   935     <tr>
   936      <td>Computed value:
   938      <td>numeric weight value (see description)
   940     <tr>
   941      <td>Animatable:
   943      <td>as <a
   944       href="http://dev.w3.org/csswg/css3-transitions/#animtype-font-weight">font
   945       weight</a>
   946   </table>
   948   <p>The <a href="#propdef-font-weight"
   949    title="font-weight!!property">‘<code
   950    class=property>font-weight</code>’</a> property specifies the weight of
   951    glyphs in the font, their degree of blackness or stroke thickness.
   953   <p>Values have the following meanings:
   955   <dl>
   956    <dt><dfn id=font-weight-numeric-values title="100...900 weight values">100
   957     to 900</dfn>
   959    <dd>These values form an ordered sequence, where each number indicates a
   960     weight that is at least as dark as its predecessor. These roughly
   961     correspond to the commonly used weight names below:
   962   </dl>
   964   <ul>
   965    <li>100 - Thin
   967    <li>200 - Extra Light (Ultra Light)
   969    <li>300 - Light
   971    <li>400 - Normal
   973    <li>500 - Medium
   975    <li>600 - Semi Bold (Demi Bold)
   977    <li>700 - Bold
   979    <li>800 - Extra Bold (Ultra Bold)
   981    <li>900 - Black (Heavy)
   982   </ul>
   984   <dl>
   985    <dt><dfn id=font-weight-normal-value
   986     title="normal!!font-weight">normal</dfn>
   988    <dd>Same as ‘<code class=css>400</code>’.
   990    <dt><dfn id=bold>bold</dfn>
   992    <dd>Same as ‘<code class=css>700</code>’.
   994    <dt><dfn id=bolder>bolder</dfn>
   996    <dd>Specifies a bolder weight than the inherited value.
   998    <dt><dfn id=lighter>lighter</dfn>
  1000    <dd>Specifies a lighter weight than the inherited value.
  1001   </dl>
  1003   <p>Font formats that use a scale other than a nine-step scale should map
  1004    their scale onto the CSS scale so that 400 roughly corresponds with a face
  1005    that would be labeled as Regular, Book, Roman and 700 roughly matches a
  1006    face that would be labeled as Bold. Or weights may be inferred from the
  1007    style names, ones that correspond roughly with the scale above. The scale
  1008    is relative, so a face with a larger weight value must never appear
  1009    lighter. If style names are used to infer weights, care should be taken to
  1010    handle variations in style names across locales.
  1012   <p>Quite often there are only a few weights available for a particular font
  1013    family. When a weight is specified for which no face exists, a face with a
  1014    nearby weight is used. In general, bold weights map to faces with heavier
  1015    weights and light weights map to faces with lighter weights (see the <a
  1016    href="#font-matching-algorithm">font matching section below</a> for a
  1017    precise definition). The examples here illustrate which face is used for
  1018    different weights, grey indicates a face for that weight does not exist so
  1019    a face with a nearby weight is used:
  1021   <div class=figure><img alt="weight mappings for a family with 400, 700 and
  1022    900 weights" src=optimaweights.png>
  1023    <p class=caption>Weight mappings for a font family with 400, 700 and 900
  1024     weight faces
  1025   </div>
  1027   <div class=figure><img alt="weight mappings for a family with 300, 600
  1028    weights" src=hiraginoweights.png>
  1029    <p class=caption>Weight mappings for a font family with 300 and 600 weight
  1030     faces
  1031   </div>
  1033   <p>Although the practice is not well-loved by typographers, bold faces are
  1034    often synthesized by user agents for faces that lack actual bold faces.
  1035    For the purposes of style matching, these faces must be treated as if they
  1036    exist within the family. Authors can explicitly avoid this behavior by
  1037    using the ‘<a href="#propdef-font-synthesis"><code
  1038    class=property>font-synthesis</code></a>’ property.
  1040   <p>Specified values of ‘<a href="#bolder"><code
  1041    class=property>bolder</code></a>’ and ‘<a href="#lighter"><code
  1042    class=property>lighter</code></a>’ indicate weights relative to the
  1043    weight of the parent element. The computed weight is calculated based on
  1044    the inherited <a href="#propdef-font-weight"
  1045    title="font-weight!!property">‘<code
  1046    class=property>font-weight</code>’</a> value using the chart below.
  1048   <table class=data id=bolderlighter summary="Bolder/lighter mappings">
  1049    <thead>
  1050     <tr>
  1051      <th>Inherited value
  1053      <th>bolder
  1055      <th>lighter
  1057    <tbody>
  1058     <tr>
  1059      <th>100
  1061      <td>400
  1063      <td>100
  1065     <tr>
  1066      <th>200
  1068      <td>400
  1070      <td>100
  1072     <tr>
  1073      <th>300
  1075      <td>400
  1077      <td>100
  1079     <tr>
  1080      <th>400
  1082      <td>700
  1084      <td>100
  1086     <tr>
  1087      <th>500
  1089      <td>700
  1091      <td>100
  1093     <tr>
  1094      <th>600
  1096      <td>900
  1098      <td>400
  1100     <tr>
  1101      <th>700
  1103      <td>900
  1105      <td>400
  1107     <tr>
  1108      <th>800
  1110      <td>900
  1112      <td>700
  1114     <tr>
  1115      <th>900
  1117      <td>900
  1119      <td>700
  1120   </table>
  1122   <p>The table above is equivalent to selecting the next relative bolder or
  1123    lighter face, given a font family containing normal and bold faces along
  1124    with a thin and a heavy face. Authors who desire finer control over the
  1125    exact weight values used for a given element may use numerical values
  1126    instead of relative weights.</p>
  1127   <!-- prop: font-stretch -->
  1129   <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
  1130    href="#propdef-font-stretch">font-stretch</a> property</h3>
  1132   <table class=propdef id=namefont-stretchvalue-normal-ultra-conde>
  1133    <tbody>
  1134     <tr>
  1135      <td>Name:
  1137      <td><dfn id=propdef-font-stretch
  1138       title="font-stretch!!property">font-stretch</dfn>
  1140     <tr>
  1141      <td>Value:
  1143      <td> <a href="#font-stretch-normal-value"
  1144       title="normal!!font-stretch">normal</a> | <a
  1145       href="#ultra-condensed">ultra-condensed</a> | <a
  1146       href="#extra-condensed">extra-condensed</a> | <a
  1147       href="#condensed">condensed</a> | <a
  1148       href="#semi-condensed-">semi-condensed</a> | <a
  1149       href="#semi-expanded">semi-expanded</a> | <a
  1150       href="#expanded">expanded</a> | <a
  1151       href="#extra-expanded">extra-expanded</a> | <a
  1152       href="#ultra-expanded">ultra-expanded</a>
  1154     <tr>
  1155      <td>Initial:
  1157      <td>normal
  1159     <tr>
  1160      <td>Applies to:
  1162      <td>all elements
  1164     <tr>
  1165      <td>Inherited:
  1167      <td>yes
  1169     <tr>
  1170      <td>Percentages:
  1172      <td>N/A
  1174     <tr>
  1175      <td>Media:
  1177      <td>visual
  1179     <tr>
  1180      <td>Computed value:
  1182      <td>as specified
  1184     <tr>
  1185      <td>Animatable:
  1187      <td>as <a href="#font-stretch-animation">font stretch</a>
  1188   </table>
  1190   <p>The <a href="#propdef-font-stretch"
  1191    title="font-stretch!!property">‘<code
  1192    class=property>font-stretch</code>’</a> property selects a normal,
  1193    condensed, or expanded face from a font family. Absolute keyword values
  1194    have the following ordering, from narrowest to widest:
  1196   <ul>
  1197    <li><dfn id=ultra-condensed>ultra-condensed</dfn>
  1199    <li><dfn id=extra-condensed>extra-condensed</dfn>
  1201    <li><dfn id=condensed>condensed</dfn>
  1203    <li><dfn id=semi-condensed->semi-condensed </dfn>
  1205    <li><dfn id=font-stretch-normal-value
  1206     title="normal!!font-stretch">normal</dfn>
  1208    <li><dfn id=semi-expanded>semi-expanded</dfn>
  1210    <li><dfn id=expanded>expanded</dfn>
  1212    <li><dfn id=extra-expanded>extra-expanded</dfn>
  1214    <li><dfn id=ultra-expanded>ultra-expanded</dfn>
  1215   </ul>
  1217   <p>When a face does not exist for a given width, normal or condensed values
  1218    map to a narrower face, otherwise a wider face. Conversely, expanded
  1219    values map to a wider face, otherwise a narrower face. The figure below
  1220    shows how the nine font-stretch property settings affect font selection
  1221    for font family containing a variety of widths, grey indicates a width for
  1222    which no face exists and a different width is substituted:
  1224   <div class=figure><img alt="width mappings for a family with condensed,
  1225    normal and expanded faces" src=universwidths.png>
  1226    <p class=caption>Width mappings for a font family with condensed, normal
  1227     and expanded width faces
  1228   </div>
  1230   <p id=font-stretch-animation>Animation of font stretch: Font stretch is
  1231    interpolated in discrete steps. The interpolation happens as though the
  1232    ordered values are equally spaced real numbers. The interpolation result
  1233    is rounded to the nearest value, with values exactly halfway between two
  1234    values rounded towards the later value in the list above.</p>
  1235   <!-- prop: font-style -->
  1237   <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
  1238    href="#propdef-font-style">font-style</a> property</h3>
  1240   <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
  1241    <tbody>
  1242     <tr>
  1243      <td>Name:
  1245      <td><dfn id=propdef-font-style
  1246       title="font-style!!property">font-style</dfn>
  1248     <tr>
  1249      <td>Value:
  1251      <td><a href="#font-style-normal-value"
  1252       title="normal!!font-style">normal</a> | <a href="#italic">italic</a> |
  1253       <a href="#oblique">oblique</a>
  1255     <tr>
  1256      <td>Initial:
  1258      <td>normal
  1260     <tr>
  1261      <td>Applies to:
  1263      <td>all elements
  1265     <tr>
  1266      <td>Inherited:
  1268      <td>yes
  1270     <tr>
  1271      <td>Percentages:
  1273      <td>N/A
  1275     <tr>
  1276      <td>Media:
  1278      <td>visual
  1280     <tr>
  1281      <td>Computed value:
  1283      <td>as specified
  1285     <tr>
  1286      <td>Animatable:
  1288      <td>no
  1289   </table>
  1291   <p>The <a href="#propdef-font-style" title="font-style!!property">‘<code
  1292    class=property>font-style</code>’</a> property allows italic or oblique
  1293    faces to be selected. Italic forms are generally cursive in nature while
  1294    oblique faces are typically sloped versions of the regular face. Oblique
  1295    faces can be simulated by artificially sloping the glyphs of the regular
  1296    face. Compare the artificially sloped renderings of Palatino ‘<code
  1297    class=property>a</code>’ and Baskerville ‘<code
  1298    class=property>N</code>’ in grey with the actual italic versions:
  1300   <div class=figure><img alt="artificial sloping vs. real italics"
  1301    src=realvsfakeitalics.png>
  1302    <p class=caption>Artificial sloping versus real italics
  1303   </div>
  1305   <p>Values have the following meanings:
  1307   <dl>
  1308    <dt><dfn id=font-style-normal-value
  1309     title="normal!!font-style">normal</dfn>
  1311    <dd>selects a face that is classified as a normal face, one that is
  1312     neither italic or obliqued
  1314    <dt><dfn id=italic>italic</dfn>
  1316    <dd>selects a font that is labeled as an italic face, or an oblique face
  1317     if one is not
  1319    <dt><dfn id=oblique>oblique</dfn>
  1321    <dd>selects a font that is labeled as an oblique face, or an italic face
  1322     if one is not
  1323   </dl>
  1325   <p>If no italic or oblique face is available, oblique faces can be
  1326    synthesized by rendering non-obliqued faces with a right sloping
  1327    transformation applied. When synthesizing these faces, the transformation
  1328    should apply to all glyphs in the same way and not vary based on codepoint
  1329    or due to horizontal or vertical line orientation.
  1331   <p class=issue>It has been <a
  1332    href="http://lists.w3.org/Archives/Public/www-style/2013May/0272.html">proposed</a>
  1333    that for vertical text runs, synthetic italics should not mimic normal
  1334    italic glyphs but instead mimic the customs of Japanese obliquing
  1335    (斜体、shatai), where the obliquing is applied across the text run
  1336    regardless of glyph orientation.
  1338   <p>Many scripts lack the tradition of mixing a cursive form within text
  1339    rendered with a normal face. Chinese, Japanese and Korean fonts almost
  1340    always lack italic or oblique faces. Fonts that support a mixture of
  1341    scripts will sometimes omit specific scripts such as Arabic from the set
  1342    of glyphs supported in the italic face. User agents should be careful
  1343    about making <a href="#character-map"><em>character map</em></a>
  1344    assumptions across faces.</p>
  1345   <!-- prop: font-size -->
  1347   <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
  1348    href="#propdef-font-size">font-size</a> property</h3>
  1350   <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
  1351    <tbody>
  1352     <tr>
  1353      <td>Name:
  1355      <td><dfn id=propdef-font-size>font-size</dfn>
  1357     <tr>
  1358      <td>Value:
  1360      <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
  1361       | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
  1362       <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
  1363       href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
  1365     <tr>
  1366      <td>Initial:
  1368      <td>medium
  1370     <tr>
  1371      <td>Applies to:
  1373      <td>all elements
  1375     <tr>
  1376      <td>Inherited:
  1378      <td>yes
  1380     <tr>
  1381      <td>Percentages:
  1383      <td>refer to parent element's font size
  1385     <tr>
  1386      <td>Media:
  1388      <td>visual
  1390     <tr>
  1391      <td>Computed value:
  1393      <td>absolute length
  1395     <tr>
  1396      <td>Animatable:
  1398      <td>as <a
  1399       href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
  1400   </table>
  1402   <p>This property indicates the desired height of glyphs from the font. For
  1403    scalable fonts, the font-size is a scale factor applied to the EM unit of
  1404    the font. (Note that certain glyphs may bleed outside their EM box.) For
  1405    non-scalable fonts, the font-size is converted into absolute units and
  1406    matched against the declared font-size of the font, using the same
  1407    absolute coordinate space for both of the matched values. Values have the
  1408    following meanings:
  1410   <dl>
  1411    <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
  1413    <dd> An <a
  1414     href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
  1415     refers to an entry in a table of font sizes computed and kept by the user
  1416     agent. Possible values are:
  1417     <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
  1419    <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
  1421    <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
  1422     keyword is interpreted relative to the table of font sizes and the
  1423     computed ‘<a href="#propdef-font-size"><code
  1424     class=property>font-size</code></a>’ of the parent element. Possible
  1425     values are:
  1426     <p> [ larger | smaller ]
  1428     <p> For example, if the parent element has a font size of ‘<code
  1429      class=property>medium</code>’, a value of ‘<code
  1430      class=property>larger</code>’ will make the font size of the current
  1431      element be ‘<code class=property>large</code>’. If the parent
  1432      element's size is not close to a table entry, the user agent is free to
  1433      interpolate between table entries or round off to the closest one. The
  1434      user agent may have to extrapolate table values if the numerical value
  1435      goes beyond the keywords.
  1437    <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
  1439    <dd>A length value specifies an absolute font size (independent of the
  1440     user agent's font table). Negative lengths are illegal.
  1442    <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
  1444    <dd>A percentage value specifies an absolute font size relative to the
  1445     parent element's font size. Use of percentage values, or values in
  1446     ‘<code class=property>em</code>’s, leads to more robust and
  1447     cascadable style sheets.
  1448   </dl>
  1450   <p>The following table provides user agent guidelines for the absolute-size
  1451    scaling factor and their mapping to HTML heading and absolute font-sizes.
  1452    The ‘<code class=property>medium</code>’ value is used as the
  1453    reference middle value. The user agent may fine-tune these values for
  1454    different fonts or different types of display devices.
  1456   <table class=data>
  1457    <thead>
  1458     <tr>
  1459      <th>CSS absolute-size values
  1461      <th>xx-small
  1463      <th>x-small
  1465      <th>small
  1467      <th>medium
  1469      <th>large
  1471      <th>x-large
  1473      <th>xx-large
  1475      <th> 
  1477    <tbody>
  1478     <tr>
  1479      <th>scaling factor
  1481      <td>3/5
  1483      <td>3/4
  1485      <td>8/9
  1487      <td>1
  1489      <td>6/5
  1491      <td>3/2
  1493      <td>2/1
  1495      <td>3/1
  1497     <tr>
  1498      <th>HTML headings
  1500      <td>h6
  1502      <td> 
  1504      <td>h5
  1506      <td>h4
  1508      <td>h3
  1510      <td>h2
  1512      <td>h1
  1514      <td> 
  1516     <tr>
  1517      <th>HTML font sizes
  1519      <td>1
  1521      <td> 
  1523      <td>2
  1525      <td>3
  1527      <td>4
  1529      <td>5
  1531      <td>6
  1533      <td>7
  1534   </table>
  1536   <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
  1537    applying these guidelines should nevertheless avoid creating font-size
  1538    resulting in less than 9 device pixels per EM unit on a computer
  1539    display.</em>
  1541   <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
  1542    factor between adjacent indexes was 1.5 which user experience proved to be
  1543    too large. In CSS2, the suggested scaling factor for computer screen
  1544    between adjacent indexes was 1.2 which still created issues for the small
  1545    sizes. The new scaling factor varies between each index to provide a
  1546    better readability.</em>
  1548   <p>The actual value of this property may differ from the computed value due
  1549    a numerical value on ‘<a href="#propdef-font-size-adjust"><code
  1550    class=property>font-size-adjust</code></a>’ and the unavailability of
  1551    certain font sizes.
  1553   <p>Child elements inherit the computed <a class=noxref
  1554    href="#font-size-prop"> <span class=property>‘<code
  1555    class=property>font-size</code>’</span></a> value (otherwise, the effect
  1556    of <a class=noxref href="#font-size-adjust-prop"><span
  1557    class=property>‘<code
  1558    class=property>font-size-adjust</code>’</span></a> would compound).
  1560   <div class=example>
  1561    <p style="display:none">Example(s):
  1563    <p>
  1565    <pre>p { font-size: 12pt; }
  1566 blockquote { font-size: larger }
  1567 em { font-size: 150% }
  1568 em { font-size: 1.5em }
  1569 </pre>
  1570   </div>
  1571   <!-- prop: font-size-adjust -->
  1573   <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
  1574    the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
  1576   <table class=propdef id=namefont-size-adjustvaluenone-auto-ltnum>
  1577    <tbody>
  1578     <tr>
  1579      <td>Name:
  1581      <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
  1583     <tr>
  1584      <td>Value:
  1586      <td><a href="#font-size-adjust-none-value"
  1587       title="none!!font-size-adjust">none</a> | <a
  1588       href="#font-size-adjust-auto-value"
  1589       title="auto!!font-size-adjust">auto</a> | <a
  1590       href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
  1592     <tr>
  1593      <td>Initial:
  1595      <td>none
  1597     <tr>
  1598      <td>Applies to:
  1600      <td>all elements
  1602     <tr>
  1603      <td>Inherited:
  1605      <td>yes
  1607     <tr>
  1608      <td>Percentages:
  1610      <td>N/A
  1612     <tr>
  1613      <td>Media:
  1615      <td>visual
  1617     <tr>
  1618      <td>Computed value:
  1620      <td>as specified
  1622     <tr>
  1623      <td>Animatable:
  1625      <td>as <a
  1626       href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a>
  1627   </table>
  1629   <p>For any given font size, the apparent size and legibility of text varies
  1630    across fonts. For scripts such as Latin or Cyrillic that distinguish
  1631    between upper and lowercase letters, the relative height of lowercase
  1632    letters compared to their uppercase counterparts is a determining factor
  1633    of legibility. This is commonly referred to as the <a class=index-def
  1634    href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
  1635    id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
  1636    the x-height of a font divided by the font size.
  1638   <p>In situations where font fallback occurs, fallback fonts may not share
  1639    the same aspect ratio as the desired font family and will thus appear less
  1640    readable. The font-size-adjust property is a way to preserve the
  1641    readability of text when font fallback occurs. It does this by adjusting
  1642    the font-size so that the x-height is the same regardless of the font
  1643    used.
  1645   <div class=example>
  1646    <p>The style defined below defines Verdana as the desired font family, but
  1647     if Verdana is not available Futura or Times will be used.</p>
  1649    <pre>p {
  1650     font-family: Verdana, Futura, Times;
  1653 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
  1654 </pre>
  1656    <p>Verdana has a relatively high aspect ratio, lowercase letters are
  1657     relatively tall compared to uppercase letters, so at small sizes text
  1658     appears legible. Times has a lower aspect ratio and so if fallback
  1659     occurs, the text will be less legible at small sizes than Verdana.</p>
  1660   </div>
  1662   <p>How text rendered in each of these fonts compares is shown below, the
  1663    columns show text rendered in Verdana, Futura and Times. The same
  1664    font-size value is used across cells within each row and red lines are
  1665    included to show the differences in x-height. In the upper half each row
  1666    is rendered in the same font-size value. The same is true for the lower
  1667    half but in this half the font-size-adjust property is also set so that
  1668    the actual font size is adjusted to preserve the x-height across each row.
  1669    Note how small text remains relatively legible across each row in the
  1670    lower half.
  1672   <div class=figure><img alt="text with and without font-size-adjust"
  1673    src=fontsizeadjust.png>
  1674    <p class=caption>Text with and without the use of font-size-adjust
  1675   </div>
  1677   <p>This property allows authors to specify an aspect value for an element
  1678    that will effectively preserve the x-height of the first choice font,
  1679    whether it is substituted or not. Values have the following meanings:
  1681   <dl>
  1682    <dt><dfn id=font-size-adjust-none-value
  1683     title="none!!font-size-adjust">none</dfn>
  1685    <dd>Do not preserve the font's x-height.
  1687    <dt><dfn id=font-size-adjust-auto-value
  1688     title="auto!!font-size-adjust">auto</dfn>
  1690    <dd>Behaves just like &lt;number>, except the number used is the aspect
  1691     value calculated by user agents for the first font in the list of fonts
  1692     defined for the initial value of the <a href="#propdef-font-family"
  1693     title="font-family!!property">‘<code
  1694     class=property>font-family</code>’</a> property. Effectively this is
  1695     the default font used when <a href="#propdef-font-family"
  1696     title="font-family!!property">‘<code
  1697     class=property>font-family</code>’</a> is not otherwise specified.
  1698     <p>Authors can use this value to specify that font size should be
  1699      normalized across fonts based on the x-height without the need to
  1700      specify the aspect ratio explicitly.</p>
  1702    <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
  1704    <dd>Specifies the aspect value used in the calculation below to calculate
  1705     the adjusted font size:
  1706     <pre>c  =  ( a / a' ) s
  1707 </pre>
  1709     <p>where:</p>
  1711     <pre>s  =  font-size value
  1712 a  =  aspect value as specified by the font-size-adjust property
  1713 a' =  aspect value of actual font
  1714 c  =  adjusted font-size to use
  1715 </pre>
  1717     <p>This value applies to any font that is selected but in typical usage
  1718      it should be based on the aspect value of the first font in the
  1719      font-family list. If this is specified accurately, the <tt>(a/a')</tt>
  1720      term in the formula above is effectively 1 for the first font and no
  1721      adjustment occurs. If the value is specified inaccurately, text rendered
  1722      using the first font in the family list will display differently in
  1723      older user agents that don't support font-size-adjust.</p>
  1724   </dl>
  1726   <p>Authors can calculate the aspect value for a given font by comparing
  1727    spans with the same content but different font-size-adjust properties. If
  1728    the same font-size is used, the spans will match when the font-size-adjust
  1729    value is accurate for the given font.
  1731   <div class=example>
  1732    <p>Two spans with borders are used to determine the aspect value of a
  1733     font. The font-size is the same for both spans but the font-size-adjust
  1734     property is specified only for the right span. Starting with a value of
  1735     0.5, the aspect value can be adjusted until the borders around the two
  1736     letters line up.</p>
  1738    <pre>p {
  1739     font-family: Futura;
  1740     font-size: 500px;
  1743 span {
  1744     border: solid 1px red;
  1747 .adjust {
  1748     font-size-adjust: 0.5;
  1751 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
  1752 </pre>
  1754    <div class=figure><img alt="Futura with an aspect value of 0.5"
  1755     src=beforefontsizeadjust.png>
  1756     <p class=caption>Futura with an aspect value of 0.5
  1757    </div>
  1759    <p>The box on the right is a bit bigger than the one on the left, so the
  1760     aspect value of this font is something less than 0.5. Adjust the value
  1761     until the boxes align.</p>
  1762   </div>
  1763   <!-- prop: font -->
  1765   <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
  1766    <a href="#propdef-font">font</a> property</h3>
  1768   <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
  1769    <tbody>
  1770     <tr>
  1771      <td>Name:
  1773      <td><dfn id=propdef-font>font</dfn>
  1775     <tr>
  1776      <td>Value:
  1778      <td>[ [ <var>&lt;<a href="#propdef-font-style"
  1779       title="font-style!!property">‘<code
  1780       class=property>font-style</code>’</a>&gt;</var> || <a
  1781       href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
  1782       || <var>&lt;<a href="#propdef-font-weight"
  1783       title="font-weight!!property">‘<code
  1784       class=property>font-weight</code>’</a>&gt;</var> || <var>&lt;<a
  1785       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  1786       class=property>font-stretch</code>’</a></var> ]? <var>&lt;‘<a
  1787       href="#propdef-font-size"><code
  1788       class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
  1789       class=property>line-height</code>’&gt;</var> ]? <var>&lt;<a
  1790       href="#propdef-font-family" title="font-family!!property">‘<code
  1791       class=property>font-family</code>’</a>&gt;</var> ] | caption | icon |
  1792       menu | message-box | small-caption | status-bar
  1794     <tr>
  1795      <td>Initial:
  1797      <td>see individual properties
  1799     <tr>
  1800      <td>Applies to:
  1802      <td>all elements
  1804     <tr>
  1805      <td>Inherited:
  1807      <td>yes
  1809     <tr>
  1810      <td>Percentages:
  1812      <td>see individual properties
  1814     <tr>
  1815      <td>Media:
  1817      <td>visual
  1819     <tr>
  1820      <td>Computed value:
  1822      <td>see individual properties
  1824     <tr>
  1825      <td>Animatable:
  1827      <td>see individual properties
  1828   </table>
  1830   <p>The <span class=property>‘<a href="#propdef-font"><code
  1831    class=property>font</code></a>’</span> property is, except as described
  1832    below, a shorthand property for setting <a href="#propdef-font-style"
  1833    title="font-style!!property">‘<code
  1834    class=property>font-style</code>’</a>, <a href="#propdef-font-variant"
  1835    title="font-variant!!property">‘<code
  1836    class=property>font-variant</code>’</a>, <a href="#propdef-font-weight"
  1837    title="font-weight!!property">‘<code
  1838    class=property>font-weight</code>’</a>, <a href="#propdef-font-stretch"
  1839    title="font-stretch!!property">‘<code
  1840    class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1841    href="#propdef-font-size"><code
  1842    class=property>font-size</code></a>’</span>, <a class=property
  1843    href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1844    class=property>line-height</code>’</a>, <a href="#propdef-font-family"
  1845    title="font-family!!property">‘<code
  1846    class=property>font-family</code>’</a> at the same place in the
  1847    stylesheet. Values for the <a href="#propdef-font-variant"
  1848    title="font-variant!!property">‘<code
  1849    class=property>font-variant</code>’</a> property may also be included
  1850    but only those supported in CSS 2.1, none of the <a
  1851    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1852    class=property>font-variant</code>’</a> values added in this
  1853    specification can be used in the <span class=property>‘<a
  1854    href="#propdef-font"><code class=property>font</code></a>’</span>
  1855    shorthand:
  1857   <pre
  1858    class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
  1860   <p>The syntax of this property is based on a traditional typographical
  1861    shorthand notation to set multiple properties related to fonts.
  1863   <p>All subproperties of the ‘<a href="#propdef-font"><code
  1864    class=property>font</code></a>’ property are first reset to their
  1865    initial values, including those listed above plus <span
  1866    class=property>‘<a href="#propdef-font-size-adjust"><code
  1867    class=property>font-size-adjust</code></a>’</span>, <span
  1868    class=property>‘<a href="#propdef-font-kerning"><code
  1869    class=property>font-kerning</code></a>’</span>, subproperties of <a
  1870    href="#propdef-font-variant" title="font-variant!!property">‘<code
  1871    class=property>font-variant</code>’</a> and and <span>‘<a
  1872    href="#propdef-font-language-override"><code
  1873    class=property>font-language-override</code></a>’</span>. Then, those
  1874    properties that are given explicit values in the <span
  1875    class=property>‘<a href="#propdef-font"><code
  1876    class=property>font</code></a>’</span> shorthand are set to those
  1877    values. For a definition of allowed and initial values, see the previously
  1878    defined properties. For reasons of backwards compatibility, it is not
  1879    possible to set <span class=property>‘<a
  1880    href="#propdef-font-size-adjust"><code
  1881    class=property>font-size-adjust</code></a>’</span> to anything other
  1882    than its initial value using the <span class=property>‘<a
  1883    href="#propdef-font"><code class=property>font</code></a>’</span>
  1884    shorthand property; instead, use the individual property.
  1886   <div class=example>
  1887    <p style="display:none">Example(s):
  1889    <p>
  1891    <pre>p { font: 12pt/14pt sans-serif }
  1892 p { font: 80% sans-serif }
  1893 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
  1894 p { font: bold italic large Palatino, serif }
  1895 p { font: normal small-caps 120%/120% fantasy }
  1896 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
  1897 </pre>
  1899    <p> In the second rule, the font size percentage value (‘<code
  1900     class=css>80%</code>’) refers to the computed ‘<a
  1901     href="#propdef-font-size"><code class=property>font-size</code></a>’ of
  1902     the parent element. In the third rule, the line height percentage
  1903     (‘<code class=css>110%</code>’) refers to the font size of the
  1904     element itself.
  1906    <p>The first three rules do not specify the <a
  1907     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1908     class=property>font-variant</code>’</a> and <a
  1909     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1910     class=property>font-weight</code>’</a> explicitly, so these properties
  1911     receive their initial values (‘<a href="#normal"><code
  1912     class=property>normal</code></a>’). Notice that the font family name
  1913     "new century schoolbook", which contains spaces, is enclosed in quotes.
  1914     The fourth rule sets the <a href="#propdef-font-weight"
  1915     title="font-weight!!property">‘<code
  1916     class=property>font-weight</code>’</a> to ‘<a href="#bold"><code
  1917     class=property>bold</code></a>’, the <a href="#propdef-font-style"
  1918     title="font-style!!property">‘<code
  1919     class=property>font-style</code>’</a> to ‘<a href="#italic"><code
  1920     class=property>italic</code></a>’, and implicitly sets <a
  1921     href="#propdef-font-variant" title="font-variant!!property">‘<code
  1922     class=property>font-variant</code>’</a> to ‘<a href="#normal"><code
  1923     class=property>normal</code></a>’.
  1925    <p> The fifth rule sets the <a href="#propdef-font-variant"
  1926     title="font-variant!!property">‘<code
  1927     class=property>font-variant</code>’</a> (‘<a href="#small-caps"><code
  1928     class=property>small-caps</code></a>’), the <span class=property>‘<a
  1929     href="#propdef-font-size"><code
  1930     class=property>font-size</code></a>’</span> (120% of the parent's font
  1931     size), the <a class=property
  1932     href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
  1933     class=property>line-height</code>’</a> (120% of the font size) and the
  1934     <a href="#propdef-font-family" title="font-family!!property">‘<code
  1935     class=property>font-family</code>’</a> (‘<a href="#fantasy"><code
  1936     class=property>fantasy</code></a>’). It follows that the keyword ‘<a
  1937     href="#normal"><code class=property>normal</code></a>’ applies to the
  1938     two remaining properties: <a href="#propdef-font-style"
  1939     title="font-style!!property">‘<code
  1940     class=property>font-style</code>’</a> and <a
  1941     href="#propdef-font-weight" title="font-weight!!property">‘<code
  1942     class=property>font-weight</code>’</a>.
  1944    <p>The sixth rule sets the <a href="#propdef-font-style"
  1945     title="font-style!!property">‘<code
  1946     class=property>font-style</code>’</a>, <a href="#propdef-font-stretch"
  1947     title="font-stretch!!property">‘<code
  1948     class=property>font-stretch</code>’</a>, <span class=property>‘<a
  1949     href="#propdef-font-size"><code
  1950     class=property>font-size</code></a>’</span>, and <a
  1951     href="#propdef-font-family" title="font-family!!property">‘<code
  1952     class=property>font-family</code>’</a>, the other font properties being
  1953     set to their initial values.
  1954   </div>
  1956   <p>Since the <a href="#propdef-font-stretch"
  1957    title="font-stretch!!property">‘<code
  1958    class=property>font-stretch</code>’</a> property was not defined in CSS
  1959    2.1, when using <a href="#propdef-font-stretch"
  1960    title="font-stretch!!property">‘<code
  1961    class=property>font-stretch</code>’</a> values within ‘<a
  1962    href="#propdef-font"><code class=property>font</code></a>’ rules,
  1963    authors should include a extra version compatible with older user agents:
  1965   <pre>p {
  1966   font: 80% sans-serif;   /* for older user agents */
  1967   font: condensed 80% sans-serif;
  1968 }</pre>
  1970   <p>The following values refer to system fonts:
  1972   <dl>
  1973    <dt><strong>caption</strong>
  1975    <dd>The font used for captioned controls (e.g., buttons, drop-downs,
  1976     etc.).
  1978    <dt><strong>icon</strong>
  1980    <dd>The font used to label icons.
  1982    <dt><strong>menu</strong>
  1984    <dd>The font used in menus (e.g., dropdown menus and menu lists).
  1986    <dt><strong>message-box</strong>
  1988    <dd>The font used in dialog boxes.
  1990    <dt><strong>small-caption</strong>
  1992    <dd>The font used for labeling small controls.
  1994    <dt><strong>status-bar</strong>
  1996    <dd>The font used in window status bars.
  1997   </dl>
  1999   <p>System fonts may only be set as a whole; that is, the font family, size,
  2000    weight, style, etc. are all set at the same time. These values may then be
  2001    altered individually if desired. If no font with the indicated
  2002    characteristics exists on a given platform, the user agent should either
  2003    intelligently substitute (e.g., a smaller version of the ‘<code
  2004    class=property>caption</code>’ font might be used for the ‘<code
  2005    class=property>small-caption</code>’ font), or substitute a user agent
  2006    default font. As for regular fonts, if, for a system font, any of the
  2007    individual properties are not part of the operating system's available
  2008    user preferences, those properties should be set to their initial values.
  2010   <p>That is why this property is "almost" a shorthand property: system fonts
  2011    can only be specified with this property, not with <a
  2012    href="#propdef-font-family" title="font-family!!property">‘<code
  2013    class=property>font-family</code>’</a> itself, so <span
  2014    class=property>‘<a href="#propdef-font"><code
  2015    class=property>font</code></a>’</span> allows authors to do more than
  2016    the sum of its subproperties. However, the individual properties such as
  2017    <a href="#propdef-font-weight" title="font-weight!!property">‘<code
  2018    class=property>font-weight</code>’</a> are still given values taken from
  2019    the system font, which can be independently varied.
  2021   <p>Note that the keywords used for the system fonts listed above are only
  2022    treated as keywords when they occur in the initial position, in other
  2023    positions the same string is treated as part of the font family name:
  2025   <pre>  font: menu;        /* use the font settings for system menus */
  2026   font: large menu;  /* use a font family named "menu" */</pre>
  2028   <div class=example>
  2029    <p style="display:none">Example(s):
  2031    <p>
  2033    <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
  2034 button p { font: menu }
  2035 button p em { font-weight: bolder }
  2036 </pre>
  2038    <p>If the font used for dropdown menus on a particular system happened to
  2039     be, for example, 9-point Charcoal, with a weight of 600, then P elements
  2040     that were descendants of BUTTON would be displayed as if this rule were
  2041     in effect:
  2043    <pre>button p { font: 600 9pt Charcoal }
  2044 </pre>
  2046    <p>Because the <span class=property>‘<a href="#propdef-font"><code
  2047     class=property>font</code></a>’</span> shorthand resets to its initial
  2048     value any property not explicitly given a value, this has the same effect
  2049     as this declaration:
  2051    <pre>button p {
  2052   font-style: normal;
  2053   font-variant: normal;
  2054   font-weight: 600;
  2055   font-size: 9pt;
  2056   line-height: normal;
  2057   font-family: Charcoal
  2059 </pre>
  2060   </div>
  2061   <!-- prop: font-synthesis -->
  2063   <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
  2064    synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
  2065    property</h3>
  2067   <table class=propdef id=namefont-synthesisvaluenone-weight-style>
  2068    <tbody>
  2069     <tr>
  2070      <td>Name:
  2072      <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
  2074     <tr>
  2075      <td>Value:
  2077      <td>none | [ weight || style ]
  2079     <tr>
  2080      <td>Initial:
  2082      <td>weight style
  2084     <tr>
  2085      <td>Applies to:
  2087      <td>all elements
  2089     <tr>
  2090      <td>Inherited:
  2092      <td>yes
  2094     <tr>
  2095      <td>Percentages:
  2097      <td>N/A
  2099     <tr>
  2100      <td>Media:
  2102      <td>visual
  2104     <tr>
  2105      <td>Computed value:
  2107      <td>as specified
  2109     <tr>
  2110      <td>Animatable:
  2112      <td>no
  2113   </table>
  2115   <p>This property controls whether user agents are allowed to synthesize
  2116    bold or oblique font faces when a font family lacks bold or italic faces.
  2117    If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
  2118    specified, user agents must not synthesize bold faces and if ‘<code
  2119    class=property>style</code>’ is not specified user agents must not
  2120    synthesize italic faces. A value of ‘<code class=property>none</code>’
  2121    disallows all synthetic faces.
  2123   <div class=example>
  2124    <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
  2126    <pre>*:lang(ar) { font-synthesis: none; }
  2127 </pre>
  2128   </div>
  2130   <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
  2132   <h3 id=font-face-rule><span class=secno>4.1 </span>The <dfn
  2133    id=at-font-face-rule style="font-weight: inherit; font-style:
  2134    inherit"><code>@font-face</code></dfn> rule</h3>
  2136   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule allows
  2137    for linking to fonts that are automatically fetched and activated when
  2138    needed. This allows authors to select a font that closely matches the
  2139    design goals for a given page rather than limiting the font choice to a
  2140    set of fonts available on all platforms. A set of font descriptors define
  2141    the location of a font resource, either locally or externally, along with
  2142    the style characteristics of an individual face. Multiple <a
  2143    href="#at-font-face-rule"><code>@font-face</code></a> rules can be used to
  2144    construct font families with a variety of faces. Using CSS font matching
  2145    rules, a user agent can selectively download only those faces that are
  2146    needed for a given piece of text.
  2148   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2149    consists of the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2150    at-keyword followed by a block of descriptor declarations. In terms of the
  2151    grammar, this specification defines the following productions:
  2153   <pre><dfn id=fontfacerule>font_face_rule</dfn>
  2154   : <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>*
  2157 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
  2158   : <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>
  2159   ;</pre>
  2161   <p>The following new definitions are introduced:
  2163   <pre>-    -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
  2164 F    f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
  2166   <p>The following new token is introduced:
  2168   <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
  2170   <p>Each <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2171    specifies a value for every font descriptor, either implicitly or
  2172    explicitly. Those not given explicit values in the rule take the initial
  2173    value listed with each descriptor in this specification. These descriptors
  2174    apply solely within the context of the <a
  2175    href="#at-font-face-rule"><code>@font-face</code></a> rule in which they
  2176    are defined, and do not apply to document language elements. There is no
  2177    notion of which elements the descriptors apply to or whether the values
  2178    are inherited by child elements. When a given descriptor occurs multiple
  2179    times in a given <a href="#at-font-face-rule"><code>@font-face</code></a>
  2180    rule, only the last descriptor declaration is used and all prior
  2181    declarations for that descriptor are ignored.
  2183   <div class=example>
  2184    <p>To use a downloadable font called Gentium:</p>
  2186    <pre>
  2187 @font-face {
  2188   font-family: Gentium;
  2189   src: url(http://example.com/fonts/Gentium.ttf);
  2192 p { font-family: Gentium, serif; }
  2193 </pre>
  2195    <p>The user agent will download Gentium and use it when rendering text
  2196     within paragraph elements. If for some reason the site serving the font
  2197     is unavailable, the default serif font will be used.</p>
  2198   </div>
  2200   <p>A given set of <a href="#at-font-face-rule"><code>@font-face</code></a>
  2201    rules define a set of fonts available for use within the documents that
  2202    contain these rules. When font matching is done, fonts defined using these
  2203    rules are considered before other available fonts on a system.
  2205   <p>Downloaded fonts are only available to documents that reference them.
  2206    The process of activating these fonts must not make them available to
  2207    other applications or to documents that don't directly link to the same
  2208    font. User agent implementers might consider it convenient to use
  2209    downloaded fonts when rendering characters in other documents for which no
  2210    other available font exists as part of the system font fallback procedure.
  2211    However, this would cause a security leak since the contents of one page
  2212    would be able to affect other pages, something an attacker could use as an
  2213    attack vector. These restrictions do not affect caching behavior, fonts
  2214    are cached the same way other web resources are cached.
  2216   <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
  2217    properties in a declaration block, declarations of any descriptors that
  2218    are not supported by the user agent must be ignored. <a
  2219    href="#at-font-face-rule"><code>@font-face</code></a> rules require a
  2220    font-family and src descriptor; if either of these are missing, the <a
  2221    href="#at-font-face-rule"><code>@font-face</code></a> rule is invalid and
  2222    must be ignored entirely.
  2224   <p>In cases where user agents have limited platform resources or implement
  2225    the ability to disable downloadable font resources, <a
  2226    href="#at-font-face-rule"><code>@font-face</code></a> rules must simply be
  2227    ignored; the behavior of individual descriptors as defined in this
  2228    specification should not be altered.
  2230   <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
  2231    href="#descdef-font-family">font-family</a> descriptor</h3>
  2233   <table class=descdef>
  2234    <tbody>
  2235     <tr>
  2236      <td>Name:
  2238      <td><dfn id=descdef-font-family
  2239       title="font-family!!descriptor">font-family</dfn>
  2241     <tr>
  2242      <td>Value:
  2244      <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
  2246     <tr>
  2247      <td><em>Initial:</em>
  2249      <td>N/A
  2250   </table>
  2252   <p>This descriptor defines the font family name that will be used in all
  2253    CSS font family name matching. It is required for the <a
  2254    href="#at-font-face-rule"><code>@font-face</code></a> rule to be valid. It
  2255    overrides the font family names contained in the underlying font data. If
  2256    the font family name is the same as a font family available in a given
  2257    user's environment, it effectively hides the underlying font for documents
  2258    that use the stylesheet. This permits a web author to freely choose
  2259    font-family names without worrying about conflicts with font family names
  2260    present in a given user's environment. Likewise, platform substitutions
  2261    for a given font family name must not be used.
  2263   <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
  2264    href="#descdef-src">src</a> descriptor</h3>
  2266   <table class=descdef>
  2267    <tbody>
  2268     <tr>
  2269      <td>Name:
  2271      <td><dfn id=descdef-src>src</dfn>
  2273     <tr>
  2274      <td>Value:
  2276      <td>[ &lt;url> [format(&lt;string> #)]? | <a
  2277       href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
  2279     <tr>
  2280      <td><em>Initial:</em>
  2282      <td>N/A
  2283   </table>
  2285   <p>This descriptor specifies the resource containing font data. It is
  2286    required for the <a href="#at-font-face-rule"><code>@font-face</code></a>
  2287    rule to be valid. Its value is a prioritized, comma-separated list of
  2288    external references or locally-installed font face names. When a font is
  2289    needed the user agent iterates over the set of references listed, using
  2290    the first one it can successfully activate. Fonts containing invalid data
  2291    or local font faces that are not found are ignored and the user agent
  2292    loads the next font in the list.
  2294   <p>As with other URLs in CSS, the URL may be relative, in which case it is
  2295    resolved relative to the location of the style sheet containing the <a
  2296    href="#at-font-face-rule"><code>@font-face</code></a> rule. In the case of
  2297    SVG fonts, the URL points to an element within a document containing SVG
  2298    font definitions. If the element reference is omitted, a reference to the
  2299    first defined font is implied. Similarly, font container formats that can
  2300    contain more than one font must load one and only one of the fonts for a
  2301    given <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  2302    Fragment identifiers are used to indicate which font to load. If a
  2303    container format lacks a defined fragment identifier scheme,
  2304    implementations should use a simple 1-based indexing scheme (e.g.
  2305    "font-collection#1" for the first font, "font-collection#2" for the second
  2306    font).
  2308   <pre>
  2309 src: url(fonts/simple.ttf);   /* load simple.ttf relative to stylesheet location */
  2310 src: url(/fonts/simple.ttf);  /* load simple.ttf from absolute location */
  2311 src: url(fonts.svg#simple);   /* load SVG font with id 'simple' */
  2312 </pre>
  2314   <p>External references consist of a URL, followed by an optional hint
  2315    describing the format of the font resource referenced by that URL. The
  2316    format hint contains a comma-separated list of format strings that denote
  2317    well-known font formats. Conformant user agents must skip downloading a
  2318    font resource if the format hints indicate only unsupported or unknown
  2319    font formats. If no format hints are supplied, the user agent should
  2320    download the font resource.
  2322   <pre>
  2323 /* load WOFF font if possible, otherwise use OpenType font */
  2324 @font-face {
  2325   font-family: bodytext;
  2326   src: url(ideal-sans-serif.woff) format("woff"),
  2327        url(basic-sans-serif.ttf) format("opentype");
  2329 </pre>
  2331   <p>Format strings defined by this specification:
  2333   <table class=data id=fontformats>
  2334    <thead>
  2335     <tr>
  2336      <th>String
  2338      <th>Font Format
  2340      <th>Common extensions
  2342    <tbody>
  2343     <tr>
  2344      <th>"woff"
  2346      <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
  2348      <td>.woff
  2350     <tr>
  2351      <th>"truetype"
  2353      <td><a
  2354       href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
  2356      <td>.ttf
  2358     <tr>
  2359      <th>"opentype"
  2361      <td><a
  2362       href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
  2364      <td>.ttf, .otf
  2366     <tr>
  2367      <th>"embedded-opentype"
  2369      <td><a
  2370       href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
  2371       OpenType</a>
  2373      <td>.eot
  2375     <tr>
  2376      <th>"svg"
  2378      <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
  2380      <td>.svg, .svgz
  2381   </table>
  2383   <p>Given the overlap in common usage between TrueType and OpenType, the
  2384    format hints "truetype" and "opentype" must be considered as synonymous; a
  2385    format hint of "opentype" does not imply that the font contains Postscript
  2386    CFF style glyph data or that it contains OpenType layout information (see
  2387    <a href="#platform-props-to-css">Appendix A</a> for more background on
  2388    this).
  2390   <p>When authors would prefer to use a locally available copy of a given
  2391    font and download it if it's not, <code>local()</code> can be used. The
  2392    locally-installed <dfn
  2393    id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
  2394    to <code>local()</code> is a format-specific string that uniquely
  2395    identifies a single font face within a larger family. The syntax for a <a
  2396    href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
  2397    unique font face name enclosed by "local(" and ")". The name can
  2398    optionally be enclosed in quotes. If unquoted, the unquoted font family
  2399    name processing conventions apply; the name must be a sequence of
  2400    identifiers separated by whitespace which is converted to a string by
  2401    joining the identifiers together separated by a single space.
  2403   <pre>
  2404 /* regular face of Gentium */
  2405 @font-face {
  2406   font-family: MyGentium;
  2407   src: local(Gentium),   /* use locally available Gentium */
  2408        url(Gentium.ttf); /* otherwise, download it */
  2410 </pre>
  2412   <p>For OpenType and TrueType fonts, this string is used to match only the
  2413    Postscript name or the full font name in the name table of locally
  2414    available fonts. Which type of name is used varies by platform and font,
  2415    so authors should include both of these names to assure proper matching
  2416    across platforms. Platform substitutions for a given font name must not be
  2417    used.
  2419   <pre>
  2420 /* bold face of Gentium */
  2421 @font-face {
  2422   font-family: MyGentium;
  2423   src: local(Gentium Bold),   /* full font name */
  2424        local(Gentium-Bold),   /* Postscript name */
  2425        url(GentiumBold.ttf);  /* otherwise, download it */
  2426   font-weight: bold;
  2428 </pre>
  2430   <p>Just as a <a href="#at-font-face-rule"><code>@font-face</code></a> rule
  2431    specifies the characteristics of a single font within a family, the unique
  2432    name used with <code>local()</code> specifies a single font, not an entire
  2433    font family. Defined in terms of OpenType font data, the Postscript name
  2434    is found in the font's <a
  2435    href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
  2436    in the name record with nameID = 6 (see <a href="#OPENTYPE"
  2437    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
  2438    Postscript name is the commonly used key for all fonts on OSX and for
  2439    Postscript CFF fonts under Windows. The full font name (nameID = 4) is
  2440    used as a unique key for fonts with TrueType glyphs on Windows.
  2442   <p>For OpenType fonts with multiple localizations of the full font name,
  2443    the US English version is used (language ID = 0x409 for Windows and
  2444    language ID = 0 for Macintosh) or the first localization when a US English
  2445    full font name is not available (the OpenType specification recommends
  2446    that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
  2447    fonts minimally include US English names</a>). User agents that also match
  2448    other full font names, e.g. matching the Dutch name when the current
  2449    system locale is set to Dutch, are considered non-conformant. This is done
  2450    not to prefer English but to avoid matching inconsistencies across font
  2451    versions and OS localizations, since font style names (e.g. "Bold") are
  2452    frequently localized into many languages and the set of localizations
  2453    available varies widely across platform and font version. User agents that
  2454    match a concatenation of family name (nameID = 1) with style name (nameID
  2455    = 2) are considered non-conformant.
  2457   <p>This also allows for referencing faces that belong to larger families
  2458    that cannot otherwise be referenced.
  2460   <div class=example>
  2461    <p>Use a local font or reference an SVG font in another document:</p>
  2463    <pre>
  2464 @font-face {
  2465   font-family: Headline;
  2466   src: local(Futura-Medium),
  2467        url(fonts.svg#MyGeometricModern) format("svg");
  2469 </pre>
  2471    <p>Create an alias for local Japanese fonts on different platforms:</p>
  2473    <pre>
  2474 @font-face {
  2475   font-family: jpgothic;
  2476   src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
  2478 </pre>
  2480    <p>Reference a font face that cannot be matched within a larger family:</p>
  2482    <pre>
  2483 @font-face {
  2484   font-family: Hoefler Text Ornaments;
  2485   /* has the same font properties as Hoefler Text Regular */
  2486   src: local(HoeflerText-Ornaments);
  2488 </pre>
  2490    <p>Since localized fullnames never match, a document with the header style
  2491     rules below would always render using the default serif font, regardless
  2492     whether a particular system locale parameter is set to Finnish or not:</p>
  2494    <pre>
  2495 @font-face {
  2496   font-family: SectionHeader;
  2497   src: local("Arial Lihavoitu");  /* Finnish fullname for Arial Bold, should fail */
  2498   font-weight: bold;
  2501 h2 { font-family: SectionHeader, serif; }
  2502 </pre>
  2504    <p>A conformant user agent would never load the font ‘<code
  2505     class=css>gentium.eot</code>’ in the example below, since it is
  2506     included in the first definition of the ‘<a href="#descdef-src"><code
  2507     class=property>src</code></a>’ descriptor which is overridden by the
  2508     second definition in the same <a
  2509     href="#at-font-face-rule"><code>@font-face</code></a> rule:</p>
  2511    <pre>
  2512 @font-face {
  2513   font-family: MainText;
  2514   src: url(gentium.eot); /* for use with older non-conformant user agents */
  2515   src: local("Gentium"), url(gentium.ttf);  /* Overrides src definition */
  2517 </pre>
  2518   </div>
  2520   <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
  2521    descriptors: the <a href="#descdef-font-style">font-style</a>, <a
  2522    href="#descdef-font-weight">font-weight</a>, <a
  2523    href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
  2525   <table class=descdef>
  2526    <tbody>
  2527     <tr>
  2528      <td>Name:
  2530      <td><dfn id=descdef-font-style
  2531       title="font-style!!descriptor">font-style</dfn>
  2533     <tr>
  2534      <td>Value:
  2536      <td>normal | italic | oblique
  2538     <tr>
  2539      <td><em>Initial:</em>
  2541      <td>normal
  2542   </table>
  2544   <table class=descdef>
  2545    <tbody>
  2546     <tr>
  2547      <td>Name:
  2549      <td><dfn id=descdef-font-weight
  2550       title="font-weight!!descriptor">font-weight</dfn>
  2552     <tr>
  2553      <td>Value:
  2555      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  2557     <tr>
  2558      <td><em>Initial:</em>
  2560      <td>normal
  2561   </table>
  2563   <table class=descdef>
  2564    <tbody>
  2565     <tr>
  2566      <td>Name:
  2568      <td><dfn id=descdef-font-stretch
  2569       title="font-stretch!!descriptor">font-stretch</dfn>
  2571     <tr>
  2572      <td>Value:
  2574      <td>normal | ultra-condensed | extra-condensed | condensed |
  2575       semi-condensed | semi-expanded | expanded | extra-expanded |
  2576       ultra-expanded
  2578     <tr>
  2579      <td><em>Initial:</em>
  2581      <td>normal
  2582   </table>
  2584   <p>These descriptors define the characteristics of a font face and are used
  2585    in the process of matching styles to specific faces. For a font family
  2586    defined with several <a
  2587    href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
  2588    can either download all faces in the family or use these descriptors to
  2589    selectively download font faces that match actual styles used in document.
  2590    The values for these descriptors are the same as those for the
  2591    corresponding font properties except that relative keywords are not
  2592    allowed, ‘<a href="#bolder"><code class=property>bolder</code></a>’
  2593    and ‘<a href="#lighter"><code class=property>lighter</code></a>’. If
  2594    these descriptors are omitted, initial values are assumed.
  2596   <p>The value for these font face style attributes is used in place of the
  2597    style implied by the underlying font data. This allows authors to combine
  2598    faces in flexible combinations, even in situations where the original font
  2599    data was arranged differently. User agents that implement synthetic
  2600    bolding and obliquing must only apply synthetic styling in cases where the
  2601    font descriptors imply this is needed, rather than based on the style
  2602    attributes implied by the font data.
  2604   <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
  2605    <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
  2607   <table class=descdef>
  2608    <tbody>
  2609     <tr>
  2610      <td>Name:
  2612      <td><dfn id=descdef-unicode-range>unicode-range</dfn>
  2614     <tr>
  2615      <td>Value:
  2617      <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
  2619     <tr>
  2620      <td><em>Initial:</em>
  2622      <td>U+0-10FFFF
  2623   </table>
  2625   <p>This descriptor defines the set of Unicode codepoints that may be
  2626    supported by the font face for which it is declared. The descriptor value
  2627    is a comma-delimited list of Unicode range (<a
  2628    href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
  2629    these ranges defines the set of codepoints that serves as a hint for user
  2630    agents when deciding whether or not to download a font resource for a
  2631    given text run.
  2633   <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
  2634    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2635    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
  2636    "U+" or "u+" prefix followed by a codepoint range in one of the three
  2637    forms listed below. Ranges that do not fit one of the these forms are
  2638    invalid and cause the declaration to be ignored.
  2640   <dl>
  2641    <dt>single codepoint (e.g. U+416)
  2643    <dd>a valid Unicode codepoint, represented as one to six hexadecimal
  2644     digits
  2646    <dt>interval range (e.g. U+400-4ff)
  2648    <dd>represented as two hyphen-separated valid Unicode codepoints
  2649     indicating the inclusive start and end codepoints of a range
  2651    <dt>wildcard range (e.g. U+4??)
  2653    <dd>defined by the set of codepoints implied when trailing ‘<code
  2654     class=css>?</code>’ characters signify any hexadeximal digit
  2655   </dl>
  2657   <p>Individual codepoints are written using hexadecimal values that
  2658    correspond to <a href="http://www.unicode.org/charts/">Unicode character
  2659    codepoints</a>. Valid Unicode codepoint values vary between 0 and 10FFFF
  2660    inclusive. Digit values of codepoints are ASCII case-insensitive. For
  2661    interval ranges, the start and end codepoints must be valid Unicode values
  2662    and the end codepoint must be greater than or equal to the start
  2663    codepoint.
  2665   <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
  2666    "U+???") are valid and equivalent to a wildcard range with an initial zero
  2667    digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
  2668    the range of valid Unicode codepoints are invalid. Because of this, the
  2669    maximum number of trailing ‘<code class=css>?</code>’ wildcard
  2670    characters is five, even though the <a
  2671    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
  2672    title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
  2674   <p>Within the comma-delimited list of Unicode ranges in a ‘<a
  2675    href="#descdef-unicode-range"><code
  2676    class=property>unicode-range</code></a>’ descriptor declaration, ranges
  2677    may overlap. The union of these ranges defines the set of codepoints for
  2678    which the corresponding font may be used. User agents must not download or
  2679    use the font for codepoints outside this set. User agents may normalize
  2680    the list of ranges into a list that is different but represents the same
  2681    set of codepoints.
  2683   <p>The associated font might not contain glyphs for the entire set of
  2684    codepoints defined by the ‘<a href="#descdef-unicode-range"><code
  2685    class=property>unicode-range</code></a>’ descriptor. When the font is
  2686    used the effective <a href="#character-map"><em>character map</em></a> is
  2687    the intersection of the codepoints defined by ‘<a
  2688    href="#descdef-unicode-range"><code
  2689    class=property>unicode-range</code></a>’ with the font's <a
  2690    href="#character-map"><em>character map</em></a>. This allows authors to
  2691    define supported ranges in terms of broad ranges without worrying about
  2692    the precise codepoint ranges supported by the underlying font.
  2694   <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
  2695    to define composite fonts</h3>
  2697   <p>Multiple <a href="#at-font-face-rule"><code>@font-face</code></a> rules
  2698    with different unicode ranges for the same family and style descriptor
  2699    values can be used to create composite fonts that mix the glyphs from
  2700    different fonts for different scripts. This can be used to combine fonts
  2701    that only contain glyphs for a single script (e.g. Latin, Greek, Cyrillic)
  2702    or it can be used by authors as a way of segmenting a font into fonts for
  2703    commonly used characters and less frequently used characters. Since the
  2704    user agent will only pull down the fonts it needs this helps reduce page
  2705    bandwidth.
  2707   <p>If the unicode ranges overlap for a set of <a
  2708    href="#at-font-face-rule"><code>@font-face</code></a> rules with the same
  2709    family and style descriptor values, the rules are ordered in the reverse
  2710    order they were defined; the last rule defined is the first to be checked
  2711    for a given character.
  2713   <p>Example ranges for specific languages or characters:
  2715   <dl>
  2716    <dt>unicode-range: U+A5;
  2718    <dd>a single code point, the yen/yuan symbol
  2720    <dt>unicode-range: U+0-7F;
  2722    <dd>code range for basic ASCII characters
  2724    <dt>unicode-range: U+590-5ff;
  2726    <dd>code range for Hebrew characters
  2728    <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
  2730    <dd>code range for Japanese kanji, hiragana and katakana characters plus
  2731     yen/yuan symbol
  2732   </dl>
  2734   <div class=example>
  2735    <p>The BBC provides news services in a wide variety of languages, many
  2736     that are not well supported across all platforms. Using an <a
  2737     href="#at-font-face-rule"><code>@font-face</code></a> rule, the BBC could
  2738     provide a font for any of these languages, as it already does via a
  2739     manual font download.</p>
  2741    <pre>
  2742 @font-face {
  2743   font-family: BBCBengali;
  2744   src: url(fonts/BBCBengali.ttf) format("opentype");
  2745   unicode-range: U+00-FF, U+980-9FF;
  2747 </pre>
  2748   </div>
  2750   <div class=example>
  2751    <p>Technical documents often require a wide range of symbols. The STIX
  2752     Fonts project is one project aimed at providing fonts to support a wide
  2753     range of technical typesetting in a standardized way. The example below
  2754     shows the use of a font that provides glyphs for many of the mathematical
  2755     and technical symbol ranges within Unicode:</p>
  2757    <pre>
  2758 @font-face {
  2759   font-family: STIXGeneral;
  2760   src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
  2761   unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
  2763 </pre>
  2764   </div>
  2766   <div class=example>
  2767    <p>This example shows how an author can override the glyphs used for Latin
  2768     characters in a Japanese font with glyphs from a different font. The
  2769     first rule specifies no range so it defaults to the entire range. The
  2770     range specified in the second rule overlaps but takes precedence because
  2771     it is defined later.</p>
  2773    <pre>
  2774 @font-face {
  2775   font-family: JapaneseWithGentium;
  2776   src: local(MSMincho);
  2777   /* no range specified, defaults to entire range */
  2780 @font-face {
  2781   font-family: JapaneseWithGentium;
  2782   src: url(../fonts/Gentium.ttf);
  2783   unicode-range: U+0-2FF;
  2785 </pre>
  2786   </div>
  2788   <div class=example>
  2789    <p>Consider a family constructed to optimize bandwidth by separating out
  2790     Latin, Japanese and other characters into different font files:</p>
  2792    <pre>
  2793 /* fallback font - size: 4.5MB */
  2794 @font-face {
  2795   font-family: DroidSans;
  2796   src: url(DroidSansFallback.ttf);
  2797   /* no range specified, defaults to entire range */
  2800 /* Japanese glyphs - size: 1.2MB */
  2801 @font-face {
  2802   font-family: DroidSans;
  2803   src: url(DroidSansJapanese.ttf);
  2804   unicode-range: U+3000-9FFF, U+ff??;
  2807 /* Latin, Greek, Cyrillic along with some
  2808    punctuation and symbols - size: 190KB */
  2809 @font-face {
  2810   font-family: DroidSans;
  2811   src: url(DroidSans.ttf);
  2812   unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
  2814 </pre>
  2816    <p>For simple Latin text, only the font for Latin characters is
  2817     downloaded:</p>
  2819    <pre>
  2820 body { font-family: DroidSans; }
  2822 &lt;p>This is that&lt;/p>
  2823 </pre>
  2825    <p>In this case the user agent first checks the unicode-range for the font
  2826     containing Latin characters (DroidSans.ttf). Since all the characters
  2827     above are in the range U+0-5FF, the user agent downloads the font and
  2828     renders the text with that font.</p>
  2830    <p>Next, consider text that makes use of an arrow character (⇨):</p>
  2832    <pre>
  2833 &lt;p>This &amp;#x21e8; that&lt;p>
  2834 </pre>
  2836    <p>The user agent again first checks the unicode-range of the font
  2837     containing Latin characters. Since U+2000-2300 includes the arrow code
  2838     point (U+21E8), the user agent downloads the font. For this character
  2839     however the Latin font does not have a matching glyph, so the effective
  2840     unicode-range used for font matching excludes this code point. Next, the
  2841     user agent evaluates the Japanese font. The unicode-range for the
  2842     Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
  2843     user agent does not download the Japanese font. Next the fallback font is
  2844     considered. The <a href="#at-font-face-rule"><code>@font-face</code></a>
  2845     rule for the fallback font does not define unicode-range so its value
  2846     defaults to the range of all Unicode code points. The fallback font is
  2847     downloaded and used to render the arrow character.</p>
  2848   </div>
  2850   <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
  2851    href="#descdef-font-variant">font-variant</a> and <a
  2852    href="#descdef-font-feature-settings">font-feature-settings</a>
  2853    descriptors</h3>
  2855   <table class=descdef>
  2856    <tbody>
  2857     <tr>
  2858      <td>Name:
  2860      <td><dfn id=descdef-font-variant
  2861       title="font-variant!!descriptor">font-variant</dfn>
  2863     <tr>
  2864      <td>Value:
  2866      <td><a href="#font-variant-normal-value"
  2867       title="normal!!font-variant">normal</a> | <a
  2868       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  2869       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  2870       || <a
  2871       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  2872       || <a
  2873       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  2874       || <a
  2875       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  2876       || <a href="#stylistic"><var
  2877       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  2878       href="#historical-forms"><var>historical-forms</var></a> || <a
  2879       href="#styleset"><var
  2880       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  2881       href="#character-variant"><var
  2882       title=character-variant>character-variant(&lt;feature-value-name&gt;
  2883       #)</var></a> || <a href="#swash"><var
  2884       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  2885       href="#ornaments"><var
  2886       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  2887       href="#annotation"><var
  2888       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  2889       <a href="#small-caps"><i>small-caps</i></a> | <a
  2890       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  2891       href="#petite-caps"><i>petite-caps</i></a> | <a
  2892       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  2893       href="#unicase"><i>unicase</i></a> | <a
  2894       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  2895       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  2896       || <a
  2897       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  2898       || <a
  2899       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  2900       || <a href="#ordinal"><i>ordinal</i></a> || <a
  2901       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  2902       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  2903       || <a
  2904       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  2905       || <a href="#ruby"><i>ruby</i></a> ]
  2907     <tr>
  2908      <td><em>Initial:</em>
  2910      <td>normal
  2911   </table>
  2913   <table class=descdef>
  2914    <tbody>
  2915     <tr>
  2916      <td>Name:
  2918      <td><dfn id=descdef-font-feature-settings
  2919       title="font-feature-settings!!descriptor">font-feature-settings</dfn>
  2921     <tr>
  2922      <td>Value:
  2924      <td><a href="#font-feature-settings-normal-value"
  2925       title="normal!!font-feature-settings">normal</a> | <a
  2926       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  2928     <tr>
  2929      <td><em>Initial:</em>
  2931      <td>normal
  2932   </table>
  2934   <p>These descriptors define initial settings that apply when the font
  2935    defined by an <a href="#at-font-face-rule"><code>@font-face</code></a>
  2936    rule is rendered. They do not affect font selection. Values are identical
  2937    to those defined for the corresponding <a href="#propdef-font-variant"
  2938    title="font-variant!!property">‘<code
  2939    class=property>font-variant</code>’</a> and <a
  2940    href="#propdef-font-feature-settings"
  2941    title="font-feature-settings!!property">‘<code
  2942    class=property>font-feature-settings</code>’</a> properties defined
  2943    below except that the value ‘<code class=property>inherit</code>’ is
  2944    omitted. When multiple font feature descriptors or properties are used,
  2945    the cumulative effect on text rendering is detailed in the section <a
  2946    href="#font-feature-resolution">Font Feature Resolution</a> below. In
  2947    cases where specific values define synthesized fallback for certain <a
  2948    href="#propdef-font-variant" title="font-variant!!property">‘<code
  2949    class=property>font-variant</code>’</a> subproperties, the same
  2950    synthesized fallback applies when used within those values are used with
  2951    the <a href="#descdef-font-style" title="font-style!!descriptor">‘<code
  2952    class=property>font-variant</code>’</a> descriptor.
  2954   <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
  2955    guidelines</h3>
  2957   <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule is
  2958    designed to allow lazy loading of font resources that are only downloaded
  2959    when used within a document. A stylesheet can include <a
  2960    href="#at-font-face-rule"><code>@font-face</code></a> rules for a library
  2961    of fonts of which only a select set are used; user agents must only
  2962    download those fonts that are referred to within the style rules
  2963    applicable to a given page. User agents that download all fonts defined in
  2964    <a href="#at-font-face-rule"><code>@font-face</code></a> rules without
  2965    considering whether those fonts are in fact used within a page are
  2966    considered non-conformant. In cases where a font might be downloaded in
  2967    character fallback cases, user agents may download a font if it's listed
  2968    in a font list but is not actually used for a given text run.
  2970   <pre>
  2971 @font-face {
  2972   font-family: GeometricModern;
  2973   src: url(font.ttf);
  2976 p {
  2977   /* font will be downloaded for pages with p elements */
  2978   font-family: GeometricModern, sans-serif;
  2981 h2 {
  2982   /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
  2983   font-family: Futura, GeometricModern, sans-serif;
  2985 </pre>
  2987   <p>In cases where textual content is loaded before downloadable fonts are
  2988    available, user agents may render text as it would be rendered if
  2989    downloadable font resources are not available or they may render text
  2990    transparently with fallback fonts to avoid a flash of text using a
  2991    fallback font. In cases where the font download fails user agents must
  2992    display text, simply leaving transparent text is considered non-conformant
  2993    behavior. Authors are advised to use fallback fonts in their font lists
  2994    that closely match the vertical metrics of the downloadable fonts to avoid
  2995    large page reflows where possible.
  2997   <h3 id=same-origin-restriction><span class=secno>4.9 </span>Same-origin
  2998    restriction for fonts</h3>
  3000   <h4 id=default-same-origin-restriction><span class=secno>4.9.1
  3001    </span>Default same-origin restriction</h4>
  3002   <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
  3003   http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
  3004   http://www.w3.org/2011/10/31-webapps-minutes.html#item02
  3005 -->
  3007   <p>User agents must implement a same-origin restriction when loading fonts
  3008    via the <a href="#at-font-face-rule"><code>@font-face</code></a>
  3009    mechanism. This restriction limits the loading of fonts for a given
  3010    document to fonts loaded from the same origin. Fonts can only be loaded
  3011    via the same host, port, and method combination as the containing
  3012    document, using the <a
  3013    href="http://www.w3.org/TR/html5/browsers.html#origin">origin matching
  3014    algorithm</a> described in the <a href="#HTML5"
  3015    rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification. The origin of
  3016    the stylesheet containing <a
  3017    href="#at-font-face-rule"><code>@font-face</code></a> rules is not used
  3018    when deciding whether a font is same origin or not, only the origin of the
  3019    containing document is used. The restriction applies to all font types.
  3021   <p>Given a document located at http://example.com/page.html, fonts defined
  3022    with ‘<a href="#descdef-src"><code class=property>src</code></a>’
  3023    definitions considered cross origin must not be loaded:
  3025   <pre>
  3026 /* same origin (i.e. domain, protocol, port match document) */
  3027 src: url(fonts/simple.ttf);
  3028 src: url(//fonts/simple.ttf);
  3030 /* cross origin, different protocol */
  3031 src: url(https://example.com/fonts/simple.ttf);
  3033 /* cross origin, different domain */
  3034 src: url(http://another.example.com/fonts/simple.ttf);
  3035 </pre>
  3037   <h4 id=allowing-cross-origin-font-loading><span class=secno>4.9.2
  3038    </span>Allowing cross-origin font loading</h4>
  3040   <p>User agents must also implement the ability to relax this restriction
  3041    using cross-site origin controls <a href="#CORS"
  3042    rel=biblioentry>[CORS]<!--{{!CORS}}--></a> for fonts loaded via HTTP.
  3043    Sites can explicitly allow cross-site downloading of font data using the
  3044    <code>Access-Control-Allow-Origin</code> HTTP header. For other protocols,
  3045    no explicit relaxation mechanism is defined or required.
  3047   <p>For font loads over HTTP, cross-origin requests must be made with the
  3048    following parameter settings which are used in conjunction with the <a
  3049    href="http://www.w3.org/TR/cors/#cross-origin-request-0"> <em>cross-origin
  3050    request algorithm</em></a> <a href="#CORS"
  3051    rel=biblioentry>[CORS]<!--{{!CORS}}--></a>:
  3053   <ul>
  3054    <li><em>request URL</em> — the URL of the font resource in the <a
  3055     href="#descdef-src"><code>src</code></a> descriptor
  3057    <li><em>request method</em> — GET
  3059    <li><em>author request headers</em> — none
  3061    <li><em>request entity body</em> — empty
  3063    <li><em>source origin</em> — the origin of the page which linked to the
  3064     stylesheet
  3066    <li><em>manual redirect flag</em> — false
  3068    <li><em>omit credentials flag</em> — true
  3070    <li><em>force preflight flag</em> — false
  3071   </ul>
  3073   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
  3074    Algorithm</h2>
  3076   <p>The algorithm below describes how fonts are associated with individual
  3077    runs of text. For each character in the run a font family is chosen and a
  3078    particular font face is selected containing a glyph for that character.
  3080   <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
  3081    font family names</h3>
  3083   <p>As part of the font matching algorithm outlined below, user agents must
  3084    match font family names used in style rules with actual font family names
  3085    contained in fonts available in a given environment or defined via <a
  3086    href="#at-font-face-rule"><code>@font-face</code></a> rules. User agents
  3087    must match these names case insensitively, using the "Default Caseless
  3088    Matching" algorithm outlined in the Unicode specification <a
  3089    href="#UNICODE6" rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>. This
  3090    algorithm is detailed in section 3.13 entitled "Default Case Algorithms".
  3091    Specifically, the algorithm must be applied without normalizing the
  3092    strings involved and without applying any language-specific tailorings.
  3093    The case folding method specified by this algorithm uses the case mappings
  3094    with status field ‘<code class=property>C</code>’ or ‘<code
  3095    class=property>F</code>’ in the CaseFolding.txt file of the Unicode
  3096    Character Database.
  3098   <p class=note> Implementors should take care to verify that a given
  3099    caseless string comparison implementation uses this precise algorithm and
  3100    not assume that a given platform string matching routine follows it, as
  3101    many of these have locale-specific behavior or use some level of string
  3102    normalization.
  3104   <p class=note> For authors this means that font family names are matched
  3105    case insensitively, whether those names exist in a platform font or in the
  3106    <a href="#at-font-face-rule"><code>@font-face</code></a> rules contained
  3107    in a stylesheet. Authors should take care to ensure that names use a
  3108    character sequence consistent with the actual font family name,
  3109    particularly when using combining characters such as diacritical marks.
  3110    For example, a family name that contains an uppercase A (U+0041) followed
  3111    by a combining ring (U+030A) will <strong>not</strong> match a name that
  3112    looks identical but which uses the precomposed lowercase a-ring character
  3113    (U+00E5) instead of the combining sequence.
  3115   <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
  3116    styles</h3>
  3118   <p>The procedure for choosing fonts consists of iterating over the font
  3119    families determined by the font-family property, selecting a font face
  3120    with the appropriate style based on other font properties and then
  3121    determining whether a glyph exists for a given character. This is done
  3122    using the <dfn id=character-map>character map</dfn> of the font, data
  3123    which maps characters to the default glyph for that character. Codepoint
  3124    sequences consisting of a base character followed by a sequence of
  3125    combining characters are treated slightly differently, see the section on
  3126    <a href="#cluster-matching">cluster matching</a> below.
  3128   <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
  3129    given font family is defined to be the face that would be selected if all
  3130    font style properties were set to their initial value.
  3132   <ol id=fontmatchingalg>
  3133    <li>Using the computed font property values for a given element, the user
  3134     agent starts with the first family name in the fontlist specified by the
  3135     <a href="#propdef-font-family" title="font-family!!property">‘<code
  3136     class=property>font-family</code>’</a> property.
  3138    <li>If the family name is unquoted and is a generic family name, the user
  3139     agent looks up the appropriate font family name to be used. User agents
  3140     may choose the generic font family to use based on the language of the
  3141     containing element or the Unicode range of the character.
  3143    <li>For other family names, the user agent attempts to find the family
  3144     name among fonts defined via <a
  3145     href="#at-font-face-rule"><code>@font-face</code></a> rules and then
  3146     among available system fonts, matching names with a case-insensitive
  3147     comparison as outlined <a href="#font-family-casing">in the section
  3148     above</a>. On systems containing fonts with multiple localized font
  3149     family names, user agents must match any of these names independent of
  3150     the underlying system locale or platform API used. If the font resources
  3151     defined for a given face in an <a
  3152     href="#at-font-face-rule"><code>@font-face</code></a> rule are either not
  3153     available or contain invalid font data, then the face should be treated
  3154     as not present in the family. If no faces are present for a family
  3155     defined via <a href="#at-font-face-rule"><code>@font-face</code></a>
  3156     rules, the family should be treated as missing; matching a platform font
  3157     with the same name must not occur in this case.
  3159    <li>If a font family match occurs, the user agent assembles the set of
  3160     font faces in that family and then narrows the set to a single face using
  3161     other font properties in the order given below:
  3162     <ol id=fontstylematchingalg>
  3163      <li><a href="#propdef-font-stretch"
  3164       title="font-stretch!!property">‘<code
  3165       class=property>font-stretch</code>’</a> is tried first. If the
  3166       matching set contains faces with width values matching the <a
  3167       href="#propdef-font-stretch" title="font-stretch!!property">‘<code
  3168       class=property>font-stretch</code>’</a> value, faces with other width
  3169       values are removed from the matching set. If there is no face that
  3170       exactly matches the width value the nearest width is used instead. If
  3171       the value of <a href="#propdef-font-stretch"
  3172       title="font-stretch!!property">‘<code
  3173       class=property>font-stretch</code>’</a> is ‘<a href="#normal"><code
  3174       class=property>normal</code></a>’ or one of the condensed values,
  3175       narrower width values are checked first, then wider values. If the
  3176       value of <a href="#propdef-font-stretch"
  3177       title="font-stretch!!property">‘<code
  3178       class=property>font-stretch</code>’</a> is one of the expanded
  3179       values, wider values are checked first, followed by narrower values.
  3180       Once the closest matching width has been determined by this process,
  3181       faces with other widths are removed from the matching set.
  3183      <li><a href="#propdef-font-style" title="font-style!!property">‘<code
  3184       class=property>font-style</code>’</a> is tried next. If the value of
  3185       <a href="#propdef-font-style" title="font-style!!property">‘<code
  3186       class=property>font-style</code>’</a> is ‘<a href="#italic"><code
  3187       class=property>italic</code></a>’, italic faces are checked first,
  3188       then oblique, then normal faces. If the value is ‘<a
  3189       href="#oblique"><code class=property>oblique</code></a>’, oblique
  3190       faces are checked first, then italic faces and then normal faces. If
  3191       the value is ‘<a href="#normal"><code
  3192       class=property>normal</code></a>’, normal faces are checked first,
  3193       then oblique faces, then italic faces. Faces with other style values
  3194       are excluded from the matching set. User agents are permitted to
  3195       distinguish between italic and oblique faces within platform font
  3196       families but this is not required, they may treat all italic or oblique
  3197       faces as italic faces. However, within font families defined via <a
  3198       href="#at-font-face-rule"><code>@font-face</code></a> rules, italic and
  3199       oblique faces must be distinguished using the value of the <a
  3200       href="#descdef-font-style" title="font-style!!descriptor">‘<code
  3201       class=property>font-style</code>’</a> descriptor.
  3203      <li><a href="#propdef-font-weight"
  3204       title="font-weight!!property">‘<code
  3205       class=property>font-weight</code>’</a> is matched next, it will
  3206       always reduce the matching set to a single font face. If bolder/lighter
  3207       relative weights are used, the effective weight is calculated based on
  3208       the inherited weight value, as described in the definition of the <a
  3209       href="#propdef-font-weight" title="font-weight!!property">‘<code
  3210       class=property>font-weight</code>’</a> property. Given the desired
  3211       weight and the weights of faces in the matching set after the steps
  3212       above, if the desired weight is available that face matches. Otherwise,
  3213       a weight is chosen using the rules below:
  3214       <ul>
  3215        <li>If the desired weight is less than 400, weights below the desired
  3216         weight are checked in descending order followed by weights above the
  3217         desired weight in ascending order until a match is found.
  3219        <li>If the desired weight is greater than 500, weights above the
  3220         desired weight are checked in ascending order followed by weights
  3221         below the desired weight in descending order until a match is found.
  3223        <li>If the desired weight is 400, 500 is checked first and then the
  3224         rule for desired weights less than 400 is used.
  3226        <li>If the desired weight is 500, 400 is checked first and then the
  3227         rule for desired weights less than 400 is used.
  3228       </ul>
  3230      <li><span class=property>‘<a href="#propdef-font-size"><code
  3231       class=property>font-size</code></a>’</span> must be matched within a
  3232       UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
  3233       are rounded to the nearest whole pixel, while the tolerance for
  3234       bitmapped fonts could be as large as 20%.) Further computations, e.g.,
  3235       by ‘<code class=property>em</code>’ values in other properties, are
  3236       based on the <span class=property>‘<a href="#propdef-font-size"><code
  3237       class=property>font-size</code></a>’</span> value that is used, not
  3238       the one that is specified.
  3239     </ol>
  3241    <li>
  3242     <p>If no matching face exists or the matched face does not contain a
  3243      glyph for the character to be rendered, the next family name is selected
  3244      and the previous two steps repeated. Glyphs from other faces in the
  3245      family are not considered. The only exception is that user agents may
  3246      optionally substitute a synthetic version of the <a
  3247      href="#default-face"><em>default face</em></a> if that face supports a
  3248      given glyph (e.g. a synthetic italic version of the regular face may be
  3249      used if the italic face doesn't support glyphs for Arabic).</p>
  3250     <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
  3252     <p>If the matched font is defined via an <a
  3253      href="#at-font-face-rule"><code>@font-face</code></a> rule and needs to
  3254      be downloaded, the font resource is downloaded. While the download
  3255      occurs, the user agent can either wait until the font is downloaded or
  3256      render once with substituted font metrics and render again once the font
  3257      is downloaded.</p>
  3259    <li>If there are no more font families to be evaluated and no matching
  3260     face has been found, then the user agent performs a <em>system font
  3261     fallback</em> procedure to find the best match for the character to be
  3262     rendered. The result of this procedure may vary across user agents.
  3264    <li>If a particular character cannot be displayed using any font, the user
  3265     agent should indicate by some means that a character is not being
  3266     displayed, displaying either a symbolic representation of the missing
  3267     glyph (e.g. using a <a
  3268     href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
  3269     Font</a>) or using the missing character glyph from a default font.
  3270   </ol>
  3272   <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
  3274   <p>When text contains characters such as combining diacritics, ideally the
  3275    base character should be rendered using the same font as the diacritic,
  3276    this assures proper placement of the diacritic. For this reason, the font
  3277    matching algorithm for clusters is more specialized than the general case
  3278    of matching a single character by itself. For sequences containing
  3279    variation selectors, which indicate the precise glyph to be used for a
  3280    given character, user agents always attempt system font fallback to find
  3281    the appropriate glyph before using the default glyph of the base
  3282    character.
  3284   <p>A font is considered to <em>support</em> a given character if (1) the
  3285    character is contained in the font's <a
  3286    href="#character-map"><em>character map</em></a> and (2) if required by
  3287    the containing script, shaping information is available for that
  3288    character. Some legacy fonts may include a given character in the <a
  3289    href="#character-map"><em>character map</em></a> but lack the shaping
  3290    information (e.g. <a
  3291    href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
  3292    layout tables</a> or <a
  3293    href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
  3294    tables</a>) necessary for correctly rendering text runs containing that
  3295    character.
  3297   <p>A sequence of codepoints containing combining diacritics or other
  3298    modifiers is termed a grapheme cluster (see <a href="#CSS3TEXT"
  3299    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
  3300    description). For a given cluster containing a base character, <em>b</em>
  3301    and a sequence of combining characters <em>c1, c2…</em>, the entire
  3302    cluster is matched using these steps:
  3304   <ol>
  3305    <li>For each family in the font list, a face is chosen using the style
  3306     selection rules defined in the previous section.
  3307     <ol>
  3308      <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
  3309       completely supported by the font, select this font for the sequence.
  3311      <li>If a sequence of multiple codepoints is canonically equivalent to a
  3312       single character and the font supports that character, select this font
  3313       for the sequence.
  3314     </ol>
  3316    <li>If no font was found in the font list in step 1:
  3317     <ol>
  3318      <li>If <em>c1</em> is a variation selector, system fallback must be used
  3319       to find a font that supports the full sequence of <em>b + c1</em>. If
  3320       no font on the system supports the full sequence, match the single
  3321       character <em>b</em> using the normal procedure for matching single
  3322       characters and ignore the variation selector. Note: a sequence with
  3323       more than one variation selector is treated as an encoding error and
  3324       the trailing selectors are ignored.
  3326      <li>Otherwise, the user agent may optionally use system font fallback to
  3327       match a font that supports the entire cluster.
  3328     </ol>
  3330    <li>If no font is found in step 2, use the matching sequence from step 1
  3331     to determine the longest sequence that is completely matched by a font in
  3332     the font list and attempt to match the remaining combining characters
  3333     separately using the rules for single characters.
  3334   </ol>
  3336   <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
  3337    issues</h3>
  3339   <p>The procedure above is always performed on text runs containing Unicode
  3340    characters, documents using legacy encodings are assumed to have been
  3341    transcoded before matching fonts. For fonts containing <a
  3342    href="#character-map"><em title="character map">character maps</em></a>
  3343    for both legacy encodings and Unicode, the contents of the legacy encoding
  3344    <a href="#character-map"><em>character map</em></a> must have no effect on
  3345    the results of the font matching process.
  3347   <p>The font matching process does not assume that text runs are in either
  3348    normalized or denormalized form (see <a href="#CHARMOD-NORM"
  3349    rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
  3350    details). Layout engines often convert base character plus combining
  3351    character sequences into precomposed characters if they exist. The font
  3352    matching algorithm outlined here supports both ways and fonts can
  3353    generally support either but variations can occur. Authors should always
  3354    tailor their choice of fonts to their content, including whether that
  3355    content contains normalized or denormalized character streams.
  3357   <p>If a given character is a Private-Use Area Unicode codepoint and none of
  3358    the fonts in the fontlist contain a glyph for that codepoint, user agents
  3359    must display some form of missing glyph symbol for that character rather
  3360    than attempting system font fallback for that codepoint. When matching the
  3361    replacement character U+FFFD, user agents may skip the font matching
  3362    process and immediately display some form of missing glyph symbol, they
  3363    are not required to display the glyph from the font that would be selected
  3364    by the font matching process.
  3366   <p>In general, the fonts for a given family will all have the same or
  3367    similar <a href="#character-map"><em title="character map">character
  3368    maps</em></a>. The process outlined here is designed to handle even font
  3369    families containing faces with widely variant <a href="#character-map"><em
  3370    title="character map">character maps</em></a>. However, authors are
  3371    cautioned that the use of such families can lead to unexpected results.
  3373   <p>Optimizations of this process are allowed provided that an
  3374    implementation behaves as if the algorithm had been followed exactly.
  3375    Matching occurs in a well-defined order to insure that the results are as
  3376    consistent as possible across user agents, given an identical set of
  3377    available fonts and rendering technology.
  3379   <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
  3380    changes since CSS 2.1</h3>
  3382   <p>The algorithm above is different from CSS 2.1 in a number of key places.
  3383    These changes were made to better reflect actual font matching behavior
  3384    across user agent implementations.
  3386   <p>Differences compared to the font matching algorithm in CSS 2.1:
  3388   <ul>
  3389    <li>The algorithm includes font-stretch matching.
  3391    <li>All possible font-style matching scenarios are delineated.
  3393    <li>Small-caps fonts are not matched as part of the font matching process,
  3394     they are now handled via font features.
  3396    <li>Unicode variation selector matching is required.
  3398    <li>Cluster sequences are matched as a unit.
  3399   </ul>
  3401   <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
  3402    examples</h3>
  3404   <div class=example>
  3405    <p>It's useful to note that the CSS selector syntax may be used to create
  3406     language-sensitive typography. For example, some Chinese and Japanese
  3407     characters are unified to have the same Unicode code point, although the
  3408     abstract glyphs are not the same in the two languages.
  3410    <pre>*:lang(ja-jp) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
  3411 *:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
  3412 </pre>
  3414    <p>This selects any element that has the given language - Japanese or
  3415     Traditional Chinese - and uses the appropriate font.
  3416   </div>
  3418   <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
  3420   <p>Modern font technologies support a variety of advanced typographic and
  3421    language-specific font features. Using these features, a single font can
  3422    provide glyphs for a wide range of ligatures, contextual and stylistic
  3423    alternates, tabular and old-style figures, small capitals, automatic
  3424    fractions, swashes, and alternates specific to a given language. To allow
  3425    authors control over these font capabilities, the ‘<code
  3426    class=property>font-variant</code>’ property has been expanded for CSS3.
  3427    It now functions as a shorthand for a set of properties that provide
  3428    control over stylistic font features.
  3430   <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
  3431    selection and positioning</h3>
  3433   <p>Simple fonts used for displaying Latin text use a very basic processing
  3434    model. Fonts contain a <a href="#character-map"><em>character map</em></a>
  3435    which maps each character to a glyph for that character. Glyphs for
  3436    subsequent characters are simply placed one after the other along a run of
  3437    text. Modern font formats such as OpenType and AAT (Apple Advanced
  3438    Typography) use a richer processing model. The glyph for a given character
  3439    can be chosen and positioned not just based on the codepoint of the
  3440    character itself, but also on adjacent characters as well as the language,
  3441    script, and features enabled for the text. Font features may be required
  3442    for specific scripts, or recommended as enabled by default or they might
  3443    be stylistic features meant to be used under author control.
  3445   <p>For a good visual overview of these features, see the <a
  3446    href="#OPENTYPE-FONT-GUIDE"
  3447    rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
  3448    For a detailed description of glyph processing for OpenType fonts, see <a
  3449    href="#WINDOWS-GLYPH-PROC"
  3450    rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
  3452   <p>Stylistic font features can be classified into two broad categories:
  3453    ones that affect the harmonization of glyph shapes with the surrounding
  3454    context, such as kerning and ligature features, and ones such as the
  3455    small-caps, subscript/superscript and alternate features that affect shape
  3456    selection.
  3458   <p>The subproperties of <a href="#propdef-font-variant"
  3459    title="font-variant!!property">‘<code
  3460    class=property>font-variant</code>’</a> listed below are used to control
  3461    these stylistic font features. They do not control features that are
  3462    required for displaying certain scripts, such as the OpenType features
  3463    used when displaying Arabic or Indic language text. They affect glyph
  3464    selection and positioning, but do not affect font selection as described
  3465    in the font matching section (except in cases required for compatibility
  3466    with CSS 2.1).
  3468   <p>To assure consistent behavior across user agents, the equivalent
  3469    OpenType property settings are listed for individual properties and are
  3470    normative. When using other font formats these should be used as a
  3471    guideline to map CSS font feature property values to specific font
  3472    features.
  3474   <h3 id=language-specific-support><span class=secno>6.2
  3475    </span>Language-specific display</h3>
  3477   <p>OpenType also supports language-specific glyph selection and
  3478    positioning, so that text can be displayed correctly in cases where the
  3479    language dictates a specific display behavior. Many languages share a
  3480    common script, but the shape of certain letters can vary across those
  3481    languages. For example, certain Cyrillic letters have different shapes in
  3482    Russian text than in Bulgarian. In Latin text, it's common to render "fi"
  3483    with an explicit fi-ligature that lacks a dot on the "i". However, in
  3484    languages such as Turkish which uses both a dotted-i and a dotless-i, it's
  3485    important to not use this ligature or use a specialized version that
  3486    contains a dot over the "i". The example below shows language-specific
  3487    variations based on stylistic traditions found in Spanish, Italian and
  3488    French orthography:
  3490   <div class=featex><img alt="language specific forms, spanish"
  3491    src=locl-1.png></div>
  3493   <div class=featex><img alt="language specific forms, italian"
  3494    src=locl-2.png></div>
  3496   <div class=featex><img alt="language specific forms, french"
  3497    src=locl-3.png></div>
  3499   <p>If the content language of the element is known according to the rules
  3500    of the <a
  3501    href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
  3502    language</a>, user agents are required to infer the OpenType language
  3503    system from the content language and use that when selecting and
  3504    positioning glyphs using an OpenType font.
  3506   <p>For OpenType fonts, in some cases it may be necessary to explicitly
  3507    declare the OpenType language to be used, for example when displaying text
  3508    in a given language that uses the typographic conventions of another
  3509    language or when the font does not explicitly support a given language but
  3510    supports a language that shares common typographic conventions. The ‘<a
  3511    href="#propdef-font-language-override"><code
  3512    class=property>font-language-override</code></a>’ property is used for
  3513    this purpose.</p>
  3514   <!-- prop: font-kerning -->
  3516   <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
  3517    href="#propdef-font-kerning">font-kerning</a> property</h3>
  3519   <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
  3520    <tbody>
  3521     <tr>
  3522      <td>Name:
  3524      <td><dfn id=propdef-font-kerning>font-kerning</dfn>
  3526     <tr>
  3527      <td>Value:
  3529      <td><a href="#font-kerning-auto-value"
  3530       title="auto!!font-kerning">auto</a> | <a
  3531       href="#font-kerning-normal-value"
  3532       title="normal!!font-kerning">normal</a> | <a
  3533       href="#font-kerning-none-value" title="none!!font-kerning">none</a>
  3535     <tr>
  3536      <td>Initial:
  3538      <td>auto
  3540     <tr>
  3541      <td>Applies to:
  3543      <td>all elements
  3545     <tr>
  3546      <td>Inherited:
  3548      <td>yes
  3550     <tr>
  3551      <td>Percentages:
  3553      <td>N/A
  3555     <tr>
  3556      <td>Media:
  3558      <td>visual
  3560     <tr>
  3561      <td>Computed value:
  3563      <td>as specified
  3565     <tr>
  3566      <td>Animatable:
  3568      <td>no
  3569   </table>
  3571   <p>Kerning is the contextual adjustment of inter-glyph spacing. This
  3572    property controls metric kerning, kerning that utilizes adjustment data
  3573    contained in the font.
  3575   <dl>
  3576    <dt><dfn id=font-kerning-auto-value title="auto!!font-kerning">auto</dfn>
  3578    <dd>Specifies that kerning is applied at the discretion of the user agent
  3580    <dt><dfn id=font-kerning-normal-value
  3581     title="normal!!font-kerning">normal</dfn>
  3583    <dd>Specifies that kerning is applied
  3585    <dt><dfn id=font-kerning-none-value title="none!!font-kerning">none</dfn>
  3587    <dd>Specifies that kerning is not applied
  3588   </dl>
  3590   <p>For fonts that do not include kerning data this property will have no
  3591    visible effect. When rendering with OpenType fonts, the <a
  3592    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
  3593    specification suggests that kerning be enabled by default. When kerning is
  3594    enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
  3595    vertical text runs the <span class=tag>vkrn</span> feature is enabled
  3596    instead). User agents must also support fonts that only support kerning
  3597    via data contained in a <span class=tag>kern</span> font table, as
  3598    detailed in the OpenType specification. If the ‘<code
  3599    class=property>letter-spacing</code>’ property is defined, kerning
  3600    adjustments are considered part of the default spacing and letter spacing
  3601    adjustments are made after kerning has been applied.
  3603   <p>When set to ‘<code class=property>auto</code>’, user agents can
  3604    determine whether to apply kerning or not based on a number of factors:
  3605    text size, script, or other factors that influence text processing speed.
  3606    Authors who want proper kerning should use ‘<a href="#normal"><code
  3607    class=property>normal</code></a>’ to explicitly enable kerning.
  3608    Likewise, some authors may prefer to disable kerning in situations where
  3609    performance is more important than precise appearance. However, in
  3610    well-designed modern implementations the use of kerning generally does not
  3611    have a large impact on text rendering speed.</p>
  3612   <!-- prop: font-variant-ligatures -->
  3614   <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
  3615    the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  3616    property</h3>
  3618   <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
  3619    <tbody>
  3620     <tr>
  3621      <td>Name:
  3623      <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
  3625     <tr>
  3626      <td>Value:
  3628      <td><a href="#font-variant-ligatures-normal-value"
  3629       title="normal!!font-variant-ligatures">normal</a> | <a
  3630       href="#font-variant-ligatures-none-value"
  3631       title="none!!font-variant-ligatures">none</a> | [ <a
  3632       href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
  3633       <a
  3634       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  3635       || <a
  3636       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  3637       || <a
  3638       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  3641     <tr>
  3642      <td>Initial:
  3644      <td>normal
  3646     <tr>
  3647      <td>Applies to:
  3649      <td>all elements
  3651     <tr>
  3652      <td>Inherited:
  3654      <td>yes
  3656     <tr>
  3657      <td>Percentages:
  3659      <td>N/A
  3661     <tr>
  3662      <td>Media:
  3664      <td>visual
  3666     <tr>
  3667      <td>Computed value:
  3669      <td>as specified
  3671     <tr>
  3672      <td>Animatable:
  3674      <td>no
  3675   </table>
  3677   <p>Ligatures and contextual forms are ways of combining glyphs to produce
  3678    more harmonized forms.
  3680   <pre
  3681    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>
  3683   <pre
  3684    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>
  3686   <pre
  3687    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>
  3689   <pre
  3690    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>
  3692   <p>Individual values have the following meanings:
  3694   <dl>
  3695    <dt><dfn id=font-variant-ligatures-normal-value
  3696     title="normal!!font-variant-ligatures">normal</dfn>
  3698    <dd>A value of ‘<a href="#normal"><code
  3699     class=property>normal</code></a>’ specifies that common default
  3700     features are enabled, <a href="#font-feature-resolution">as described in
  3701     detail in the next section</a>. For OpenType fonts, common ligatures and
  3702     contextual forms are on by default, discretionary and historical
  3703     ligatures are not.
  3705    <dt><dfn id=font-variant-ligatures-none-value
  3706     title="none!!font-variant-ligatures">none</dfn>
  3708    <dd>Specifies that all types of ligatures and contextual forms covered by
  3709     this property are explicitly disabled. In situations where ligatures are
  3710     not considered necessary, this may improve the speed of text rendering.
  3712    <dt><dfn id=common-ligatures>common-ligatures</dfn>
  3714    <dd>Enables display of common ligatures (OpenType features: <span
  3715     class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
  3716     enabled by default.
  3717   </dl>
  3719   <div class=featex><img alt="common ligature example" src=liga.png></div>
  3721   <dl>
  3722    <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
  3724    <dd>Disables display of common ligatures (OpenType features: <span
  3725     class=tag>liga, clig</span>).
  3727    <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
  3729    <dd>Enables display of discretionary ligatures (OpenType feature: <span
  3730     class=tag>dlig</span>). Which ligatures are discretionary or optional is
  3731     decided by the type designer, so authors will need to refer to the
  3732     documentation of a given font to understand which ligatures are
  3733     considered discretionary.
  3734   </dl>
  3736   <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
  3738   <dl>
  3739    <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
  3741    <dd>Disables display of discretionary ligatures (OpenType feature: <span
  3742     class=tag>dlig</span>).
  3744    <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
  3746    <dd>Enables display of historical ligatures (OpenType feature: <span
  3747     class=tag>hlig</span>).
  3748   </dl>
  3750   <div class=featex><img alt="historical ligature example" src=hlig.png></div>
  3752   <dl>
  3753    <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
  3755    <dd>Disables display of historical ligatures (OpenType feature: <span
  3756     class=tag>hlig</span>).
  3758    <dt><dfn id=contextual>contextual</dfn>
  3760    <dd>Enables display of contextual alternates (OpenType feature: <span
  3761     class=tag>calt</span>). Although not strictly a ligature feature, like
  3762     ligatures this feature is commonly used to harmonize the shapes of glyphs
  3763     with the surrounding context. For OpenType fonts, this feature is on by
  3764     default.
  3765   </dl>
  3767   <div class=featex><img alt="contextual alternate example" src=calt.png></div>
  3769   <dl>
  3770    <dt><dfn id=no-contextual>no-contextual</dfn>
  3772    <dd>Disables display of contextual alternates (OpenType feature: <span
  3773     class=tag>calt</span>).
  3774   </dl>
  3776   <p>Required ligatures, needed for correctly rendering complex scripts, are
  3777    not affected by the settings above, including ‘<code
  3778    class=property>none</code>’ (OpenType feature: <span
  3779    class=tag>rlig</span>).</p>
  3780   <!-- prop: font-variant-position -->
  3782   <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
  3783    and superscript forms: the <a
  3784    href="#propdef-font-variant-position">font-variant-position</a> property</h3>
  3786   <table class=propdef id=namefont-variant-positionvaluenormal-sub>
  3787    <tbody>
  3788     <tr>
  3789      <td>Name:
  3791      <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
  3793     <tr>
  3794      <td>Value:
  3796      <td><span title="normal!!font-variant-position">normal</span> | <a
  3797       href="#sub">sub</a> | <a href="#super">super</a>
  3799     <tr>
  3800      <td>Initial:
  3802      <td>normal
  3804     <tr>
  3805      <td>Applies to:
  3807      <td>all elements
  3809     <tr>
  3810      <td>Inherited:
  3812      <td>yes
  3814     <tr>
  3815      <td>Percentages:
  3817      <td>N/A
  3819     <tr>
  3820      <td>Media:
  3822      <td>visual
  3824     <tr>
  3825      <td>Computed value:
  3827      <td>as specified
  3829     <tr>
  3830      <td>Animatable:
  3832      <td>no
  3833   </table>
  3835   <p>This property is used to enable typographic subscript and superscript
  3836    glyphs. These are alternate glyphs designed within the same em-box as
  3837    default glyphs and are intended to be laid out on the same baseline as the
  3838    default glyphs, with no resizing or repositioning of the baseline. They
  3839    are explicitly designed to match the surrounding text and to be more
  3840    readable without affecting the line height.
  3842   <div class=figure><img alt="comparison between real subscript glyphs and
  3843    synthesized ones" src=realsubscripts.png>
  3844    <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
  3845     (bottom)
  3846   </div>
  3848   <p>Individual values have the following meanings:
  3850   <dl>
  3851    <dt><dfn id=normal>normal</dfn>
  3853    <dd>None of the features listed below are enabled.
  3855    <dt><dfn id=sub>sub</dfn>
  3857    <dd>Enables display of subscript variants (OpenType feature: <span
  3858     class=tag>subs</span>).
  3860    <dt><dfn id=super>super</dfn>
  3862    <dd>Enables display of superscript variants (OpenType feature: <span
  3863     class=tag>sups</span>).
  3864   </dl>
  3866   <p>Because of the semantic nature of subscripts and superscripts, when the
  3867    value is either ‘<a href="#sub"><code class=property>sub</code></a>’
  3868    or ‘<a href="#super"><code class=property>super</code></a>’ for a
  3869    given contiguous run of text, if a variant glyph is not available for all
  3870    the characters in the run, simulated glyphs must be synthesized for all
  3871    characters using reduced forms of the glyphs that would be used without
  3872    this feature applied. This is done per run to avoid a mixture of variant
  3873    glyphs and synthesized ones that would not align correctly. In the case of
  3874    OpenType fonts that lack subscript or superscript glyphs for a given
  3875    character, user agents must use the appropriate subscript and superscript
  3876    metrics specified in the selected font's <a
  3877    href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
  3878    table</a> <a href="#OPENTYPE"
  3879    rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
  3880    and offset of the synthesized substitutes.
  3882   <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
  3883    using superscript metrics" src=superscript-alt-synth.png>
  3884    <p class=caption>Superscript alternate glyph (left), synthesized
  3885     superscript glyphs (middle), and incorrect mixture of the two (right)
  3886   </div>
  3888   <p>In the past, user agents have used font-size and vertical-align to
  3889    simulate subscripts and superscripts for the <a class=tag
  3890    href="#sub">sub</a> and <span class=tag>sup</span> elements. To allow a
  3891    backwards compatible way of defining subscripts and superscripts, it is
  3892    recommended that authors use conditional rules <a href="#CSS3-CONDITIONAL"
  3893    rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
  3894    older user agents will still render subscripts and superscripts via the
  3895    older mechanism.
  3897   <p>Authors should note that fonts typically only provide subscript and
  3898    superscript glyphs for a subset of all characters supported by the font.
  3899    For example, while subscript and superscript glyphs are often available
  3900    for Latin numbers, glyphs for punctuation and letter characters are less
  3901    frequently provided. The synthetic fallback rules defined for this
  3902    property assure that subscripts and superscripts will always appear but
  3903    the appearance may not match author expectations if the font used does not
  3904    provide the appropriate alternate glyph for all characters contained in a
  3905    subscript or superscript.
  3907   <p>This property is not cumulative. Applying it to elements within a
  3908    subscript or superscript won't nest the placement of a subscript or
  3909    superscript glyph. Images contained within text runs where the value of
  3910    this property is ‘<a href="#sub"><code class=property>sub</code></a>’
  3911    or ‘<a href="#super"><code class=property>super</code></a>’ will be
  3912    drawn just as they would if the value was ‘<a href="#normal"><code
  3913    class=property>normal</code></a>’. Likewise, text decorations such as
  3914    underlines or emphasis marks will render in the same position as they
  3915    would for the default glyphs, since this property does not affect the
  3916    baseline position.
  3918   <p class=issue>Some have suggested that text decorations should apply to
  3919    the visual baseline of the variant glyphs, rather than the baseline
  3920    defined by the font.
  3922   <p>Because of these limitations, ‘<a
  3923    href="#propdef-font-variant-position"><code
  3924    class=property>font-variant-position</code></a>’ is not recommended for
  3925    use in user agent stylesheets. Authors should use it in cases where
  3926    subscripts or superscripts will only contain the narrow range of
  3927    characters supported by the fonts specified.
  3929   <div class=example>
  3930    <p>A typical user agent default style for the <a class=tag
  3931     href="#sub">sub</a> element:</p>
  3933    <pre>sub {
  3934   vertical-align: sub;
  3935   font-size: smaller;
  3936   line-height: normal;
  3938 </pre>
  3940    <p>Using font-variant-position to specify typographic subscripts in a way
  3941     that will still show subscripts in older user agents:</p>
  3943    <pre>@supports ( font-variant-position: sub ) {
  3945   sub {
  3946     vertical-align: baseline;
  3947     font-size: 100%;
  3948     line-height: inherit;
  3949     font-variant-position: sub;
  3953 </pre>
  3955    <p>User agents that support the ‘<a
  3956     href="#propdef-font-variant-position"><code
  3957     class=property>font-variant-position</code></a>’ property will select a
  3958     subscript variant glyph and render this without adjusting the baseline or
  3959     font-size. Older user agents will ignore the ‘<a
  3960     href="#propdef-font-variant-position"><code
  3961     class=property>font-variant-position</code></a>’ property definition
  3962     and use the standard defaults for subscripts.</p>
  3963   </div>
  3964   <!-- prop: font-variant-caps -->
  3966   <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
  3967    the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
  3969   <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
  3970    <tbody>
  3971     <tr>
  3972      <td>Name:
  3974      <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
  3976     <tr>
  3977      <td>Value:
  3979      <td><a href="#font-variant-caps-normal-value"
  3980       title="normal!!font-variant-caps">normal</a> | <a
  3981       href="#small-caps">small-caps</a> | <a
  3982       href="#all-small-caps">all-small-caps</a> | <a
  3983       href="#petite-caps">petite-caps</a> | <a
  3984       href="#all-petite-caps">all-petite-caps</a> | <a
  3985       href="#unicase">unicase</a> | <a href="#titling-caps">titling-caps</a>
  3987     <tr>
  3988      <td>Initial:
  3990      <td>normal
  3992     <tr>
  3993      <td>Applies to:
  3995      <td>all elements
  3997     <tr>
  3998      <td>Inherited:
  4000      <td>yes
  4002     <tr>
  4003      <td>Percentages:
  4005      <td>N/A
  4007     <tr>
  4008      <td>Media:
  4010      <td>visual
  4012     <tr>
  4013      <td>Computed value:
  4015      <td>as specified
  4017     <tr>
  4018      <td>Animatable:
  4020      <td>no
  4021   </table>
  4023   <p>This property allows the selection of alternate glyphs used for small or
  4024    petite capitals or for titling. These glyphs are specifically designed to
  4025    blend well with the surrounding normal glyphs, to maintain the weight and
  4026    readability which suffers when text is simply resized to fit this purpose.
  4028   <p>Individual values have the following meanings:
  4030   <dl>
  4031    <dt><dfn id=font-variant-caps-normal-value
  4032     title="normal!!font-variant-caps">normal</dfn>
  4034    <dd>None of the features listed below are enabled.
  4036    <dt><dfn id=small-caps>small-caps</dfn>
  4038    <dd>Enables display of small capitals (OpenType feature: <span
  4039     class=tag>smcp</span>). Small-caps glyphs typically use the form of
  4040     uppercase letters but are reduced to the size of lowercase letters.
  4041   </dl>
  4043   <div class=featex><img alt="small-caps example" src=smcp.png></div>
  4045   <dl>
  4046    <dt><dfn id=all-small-caps>all-small-caps</dfn>
  4048    <dd>Enables display of small capitals for both upper and lowercase letters
  4049     (OpenType features: <span class=tag>c2sc, smcp</span>).
  4051    <dt><dfn id=petite-caps>petite-caps</dfn>
  4053    <dd>Enables display of petite capitals (OpenType feature: <span
  4054     class=tag>pcap</span>).
  4056    <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
  4058    <dd>Enables display of petite capitals for both upper and lowercase
  4059     letters (OpenType features: <span class=tag>c2pc, pcap</span>).
  4061    <dt><dfn id=unicase>unicase</dfn>
  4063    <dd>Enables display of mixture of small capitals for uppercase letters
  4064     with normal lowercase letters (OpenType feature: <span
  4065     class=tag>unic</span>).
  4067    <dt><dfn id=titling-caps>titling-caps</dfn>
  4069    <dd>Enables display of titling capitals (OpenType feature: <span
  4070     class=tag>titl</span>). Uppercase letter glyphs are often designed for
  4071     use with lowercase letters. When used in all uppercase titling sequences
  4072     they can appear too strong. Titling capitals are designed specifically
  4073     for this situation.
  4074   </dl>
  4076   <p>The availability of these glyphs is based on whether a given feature is
  4077    defined or not in the feature list of the font. User agents can optionally
  4078    decide this on a per-script basis but should explicitly not decide this on
  4079    a per-character basis.
  4081   <p>Some fonts may only support a subset or none of the features described
  4082    for this property. For backwards compatibility with CSS 2.1, if ‘<a
  4083    href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
  4084    href="#all-small-caps"><code class=property>all-small-caps</code></a>’
  4085    is specified but small-caps glyphs are not available for a given font,
  4086    user agents should simulate a small-caps font, for example by taking a
  4087    normal font and replacing the glyphs for lowercase letters with scaled
  4088    versions of the glyphs for uppercase characters (replacing the glyphs for
  4089    both upper and lowercase letters in the case of ‘<a
  4090    href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
  4092   <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
  4093    real small-caps" class=hires src=synthetic-vs-real-small-caps.png
  4094    width=512px>
  4095    <p class=caption>Synthetic vs. real small-caps
  4096   </div>
  4098   <p>To match the surrounding text, a font may provide alternate glyphs for
  4099    caseless characters when these features are enabled but when a user agent
  4100    simulates small capitals, it must not attempt to simulate alternates for
  4101    codepoints which are considered caseless.
  4103   <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
  4104    characters with small-caps, all-small-caps enabled" class=hires
  4105    src=small-capitals-variations.png width=418px>
  4106    <p class=caption>Caseless characters with small-caps, all-small-caps
  4107     enabled
  4108   </div>
  4110   <p>If either ‘<a href="#petite-caps"><code
  4111    class=property>petite-caps</code></a>’ or ‘<a
  4112    href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
  4113    is specified for a font that doesn't support these features, the property
  4114    behaves as if ‘<a href="#small-caps"><code
  4115    class=property>small-caps</code></a>’ or ‘<a
  4116    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4117    respectively, had been specified. If ‘<a href="#unicase"><code
  4118    class=property>unicase</code></a>’ is specified for a font that doesn't
  4119    support that feature, the property behaves as if ‘<a
  4120    href="#small-caps"><code class=property>small-caps</code></a>’ was
  4121    applied only to lowercased uppercase letters. If ‘<a
  4122    href="#titling-caps"><code class=property>titling-caps</code></a>’ is
  4123    specified with a font that does not support this feature, this property
  4124    has no visible effect. When simulated small capital glyphs are used, for
  4125    scripts that lack uppercase and lowercase letters, ‘<a
  4126    href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
  4127    href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
  4128    ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
  4129    ‘<a href="#all-petite-caps"><code
  4130    class=property>all-petite-caps</code></a>’ and ‘<a
  4131    href="#unicase"><code class=property>unicase</code></a>’ have no visible
  4132    effect.
  4134   <p>When casing transforms are used to simulate small capitals, the casing
  4135    transformations must match those used for the <span
  4136    class=property>‘<code class=property>text-transform</code>’</span>
  4137    property.
  4139   <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
  4140    replace glyphs in a small-caps font so that the text appears in all
  4141    uppercase letters.
  4143   <div class=figure style="padding: 0; margin: auto;"><img alt="using
  4144    all-small-caps in acronym-laden text" class=hires
  4145    src=acronym-laden-text.png width=596px>
  4146    <p class=caption>Using small capitals to improve readability in
  4147     acronym-laden text
  4148   </div>
  4150   <div class=example>
  4151    <p>Quotes rendered italicised, with small-caps on the first line:</p>
  4153    <pre>blockquote            { font-style: italic; }
  4154 blockquote:first-line { font-variant: small-caps; }
  4156 &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>
  4157 </pre>
  4158   </div>
  4159   <!-- prop: font-variant-numeric -->
  4161   <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
  4162    formatting: the <a
  4163    href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
  4165   <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
  4166    <tbody>
  4167     <tr>
  4168      <td>Name:
  4170      <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
  4172     <tr>
  4173      <td>Value:
  4175      <td><a href="#font-variant-numeric-normal-value"
  4176       title="normal!!font-variant-numeric">normal</a> | [ <a
  4177       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  4178       || <a
  4179       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  4180       || <a
  4181       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  4182       || <a href="#ordinal">ordinal</a> || <a
  4183       href="#slashed-zero">slashed-zero</a> ]
  4185     <tr>
  4186      <td>Initial:
  4188      <td>normal
  4190     <tr>
  4191      <td>Applies to:
  4193      <td>all elements
  4195     <tr>
  4196      <td>Inherited:
  4198      <td>yes
  4200     <tr>
  4201      <td>Percentages:
  4203      <td>N/A
  4205     <tr>
  4206      <td>Media:
  4208      <td>visual
  4210     <tr>
  4211      <td>Computed value:
  4213      <td>as specified
  4215     <tr>
  4216      <td>Animatable:
  4218      <td>no
  4219   </table>
  4221   <p>Specifies control over numerical forms. The example below shows how some
  4222    of these values can be combined to influence the rendering of tabular data
  4223    with fonts that support these features. Within normal paragraph text,
  4224    proportional numbers are used while tabular numbers are used so that
  4225    columns of numbers line up properly:
  4227   <div class=figure style="padding: 0; margin: auto;"><img alt="combining
  4228    number styles" src=numberstyles.png>
  4229    <p class=caption>Using number styles
  4230   </div>
  4232   <p>Possible combinations:
  4234   <pre
  4235    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>
  4237   <pre
  4238    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>
  4240   <pre
  4241    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>
  4243   <p>Individual values have the following meanings:
  4245   <dl>
  4246    <dt><dfn id=font-variant-numeric-normal-value
  4247     title="normal!!font-variant-numeric">normal</dfn>
  4249    <dd>None of the features listed below are enabled.
  4251    <dt><dfn id=lining-nums>lining-nums</dfn>
  4253    <dd>Enables display of lining numerals (OpenType feature: <span
  4254     class=tag>lnum</span>).
  4256    <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
  4258    <dd>Enables display of old-style numerals (OpenType feature: <span
  4259     class=tag>onum</span>).
  4261    <dt><dfn id=proportional-nums>proportional-nums</dfn>
  4263    <dd>Enables display of proportional numerals (OpenType feature: <span
  4264     class=tag>pnum</span>).
  4266    <dt><dfn id=tabular-nums>tabular-nums</dfn>
  4268    <dd>Enables display of tabular numerals (OpenType feature: <span
  4269     class=tag>tnum</span>).
  4271    <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
  4273    <dd>Enables display of lining diagonal fractions (OpenType feature: <span
  4274     class=tag>frac</span>).
  4275   </dl>
  4277   <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
  4279   <dl>
  4280    <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
  4282    <dd>Enables display of lining stacked fractions (OpenType feature: <span
  4283     class=tag>afrc</span>).
  4284   </dl>
  4286   <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
  4288   <dl>
  4289    <dt><dfn id=ordinal>ordinal</dfn>
  4291    <dd>Enables display of forms used with ordinal numbers (OpenType feature:
  4292     <span class=tag>ordn</span>).
  4294    <dt><dfn id=slashed-zero>slashed-zero</dfn>
  4296    <dd>Enables display of slashed zeros (OpenType feature: <span
  4297     class=tag>zero</span>).
  4298   </dl>
  4300   <div class=featex><img alt="slashed zero example" src=zero.png></div>
  4302   <div class=example id=steak-marinade>
  4303    <p>A simple flank steak marinade recipe, rendered with automatic fractions
  4304     and old-style numerals:</p>
  4306    <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
  4308 &lt;h4>Steak marinade:&lt;/h4>
  4309 &lt;ul>
  4310   &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
  4311   &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
  4312   &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
  4313   &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
  4314   &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
  4315   &lt;li>Salt &amp;amp; pepper&lt;/li>
  4316 &lt;/ul>
  4318 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
  4319 for a few hours or overnight.&lt;/p>
  4320 </pre>
  4322    <p>Note that the fraction feature is only applied to values not the entire
  4323     paragraph. Fonts often implement this feature using contextual rules
  4324     based on the use of the slash (‘<code class=css>/</code>’) character.
  4325     As such, it's not suitable for use as a paragraph-level style.</p>
  4326   </div>
  4327   <!-- prop: font-variant-alternates -->
  4329   <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
  4330    and swashes: the <a
  4331    href="#propdef-font-variant-alternates">font-variant-alternates</a>
  4332    property</h3>
  4334   <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
  4335    <tbody>
  4336     <tr>
  4337      <td>Name:
  4339      <td><dfn
  4340       id=propdef-font-variant-alternates>font-variant-alternates</dfn>
  4342     <tr>
  4343      <td>Value:
  4345      <td>normal | [ <a href="#stylistic"
  4346       title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
  4347       href="#historical-forms">historical-forms</a> || <a href="#styleset"
  4348       title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
  4349       href="#character-variant"
  4350       title=character-variant>character-variant(&lt;feature-value-name&gt;
  4351       #)</a> || <a href="#swash"
  4352       title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
  4353       href="#ornaments"
  4354       title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
  4355       href="#annotation"
  4356       title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
  4358     <tr>
  4359      <td>Initial:
  4361      <td>normal
  4363     <tr>
  4364      <td>Applies to:
  4366      <td>all elements
  4368     <tr>
  4369      <td>Inherited:
  4371      <td>yes
  4373     <tr>
  4374      <td>Percentages:
  4376      <td>N/A
  4378     <tr>
  4379      <td>Media:
  4381      <td>visual
  4383     <tr>
  4384      <td>Computed value:
  4386      <td>as specified
  4388     <tr>
  4389      <td>Animatable:
  4391      <td>no
  4392   </table>
  4394   <p>For any given character, fonts can provide a variety of alternate glyphs
  4395    in addition to the default glyph for that character. This property
  4396    provides control over the selection of these alternate glyphs.
  4398   <p>For many of the property values listed below, several different
  4399    alternate glyphs are available. How many alternates are available and what
  4400    they represent is font-specific, so these are each marked <em>font
  4401    specific</em> in the value definitions below. Because the nature of these
  4402    alternates is font-specific, the <a
  4403    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4404    rule is used to define values for a specific font family or set of
  4405    families that associate a font-specific numeric
  4406    <code>&lt;feature-index&gt;</code> with a custom
  4407    <code>&lt;feature-value-name&gt;</code>, which is then used in this
  4408    property to select specific alternates:
  4410   <pre>@font-feature-values Noble Script { @swash { swishy: 1; flowing: 2; } }
  4412 p {
  4413   font-family: Noble Script;
  4414   font-variant-alternates: swash(flowing); /* use swash alternate #2 */
  4415 }</pre>
  4417   <p>When a particular <code>&lt;feature-value-name&gt;</code> has not been
  4418    defined for a given family or for a particular feature type, the computed
  4419    value must be the same as if it had been defined. However, property values
  4420    that contain these undefined <code>&lt;feature-value-name&gt;</code>
  4421    identifiers must be ignored when choosing glyphs.
  4423   <pre>/* these two style rules are effectively the same */
  4424 p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
  4425 p { font-variant-alternates: normal; }
  4426 </pre>
  4428   <p>This allows values to be defined and used for a given set of font
  4429    families but ignored if fallback occurs, since the font family name would
  4430    be different. If a given value is outside the range supported by a given
  4431    font, the value is ignored. These values never apply to generic font
  4432    families.
  4434   <p>Individual values have the following meanings:
  4436   <dl>
  4437    <dt><dfn id=font-variant-alternates-normal-value
  4438     title="normal!!font-variant-alternates">normal</dfn>
  4440    <dd>None of the features listed below are enabled.
  4442    <dt><dfn id=historical-forms>historical-forms</dfn>
  4444    <dd>Enables display of historical forms (OpenType feature: <span
  4445     class=tag>hist</span>).
  4446   </dl>
  4448   <div class=featex><img alt="historical form example" src=hist.png></div>
  4450   <dl>
  4451    <dt><dfn id=stylistic
  4452     title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
  4454    <dd>Enables display of stylistic alternates (<em>font specific</em>,
  4455     OpenType feature: <span class=tag>salt &lt;feature-index&gt;</span>).
  4456   </dl>
  4458   <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
  4460   <dl>
  4461    <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
  4462     #)</dfn>
  4464    <dd>Enables display with stylistic sets (<em>font specific</em>, OpenType
  4465     feature: <span class=tag>ss&lt;feature-index&gt;</span> OpenType
  4466     currently defines <span class=tag>ss01</span> through <span
  4467     class=tag>ss20</span>).
  4468   </dl>
  4470   <div class=featex><img alt="styleset example" src=ssnn.png></div>
  4472   <dl>
  4473    <dt><dfn id=character-variant
  4474     title=character-variant>character-variant(&lt;feature-value-name&gt;
  4475     #)</dfn>
  4477    <dd>Enables display of specific character variants (<em>font
  4478     specific</em>, OpenType feature: <span
  4479     class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
  4480     class=tag>cv01</span> through <span class=tag>cv99</span>).
  4482    <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
  4484    <dd>Enables display of swash glyphs (<em>font specific</em>, OpenType
  4485     feature: <span class=tag>swsh &lt;feature-index&gt;, cswh
  4486     &lt;feature-index&gt;</span>).
  4487   </dl>
  4489   <div class=featex><img alt="swash example" src=swsh.png></div>
  4491   <dl>
  4492    <dt><dfn id=ornaments
  4493     title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
  4495    <dd>Enables replacement of default glyphs with ornaments, if provided in
  4496     the font (<em>font specific</em>, OpenType feature: <span class=tag>ornm
  4497     &lt;feature-index&gt;</span>). Some fonts may offer ornament glyphs as
  4498     alternates for a wide collection of characters; however, displaying
  4499     arbitrary characters (e.g., alphanumerics) as ornaments is poor practice
  4500     as it distorts the semantics of the data. Font designers are encouraged
  4501     to encode all ornaments (except those explicitly encoded in the Unicode
  4502     Dingbats blocks, etc.) as alternates for the bullet character (U+2022) to
  4503     allow authors to select the desired glyph using ‘<a
  4504     href="#ornaments"><code class=property>ornaments</code></a>’.
  4505   </dl>
  4507   <div class=featex><img alt="ornaments example" src=ornm.png></div>
  4509   <dl>
  4510    <dt><dfn id=annotation
  4511     title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
  4513    <dd>Enables display of alternate annotation forms (<em>font specific</em>,
  4514     OpenType feature: <span class=tag>nalt &lt;feature-index&gt;</span>).
  4515   </dl>
  4517   <div class=featex><img alt="alternate annotation form example"
  4518    src=nalt.png></div>
  4520   <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
  4521    specific alternates: the <dfn id=at-font-feature-values-rule
  4522    style="font-weight: inherit; font-style:
  4523    inherit"><code>@font-feature-values</code></dfn> rule</h3>
  4525   <p>Several of the possible values of ‘<a
  4526    href="#propdef-font-variant-alternates"><code
  4527    class=property>font-variant-alternates</code></a>’ listed above are
  4528    labeled as "font specific". For these features fonts may define not just a
  4529    single glyph but a set of alternate glyphs with an index to select a given
  4530    alternate. Since these are font family specific, the <a
  4531    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4532    rule is used to define named-values for these indices for a given family.
  4534   <p>In the case of the swash Q in the example shown above, the swash could
  4535    be specified using these style rules:
  4537   <pre>
  4539 @font-feature-values Jupiter Sans {
  4540   @swash {
  4541     delicate: 1;
  4542     flowing: 2;
  4546 h2 { font-family: Jupiter Sans, sans-serif; }
  4548 /* show the second swash variant in h2 headings */
  4549 h2:first-letter { font-variant-alternates: swash(flowing); }
  4551 &lt;h2>Quick&lt;/h2></pre>
  4553   <p>When Jupiter Sans is present, the second alternate swash alternate will
  4554    be displayed. When not present, no swash character will be shown, since
  4555    the specific named-value "flowing" is only defined for the Jupiter Sans
  4556    family. The @-mark indicates the name of the property value for which a
  4557    named-value can be used. The name "flowing" is chosen by the author, the
  4558    values specified within a given font's data.
  4560   <p>In terms of the grammar, this specification defines the following
  4561    productions:
  4563   <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
  4564   : <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>*
  4565     '{' <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>*
  4568 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
  4569   : <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> ]*
  4572 <dfn id=fontfamilyname>font_family_name</dfn>
  4573   : <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> ]* ]
  4576 <dfn id=featurevalueblock>feature_value_block</dfn>
  4577   : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
  4578     '{' <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>*
  4581 <dfn id=featuretype>feature_type</dfn>:
  4582   <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
  4585 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
  4586   : <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> ]*
  4588 </pre>
  4590   <p>The following new token is introduced:
  4592   <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>;}
  4593 </pre>
  4595   <p>Feature value blocks are treated <a
  4596    href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">similar to
  4597    at-rules</a>, they consist of everything up to the next block or
  4598    semi-colon, whichever comes first.
  4600   <p>Font feature values rules define a set of values for a specific font
  4601    feature as used for a given set of families. Effectively, they define a
  4602    mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
  4603    ⟨values⟩ are the indices used for specific features defined for a
  4604    given font.
  4606   <p>The font family list uses the same syntax as that used for the <a
  4607    href="#propdef-font-family" title="font-family!!property">‘<code
  4608    class=property>font-family</code>’</a> property. Within feature value
  4609    blocks, the feature type is ‘<code class=css>@</code>’ followed by the
  4610    name of the font-specific property value (e.g. <a
  4611    href="#swash"><code>@swash</code></a>). The feature type must match, using
  4612    an ASCII case-insensitive comparison, one of the <em>font specific</em>
  4613    values of the ‘<a href="#propdef-font-variant-alternates"><code
  4614    class=property>font-variant-alternates</code></a>’ property. The values
  4615    associated with a given idenitifier are limited to integer values 0 or
  4616    greater.
  4618   <p>If syntax errors occur within the font family list, the entire rule must
  4619    be ignored. When syntax errors occur within a feature value definition,
  4620    such as invalid identifiers or values, the entire feature value definition
  4621    must be omitted, similar to the way syntax errors in style declarations
  4622    are handled. When the <code>&lt;feature-type></code> is invalid, the
  4623    entire associated feature value block must be ignored.
  4625   <pre>@font-feature-values Bongo {
  4626   @swash { ornate: 1; }
  4627   annotation { boxed: 4; } /* should be @annotation! */
  4628   @swash { double-loops: 1; flowing: -1; } /* negative value */
  4629   @ornaments ; /* incomplete definition */
  4630   @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
  4631   <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none;">redrum</a>  /* random editing mistake */
  4632 }</pre>
  4634   <p>The example above is equivalent to:
  4636   <pre>@font-feature-values Bongo {
  4637   @swash { ornate: 1; }
  4638   @swash { double-loops: 1; }
  4639   @styleset { double-W: 14; sharp-terminals: 16 1; }
  4640 }</pre>
  4642   <p>If multiple <a
  4643    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  4644    rules are defined for a given family, the resulting values defined are the
  4645    union of these rules. This allows a set of named-values to be defined for
  4646    a given font family globally for a site and specific additions made
  4647    per-page. If the same &lt;feature-value-name&gt; is defined mulitple times
  4648    for a given <a href="#propdef-font-variant"
  4649    title="font-variant!!property">‘<code
  4650    class=property>font-variant</code>’</a> value, the last defined value is
  4651    used.
  4653   <pre>
  4654 site.css:
  4656   @font-feature-values Mercury Serif {
  4657     @styleset {
  4658       stacked-g: 3; /* "two-storey" versions of g, a */
  4659       stacked-a: 4;
  4663 page.css:
  4665   @font-feature-values Mercury Serif {
  4666     @styleset {
  4667       geometric-m: 7; /* alternate version of m */
  4671   body {
  4672     font-family: Mercury Serif, serif;
  4674     /* enable both the use of stacked g and alternate m */
  4675     font-variant-alternates: styleset(stacked-g, geometric-m);
  4676   }</pre>
  4678   <p>Only named font families are allowed for &lt;font-family&gt;, rules that
  4679    include generic or system fonts in the list of font families are
  4680    considered syntax errors and the contents of the rules are ignored.
  4681    However, if a user agent defines a generic font to be a specific named
  4682    font (e.g. Helvetica), the settings associated with that family name will
  4683    be used.
  4685   <p>For &lt;font-variant-property-value>, only font specific property value
  4686    names supported by the <a href="#propdef-font-variant"
  4687    title="font-variant!!property">‘<code
  4688    class=property>font-variant</code>’</a> property are recognized,
  4689    definitions for other value names cause a syntax error and are ignored.
  4690    Each property value that is font specific is clearly marked as such.
  4691    Feature value names follow the rules of CSS user identifiers and are
  4692    case-sensitive. They are unique only for a given set of font families and
  4693    <a href="#propdef-font-variant" title="font-variant!!property">‘<code
  4694    class=property>font-variant</code>’</a> property value; the same
  4695    identifier used with a different <a href="#propdef-font-variant"
  4696    title="font-variant!!property">‘<code
  4697    class=property>font-variant</code>’</a> property value is treated as a
  4698    separate and distinct value.
  4700   <p>Using a commonly named value allows authors to use a single style rule
  4701    to cover a set of fonts for which the underlying selector is different for
  4702    each font. If either font in the example below is found, a circled number
  4703    glyph will be used:
  4705   <pre>@font-feature-values Taisho Gothic {
  4706   @annotation { boxed: 1; circled: 4; }
  4709 @font-feature-values Otaru Kisa {
  4710   @annotation { circled: 1; black-boxed: 3; }
  4713 h3.title {
  4714   /* circled form defined for both fonts */
  4715   font-family: Taisho Gothic, Otaru Kisa;
  4716   font-variant: annotation(circled);
  4717 }</pre>
  4719   <p>Most font specific <a href="#propdef-font-variant"
  4720    title="font-variant!!property">‘<code
  4721    class=property>font-variant</code>’</a> property values take a single
  4722    value (e.g. swash). The character-variant property value allows two values
  4723    and styleset allows an unlimited number. If a larger number of values are
  4724    assigned to a given name, a syntax error occurs and the entire
  4725    &lt;font-feature-values-declaration&gt; is ignored.
  4727   <p>For the styleset property value, multiple values indicate the style sets
  4728    to be enabled. Values between 1 and 99 enable OpenType features <span
  4729    class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
  4730    OpenType standard only officially defines <span class=tag>ss01</span>
  4731    through <span class=tag>ss20</span>. Values greater than 99 or equal to 0
  4732    are ignored but do not generate a syntax error when parsed.
  4734   <pre>@font-feature-values Mars Serif {
  4735   @styleset {
  4736     alt-g: 1;        /* implies ss01 = 1 */
  4737     curly-quotes: 3; /* implies ss03 = 1 */
  4738     code: 4 5;       /* implies ss04 = 1, ss05 = 1 */
  4741   @styleset {
  4742     dumb: 125;        /* &gt;99, ignored */
  4745   @swash {
  4746     swishy: 3 5;     /* more than 1 value for swash, syntax error */
  4750 p.codeblock {
  4751   /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
  4752   font-variant-alternates: styleset(curly-quotes, code);
  4753 }</pre>
  4755   <p>For character-variant, a single value between 1 and 99 indicates the
  4756    enabling of OpenType feature <span class=tag>cv01</span> through <span
  4757    class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
  4758    to 0 are ignored but do not generate a syntax error when parsed. When two
  4759    values are listed, the first value indicates the feature used and the
  4760    second the value passed for that feature. When two value names imply
  4761    different settings for the same underlying feature the last setting is
  4762    used.
  4764   <pre>@font-feature-values MM Greek {
  4765   @character-variant { alpha-2: 1 2; }   /* implies cv01 = 2 */
  4766   @character-variant { beta-3: 2 3; }    /* implies cv02 = 3 */
  4767   @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, ignored */
  4768   @character-variant { gamma: 12; }      /* implies cv12 = 1 */
  4769   @character-variant { zeta:   20 3; }   /* implies cv20 = 3 */
  4770   @character-variant { zeta-2: 20 2; }   /* implies cv20 = 2 */
  4771   @character-variant { silly: 105; }     /* &gt;99, ignored */
  4772   @character-variant { dumb: 323 3; }    /* &gt;99, ignored */
  4775 #title {
  4776   /* use the third alternate beta, first alternate gamma */
  4777   font-variant-alternates: character-variant(beta-3, gamma);
  4780 p {
  4781   /* zeta-2 follows zeta, implies cv20 = 2  */
  4782   font-variant-alternates: character-variant(zeta, zeta-2);
  4785 .special {
  4786   /* zeta follows zeta-2, implies cv20 = 3  */
  4787   font-variant-alternates: character-variant(zeta-2, zeta);
  4788 }</pre>
  4790   <p>See the <a href="#om-fontfeaturevalues">object model reference
  4791    section</a> for a description of the interfaces used to modify these rules
  4792    via the CSS Object Model.
  4794   <div class=figure><img alt="Matching text on Byzantine seals using
  4795    character variants" src=byzantineseal.png>
  4796    <p class=caption>Byzantine seal text displayed with character variants
  4797   </div>
  4799   <div class=example>
  4800    <p>In the figure above, the text in red is rendered using a font
  4801     containing character variants that mimic the character forms found on a
  4802     Byzantine seal from the 8th century A.D. Two lines below is the same text
  4803     displayed in a font without variants. Note the two variants for U and N
  4804     used on the seal.</p>
  4806    <pre>@font-feature-values Athena Ruby {
  4807   @character-variant {
  4808     leo-B: 2 1;
  4809     leo-M: 13 3;
  4810     leo-alt-N: 14 1;
  4811     leo-N: 14 2;
  4812     leo-T: 20 1;
  4813     leo-U: 21 2;
  4814     leo-alt-U: 21 4;
  4818 p {
  4819   font-variant: discretionary-ligatures,
  4820                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
  4823 span.alt-N {
  4824   font-variant-alternates: character-variant(leo-alt-N);
  4827 span.alt-U {
  4828   font-variant-alternates: character-variant(leo-alt-U);
  4831 &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>
  4833 &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>
  4834 </pre>
  4835   </div>
  4837   <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
  4838    Asian text rendering: the <a
  4839    href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  4840    property</h3>
  4842   <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
  4843    <tbody>
  4844     <tr>
  4845      <td>Name:
  4847      <td><dfn
  4848       id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
  4850     <tr>
  4851      <td>Value:
  4853      <td><a href="#font-variant-east-asian-normal-value"
  4854       title="normal!!font-variant-east-asian">normal</a> | [ <a
  4855       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  4856       || <a
  4857       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  4858       || <a href="#ruby">ruby</a> ]
  4860     <tr>
  4861      <td>Initial:
  4863      <td>normal
  4865     <tr>
  4866      <td>Applies to:
  4868      <td>all elements
  4870     <tr>
  4871      <td>Inherited:
  4873      <td>yes
  4875     <tr>
  4876      <td>Percentages:
  4878      <td>N/A
  4880     <tr>
  4881      <td>Media:
  4883      <td>visual
  4885     <tr>
  4886      <td>Computed value:
  4888      <td>as specified
  4890     <tr>
  4891      <td>Animatable:
  4893      <td>no
  4894   </table>
  4896   <p>Allows control of glyph substitution and sizing in East Asian text.
  4898   <pre
  4899    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>
  4901   <pre
  4902    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>
  4904   <p>Individual values have the following meanings:
  4906   <dl>
  4907    <dt><dfn id=font-variant-east-asian-normal-value
  4908     title="normal!!font-variant-east-asian">normal</dfn>
  4910    <dd>None of the features listed below are enabled.
  4912    <dt><dfn id=jis78>jis78</dfn>
  4914    <dd>Enables rendering of JIS78 forms (OpenType feature: <span
  4915     class=tag>jp78</span>).
  4916   </dl>
  4918   <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
  4920   <dl>
  4921    <dt><dfn id=jis83>jis83</dfn>
  4923    <dd>Enables rendering of JIS83 forms (OpenType feature: <span
  4924     class=tag>jp83</span>).
  4926    <dt><dfn id=jis90>jis90</dfn>
  4928    <dd>Enables rendering of JIS90 forms (OpenType feature: <span
  4929     class=tag>jp90</span>).
  4931    <dt><dfn id=jis04>jis04</dfn>
  4933    <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
  4934     class=tag>jp04</span>).
  4935     <p>The various JIS variants reflect the glyph forms defined in different
  4936      Japanese national standards. Fonts generally include glyphs defined by
  4937      the most recent national standard but it's sometimes necessary to use
  4938      older variants, to match signage for example.</p>
  4940    <dt><dfn id=simplified>simplified</dfn>
  4942    <dd>Enables rendering of simplified forms (OpenType feature: <span
  4943     class=tag>smpl</span>).
  4945    <dt><dfn id=traditional>traditional</dfn>
  4947    <dd>Enables rendering of traditional forms (OpenType feature: <span
  4948     class=tag>trad</span>).
  4949   </dl>
  4951   <p>The ‘<a href="#simplified"><code
  4952    class=property>simplified</code></a>’ and ‘<a
  4953    href="#traditional"><code class=property>traditional</code></a>’ values
  4954    allow control over the glyph forms for characters which have been
  4955    simplified over time but for which the older, traditional form is still
  4956    used in some contexts. The exact set of characters and glyph forms will
  4957    vary to some degree by context for which a given font was designed.
  4959   <div class=featex><img alt="tradtional form example" src=trad.png></div>
  4961   <dl>
  4962    <dt><dfn id=full-width>full-width</dfn>
  4964    <dd>Enables rendering of full-width variants (OpenType feature: <span
  4965     class=tag>fwid</span>).
  4967    <dt><dfn id=proportional-width>proportional-width</dfn>
  4969    <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
  4970     <span class=tag>pwid</span>).
  4971   </dl>
  4973   <div class=featex><img alt="proportionally spaced Japanese example"
  4974    src=pwid.png></div>
  4976   <dl>
  4977    <dt><dfn id=ruby>ruby</dfn>
  4979    <dd>Enables display of ruby variant glyphs (OpenType feature: <span
  4980     class=tag>ruby</span>). Since ruby text is generally smaller than the
  4981     associated body text, font designers can design special glyphs for use
  4982     with ruby that are more readable than scaled down versions of the default
  4983     glyphs. Only glyph selection is affected, there is no associated font
  4984     scaling or other change that affects line layout. The red ruby text below
  4985     is shown with default glyphs (top) and with ruby variant glyphs (bottom).
  4986     Note the slight difference in stroke thickness.
  4987   </dl>
  4989   <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
  4991   <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
  4992    for font rendering: the <a href="#propdef-font-variant">font-variant</a>
  4993    property</h3>
  4995   <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
  4996    <tbody>
  4997     <tr>
  4998      <td>Name:
  5000      <td><dfn id=propdef-font-variant
  5001       title="font-variant!!property">font-variant</dfn>
  5003     <tr>
  5004      <td>Value:
  5006      <td><a href="#font-variant-normal-value"
  5007       title="normal!!font-variant">normal</a> | <a
  5008       href="#font-variant-none-value" title="none!!font-variant">none</a> | [
  5009       <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
  5010       || <a
  5011       href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
  5012       || <a
  5013       href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
  5014       || <a
  5015       href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
  5016       || <a href="#stylistic"><var
  5017       title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
  5018       href="#historical-forms"><var>historical-forms</var></a> || <a
  5019       href="#styleset"><var
  5020       title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
  5021       href="#character-variant"><var
  5022       title=character-variant>character-variant(&lt;feature-value-name&gt;
  5023       #)</var></a> || <a href="#swash"><var
  5024       title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
  5025       href="#ornaments"><var
  5026       title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
  5027       href="#annotation"><var
  5028       title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
  5029       <a href="#small-caps"><i>small-caps</i></a> | <a
  5030       href="#all-small-caps"><i>all-small-caps</i></a> | <a
  5031       href="#petite-caps"><i>petite-caps</i></a> | <a
  5032       href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
  5033       href="#unicase"><i>unicase</i></a> | <a
  5034       href="#titling-caps"><i>titling-caps</i></a> ] || <a
  5035       href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
  5036       || <a
  5037       href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
  5038       || <a
  5039       href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
  5040       || <a href="#ordinal"><i>ordinal</i></a> || <a
  5041       href="#slashed-zero"><i>slashed-zero</i></a> || <a
  5042       href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
  5043       || <a
  5044       href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
  5045       || <a href="#ruby"><i>ruby</i></a> ]
  5047     <tr>
  5048      <td>Initial:
  5050      <td>normal
  5052     <tr>
  5053      <td>Applies to:
  5055      <td>all elements
  5057     <tr>
  5058      <td>Inherited:
  5060      <td>yes
  5062     <tr>
  5063      <td>Percentages:
  5065      <td>see individual properties
  5067     <tr>
  5068      <td>Media:
  5070      <td>visual
  5072     <tr>
  5073      <td>Computed value:
  5075      <td>see individual properties
  5077     <tr>
  5078      <td>Animatable:
  5080      <td>see individual properties
  5081   </table>
  5083   <p>The <a href="#propdef-font-variant"
  5084    title="font-variant!!property">‘<code
  5085    class=property>font-variant</code>’</a> property is a shorthand for all
  5086    font-variant subproperties. The value <dfn id=font-variant-normal-value
  5087    title="normal!!font-variant">‘<code
  5088    class=property>normal</code>’</dfn> resets all subproperties of <a
  5089    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5090    class=property>font-variant</code>’</a> to their inital value. The <dfn
  5091    id=font-variant-none-value title="none!!font-variant">‘<code
  5092    class=property>none</code>’</dfn> value sets ‘<a
  5093    href="#propdef-font-variant-ligatures"><code
  5094    class=property>font-variant-ligatures</code></a>’ to ‘<code
  5095    class=property>none</code>’ and resets all other font feature properties
  5096    to their initial value. Like other shorthands, using <a
  5097    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5098    class=property>font-variant</code>’</a> resets unspecified <a
  5099    href="#propdef-font-variant" title="font-variant!!property">‘<code
  5100    class=property>font-variant</code>’</a> subproperties to their initial
  5101    values. It does not reset the values of either ‘<a
  5102    href="#propdef-font-language-override"><code
  5103    class=property>font-language-override</code></a>’ or <a
  5104    href="#propdef-font-feature-settings"
  5105    title="font-feature-settings!!property">‘<code
  5106    class=property>font-feature-settings</code>’</a>.
  5108   <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
  5109    font feature settings control: the <a
  5110    href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
  5112   <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
  5113    <tbody>
  5114     <tr>
  5115      <td>Name:
  5117      <td><dfn id=propdef-font-feature-settings
  5118       title="font-feature-settings!!property">font-feature-settings</dfn>
  5120     <tr>
  5121      <td>Value:
  5123      <td><a href="#font-feature-settings-normal-value"
  5124       title="normal!!font-feature-settings">normal</a> | <a
  5125       href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
  5127     <tr>
  5128      <td>Initial:
  5130      <td>normal
  5132     <tr>
  5133      <td>Applies to:
  5135      <td>all elements
  5137     <tr>
  5138      <td>Inherited:
  5140      <td>yes
  5142     <tr>
  5143      <td>Percentages:
  5145      <td>N/A
  5147     <tr>
  5148      <td>Media:
  5150      <td>visual
  5152     <tr>
  5153      <td>Computed value:
  5155      <td>as specified
  5157     <tr>
  5158      <td>Animatable:
  5160      <td>no
  5161   </table>
  5163   <p>This property provides low-level control over OpenType font features. It
  5164    is intended as a way of providing access to font features that are not
  5165    widely used but are needed for a particular use case.
  5167   <p>Authors should generally use <a href="#propdef-font-variant"
  5168    title="font-variant!!property">‘<code
  5169    class=property>font-variant</code>’</a> and its related subproperties
  5170    whenever possible and only use this property for special cases where its
  5171    use is the only way of accessing a particular infrequently used font
  5172    feature.
  5174   <pre>/* enable small caps and use second swash alternate */
  5175 font-feature-settings: "smcp", "swsh" 2;</pre>
  5177   <p>A value of <dfn id=font-feature-settings-normal-value
  5178    title="normal!!font-feature-settings">‘<code
  5179    class=property>normal</code>’</dfn> means that no change in glyph
  5180    selection or positioning occurs due to this property.
  5182   <p>Feature tag values have the following syntax:
  5184   <pre
  5185    class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
  5187   <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
  5188    specified in the OpenType specification, feature tags contain four ASCII
  5189    characters. Tag strings longer or shorter than four characters, or
  5190    containing characters outside the U+20–7E codepoint range are invalid.
  5191    Feature tags need only match a feature tag defined in the font, so they
  5192    are not limited to explicitly registered OpenType features. Fonts defining
  5193    custom feature tags should follow the <a
  5194    href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
  5195    rules</a> defined in the OpenType specification <a
  5196    href="#OPENTYPE-FEATURES"
  5197    rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
  5198    Feature tags not present in the font are ignored; a user agent must not
  5199    attempt to synthesize fallback behavior based on these feature tags.
  5201   <p>This means that explicitly disabling the <span class=tag>kern</span>
  5202    feature will not affect the application of kerning data found in the
  5203    ‘<code class=property>kern</code>’ table (as opposed to kerning data
  5204    associated with the <span class=tag>kern</span> feature in the ‘<code
  5205    class=property>GPOS</code>’ table). Authors should use the ‘<a
  5206    href="#propdef-font-kerning"><code
  5207    class=property>font-kerning</code></a>’ property to explictly enable or
  5208    disable kerning since this property affects both types of kerning.
  5210   <p>If present, a value indicates an index used for glyph selection. An
  5211    &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
  5212    the feature is disabled. For boolean features, a value of 1 enables the
  5213    feature. For non-boolean features, a value of 1 or greater enables the
  5214    feature and indicates the feature selection index. A value of ‘<code
  5215    class=property>on</code>’ is synonymous with 1 and ‘<code
  5216    class=property>off</code>’ is synonymous with 0. If the value is
  5217    omitted, a value of 1 is assumed.
  5219   <pre>
  5220 font-feature-settings: "dlig" 1;       /* dlig=1 enable discretionary ligatures */
  5221 font-feature-settings: "smcp" on;      /* smcp=1 enable small caps */
  5222 font-feature-settings: 'c2sc';         /* c2sc=1 enable caps to small caps */
  5223 font-feature-settings: "liga" off;     /* liga=0 no common ligatures */
  5224 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
  5225 font-feature-settings: "tnum" "hist";  /* invalid, need a comma-delimited list */
  5226 font-feature-settings: "palin" off;    /* good idea but invalid tagname */
  5227 font-feature-settings: "PKRN";         /* PKRN=1 enable custom feature */
  5228 font-feature-settings: dlig;           /* invalid, tag must be a string */
  5229 </pre>
  5231   <p>When values greater than the range supported by the font are specified,
  5232    the behavior is explicitly undefined. For boolean features, in general
  5233    these will enable the feature. For non-boolean features, out of range
  5234    values will in general be equivalent to a 0 value. However, in both cases
  5235    the exact behavior will depend upon the way the font is designed
  5236    (specifically, which type of lookup is used to define the feature).
  5238   <p>Although specifically defined for OpenType feature tags, feature tags
  5239    for other modern font formats that support font features may be added in
  5240    the future. Where possible, features defined for other font formats should
  5241    attempt to follow the pattern of registered OpenType tags.
  5243   <div class=example>
  5244    <p>The Japanese text below will be rendered with half-width kana
  5245     characters:</p>
  5247    <pre lang=ja>
  5248 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
  5250 &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>
  5251 </pre>
  5252   </div>
  5254   <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
  5255    language override: the <a
  5256    href="#propdef-font-language-override">font-language-override</a> property</h3>
  5258   <table class=propdef id=namefont-language-overridevaluenormal-lt>
  5259    <tbody>
  5260     <tr>
  5261      <td>Name:
  5263      <td><dfn id=propdef-font-language-override>font-language-override</dfn>
  5265     <tr>
  5266      <td>Value:
  5268      <td><a href="#font-language-override-normal-value"
  5269       title="normal!!font-language-override">normal</a> | <a
  5270       href="#font-language-override-string-value"><var>&lt;string&gt;</var></a>
  5272     <tr>
  5273      <td>Initial:
  5275      <td><a href="#font-language-override-normal-value"
  5276       title="normal!!font-language-override">normal</a>
  5278     <tr>
  5279      <td>Applies to:
  5281      <td>all elements
  5283     <tr>
  5284      <td>Inherited:
  5286      <td>yes
  5288     <tr>
  5289      <td>Percentages:
  5291      <td>N/A
  5293     <tr>
  5294      <td>Media:
  5296      <td>visual
  5298     <tr>
  5299      <td>Computed value:
  5301      <td>as specified
  5303     <tr>
  5304      <td>Animatable:
  5306      <td>no
  5307   </table>
  5309   <p>Normally, authors can control the use of language-specific glyph
  5310    substitutions and positioning by setting the content language of an
  5311    element, as <a href="#language-specific-support">described above</a>:
  5313   <pre>&lt;!-- Display text using S'gaw Karen specific features -->
  5314 &ltp lang="ksw">...&lt;/p></pre>
  5316   <p>In some cases, authors may need to specify a language system that
  5317    differs from the content language, for example due to the need to mimic
  5318    another language's typographic traditions. The ‘<a
  5319    href="#propdef-font-language-override"><code
  5320    class=property>font-language-override</code></a>’ property allows
  5321    authors to explicitly specify the language system of the font, overriding
  5322    the language system implied by the content language.
  5324   <p>Values have the following meanings:
  5326   <dl>
  5327    <dt><dfn id=font-language-override-normal-value
  5328     title="normal!!font-language-override">normal</dfn>
  5330    <dd>specifies that when rendering with OpenType fonts, the content
  5331     language of the element is used to infer the OpenType language system
  5333    <dt><dfn
  5334     id=font-language-override-string-value><var>&lt;string&gt;</var></dfn>
  5336    <dd>single three-letter OpenType <a
  5337     href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
  5338     system tag</a>, specifies the OpenType language system to be used instead
  5339     of the language system implied by the language of the element
  5340   </dl>
  5342   <p>Use of invalid OpenType language system tags must not generate a parse
  5343    error but must be ignored when doing glyph selection and placement.
  5345   <div class=example>
  5346    <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
  5347     Declaration of Human Rights</a> has been translated into a wide variety
  5348     of languages. In Turkish, Article 9 of this document might be marked up
  5349     as below:</p>
  5351    <pre lang=tr>&lt;body lang="tr">
  5353 &lt;h4>Madde 9&lt;/h4>
  5354 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
  5355 </pre>
  5357    <p>Here the user agent uses the value of the ‘<code
  5358     class=property>lang</code>’ attribute when rendering text and
  5359     appropriately renders this text without ‘<code
  5360     class=property>fi</code>’ ligatures. There is no need to use the ‘<a
  5361     href="#propdef-font-language-override"><code
  5362     class=property>font-language-override</code></a>’ property.</p>
  5364    <p>However, a given font may lack support for a specific language. In this
  5365     situation authors may need to use the typographic conventions of a
  5366     related language that are supported by that font:</p>
  5368    <pre lang=mk>&lt;body lang="mk">     &lt;!-- Macedonian lang code --&gt;
  5370 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
  5372 &lt;h4>Члeн 9&lt;/h4>
  5373 &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>
  5375 </pre>
  5377    <p>The Macedonian text here will be rendered using Serbian typographic
  5378     conventions, with the assumption that the font specified supports
  5379     Serbian.</p>
  5380   </div>
  5382   <p><a id=rendering-considerations></a>
  5384   <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
  5385    Resolution</h2>
  5387   <p>As described in the previous section, font features can be enabled in a
  5388    variety of ways, either via the use of <a href="#propdef-font-variant"
  5389    title="font-variant!!property">‘<code
  5390    class=property>font-variant</code>’</a> or <a
  5391    href="#propdef-font-feature-settings"
  5392    title="font-feature-settings!!property">‘<code
  5393    class=property>font-feature-settings</code>’</a> in a style rule or
  5394    within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5395    The resolution order for the union of these settings is defined below.
  5396    Features defined via CSS properties are applied on top of layout engine
  5397    default features.
  5399   <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
  5401   <p>For OpenType fonts, user agents must enable the default features defined
  5402    in the OpenType documentation for a given script and writing mode.
  5403    Required ligatures, common ligatures and contextual forms must be enabled
  5404    by default (OpenType features: <span class=tag>rlig, liga, clig,
  5405    calt</span>), along with localized forms (OpenType feature: <span
  5406    class=tag>locl</span>), and features required for proper display of
  5407    composed characters and marks (OpenType features: <span class=tag>ccmp,
  5408    mark, mkmk</span>). These features must always be enabled, even when the
  5409    value of the <a href="#propdef-font-variant"
  5410    title="font-variant!!property">‘<code
  5411    class=property>font-variant</code>’</a> and <a
  5412    href="#propdef-font-feature-settings"
  5413    title="font-feature-settings!!property">‘<code
  5414    class=property>font-feature-settings</code>’</a> properties is ‘<a
  5415    href="#normal"><code class=property>normal</code></a>’. Individual
  5416    features are only disabled when explicitly overridden by the author, as
  5417    when ‘<a href="#propdef-font-variant-ligatures"><code
  5418    class=property>font-variant-ligatures</code></a>’ is set to ‘<a
  5419    href="#no-common-ligatures"><code
  5420    class=property>no-common-ligatures</code></a>’. For handling complex
  5421    scripts such as <a
  5422    href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
  5423    <a
  5424    href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
  5425    or <a
  5426    href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
  5427    additional features are required. For upright text within vertical text
  5428    runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
  5429    must be enabled.
  5431   <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
  5433   <p>General and font specific font feature property settings are resolved in
  5434    the order below, in ascending precedence order. This ordering is used to
  5435    construct a combined list of font features that affect a given text run.
  5437   <ol>
  5438    <li>Font features enabled by default, including features required for a
  5439     given script.
  5441    <li>If the font is defined via an <a
  5442     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5443     features implied by the font-variant descriptor in the <a
  5444     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5446    <li>If the font is defined via an <a
  5447     href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
  5448     features implied by the font-feature-settings descriptor in the <a
  5449     href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5451    <li>Feature settings determined by properties other than <a
  5452     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5453     class=property>font-variant</code>’</a> or <a
  5454     href="#propdef-font-feature-settings"
  5455     title="font-feature-settings!!property">‘<code
  5456     class=property>font-feature-settings</code>’</a>. For example, setting
  5457     a non-default value for the ‘<code
  5458     class=property>letter-spacing</code>’ property disables ligatures.
  5460    <li>Font features implied by the value of the <a
  5461     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5462     class=property>font-variant</code>’</a> property, the related <a
  5463     href="#propdef-font-variant" title="font-variant!!property">‘<code
  5464     class=property>font-variant</code>’</a> subproperties and any other CSS
  5465     property that may use OpenType features (e.g. the ‘<a
  5466     href="#propdef-font-kerning"><code
  5467     class=property>font-kerning</code></a>’ property).
  5469    <li>Font features implied by the value of <a
  5470     href="#propdef-font-feature-settings"
  5471     title="font-feature-settings!!property">‘<code
  5472     class=property>font-feature-settings</code>’</a> property.
  5473   </ol>
  5475   <p>This ordering allows authors to set up a general set of defaults for
  5476    fonts within their <a
  5477    href="#at-font-face-rule"><code>@font-face</code></a> rules, then override
  5478    them with property settings for specific elements. General property
  5479    settings override the settings in <a
  5480    href="#at-font-face-rule"><code>@font-face</code></a> rules and low-level
  5481    font feature settings override <a href="#propdef-font-variant"
  5482    title="font-variant!!property">‘<code
  5483    class=property>font-variant</code>’</a> property settings.
  5485   <p>For situations where the combined list of font feature settings contains
  5486    more than one value for the same feature, the last value is used. When a
  5487    font lacks support for a given underlying font feature, text is simply
  5488    rendered as if that font feature was not enabled; font fallback does not
  5489    occur and no attempt is made to synthesize the feature except where
  5490    explicitly noted for specific properties.
  5492   <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
  5493    precedence examples</h3>
  5495   <div class=example>
  5496    <p>With the styles below, numbers are rendered proportionally when used
  5497     within a paragraph but are shown in tabular form within tables of prices:</p>
  5499    <pre>body {
  5500   font-variant-numeric: proportional-nums;
  5503 table.prices td {
  5504   font-variant-numeric: tabular-nums;
  5506 </pre>
  5507   </div>
  5509   <div class=example>
  5510    <p>When the font-variant descriptor is used within an <a
  5511     href="#at-font-face-rule"><code>@font-face</code></a> rule, it only
  5512     applies to the font defined by that rule.</p>
  5514    <pre>@font-face {
  5515   font-family: MainText;
  5516   src: url(http://example.com/font.ttf);
  5517   font-variant: oldstyle-nums proportional-nums styleset(1,3);
  5520 body {
  5521   font-family: MainText, Helvetica;
  5524 table.prices td {
  5525   font-variant-numeric: tabular-nums;
  5527 </pre>
  5529    <p>In this case, old-style numerals will be used throughout but only where
  5530     the font "MainText" is used. Just as in the previous example, tabular
  5531     values will be used in price tables since ‘<a
  5532     href="#tabular-nums"><code class=property>tabular-nums</code></a>’
  5533     appears in a general style rule and its use is mutually exclusive with
  5534     ‘<a href="#proportional-nums"><code
  5535     class=property>proportional-nums</code></a>’. Stylistic alternate sets
  5536     will only be used where MainText is used.</p>
  5537   </div>
  5539   <div class=example>
  5540    <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule can
  5541     also be used to access font features in locally available fonts via the
  5542     use of <code>local()</code> in the ‘<a href="#descdef-src"><code
  5543     class=property>src</code></a>’ descriptor of the <a
  5544     href="#at-font-face-rule"><code>@font-face</code></a> definition:</p>
  5546    <pre>@font-face {
  5547   font-family: BodyText;
  5548   src: local("HiraMaruPro-W4");
  5549   font-variant: proportional-width;
  5550   font-feature-settings: "ital"; /* Latin italics within CJK text feature */
  5553 body { font-family: BodyText, serif; }
  5554 </pre>
  5556    <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
  5557     text rendering occurs, Japanese kana will be proportionally spaced and
  5558     Latin text will be italicised. Text rendered with the fallback serif font
  5559     will use default rendering properties.</p>
  5560   </div>
  5562   <div class=example>
  5563    <p>In the example below, discretionary ligatures are enabled only for a
  5564     downloadable font but are disabled within spans of class "special":</p>
  5566    <pre>@font-face {
  5567   font-family: main;
  5568   src: url(fonts/ffmeta.woff) format("woff");
  5569   font-variant: discretionary-ligatures;
  5572 body         { font-family: main, Helvetica; }
  5573 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5574 </pre>
  5576    <p>Adding an discretionary style rule with the <a
  5577     href="#at-font-face-rule"><code>@font-face</code></a> above:</p>
  5579    <pre>body         { font-family: main, Helvetica; }
  5580 span         { font-feature-settings: "dlig"; }
  5581 span.special { font-variant-ligatures: no-discretionary-ligatures; }
  5582 </pre>
  5584    <p>Within spans of class "special", discretionary ligatures <em>will</em>
  5585     be rendered. This is because both the <a
  5586     href="#propdef-font-feature-settings"
  5587     title="font-feature-settings!!property">‘<code
  5588     class=property>font-feature-settings</code>’</a> and ‘<a
  5589     href="#propdef-font-variant-ligatures"><code
  5590     class=property>font-variant-ligatures</code></a>’ properties apply to
  5591     these spans. Although the ‘<code class=css>no-discretionary
  5592     ligatures</code>’ setting of ‘<a
  5593     href="#propdef-font-variant-ligatures"><code
  5594     class=property>font-variant-ligatures</code></a>’ effectively disables
  5595     the OpenType <span class=tag>dlig</span> feature, because the <a
  5596     href="#propdef-font-feature-settings"
  5597     title="font-feature-settings!!property">‘<code
  5598     class=property>font-feature-settings</code>’</a> is resolved after
  5599     that, the ‘<code class=property>dlig</code>’ value reenables
  5600     discretionary ligatures.</p>
  5601   </div>
  5603   <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
  5605   <p>The contents of <a href="#at-font-face-rule"><code>@font-face</code></a>
  5606    and <a
  5607    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5608    rules can be accessed via the following extensions to the CSS Object
  5609    Model.
  5611   <h3 id=om-fontface><span class=secno>8.1 </span>The <a
  5612    href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
  5614   <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
  5615    <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
  5617   <pre class=idl>
  5618 interface CSSFontFaceRule : CSSRule {
  5619   attribute DOMString family;
  5620   attribute DOMString src;
  5621   attribute DOMString style;
  5622   attribute DOMString weight;
  5623   attribute DOMString stretch;
  5624   attribute DOMString unicodeRange;
  5625   attribute DOMString variant;
  5626   attribute DOMString featureSettings;
  5627 }</pre>
  5629   <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
  5630    rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
  5631    defined a different variant of this rule. This definition supercedes that
  5632    one.
  5634   <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
  5635    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5636    interface</h3>
  5638   <p>The <code>CSSRule</code> interface is extended as follows:
  5640   <pre class=idl>partial interface CSSRule {
  5641   const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  5642 }</pre>
  5644   <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
  5645    interface represents a <a
  5646    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5647    rule.
  5649   <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
  5650   readonly attribute DOMString familyList;
  5651   readonly attribute DOMString valueText;
  5652 };</pre>
  5654   <dl class=idl-attributes>
  5655    <dt><var>familyList</var> of type <code>DOMString</code>, readonly
  5657    <dd>The list of one or more font families for which a given set of feature
  5658     values is defined.
  5660    <dt><var>valueText</var> of type <code>DOMString</code>, readonly
  5662    <dd>Serialized set of feature values.
  5663   </dl>
  5665   <p class=issue>Should this be extended to make <a
  5666    href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
  5667    be a subclass of <code>CSSGroupingRule</code> with other CSSRule
  5668    subclasses for each value definition block?
  5670   <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
  5671    properties to CSS properties</h2>
  5673   <p><em>This appendix is included as background for some of the problems and
  5674    situations that are described in other sections. It should be viewed as
  5675    informative only.</em>
  5677   <p>Font properties in CSS are designed to be independent of the underlying
  5678    font formats used; they can be used to specify bitmap fonts, Type1 fonts,
  5679    SVG fonts in addition to the common TrueType and OpenType fonts. But there
  5680    are facets of the TrueType and OpenType formats that often cause confusion
  5681    for authors and present challenges to implementers on different platforms.
  5683   <p>Originally developed at Apple, TrueType was designed as an outline font
  5684    format for both screen and print. Microsoft joined Apple in developing the
  5685    TrueType format and both platforms have supported TrueType fonts since
  5686    then. Font data in the TrueType format consists of a set of tables
  5687    distinguished with common four-letter tag names, each containing a
  5688    specific type of data. For example, naming information, including
  5689    copyright and license information, is stored in the ‘<code
  5690    class=property>name</code>’ table. The <a
  5691    href="#character-map"><em>character map</em></a> (‘<code
  5692    class=property>cmap</code>’) table contains a mapping of character
  5693    encodings to glyphs. Apple later added additional tables for supporting
  5694    enhanced typographic functionality; these are now called Apple Advanced
  5695    Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
  5696    tables for advanced typography and called their format OpenType <a
  5697    href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
  5699   <p>In many cases the font data used under Microsoft Windows or Linux is
  5700    slightly different from the data used under Apple's Mac OS X because the
  5701    TrueType format allowed for explicit variation across platforms. This
  5702    includes font metrics, names and <a href="#character-map"><em>character
  5703    map</em></a> data.
  5705   <p>Specifically, font family name data is handled differently across
  5706    platforms. For TrueType and OpenType fonts these names are contained in
  5707    the ‘<code class=property>name</code>’ table, in name records with
  5708    name ID 1. Mulitple names can be stored for different locales, but
  5709    Microsoft recommends fonts always include at least a US English version of
  5710    the name. On Windows, Microsoft made the decision for backwards
  5711    compatibility to limit this family name to a maximum of four faces; for
  5712    larger groupings the "preferred family" (name ID 16) or "WWS family" (name
  5713    ID 21) can be used. Other platforms such as OSX don't have this
  5714    limitation, so the family name is used to define all possible groupings.
  5716   <p>Other name table data provides names used to uniquely identify a
  5717    specific face within a family. The full font name (name ID 4) and the
  5718    Postscript name (name ID 6) describe a single face uniquely. For example,
  5719    the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
  5720    and a Postscript name of "GillSans-Bold". There can be multiple localized
  5721    versions of the fullname for a given face, but the Postscript name is
  5722    always a unique name made from a limited set of ASCII characters.
  5724   <p>On various platforms, different names are used to search for a font. For
  5725    example, with the Windows GDI CreateIndirectFont API, either a family or
  5726    fullname can be used to lookup a face, while on Mac OS X the
  5727    CTFontCreateWithName API call is used to lookup a given face using the
  5728    fullname and Postscript name. Under Linux, the fontconfig API allows fonts
  5729    to be searched using any of these names. In situations where platform
  5730    API's automatically substitute other font choices, it may be necessary to
  5731    verify a returned font matches a given name.
  5733   <p>The weight of a given face can be determined via the usWeightClass field
  5734    of the OS/2 table or inferred from the style name (name ID 2). Likewise,
  5735    the width can be determined via the usWidthClass of the OS/2 table or
  5736    inferred from the style name. For historical reasons related to synthetic
  5737    bolding at weights 200 or lower with the Windows GDI API, font designers
  5738    have sometimes skewed values in the OS/2 table to avoid these weights.
  5740   <p>Rendering complex scripts that use contextual shaping such as Thai,
  5741    Arabic and Devanagari requires features present only in OpenType or AAT
  5742    fonts. Currently, complex script rendering is supported on Windows and
  5743    Linux using OpenType font features while both OpenType and AAT font
  5744    features are used under Mac OS X.
  5746   <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
  5748   <h3 class=no-num id=recent-changes> Changes from the <a
  5749    href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">February 2013
  5750    CSS3 Fonts Working Draft</a></h3>
  5752   <p>Major changes include:
  5754   <ul>
  5755    <li>Moved font load events into a separate <a
  5756     href="http://dev.w3.org/csswg/css3-font-load-events/">spec</a>
  5758    <li>Tightened error handling rules for <a
  5759     href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5760     rules
  5762    <li>Added grammar productions for <a
  5763     href="#at-font-face-rule"><code>@font-face</code></a> and <a
  5764     href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5765     rules
  5767    <li>Tightened definition of synthetic oblique
  5769    <li>Revised definition of ‘<a href="#descdef-unicode-range"><code
  5770     class=property>unicode-range</code></a>’ descriptor
  5771   </ul>
  5773   <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
  5775   <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
  5776    their help and feedback. John Hudson was kind enough to take the time to
  5777    explain the subtleties of OpenType language tags and provided the example
  5778    of character variant usage for displaying text on Byzantine seals. Ken
  5779    Lunde and Eric Muller provided valuable feedback on CJK OpenType features
  5780    and Unicode variation selectors. The idea for supporting font features by
  5781    using <a href="#propdef-font-variant"
  5782    title="font-variant!!property">‘<code
  5783    class=property>font-variant</code>’</a> subproperties originated with
  5784    Håkon Wium Lie, Adam Twardoch and Tal Leming. Elika Etemad supplied some
  5785    of the initial design ideas for the <a
  5786    href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
  5787    rule. Thanks also to House Industries for allowing the use of Ed Interlock
  5788    in the discretionary ligatures example.
  5790   <p>A special thanks to Robert Bringhurst for the sublime mind expansion
  5791    that is <em>The Elements of Typographic Style</em>.
  5793   <h2 class=no-num id=conformance> Conformance</h2>
  5795   <h3 class=no-num id=conventions> Document Conventions</h3>
  5797   <p>Conformance requirements are expressed with a combination of descriptive
  5798    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
  5799    NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
  5800    “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
  5801    normative parts of this document are to be interpreted as described in RFC
  5802    2119. However, for readability, these words do not appear in all uppercase
  5803    letters in this specification.
  5805   <p>All of the text of this specification is normative except sections
  5806    explicitly marked as non-normative, examples, and notes. <a
  5807    href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
  5809   <p>Examples in this specification are introduced with the words “for
  5810    example” or are set apart from the normative text with
  5811    <code>class="example"</code>, like this:
  5813   <div class=example>
  5814    <p>This is an example of an informative example.
  5815   </div>
  5817   <p>Informative notes begin with the word “Note” and are set apart from
  5818    the normative text with <code>class="note"</code>, like this:
  5820   <p class=note>Note, this is an informative note.
  5822   <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
  5824   <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
  5825    classes:
  5827   <dl>
  5828    <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
  5829     sheet</dfn>
  5831    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
  5832     style sheet</a>.
  5834    <dt><dfn id=renderer>renderer</dfn>
  5836    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5837     that interprets the semantics of a style sheet and renders documents that
  5838     use them.
  5840    <dt><dfn id=authoring-tool>authoring tool</dfn>
  5842    <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
  5843     that writes a style sheet.
  5844   </dl>
  5846   <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
  5847    declarations that use properties defined in this module have values that
  5848    are valid according to the generic CSS grammar and the individual grammars
  5849    of each property as given in this module.
  5851   <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
  5852    interpreting the style sheet as defined by the appropriate specifications,
  5853    it supports all the features defined by CSS Fonts Level 3 Module by
  5854    parsing them correctly and rendering the document accordingly. However,
  5855    the inability of a UA to correctly render a document due to limitations of
  5856    the device does not make the UA non-conformant. (For example, a UA is not
  5857    required to render color on a monochrome monitor.)
  5859   <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
  5860    style sheets that are syntactically correct according to the generic CSS
  5861    grammar and the individual grammars of each feature in this module, and
  5862    meet all other conformance requirements of style sheets as described in
  5863    this module.
  5865   <h3 class=no-num id=partial> Partial Implementations</h3>
  5867   <p>So that authors can exploit the forward-compatible parsing rules to
  5868    assign fallback values, CSS renderers <strong>must</strong> treat as
  5869    invalid (and <a
  5870    href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
  5871    appropriate</a>) any at-rules, properties, property values, keywords, and
  5872    other syntactic constructs for which they have no usable level of support.
  5873    In particular, user agents <strong>must not</strong> selectively ignore
  5874    unsupported component values and honor supported values in a single
  5875    multi-value property declaration: if any value is considered invalid (as
  5876    unsupported values must be), CSS requires that the entire declaration be
  5877    ignored.
  5879   <h3 class=no-num id=experimental> Experimental Implementations</h3>
  5881   <p>To avoid clashes with future CSS features, the CSS2.1 specification
  5882    reserves a <a
  5883    href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  5884    syntax</a> for proprietary and experimental extensions to CSS.
  5886   <p>Prior to a specification reaching the Candidate Recommendation stage in
  5887    the W3C process, all implementations of a CSS feature are considered
  5888    experimental. The CSS Working Group recommends that implementations use a
  5889    vendor-prefixed syntax for such features, including those in W3C Working
  5890    Drafts. This avoids incompatibilities with future changes in the draft.
  5892   <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
  5894   <p>Once a specification reaches the Candidate Recommendation stage,
  5895    non-experimental implementations are possible, and implementors should
  5896    release an unprefixed implementation of any CR-level feature they can
  5897    demonstrate to be correctly implemented according to spec.
  5899   <p>To establish and maintain the interoperability of CSS across
  5900    implementations, the CSS Working Group requests that non-experimental CSS
  5901    renderers submit an implementation report (and, if necessary, the
  5902    testcases used for that implementation report) to the W3C before releasing
  5903    an unprefixed implementation of any CSS features. Testcases submitted to
  5904    W3C are subject to review and correction by the CSS Working Group.
  5906   <p>Further information on submitting testcases and implementation reports
  5907    can be found from on the CSS Working Group's website at <a
  5908    href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
  5909    Questions should be directed to the <a
  5910    href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
  5911    mailing list.
  5913   <h2 class=no-num id=references>References</h2>
  5915   <h3 class=no-num id=normative-references>Normative References</h3>
  5916   <!--begin-normative-->
  5917   <!-- Sorted by label -->
  5919   <dl class=bibliography>
  5920    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  5921     <!---->
  5923    <dt id=CHARMOD>[CHARMOD]
  5925    <dd>Martin J. Dürst; et al. <a
  5926     href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
  5927     Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
  5928     2005. W3C Recommendation. URL: <a
  5929     href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
  5930     </dd>
  5931    <!---->
  5933    <dt id=CORS>[CORS]
  5935    <dd>Anne van Kesteren. <a
  5936     href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
  5937     Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
  5938     Recommendation. (Work in progress.) URL: <a
  5939     href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
  5940     </dd>
  5941    <!---->
  5943    <dt id=CSS21>[CSS21]
  5945    <dd>Bert Bos; et al. <a
  5946     href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
  5947     Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
  5948     2011. W3C Recommendation. URL: <a
  5949     href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
  5950     </dd>
  5951    <!---->
  5953    <dt id=CSS3VAL>[CSS3VAL]
  5955    <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
  5956     href="http://www.w3.org/TR/2012/CR-css3-values-20120828/"><cite>CSS
  5957     Values and Units Module Level 3.</cite></a> 28 August 2012. W3C Candidate
  5958     Recommendation. (Work in progress.) URL: <a
  5959     href="http://www.w3.org/TR/2012/CR-css3-values-20120828/">http://www.w3.org/TR/2012/CR-css3-values-20120828/</a>
  5960     </dd>
  5961    <!---->
  5963    <dt id=HTML5>[HTML5]
  5965    <dd>Ian Hickson. <a
  5966     href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
  5967     17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
  5968     <a
  5969     href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
  5970     </dd>
  5971    <!---->
  5973    <dt id=OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
  5975    <dd><a
  5976     href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip"><cite>Information
  5977     technology — Coding of audio-visual objects — Part 22: Open Font
  5978     Format.</cite></a> International Organization for Standardization.
  5979     ISO/IEC 14496-22:2009. URL: <a
  5980     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>
  5981     </dd>
  5982    <!---->
  5984    <dt id=OPENTYPE>[OPENTYPE]
  5986    <dd><a
  5987     href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
  5988     specification.</cite></a> Microsoft. URL: <a
  5989     href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
  5990     </dd>
  5991    <!---->
  5993    <dt id=OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
  5995    <dd><a
  5996     href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
  5997     feature registry.</cite></a> Microsoft. URL: <a
  5998     href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
  5999     </dd>
  6000    <!---->
  6002    <dt id=RFC2119>[RFC2119]
  6004    <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
  6005     words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
  6006     RFC 2119. URL: <a
  6007     href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  6008     </dd>
  6009    <!---->
  6011    <dt id=UAX15>[UAX15]
  6013    <dd>Mark Davis; Ken Whistler. <a
  6014     href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
  6015     Forms.</cite></a> 31 August 2012. Unicode Standard Annex #15. URL: <a
  6016     href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
  6017     </dd>
  6018    <!---->
  6020    <dt id=UAX29>[UAX29]
  6022    <dd>Mark Davis. <a
  6023     href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
  6024     Segmentation.</cite></a> 12 September 2012. Unicode Standard Annex #29.
  6025     URL: <a
  6026     href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
  6027     </dd>
  6028    <!---->
  6030    <dt id=UNICODE6>[UNICODE6]
  6032    <dd>The Unicode Consortium. <a
  6033     href="http://www.unicode.org/versions/Unicode6.2.0/"><cite>The Unicode
  6034     Standard, Version 6.2.0.</cite></a> Defined by: The Unicode Standard,
  6035     Version 6.2.0 URL: <a
  6036     href="http://www.unicode.org/versions/Unicode6.2.0/">http://www.unicode.org/versions/Unicode6.2.0/</a>
  6037     </dd>
  6038    <!---->
  6039   </dl>
  6040   <!--end-normative-->
  6041   <!--{{!CSS21}}-->
  6042   <!--{{!CSS3VAL}}-->
  6043   <!--{{!OPENTYPE}}-->
  6044   <!--{{!OPENTYPE-FEATURES}}-->
  6045   <!--{{!OPEN-FONT-FORMAT}}-->
  6046   <!--{{!UNICODE6}}-->
  6047   <!--{{!UAX15}}-->
  6048   <!--{{!UAX29}}-->
  6049   <!--{{!CORS}}-->
  6050   <!--{{!HTML5}}-->
  6051   <!--{{!CHARMOD}}-->
  6053   <h3 class=no-num id=other-references>Other References</h3>
  6054   <!--begin-informative-->
  6055   <!-- Sorted by label -->
  6057   <dl class=bibliography>
  6058    <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
  6059     <!---->
  6061    <dt id=AAT-FEATURES>[AAT-FEATURES]
  6063    <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
  6064     Advanced Typography font feature registry.</cite></a> Apple. URL: <a
  6065     href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
  6066     </dd>
  6067    <!---->
  6069    <dt id=ARABIC-TYPO>[ARABIC-TYPO]
  6071    <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
  6072     Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
  6073    <!---->
  6075    <dt id=CHARMOD-NORM>[CHARMOD-NORM]
  6077    <dd>François Yergeau; et al. <a
  6078     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
  6079     Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
  6080     W3C Working Draft. (Work in progress.) URL: <a
  6081     href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
  6082     </dd>
  6083    <!---->
  6085    <dt id=CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
  6087    <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
  6088     O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
  6089    <!---->
  6091    <dt id=CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
  6093    <dd>L. David Baron. <a
  6094     href="http://www.w3.org/TR/2012/WD-css3-conditional-20121213/"><cite>CSS
  6095     Conditional Rules Module Level 3.</cite></a> 13 December 2012. W3C
  6096     Working Draft. (Work in progress.) URL: <a
  6097     href="http://www.w3.org/TR/2012/WD-css3-conditional-20121213/">http://www.w3.org/TR/2012/WD-css3-conditional-20121213/</a>
  6098     </dd>
  6099    <!---->
  6101    <dt id=CSS3TEXT>[CSS3TEXT]
  6103    <dd>Elika J. Etemad; Koji Ishii. <a
  6104     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
  6105     Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
  6106     progress.) URL: <a
  6107     href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
  6108     </dd>
  6109    <!---->
  6111    <dt id=DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
  6113    <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
  6114     and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
  6115     ISBN 0-201-17633-5.</dd>
  6116    <!---->
  6118    <dt id=DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
  6120    <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
  6121     href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
  6122     Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
  6123     2000. W3C Recommendation. URL: <a
  6124     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>
  6125     </dd>
  6126    <!---->
  6128    <dt id=ELEMTYPO>[ELEMTYPO]
  6130    <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
  6131     4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
  6132    <!---->
  6134    <dt id=LANGCULTTYPE>[LANGCULTTYPE]
  6136    <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
  6137     ISBN 1-932026-01-0.</dd>
  6138    <!---->
  6140    <dt id=OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
  6142    <dd><a
  6143     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
  6144     User Guide.</cite></a> FontShop International. URL: <a
  6145     href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
  6146     </dd>
  6147    <!---->
  6149    <dt id=RASTER-TRAGEDY>[RASTER-TRAGEDY]
  6151    <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
  6152     Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
  6153     href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
  6154    <!---->
  6156    <dt id=WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
  6158    <dd>John Hudson. <a
  6159     href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
  6160     Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
  6161     href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
  6162     </dd>
  6163    <!---->
  6164   </dl>
  6165   <!--end-informative-->
  6166   <!--{{ARABIC-TYPO}}-->
  6167   <!--{{CJKV-INFO-PROCESSING}}-->
  6168   <!--{{DIGITAL-TYPOGRAPHY}}-->
  6169   <!--{{DOM-LEVEL-2-STYLE}}-->
  6170   <!--{{ELEMTYPO}}-->
  6171   <!--{{LANGCULTTYPE}}-->
  6172   <!--{{OPENTYPE-FONT-GUIDE}}-->
  6173   <!--{{RASTER-TRAGEDY}}-->
  6174   <!--{{WINDOWS-GLYPH-PROC}}-->
  6175   <!--{{CHARMOD-NORM}}-->
  6176   <!--{{AAT-FEATURES}}-->
  6177   <!--{{CSS3-CONDITIONAL}}-->
  6178   <!--{{CSS3TEXT}}-->
  6180   <h2 class=no-num id=index>Index</h2>
  6181   <!--begin-index-->
  6183   <ul class=indexlist>
  6184    <li>100...900 weight values, <a href="#font-weight-numeric-values"
  6185     title="100...900 weight values"><strong>3.2</strong></a>
  6187    <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
  6188     title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
  6190    <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
  6191     title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
  6193    <li><var>&lt;contextual-alt-values&gt;</var>, <a
  6194     href="#contextual-alt-values"
  6195     title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
  6197    <li><var>&lt;discretionary-lig-values&gt;</var>, <a
  6198     href="#discretionary-lig-values"
  6199     title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
  6201    <li><var>&lt;east-asian-variant-values&gt;</var>, <a
  6202     href="#east-asian-variant-values"
  6203     title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
  6205    <li><var>&lt;east-asian-width-values&gt;</var>, <a
  6206     href="#east-asian-width-values"
  6207     title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
  6209    <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
  6210     title="&lt;family-name&gt;"><strong>3.1</strong></a>
  6212    <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
  6213     title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
  6215    <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
  6216     title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
  6218    <li><var>&lt;font-variant-css21&gt;</var>, <a
  6219     href="#font-variant-css21-values"
  6220     title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
  6222    <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
  6223     title="&lt;generic-family&gt;"><strong>3.1</strong></a>
  6225    <li><var>&lt;historical-lig-values&gt;</var>, <a
  6226     href="#historical-lig-values"
  6227     title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
  6229    <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
  6230     title="&lt;length&gt;"><strong>3.5</strong></a>
  6232    <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
  6233     title="&lt;number&gt;"><strong>3.6</strong></a>
  6235    <li><var>&lt;numeric-figure-values&gt;</var>, <a
  6236     href="#numeric-figure-values"
  6237     title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
  6239    <li><var>&lt;numeric-fraction-values&gt;</var>, <a
  6240     href="#numeric-fraction-values"
  6241     title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
  6243    <li><var>&lt;numeric-spacing-values&gt;</var>, <a
  6244     href="#numeric-spacing-values"
  6245     title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
  6247    <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
  6248     title="&lt;percentage&gt;"><strong>3.5</strong></a>
  6250    <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
  6251     title="&lt;relative-size&gt;"><strong>3.5</strong></a>
  6253    <li><var>&lt;string&gt;</var>, <a
  6254     href="#font-language-override-string-value"
  6255     title="&lt;string&gt;"><strong>6.13</strong></a>
  6257    <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
  6258     title="&lt;urange&gt;"><strong>4.5</strong></a>
  6260    <li><code>@font-face</code>, <a href="#at-font-face-rule"
  6261     title="@font-face"><strong>4.1</strong></a>
  6263    <li><code>@font-feature-values</code>, <a
  6264     href="#at-font-feature-values-rule"
  6265     title="@font-feature-values"><strong>6.9</strong></a>
  6267    <li>all-petite-caps, <a href="#all-petite-caps"
  6268     title=all-petite-caps><strong>6.6</strong></a>
  6270    <li>all-small-caps, <a href="#all-small-caps"
  6271     title=all-small-caps><strong>6.6</strong></a>
  6273    <li>annotation, <a href="#annotation"
  6274     title=annotation><strong>6.8</strong></a>
  6276    <li>aspect value, <a href="#aspect-value0" title="aspect
  6277     value"><strong>3.6</strong></a>
  6279    <li>authoring tool, <a href="#authoring-tool" title="authoring
  6280     tool"><strong>#</strong></a>
  6282    <li>auto
  6283     <ul>
  6284      <li>font-kerning, <a href="#font-kerning-auto-value" title="auto,
  6285       font-kerning"><strong>6.3</strong></a>
  6287      <li>font-size-adjust, <a href="#font-size-adjust-auto-value"
  6288       title="auto, font-size-adjust"><strong>3.6</strong></a>
  6289     </ul>
  6291    <li>bold, <a href="#bold" title=bold><strong>3.2</strong></a>
  6293    <li>bolder, <a href="#bolder" title=bolder><strong>3.2</strong></a>
  6295    <li>character map, <a href="#character-map" title="character
  6296     map"><strong>5.2</strong></a>
  6298    <li>character-variant, <a href="#character-variant"
  6299     title=character-variant><strong>6.8</strong></a>
  6301    <li>common-ligatures, <a href="#common-ligatures"
  6302     title=common-ligatures><strong>6.4</strong></a>
  6304    <li>condensed, <a href="#condensed"
  6305     title=condensed><strong>3.3</strong></a>
  6307    <li>contextual, <a href="#contextual"
  6308     title=contextual><strong>6.4</strong></a>
  6310    <li>CSSFontFaceRule, <a href="#cssfontfacerule"
  6311     title=CSSFontFaceRule><strong>8.1</strong></a>
  6313    <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
  6314     title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
  6316    <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
  6317     of"><strong>#</strong></a>
  6319    <li>default face, <a href="#default-face" title="default
  6320     face"><strong>5.2</strong></a>
  6322    <li>descriptor_declaration, <a href="#descriptordeclaration"
  6323     title="descriptor_declaration"><strong>4.1</strong></a>
  6325    <li>diagonal-fractions, <a href="#diagonal-fractions"
  6326     title=diagonal-fractions><strong>6.7</strong></a>
  6328    <li>discretionary-ligatures, <a href="#discretionary-ligatures"
  6329     title=discretionary-ligatures><strong>6.4</strong></a>
  6331    <li>expanded, <a href="#expanded" title=expanded><strong>3.3</strong></a>
  6333    <li>extra-condensed, <a href="#extra-condensed"
  6334     title=extra-condensed><strong>3.3</strong></a>
  6336    <li>extra-expanded, <a href="#extra-expanded"
  6337     title=extra-expanded><strong>3.3</strong></a>
  6339    <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
  6340     of"><strong>#</strong></a>
  6342    <li>feature_type, <a href="#featuretype"
  6343     title="feature_type"><strong>6.9</strong></a>
  6345    <li>feature_value_block, <a href="#featurevalueblock"
  6346     title="feature_value_block"><strong>6.9</strong></a>
  6348    <li>feature_value_definition, <a href="#featurevaluedefinition"
  6349     title="feature_value_definition"><strong>6.9</strong></a>
  6351    <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
  6353    <li>font-family
  6354     <ul>
  6355      <li>descriptor, <a href="#descdef-font-family" title="font-family,
  6356       descriptor"><strong>4.2</strong></a>
  6358      <li>property, <a href="#propdef-font-family" title="font-family,
  6359       property"><strong>3.1</strong></a>
  6360     </ul>
  6362    <li>font-feature-settings
  6363     <ul>
  6364      <li>descriptor, <a href="#descdef-font-feature-settings"
  6365       title="font-feature-settings, descriptor"><strong>4.7</strong></a>
  6367      <li>property, <a href="#propdef-font-feature-settings"
  6368       title="font-feature-settings, property"><strong>6.12</strong></a>
  6369     </ul>
  6371    <li>font-kerning, <a href="#propdef-font-kerning"
  6372     title=font-kerning><strong>6.3</strong></a>
  6374    <li>font-language-override, <a href="#propdef-font-language-override"
  6375     title=font-language-override><strong>6.13</strong></a>
  6377    <li>font-size, <a href="#propdef-font-size"
  6378     title=font-size><strong>3.5</strong></a>
  6380    <li>font-size-adjust, <a href="#propdef-font-size-adjust"
  6381     title=font-size-adjust><strong>3.6</strong></a>
  6383    <li>font-stretch
  6384     <ul>
  6385      <li>descriptor, <a href="#descdef-font-stretch" title="font-stretch,
  6386       descriptor"><strong>4.4</strong></a>
  6388      <li>property, <a href="#propdef-font-stretch" title="font-stretch,
  6389       property"><strong>3.3</strong></a>
  6390     </ul>
  6392    <li>font-style
  6393     <ul>
  6394      <li>descriptor, <a href="#descdef-font-style" title="font-style,
  6395       descriptor"><strong>4.4</strong></a>
  6397      <li>property, <a href="#propdef-font-style" title="font-style,
  6398       property"><strong>3.4</strong></a>
  6399     </ul>
  6401    <li>font-synthesis, <a href="#propdef-font-synthesis"
  6402     title=font-synthesis><strong>3.8</strong></a>
  6404    <li>font-variant
  6405     <ul>
  6406      <li>descriptor, <a href="#descdef-font-variant" title="font-variant,
  6407       descriptor"><strong>4.7</strong></a>
  6409      <li>property, <a href="#propdef-font-variant" title="font-variant,
  6410       property"><strong>6.11</strong></a>
  6411     </ul>
  6413    <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
  6414     title=font-variant-alternates><strong>6.8</strong></a>
  6416    <li>font-variant-caps, <a href="#propdef-font-variant-caps"
  6417     title=font-variant-caps><strong>6.6</strong></a>
  6419    <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
  6420     title=font-variant-east-asian><strong>6.10</strong></a>
  6422    <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
  6423     title=font-variant-ligatures><strong>6.4</strong></a>
  6425    <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
  6426     title=font-variant-numeric><strong>6.7</strong></a>
  6428    <li>font-variant-position, <a href="#propdef-font-variant-position"
  6429     title=font-variant-position><strong>6.5</strong></a>
  6431    <li>font-weight
  6432     <ul>
  6433      <li>descriptor, <a href="#descdef-font-weight" title="font-weight,
  6434       descriptor"><strong>4.4</strong></a>
  6436      <li>property, <a href="#propdef-font-weight" title="font-weight,
  6437       property"><strong>3.2</strong></a>
  6438     </ul>
  6440    <li>font_face_rule, <a href="#fontfacerule"
  6441     title="font_face_rule"><strong>4.1</strong></a>
  6443    <li>FONT_FACE_SYM, <a href="#fontfacesym"
  6444     title="FONT_FACE_SYM"><strong>4.1</strong></a>
  6446    <li>font_family_name, <a href="#fontfamilyname"
  6447     title="font_family_name"><strong>6.9</strong></a>
  6449    <li>font_family_name_list, <a href="#fontfamilynamelist"
  6450     title="font_family_name_list"><strong>6.9</strong></a>
  6452    <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
  6453     title="font_feature_values_rule"><strong>6.9</strong></a>
  6455    <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
  6456     title="FONT_FEATURE_VALUES_SYM"><strong>6.9</strong></a>
  6458    <li>full-width, <a href="#full-width"
  6459     title=full-width><strong>6.10</strong></a>
  6461    <li>historical-forms, <a href="#historical-forms"
  6462     title=historical-forms><strong>6.8</strong></a>
  6464    <li>historical-ligatures, <a href="#historical-ligatures"
  6465     title=historical-ligatures><strong>6.4</strong></a>
  6467    <li>italic, <a href="#italic" title=italic><strong>3.4</strong></a>
  6469    <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
  6471    <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
  6473    <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
  6475    <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
  6477    <li>lighter, <a href="#lighter" title=lighter><strong>3.2</strong></a>
  6479    <li>lining-nums, <a href="#lining-nums"
  6480     title=lining-nums><strong>6.7</strong></a>
  6482    <li>monospace, definition of, <a href="#monospace0" title="monospace,
  6483     definition of"><strong>#</strong></a>
  6485    <li>no-common-ligatures, <a href="#no-common-ligatures"
  6486     title=no-common-ligatures><strong>6.4</strong></a>
  6488    <li>no-contextual, <a href="#no-contextual"
  6489     title=no-contextual><strong>6.4</strong></a>
  6491    <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
  6492     title=no-discretionary-ligatures><strong>6.4</strong></a>
  6494    <li>no-historical-ligatures, <a href="#no-historical-ligatures"
  6495     title=no-historical-ligatures><strong>6.4</strong></a>
  6497    <li>none
  6498     <ul>
  6499      <li>font-kerning, <a href="#font-kerning-none-value" title="none,
  6500       font-kerning"><strong>6.3</strong></a>
  6502      <li>font-size-adjust, <a href="#font-size-adjust-none-value"
  6503       title="none, font-size-adjust"><strong>3.6</strong></a>
  6505      <li>font-variant, <a href="#font-variant-none-value" title="none,
  6506       font-variant"><strong>6.11</strong></a>
  6508      <li>font-variant-ligatures, <a href="#font-variant-ligatures-none-value"
  6509       title="none, font-variant-ligatures"><strong>6.4</strong></a>
  6510     </ul>
  6512    <li>normal, <a href="#normal" title=normal><strong>6.5</strong></a>
  6513     <ul>
  6514      <li>font-feature-settings, <a href="#font-feature-settings-normal-value"
  6515       title="normal, font-feature-settings"><strong>6.12</strong></a>
  6517      <li>font-kerning, <a href="#font-kerning-normal-value" title="normal,
  6518       font-kerning"><strong>6.3</strong></a>
  6520      <li>font-language-override, <a
  6521       href="#font-language-override-normal-value" title="normal,
  6522       font-language-override"><strong>6.13</strong></a>
  6524      <li>font-stretch, <a href="#font-stretch-normal-value" title="normal,
  6525       font-stretch"><strong>3.3</strong></a>
  6527      <li>font-style, <a href="#font-style-normal-value" title="normal,
  6528       font-style"><strong>3.4</strong></a>
  6530      <li>font-variant, <a href="#font-variant-normal-value" title="normal,
  6531       font-variant"><strong>6.11</strong></a>
  6533      <li>font-variant-alternates, <a
  6534       href="#font-variant-alternates-normal-value" title="normal,
  6535       font-variant-alternates"><strong>6.8</strong></a>
  6537      <li>font-variant-caps, <a href="#font-variant-caps-normal-value"
  6538       title="normal, font-variant-caps"><strong>6.6</strong></a>
  6540      <li>font-variant-east-asian, <a
  6541       href="#font-variant-east-asian-normal-value" title="normal,
  6542       font-variant-east-asian"><strong>6.10</strong></a>
  6544      <li>font-variant-ligatures, <a
  6545       href="#font-variant-ligatures-normal-value" title="normal,
  6546       font-variant-ligatures"><strong>6.4</strong></a>
  6548      <li>font-variant-numeric, <a href="#font-variant-numeric-normal-value"
  6549       title="normal, font-variant-numeric"><strong>6.7</strong></a>
  6551      <li>font-weight, <a href="#font-weight-normal-value" title="normal,
  6552       font-weight"><strong>3.2</strong></a>
  6553     </ul>
  6555    <li>oblique, <a href="#oblique" title=oblique><strong>3.4</strong></a>
  6557    <li>oldstyle-nums, <a href="#oldstyle-nums"
  6558     title=oldstyle-nums><strong>6.7</strong></a>
  6560    <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
  6562    <li>ornaments, <a href="#ornaments"
  6563     title=ornaments><strong>6.8</strong></a>
  6565    <li>petite-caps, <a href="#petite-caps"
  6566     title=petite-caps><strong>6.6</strong></a>
  6568    <li>proportional-nums, <a href="#proportional-nums"
  6569     title=proportional-nums><strong>6.7</strong></a>
  6571    <li>proportional-width, <a href="#proportional-width"
  6572     title=proportional-width><strong>6.10</strong></a>
  6574    <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
  6576    <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
  6578    <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
  6579     definition of"><strong>#</strong></a>
  6581    <li>semi-condensed, <a href="#semi-condensed-"
  6582     title=semi-condensed><strong>3.3</strong></a>
  6584    <li>semi-expanded, <a href="#semi-expanded"
  6585     title=semi-expanded><strong>3.3</strong></a>
  6587    <li>serif, definition of, <a href="#serif0" title="serif, definition
  6588     of"><strong>#</strong></a>
  6590    <li>simplified, <a href="#simplified"
  6591     title=simplified><strong>6.10</strong></a>
  6593    <li>slashed-zero, <a href="#slashed-zero"
  6594     title=slashed-zero><strong>6.7</strong></a>
  6596    <li>small-caps, <a href="#small-caps"
  6597     title=small-caps><strong>6.6</strong></a>
  6599    <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
  6601    <li>stacked-fractions, <a href="#stacked-fractions"
  6602     title=stacked-fractions><strong>6.7</strong></a>
  6604    <li>style sheet
  6605     <ul>
  6606      <li>as conformance class, <a href="#style-sheet" title="style sheet, as
  6607       conformance class"><strong>#</strong></a>
  6608     </ul>
  6610    <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
  6612    <li>stylistic, <a href="#stylistic"
  6613     title=stylistic><strong>6.8</strong></a>
  6615    <li>sub, <a href="#sub" title=sub><strong>6.5</strong></a>
  6617    <li>super, <a href="#super" title=super><strong>6.5</strong></a>
  6619    <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
  6621    <li>tabular-nums, <a href="#tabular-nums"
  6622     title=tabular-nums><strong>6.7</strong></a>
  6624    <li>titling-caps, <a href="#titling-caps"
  6625     title=titling-caps><strong>6.6</strong></a>
  6627    <li>traditional, <a href="#traditional"
  6628     title=traditional><strong>6.10</strong></a>
  6630    <li>ultra-condensed, <a href="#ultra-condensed"
  6631     title=ultra-condensed><strong>3.3</strong></a>
  6633    <li>ultra-expanded, <a href="#ultra-expanded"
  6634     title=ultra-expanded><strong>3.3</strong></a>
  6636    <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
  6638    <li>unicode-range, <a href="#descdef-unicode-range"
  6639     title=unicode-range><strong>4.5</strong></a>
  6641    <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
  6643    <li>width, <a href="#width" title=width><strong>2</strong></a>
  6644   </ul>
  6645   <!--end-index-->
  6647   <h2 class=no-num id=property-index>Property index</h2>
  6648   <!--begin-properties-->
  6650   <table class=proptable>
  6651    <thead>
  6652     <tr>
  6653      <th>Property
  6655      <th>Values
  6657      <th>Initial
  6659      <th>Applies to
  6661      <th>Inh.
  6663      <th>Percentages
  6665      <th>Media
  6667    <tbody>
  6668     <tr>
  6669      <th><a class=property href="#propdef-font">font</a>
  6671      <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
  6672       &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
  6673       &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
  6674       &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
  6675       small-caption | status-bar
  6677      <td>see individual properties
  6679      <td>all elements
  6681      <td>yes
  6683      <td>see individual properties
  6685      <td>visual
  6687     <tr>
  6688      <th><span class=property>font-family</span>
  6690      <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
  6692      <td>depends on user agent
  6694      <td>all elements
  6696      <td>yes
  6698      <td>N/A
  6700      <td>visual
  6702     <tr>
  6703      <th><span class=property>font-feature-settings</span>
  6705      <td>normal | &lt;feature-tag-value&gt; #
  6707      <td>normal
  6709      <td>all elements
  6711      <td>yes
  6713      <td>N/A
  6715      <td>visual
  6717     <tr>
  6718      <th><a class=property href="#propdef-font-kerning">font-kerning</a>
  6720      <td>auto | normal | none
  6722      <td>auto
  6724      <td>all elements
  6726      <td>yes
  6728      <td>N/A
  6730      <td>visual
  6732     <tr>
  6733      <th><a class=property
  6734       href="#propdef-font-language-override">font-language-override</a>
  6736      <td>normal | &lt;string&gt;
  6738      <td>normal
  6740      <td>all elements
  6742      <td>yes
  6744      <td>N/A
  6746      <td>visual
  6748     <tr>
  6749      <th><a class=property href="#propdef-font-size">font-size</a>
  6751      <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
  6752       &lt;percentage&gt;
  6754      <td>medium
  6756      <td>all elements
  6758      <td>yes
  6760      <td>refer to parent element's font size
  6762      <td>visual
  6764     <tr>
  6765      <th><a class=property
  6766       href="#propdef-font-size-adjust">font-size-adjust</a>
  6768      <td>none | auto | &lt;number&gt;
  6770      <td>none
  6772      <td>all elements
  6774      <td>yes
  6776      <td>N/A
  6778      <td>visual
  6780     <tr>
  6781      <th><span class=property>font-stretch</span>
  6783      <td>normal | ultra-condensed | extra-condensed | condensed |
  6784       semi-condensed | semi-expanded | expanded | extra-expanded |
  6785       ultra-expanded
  6787      <td>normal
  6789      <td>all elements
  6791      <td>yes
  6793      <td>N/A
  6795      <td>visual
  6797     <tr>
  6798      <th><span class=property>font-style</span>
  6800      <td>normal | italic | oblique
  6802      <td>normal
  6804      <td>all elements
  6806      <td>yes
  6808      <td>N/A
  6810      <td>visual
  6812     <tr>
  6813      <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
  6815      <td>none | [ weight || style ]
  6817      <td>weight style
  6819      <td>all elements
  6821      <td>yes
  6823      <td>N/A
  6825      <td>visual
  6827     <tr>
  6828      <th><span class=property>font-variant</span>
  6830      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6831       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6832       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  6833       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  6834       character-variant(&lt;feature-value-name&gt; #) ||
  6835       swash(&lt;feature-value-name&gt;) ||
  6836       ornaments(&lt;feature-value-name&gt;) ||
  6837       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  6838       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  6839       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  6840       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  6841       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  6842       ruby ]
  6844      <td>normal
  6846      <td>all elements
  6848      <td>yes
  6850      <td>see individual properties
  6852      <td>visual
  6854     <tr>
  6855      <th><a class=property
  6856       href="#propdef-font-variant-alternates">font-variant-alternates</a>
  6858      <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
  6859       || styleset(&lt;feature-value-name&gt; #) ||
  6860       character-variant(&lt;feature-value-name&gt; #) ||
  6861       swash(&lt;feature-value-name&gt;) ||
  6862       ornaments(&lt;feature-value-name&gt;) ||
  6863       annotation(&lt;feature-value-name&gt;) ]
  6865      <td>normal
  6867      <td>all elements
  6869      <td>yes
  6871      <td>N/A
  6873      <td>visual
  6875     <tr>
  6876      <th><a class=property
  6877       href="#propdef-font-variant-caps">font-variant-caps</a>
  6879      <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
  6880       | unicase | titling-caps
  6882      <td>normal
  6884      <td>all elements
  6886      <td>yes
  6888      <td>N/A
  6890      <td>visual
  6892     <tr>
  6893      <th><a class=property
  6894       href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
  6896      <td>normal | [ &lt;east-asian-variant-values&gt; ||
  6897       &lt;east-asian-width-values&gt; || ruby ]
  6899      <td>normal
  6901      <td>all elements
  6903      <td>yes
  6905      <td>N/A
  6907      <td>visual
  6909     <tr>
  6910      <th><a class=property
  6911       href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
  6913      <td>normal | none | [ &lt;common-lig-values&gt; ||
  6914       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  6915       &lt;contextual-alt-values&gt; ]
  6917      <td>normal
  6919      <td>all elements
  6921      <td>yes
  6923      <td>N/A
  6925      <td>visual
  6927     <tr>
  6928      <th><a class=property
  6929       href="#propdef-font-variant-numeric">font-variant-numeric</a>
  6931      <td>normal | [ &lt;numeric-figure-values&gt; ||
  6932       &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
  6933       ordinal || slashed-zero ]
  6935      <td>normal
  6937      <td>all elements
  6939      <td>yes
  6941      <td>N/A
  6943      <td>visual
  6945     <tr>
  6946      <th><a class=property
  6947       href="#propdef-font-variant-position">font-variant-position</a>
  6949      <td>normal | sub | super
  6951      <td>normal
  6953      <td>all elements
  6955      <td>yes
  6957      <td>N/A
  6959      <td>visual
  6961     <tr>
  6962      <th><span class=property>font-weight</span>
  6964      <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
  6965       | 700 | 800 | 900
  6967      <td>normal
  6969      <td>all elements
  6971      <td>yes
  6973      <td>N/A
  6975      <td>visual
  6976   </table>
  6977   <!--end-properties-->
  6978   <!--begin-descriptors-->
  6980   <table class=proptable>
  6981    <thead>
  6982     <tr>
  6983      <th>Descriptor
  6985      <th>Value
  6987      <th>Initial
  6989      <th>Percentages
  6991      <th>Media
  6993    <tbody>
  6994     <tr>
  6995      <th><span class=property>font-family</span>
  6997      <td>&lt;family-name&gt;
  6999      <td>N/A
  7001     <tr>
  7002      <th><span class=property>font-feature-settings</span>
  7004      <td>normal | &lt;feature-tag-value&gt; #
  7006      <td>normal
  7008     <tr>
  7009      <th><span class=property>font-stretch</span>
  7011      <td>normal | ultra-condensed | extra-condensed | condensed |
  7012       semi-condensed | semi-expanded | expanded | extra-expanded |
  7013       ultra-expanded
  7015      <td>normal
  7017     <tr>
  7018      <th><span class=property>font-style</span>
  7020      <td>normal | italic | oblique
  7022      <td>normal
  7024     <tr>
  7025      <th><span class=property>font-variant</span>
  7027      <td>normal | none | [ &lt;common-lig-values&gt; ||
  7028       &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
  7029       &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
  7030       || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
  7031       character-variant(&lt;feature-value-name&gt; #) ||
  7032       swash(&lt;feature-value-name&gt;) ||
  7033       ornaments(&lt;feature-value-name&gt;) ||
  7034       annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
  7035       | petite-caps | all-petite-caps | unicase | titling-caps ] ||
  7036       &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
  7037       &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
  7038       &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
  7039       ruby ]
  7041      <td>normal
  7043     <tr>
  7044      <th><span class=property>font-weight</span>
  7046      <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
  7048      <td>normal
  7050     <tr>
  7051      <th><a class=property href="#descdef-src">src</a>
  7053      <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
  7055      <td>N/A
  7057     <tr>
  7058      <th><a class=property href="#descdef-unicode-range">unicode-range</a>
  7060      <td>&lt;urange&gt; #
  7062      <td>U+0-10FFFF
  7063   </table>
  7064   <!--end-descriptors-->
  7065   <script type="text/javascript">
  7066 window.onload = function () {
  7067   if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
  7068   var i, hiresElements = document.getElementsByClassName("hires");
  7069   for (i = 0; i < hiresElements.length; i++) {
  7070     var h = hiresElements[i];
  7071     if (h.tagName != "IMG") continue;
  7072     var src = h.getAttribute("src");
  7073     var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
  7074     h.src = src2x;
  7077 </script>
  7078 </html>
  7079 <!-- Keep this comment at the end of the file
  7080 Local variables:
  7081 mode: sgml
  7082 sgml-declaration:"~/SGML/HTML4.decl"
  7083 sgml-default-doctype-name:"html"
  7084 sgml-minimize-attributes:t
  7085 sgml-nofill-elements:("pre" "style" "br")
  7086 sgml-live-element-indicator:t
  7087 sgml-omittag:nil
  7088 sgml-shorttag:nil
  7089 sgml-namecase-general:t
  7090 sgml-general-insert-case:lower
  7091 sgml-always-quote-attributes:t
  7092 sgml-indent-step:nil
  7093 sgml-indent-data:t
  7094 sgml-parent-document:nil
  7095 sgml-exposed-tags:nil
  7096 sgml-local-catalogs:nil
  7097 sgml-local-ecat-files:nil
  7098 End:
  7099 -->
  7100 <!--
  7102 to do:
  7104 - wording of OpenType family name handling
  7105 - handling combining sequences in the font matching algorithm
  7106 - fix-up fi ligature example
  7108 -->

mercurial