css-fonts/Fonts.html

Mon, 10 Jun 2013 11:36:04 +0900

author
John Daggett <jdaggett@mozilla.com>
date
Mon, 10 Jun 2013 11:36:04 +0900
changeset 8387
f257ff301ad8
parent 8386
239900bde699
child 8391
f8ed09648c85
permissions
-rw-r--r--

[css3-fonts] fix markup bug causing the validator to burp

jdaggett@484 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
jdaggett@484 2 "http://www.w3.org/TR/html4/strict.dtd">
jdaggett@484 3
jdaggett@484 4 <html lang=en>
jdaggett@484 5 <head><meta content="text/html;charset=utf-8" http-equiv=Content-Type>
jdaggett@484 6
jdaggett@1244 7 <title>CSS Fonts Module Level 3</title>
jdaggett@484 8 <!--
jdaggett@484 9 FIXME when publishing: copy the current default.css and link to
jdaggett@484 10 "default.css" rather than "../default.css"
jdaggett@484 11 -->
jdaggett@484 12 <link href="../default.css" rel=stylesheet type="text/css">
jdaggett@4545 13 <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
jdaggett@4546 14 <!-- I'm just experimenting here, don't get your bee in a bonnet -->
jdaggett@4546 15 <script src="http://use.typekit.com/xon2bky.js"
jdaggett@4546 16 type="text/javascript"></script>
jdaggett@4546 17 <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
jdaggett@484 18
jdaggett@497 19 <style type="text/css">
jdaggett@4546 20
jdaggett@4547 21 body, th, td, h1, h2, h3, h4, h5, h6 {
jdaggett@4547 22 font-family: "myriad-pro", sans-serif !important;
jdaggett@4547 23 }
jdaggett@8277 24
jdaggett@524 25 body {
jdaggett@524 26 padding: 2em 70px 2em 70px;
jdaggett@524 27 }
jdaggett@4546 28
jdaggett@497 29 p + p, p.mtb {
jdaggett@497 30 margin-top: 0.8em;
jdaggett@497 31 text-indent: 0px;
jdaggett@497 32 }
jdaggett@6651 33
jdaggett@6651 34 #bolderlighter {
jdaggett@6651 35 width: 40%;
jdaggett@6651 36 }
jdaggett@6651 37
jdaggett@6651 38 #bolderlighter th {
jdaggett@6651 39 text-align: center;
jdaggett@6651 40 }
jdaggett@8277 41
jdaggett@7103 42 #fontformats td, #eventhandlers td, #fontformats th, #eventhandlers th {
jdaggett@1244 43 padding-right: 2em;
jdaggett@512 44 text-align: left;
jdaggett@512 45 }
jdaggett@8277 46
jdaggett@518 47 dd {
jdaggett@518 48 margin-bottom: 1em;
jdaggett@514 49 }
jdaggett@8277 50
jdaggett@516 51 #authors dd {
jdaggett@516 52 margin-bottom: 0;
jdaggett@516 53 }
jdaggett@8277 54
jdaggett@531 55 #fontstylematchingalg {
jdaggett@531 56 list-style-type: lower-alpha;
jdaggett@531 57 }
jdaggett@8277 58
jdaggett@531 59 #fontmatchingalg ul, #fontmatchingalg ol {
jdaggett@531 60 margin-top: 0.8em;
jdaggett@531 61 }
jdaggett@8277 62
jdaggett@531 63 #fontmatchingalg li + li {
jdaggett@531 64 margin-top: 0.8em;
jdaggett@531 65 }
jdaggett@8277 66
jdaggett@531 67 div.example {
jdaggett@531 68 padding: 1em;
jdaggett@531 69 margin-top: 1em;
jdaggett@531 70 }
jdaggett@531 71
jdaggett@531 72 div.example + div.example {
jdaggett@531 73 margin-top: 2em;
jdaggett@531 74 }
jdaggett@8277 75
jdaggett@531 76 div.figure {
jdaggett@531 77 page-break-inside: avoid;
jdaggett@531 78 }
jdaggett@1244 79
jdaggett@1662 80 pre.prod { white-space: pre-wrap; margin: 1em 0 1em 2em }
jdaggett@8277 81
jdaggett@8277 82 div.featex {
jdaggett@1662 83 width: 700px;
jdaggett@1662 84 }
jdaggett@8277 85
jdaggett@1662 86 div.featex img {
jdaggett@1662 87 margin: auto;
jdaggett@1662 88 display: block;
jdaggett@1662 89 }
jdaggett@6436 90
jdaggett@6436 91 span.tag {
jdaggett@6436 92 font-family: monospace;
jdaggett@6436 93 font-size: 120%;
jdaggett@6436 94 }
jdaggett@6648 95
jdaggett@6701 96 ol ol {
jdaggett@6701 97 list-style-type: lower-alpha;
jdaggett@6701 98 }
jdaggett@7060 99
jdaggett@7060 100 .idl-code {
jdaggett@7060 101 font-weight: bold;
jdaggett@7060 102 color: #c50;
jdaggett@7060 103 }
jdaggett@497 104 </style>
jdaggett@2556 105 <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
jdaggett@2556 106 type="text/css">
peter@8369 107 <script defer=defer
jdaggett@8385 108 src="http://test.csswg.org/harness/annotate.js#CSS3-FONTS_DEV"
jdaggett@8385 109 type="text/javascript"></script>
jdaggett@497 110
jdaggett@484 111 <body>
jdaggett@484 112 <div class=head> <!--begin-logo-->
jdaggett@484 113 <p><a href="http://www.w3.org/"><img alt=W3C height=48
jdaggett@890 114 src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
jdaggett@890 115
jdaggett@901 116 <h1>CSS Fonts Module Level 3</h1>
jdaggett@901 117
jdaggett@8385 118 <h2 class="no-num no-toc" id=editors-draft-10-june-2013>Editor's Draft 10
jdaggett@8356 119 June 2013</h2>
jdaggett@484 120
jdaggett@516 121 <dl id=authors>
jdaggett@484 122 <dt>This version:
jdaggett@484 123
jdaggett@484 124 <dd><a
jdaggett@8031 125 href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
jdaggett@8385 126 <!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130610/">http://www.w3.org/TR/2013/ED-css3-fonts-20130610/</a> -->
jdaggett@484 127
jdaggett@484 128
jdaggett@484 129 <dt>Latest version:
jdaggett@484 130
jdaggett@484 131 <dd><a
jdaggett@484 132 href="http://www.w3.org/TR/css3-fonts/">http://www.w3.org/TR/css3-fonts/</a>
jdaggett@484 133
jdaggett@890 134 <dt>Latest editor's draft:
jdaggett@890 135
jdaggett@890 136 <dd><a
jdaggett@8031 137 href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
jdaggett@7488 138 (<a
jdaggett@8031 139 href="https://dvcs.w3.org/hg/csswg/log/tip/css-fonts/Fonts.html">change
jdaggett@7488 140 log</a>)
jdaggett@890 141
jdaggett@4624 142 <dt>Previous version:
jdaggett@890 143
jdaggett@890 144 <dd><a
jdaggett@7451 145 href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</a>
jdaggett@4624 146
jdaggett@4624 147 <dt>Issues List:
jdaggett@4624 148
jdaggett@4624 149 <dd><a href="http://www.w3.org/Style/CSS/Tracker/products/18">CSS3 Fonts
jdaggett@4624 150 issues in Tracker</a>
jdaggett@2556 151
jdaggett@2556 152 <dd><a
jdaggett@6648 153 href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Fonts&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED">CSS3
jdaggett@4624 154 Fonts issues in Bugzilla</a>
jdaggett@4624 155
jdaggett@8031 156 <dt>Discussion:
jdaggett@8031 157
jdaggett@8031 158 <dd><a
jdaggett@8031 159 href="mailto:www-style@w3.org?subject=%5Bcss-fonts%5D%20feedback">www-style@w3.org</a>
jdaggett@8031 160 with subject line “<kbd>[css-fonts] <var>… message topic
jdaggett@8031 161 …</var></kbd>” (<a
jdaggett@8031 162 href="http://lists.w3.org/Archives/Public/www-style/"
jdaggett@8031 163 rel=discussion>archives</a>)
jdaggett@890 164
jdaggett@890 165 <dt>Editor:
jdaggett@484 166
jdaggett@497 167 <dd><a href="mailto:jdaggett@mozilla.com">John Daggett (Mozilla)</a>
jdaggett@484 168 </dl>
jdaggett@484 169 <!--begin-copyright-->
jdaggett@484 170 <p class=copyright><a
jdaggett@484 171 href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
jdaggett@7179 172 rel=license>Copyright</a> © 2013 <a href="http://www.w3.org/"><abbr
jdaggett@5530 173 title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
jdaggett@5530 174 href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of
jdaggett@5530 175 Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr
jdaggett@1662 176 title="European Research Consortium for Informatics and
jdaggett@7244 177 Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>,
jdaggett@7244 178 <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C
jdaggett@7244 179 <a
jdaggett@484 180 href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
jdaggett@484 181 <a
jdaggett@484 182 href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
jdaggett@484 183 and <a
jdaggett@484 184 href="http://www.w3.org/Consortium/Legal/copyright-documents">document
jdaggett@484 185 use</a> rules apply.</p>
jdaggett@484 186 <!--end-copyright-->
jdaggett@484 187 <hr title="Separator for header">
jdaggett@484 188 </div>
jdaggett@525 189
jdaggett@484 190 <h2 class="no-num no-toc" id=abstract>Abstract</h2>
jdaggett@484 191
jdaggett@890 192 <p>This CSS3 module describes how font properties are specified and how
jdaggett@890 193 font resources are loaded dynamically. The contents of this specification
jdaggett@1244 194 are a consolidation of content previously divided into <a
jdaggett@3538 195 href="http://www.w3.org/TR/2002/WD-css3-fonts-20020802/">CSS3 Fonts</a>
jdaggett@3538 196 and <a href="http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/">CSS3
jdaggett@7521 197 Web Fonts</a> modules. The description of font load events was moved into
jdaggett@7521 198 the <a href="http://dev.w3.org/csswg/css3-font-load-events/">CSS3 Font
jdaggett@7521 199 Load Events</a> module.
jdaggett@484 200
jdaggett@484 201 <h2 class="no-num no-toc" id=status>Status of this document</h2>
jdaggett@484 202 <!--begin-status-->
jdaggett@484 203
jdaggett@484 204 <p>This is a public copy of the editors' draft. It is provided for
jdaggett@484 205 discussion only and may change at any moment. Its publication here does
jdaggett@484 206 not imply endorsement of its contents by W3C. Don't cite this document
jdaggett@484 207 other than as work in progress.
jdaggett@484 208
jdaggett@484 209 <p>The (<a
jdaggett@484 210 href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
jdaggett@1662 211 mailing list <a
jdaggett@1662 212 href="mailto:www-style@w3.org?Subject=%5Bcss3-fonts%5D%20PUT%20SUBJECT%20HERE">
jdaggett@1662 213 www-style@w3.org</a> (see <a
jdaggett@1662 214 href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
jdaggett@1662 215 discussion of this specification. When sending e-mail, please put the text
jdaggett@1662 216 “css3-fonts” in the subject, preferably like this:
jdaggett@1148 217 “[<!---->css3-fonts<!---->] <em>…summary of comment…</em>”
jdaggett@484 218
jdaggett@8031 219 <p>This document was produced by the <a
jdaggett@8031 220 href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
jdaggett@8031 221 the <a href="http://www.w3.org/Style/">Style Activity</a>).
jdaggett@484 222
jdaggett@484 223 <p>This document was produced by a group operating under the <a
jdaggett@8031 224 href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
jdaggett@8031 225 2004 W3C Patent Policy</a>. W3C maintains a <a
jdaggett@8031 226 href="http://www.w3.org/2004/01/pp-impl/32061/status"
jdaggett@484 227 rel=disclosure>public list of any patent disclosures</a> made in
jdaggett@484 228 connection with the deliverables of the group; that page also includes
jdaggett@484 229 instructions for disclosing a patent. An individual who has actual
jdaggett@484 230 knowledge of a patent which the individual believes contains <a
jdaggett@8031 231 href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
jdaggett@484 232 Claim(s)</a> must disclose the information in accordance with <a
jdaggett@8031 233 href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
jdaggett@8031 234 6 of the W3C Patent Policy</a>.</p>
jdaggett@484 235 <!--end-status-->
jdaggett@8385 236
jdaggett@8385 237 <h3 class="no-num no-toc" id=atrisk>Features at risk</h3>
jdaggett@8385 238
jdaggett@8385 239 <p>The following features are at risk and may be removed when exiting CR:
jdaggett@8385 240
jdaggett@8385 241 <ul>
jdaggett@8386 242 <li>fallback handling for text decoration in superscript/subscript variant
jdaggett@8385 243 glyphs (‘<a href="#propdef-font-variant-position"><code
jdaggett@8385 244 class=property>font-variant-position</code></a>’)
jdaggett@8385 245
jdaggett@8385 246 <li>‘<a href="#propdef-font-language-override"><code
jdaggett@8385 247 class=property>font-language-override</code></a>’ property
jdaggett@8385 248 </ul>
jdaggett@8385 249
jdaggett@8385 250 <p>This draft is a <strong>Last Call Working Draft</strong>. Please send
jdaggett@8385 251 comments to the <a
jdaggett@8385 252 href="http://lists.w3.org/Archives/Public/www-style/">www-style mailing
jdaggett@8385 253 list</a> as described above. The <strong>deadline for comments</strong> is
jdaggett@8385 254 six weeks after the date of publication in the header.
jdaggett@2472 255
jdaggett@484 256 <h2 class="no-num no-toc" id=contents>Table of contents</h2>
jdaggett@484 257 <!--begin-toc-->
jdaggett@484 258
jdaggett@484 259 <ul class=toc>
jdaggett@890 260 <li><a href="#introduction"><span class=secno>1 </span>Introduction</a>
jdaggett@890 261
jdaggett@1244 262 <li><a href="#typography-background"><span class=secno>2 </span>Typography
jdaggett@545 263 Background</a>
jdaggett@545 264
jdaggett@6699 265 <li><a href="#basic-font-props"><span class=secno>3 </span>Basic Font
jdaggett@6699 266 Properties</a>
jdaggett@484 267 <ul class=toc>
jdaggett@1662 268 <li><a href="#font-family-prop"><span class=secno>3.1 </span>Font
jdaggett@1662 269 family: the font-family property</a>
jdaggett@514 270 <ul class=toc>
jdaggett@1244 271 <li><a href="#generic-font-families"><span class=secno>3.1.1
jdaggett@1244 272 </span>Generic font families</a>
jdaggett@514 273 </ul>
jdaggett@484 274
jdaggett@1662 275 <li><a href="#font-weight-prop"><span class=secno>3.2 </span>Font
jdaggett@1662 276 weight: the font-weight property</a>
jdaggett@1662 277
jdaggett@1662 278 <li><a href="#font-stretch-prop"><span class=secno>3.3 </span>Font
jdaggett@1662 279 width: the font-stretch property</a>
jdaggett@1662 280
jdaggett@1662 281 <li><a href="#font-style-prop"><span class=secno>3.4 </span>Font style:
jdaggett@1662 282 the font-style property</a>
jdaggett@1662 283
jdaggett@1662 284 <li><a href="#font-size-prop"><span class=secno>3.5 </span>Font size:
jdaggett@1662 285 the font-size property</a>
jdaggett@1662 286
jdaggett@1662 287 <li><a href="#font-size-adjust-prop"><span class=secno>3.6
jdaggett@1662 288 </span>Relative sizing: the font-size-adjust property</a>
jdaggett@1662 289
jdaggett@1662 290 <li><a href="#font-prop"><span class=secno>3.7 </span>Shorthand font
jdaggett@1662 291 property: the font property</a>
jdaggett@2457 292
jdaggett@2487 293 <li><a href="#font-synthesis-prop"><span class=secno>3.8
jdaggett@2487 294 </span>Controlling synthetic faces: the font-synthesis property</a>
jdaggett@484 295 </ul>
jdaggett@484 296
jdaggett@890 297 <li><a href="#font-resources"><span class=secno>4 </span>Font
jdaggett@6699 298 Resources</a>
jdaggett@512 299 <ul class=toc>
jdaggett@1662 300 <li><a href="#font-face-rule"><span class=secno>4.1 </span>The
jdaggett@7096 301 <code>@font-face</code> rule</a>
jdaggett@1244 302
jdaggett@1662 303 <li><a href="#font-family-desc"><span class=secno>4.2 </span>Font
jdaggett@1662 304 family: the font-family descriptor</a>
jdaggett@1662 305
jdaggett@1662 306 <li><a href="#src-desc"><span class=secno>4.3 </span>Font reference: the
jdaggett@1662 307 src descriptor</a>
jdaggett@1662 308
jdaggett@1662 309 <li><a href="#font-prop-desc"><span class=secno>4.4 </span>Font property
jdaggett@1662 310 descriptors: the font-style, font-weight, font-stretch descriptors</a>
jdaggett@1662 311
jdaggett@1662 312 <li><a href="#unicode-range-desc"><span class=secno>4.5 </span>Character
jdaggett@1662 313 range: the unicode-range descriptor</a>
jdaggett@1662 314
jdaggett@8225 315 <li><a href="#composite-fonts"><span class=secno>4.6 </span>Using
jdaggett@8225 316 character ranges to define composite fonts</a>
jdaggett@8225 317
jdaggett@8225 318 <li><a href="#font-rend-desc"><span class=secno>4.7 </span>Font
jdaggett@1732 319 features: the font-variant and font-feature-settings descriptors</a>
jdaggett@2563 320
jdaggett@8225 321 <li><a href="#font-face-loading"><span class=secno>4.8 </span>Font
jdaggett@2563 322 loading guidelines</a>
jdaggett@2737 323
jdaggett@8225 324 <li><a href="#same-origin-restriction"><span class=secno>4.9
jdaggett@2737 325 </span>Same-origin restriction for fonts</a>
jdaggett@2740 326 <ul class=toc>
jdaggett@8225 327 <li><a href="#default-same-origin-restriction"><span class=secno>4.9.1
jdaggett@2740 328 </span>Default same-origin restriction</a>
jdaggett@2740 329
jdaggett@2740 330 <li><a href="#allowing-cross-origin-font-loading"><span
jdaggett@8225 331 class=secno>4.9.2 </span>Allowing cross-origin font loading</a>
jdaggett@2740 332 </ul>
jdaggett@512 333 </ul>
jdaggett@484 334
jdaggett@1244 335 <li><a href="#font-matching-algorithm"><span class=secno>5 </span>Font
jdaggett@6699 336 Matching Algorithm</a>
jdaggett@2457 337 <ul class=toc>
jdaggett@7309 338 <li><a href="#font-family-casing"><span class=secno>5.1 </span>Case
jdaggett@7309 339 sensitivity of font family names</a>
jdaggett@7309 340
jdaggett@7309 341 <li><a href="#font-style-matching"><span class=secno>5.2 </span>Matching
jdaggett@2457 342 font styles</a>
jdaggett@2457 343
jdaggett@7309 344 <li><a href="#cluster-matching"><span class=secno>5.3 </span>Cluster
jdaggett@6701 345 matching</a>
jdaggett@6701 346
jdaggett@7309 347 <li><a href="#char-handling-issues"><span class=secno>5.4
jdaggett@2457 348 </span>Character handling issues</a>
jdaggett@2509 349
jdaggett@7309 350 <li><a href="#font-matching-changes"><span class=secno>5.5 </span>Font
jdaggett@2509 351 matching changes since CSS 2.1</a>
jdaggett@6701 352
jdaggett@7309 353 <li><a href="#font-matching-examples"><span class=secno>5.6 </span>Font
jdaggett@6701 354 matching examples</a>
jdaggett@2457 355 </ul>
jdaggett@1244 356
jdaggett@6699 357 <li><a href="#font-rend-props"><span class=secno>6 </span>Font Feature
jdaggett@6699 358 Properties</a>
jdaggett@1662 359 <ul class=toc>
jdaggett@1856 360 <li><a href="#glyph-selection-positioning"><span class=secno>6.1
jdaggett@1856 361 </span>Glyph selection and positioning</a>
jdaggett@1856 362
jdaggett@1856 363 <li><a href="#language-specific-support"><span class=secno>6.2
jdaggett@1856 364 </span>Language-specific display</a>
jdaggett@1856 365
jdaggett@1856 366 <li><a href="#font-kerning-prop"><span class=secno>6.3 </span>Kerning:
jdaggett@1662 367 the font-kerning property</a>
jdaggett@1662 368
jdaggett@6176 369 <li><a href="#font-variant-ligatures-prop"><span class=secno>6.4
jdaggett@6176 370 </span>Ligatures: the font-variant-ligatures property</a>
jdaggett@6176 371
jdaggett@6176 372 <li><a href="#font-variant-position-prop"><span class=secno>6.5
jdaggett@3638 373 </span>Subscript and superscript forms: the font-variant-position
jdaggett@3638 374 property</a>
jdaggett@1856 375
jdaggett@2118 376 <li><a href="#font-variant-caps-prop"><span class=secno>6.6
jdaggett@2118 377 </span>Capitalization: the font-variant-caps property</a>
jdaggett@2118 378
jdaggett@2118 379 <li><a href="#font-variant-numeric-prop"><span class=secno>6.7
jdaggett@2118 380 </span>Numerical formatting: the font-variant-numeric property</a>
jdaggett@2118 381
jdaggett@2118 382 <li><a href="#font-variant-alternates-prop"><span class=secno>6.8
jdaggett@1662 383 </span>Alternates and swashes: the font-variant-alternates property</a>
jdaggett@1662 384
jdaggett@1662 385
jdaggett@2472 386 <li><a href="#font-feature-values"><span class=secno>6.9 </span>Defining
jdaggett@7096 387 font specific alternates: the <code>@font-feature-values</code>
jdaggett@7096 388 rule</a>
jdaggett@8356 389 <ul class=toc>
jdaggett@8356 390 <li><a href="#basic-syntax"><span class=secno>6.9.1 </span>Basic
jdaggett@8356 391 syntax</a>
jdaggett@8356 392
jdaggett@8356 393 <li><a href="#multi-valued-feature-value-definitions"><span
jdaggett@8356 394 class=secno>6.9.2 </span>Multi-valued feature value definitions</a>
jdaggett@8356 395 </ul>
jdaggett@2118 396
jdaggett@2118 397 <li><a href="#font-variant-east-asian-prop"><span class=secno>6.10
jdaggett@1662 398 </span>East Asian text rendering: the font-variant-east-asian
jdaggett@1662 399 property</a>
jdaggett@1662 400
jdaggett@2118 401 <li><a href="#font-variant-prop"><span class=secno>6.11 </span>Overall
jdaggett@1662 402 shorthand for font rendering: the font-variant property</a>
jdaggett@1662 403
jdaggett@2118 404 <li><a href="#font-feature-settings-prop"><span class=secno>6.12
jdaggett@2509 405 </span>Low-level font feature settings control: the
jdaggett@2509 406 font-feature-settings property</a>
jdaggett@1662 407
jdaggett@2118 408 <li><a href="#font-language-override-prop"><span class=secno>6.13
jdaggett@1732 409 </span>Font language override: the font-language-override property</a>
jdaggett@1662 410 </ul>
jdaggett@1662 411
jdaggett@6176 412 <li><a href="#font-feature-resolution"><span class=secno>7 </span>Font
jdaggett@6699 413 Feature Resolution </a>
jdaggett@6699 414 <ul class=toc>
jdaggett@6699 415 <li><a href="#default-features"><span class=secno>7.1 </span>Default
jdaggett@6699 416 features</a>
jdaggett@6699 417
jdaggett@6699 418 <li><a href="#feature-precedence"><span class=secno>7.2 </span>Feature
jdaggett@6699 419 precedence</a>
jdaggett@6699 420
jdaggett@6699 421 <li><a href="#feature-precedence-examples"><span class=secno>7.3
jdaggett@6699 422 </span>Feature precedence examples</a>
jdaggett@6699 423 </ul>
jdaggett@6699 424
jdaggett@7021 425 <li><a href="#object-model"><span class=secno>8 </span>Object Model</a>
jdaggett@7021 426 <ul class=toc>
jdaggett@7021 427 <li><a href="#om-fontface"><span class=secno>8.1 </span>The
jdaggett@7021 428 <code>CSSFontFaceRule</code> interface</a>
jdaggett@7021 429
jdaggett@7021 430 <li><a href="#om-fontfeaturevalues"><span class=secno>8.2 </span>The
jdaggett@7021 431 <code>CSSFontFeatureValuesRule</code> interface</a>
jdaggett@7021 432 </ul>
jdaggett@7021 433
jdaggett@2737 434 <li class=no-num><a href="#platform-props-to-css">Appendix A: Mapping
jdaggett@1662 435 platform font properties to CSS properties</a>
jdaggett@1662 436
jdaggett@2472 437 <li class=no-num><a href="#ch-ch-ch-changes">Changes</a>
jdaggett@2472 438 <ul class=toc>
jdaggett@7442 439 <li class=no-num><a href="#recent-changes"> Changes from the February
jdaggett@7442 440 2013 CSS3 Fonts Working Draft</a>
jdaggett@2472 441 </ul>
jdaggett@2472 442
jdaggett@529 443 <li class=no-num><a href="#acknowledgments">Acknowledgments</a>
jdaggett@529 444
jdaggett@7242 445 <li class=no-num><a href="#conformance"> Conformance</a>
jdaggett@7242 446 <ul class=toc>
jdaggett@7242 447 <li class=no-num><a href="#conventions"> Document Conventions</a>
jdaggett@7242 448
jdaggett@7242 449 <li class=no-num><a href="#conformance-classes"> Conformance Classes</a>
jdaggett@7242 450
jdaggett@7242 451
jdaggett@7242 452 <li class=no-num><a href="#partial"> Partial Implementations</a>
jdaggett@7242 453
jdaggett@7242 454 <li class=no-num><a href="#experimental"> Experimental
jdaggett@7242 455 Implementations</a>
jdaggett@7242 456
jdaggett@7242 457 <li class=no-num><a href="#testing"> Non-Experimental
jdaggett@7242 458 Implementations</a>
jdaggett@7242 459 </ul>
jdaggett@7242 460
jdaggett@484 461 <li class=no-num><a href="#references">References</a>
jdaggett@484 462 <ul class=toc>
jdaggett@1662 463 <li class=no-num><a href="#normative-references">Normative
jdaggett@1662 464 References</a>
jdaggett@1662 465
jdaggett@1662 466 <li class=no-num><a href="#other-references">Other References</a>
jdaggett@484 467 </ul>
jdaggett@484 468
jdaggett@484 469 <li class=no-num><a href="#index">Index</a>
jdaggett@484 470
jdaggett@484 471 <li class=no-num><a href="#property-index">Property index</a>
jdaggett@484 472 </ul>
jdaggett@484 473 <!--end-toc-->
jdaggett@484 474
jdaggett@890 475 <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
jdaggett@545 476
jdaggett@1148 477 <p>A font provides a resource containing the visual representation of
jdaggett@1662 478 characters. At the simplest level it contains information that maps
jdaggett@1662 479 character codes to shapes (called glyphs) that represent these characters.
jdaggett@1662 480 Fonts sharing a common design style are commonly grouped into font
jdaggett@1662 481 families classified by a set of standard font properties. Within a family,
jdaggett@1662 482 the shape displayed for a given character can vary by stroke weight, slant
jdaggett@7311 483 or relative width, among others. An individual font face is described by a
jdaggett@1662 484 unique combination of these properties. For a given range of text, CSS
jdaggett@1662 485 font properties are used to select a font family and a specific font face
jdaggett@1662 486 within that family to be used when rendering that text. As a simple
jdaggett@1662 487 example, to use the bold form of Helvetica one could use:
jdaggett@1148 488
jdaggett@8277 489 <pre>body {
jdaggett@8277 490 font-family: Helvetica;
jdaggett@8277 491 font-weight: bold;
jdaggett@1148 492 }</pre>
jdaggett@1148 493
jdaggett@7311 494 <p>Font resources may be installed locally on the system on which a user
jdaggett@7311 495 agent is running or downloadable. For local font resources descriptive
jdaggett@1148 496 information can be obtained directly from the font resource. For
jdaggett@1148 497 downloadable font resources (sometimes referred to as web fonts), the
jdaggett@1148 498 descriptive information is included with the reference to the font
jdaggett@1148 499 resource.
jdaggett@1148 500
jdaggett@1148 501 <p>Families of fonts typically don't contain a single face for each
jdaggett@1148 502 possible variation of font properties. The CSS font selection mechanism
jdaggett@7311 503 describes how to match a given set of CSS font properties to a single font
jdaggett@1148 504 face.
jdaggett@890 505
jdaggett@1244 506 <h2 id=typography-background><span class=secno>2 </span>Typography
jdaggett@1244 507 Background</h2>
jdaggett@890 508
jdaggett@7311 509 <p><em>This section is non-normative.</em>
jdaggett@7311 510
jdaggett@7311 511 <p> Typographic traditions vary across the globe, so there is no unique way
jdaggett@890 512 to classify all fonts across languages and cultures. For even common Latin
jdaggett@890 513 letters, wide variations are possible:
jdaggett@497 514
jdaggett@1150 515 <div class=figure><img alt="variations in glyphs for a single character"
jdaggett@1150 516 src=aaaaaa.png>
jdaggett@890 517 <p class=caption>One character, many glyph variations
jdaggett@498 518 </div>
jdaggett@497 519
jdaggett@497 520 <p>Differences in the anatomy of letterforms is one way to distinguish
jdaggett@497 521 fonts. For Latin fonts, flourishes at the ends of a character's main
jdaggett@497 522 strokes, or serifs, can distinguish a font from those without. Similar
jdaggett@534 523 comparisons exist in non-Latin fonts between fonts with tapered strokes
jdaggett@534 524 and those using primarily uniform strokes:
jdaggett@497 525
jdaggett@1150 526 <div class=figure><img alt="serif vs. non-serifs" src=serifvssansserif.png>
jdaggett@890 527 <p class=caption>Letterforms with and without serifs
jdaggett@534 528 </div>
jdaggett@534 529
jdaggett@1150 530 <div class=figure><img alt="serif vs. non-serifs for japanese"
jdaggett@1150 531 src=minchovsgothic.png>
jdaggett@890 532 <p class=caption>Similar groupings for Japanese typefaces
jdaggett@498 533 </div>
jdaggett@497 534
jdaggett@497 535 <p>Fonts contain letterforms and the data needed to map characters to these
jdaggett@7311 536 letterforms. Often this may be a simple one-to-one mapping, but more
jdaggett@497 537 complex mappings are also possible. The use of combining diacritic marks
jdaggett@497 538 creates many variations for an underlying letterform:
jdaggett@497 539
jdaggett@1150 540 <div class=figure><img alt="diacritic marks" src=aaaaaa-diacritics.png>
jdaggett@890 541 <p class=caption>Variations with diacritic marks
jdaggett@498 542 </div>
jdaggett@525 543
jdaggett@497 544 <p>A sequence of characters can be represented by a single glyph known as a
jdaggett@497 545 ligature:
jdaggett@497 546
jdaggett@1150 547 <div class=figure><img alt="example of a fi ligature"
jdaggett@1150 548 src=final-ligature.png>
jdaggett@890 549 <p class=caption>Ligature example
jdaggett@498 550 </div>
jdaggett@497 551
jdaggett@7311 552 <p>Visual transformations based on textual context are often stylistic
jdaggett@7311 553 option in European languages. They are required to correctly render
jdaggett@7311 554 languages like Arabic, the lam and alef characters below <em>must</em> be
jdaggett@7311 555 combined when they exist in sequence:
jdaggett@497 556
jdaggett@1150 557 <div class=figure><img alt="lam alef ligature" src=lamaleflig.png>
jdaggett@890 558 <p class=caption>Required Arabic ligature
jdaggett@498 559 </div>
jdaggett@497 560
jdaggett@498 561 <p>The relative complexity of these shaping transformations requires
jdaggett@498 562 additional data within the font.
jdaggett@497 563
jdaggett@497 564 <p>Sets of font faces with various stylistic variations are often grouped
jdaggett@512 565 together into font families. In the simplest case a regular face is
jdaggett@7311 566 supplemented with bold and italic faces, but much more extensive groupings
jdaggett@7311 567 are possible. Variations in the thickness of letterform strokes, the <dfn
jdaggett@7311 568 id=weight>weight</dfn>, and the overall proportions of the letterform, the
jdaggett@7311 569 <dfn id=width>width</dfn>, are most common. In the example below, each
jdaggett@7311 570 letter uses a different font face within the Univers font family. The
jdaggett@7311 571 width used increases from top to bottom and the weight increases from left
jdaggett@7311 572 to right:
jdaggett@497 573
jdaggett@1150 574 <div class=figure><img alt="various width and weight variations within a
jdaggett@1150 575 single family" src=weightwidthvariations.png>
jdaggett@890 576 <p class=caption>Weight and width variations within a single font family
jdaggett@498 577 </div>
jdaggett@497 578
jdaggett@545 579 <p>Creating fonts that support multiple scripts is a difficult task;
jdaggett@1148 580 designers need to understand the cultural traditions surrounding the use
jdaggett@1148 581 of type in different scripts and come up with letterforms that somehow
jdaggett@1148 582 share a common theme. Many languages often share a common script and each
jdaggett@7311 583 of these languages may have noticeable stylistic differences. For example,
jdaggett@7311 584 the Arabic script is shared by Persian and Urdu and Cyrillic is used with
jdaggett@7311 585 many languages, not just Russian.
jdaggett@518 586
jdaggett@8225 587 <p>The <a href="#character-map"><em>character map</em></a> of a font
jdaggett@8225 588 defines the mapping of characters to glyphs for that font. If a document
jdaggett@8225 589 contains characters not supported by the <a href="#character-map"><em
jdaggett@8225 590 title="character map">character maps</em></a> of the fonts contained in a
jdaggett@8363 591 font family list, a user agent may use a <a
jdaggett@8363 592 href="#system-font-fallback"><em>system font fallback</em></a> procedure
jdaggett@8363 593 to locate an appropriate font that does. If no appropriate font can be
jdaggett@8363 594 found, some form of "missing glyph" character will be rendered by the user
jdaggett@8363 595 agent. System fallback can occur when the specified list of font families
jdaggett@8363 596 does not include a font that supports a given character.
jdaggett@8225 597
jdaggett@8225 598 <p>Although the <a href="#character-map"><em>character map</em></a> of a
jdaggett@8225 599 font maps a given character to a glyph for that character, modern font
jdaggett@8225 600 technologies such as OpenType and AAT (Apple Advanced Typography) provide
jdaggett@8225 601 ways of mapping a character to different glyphs based upon feature
jdaggett@8225 602 settings. Fonts in these formats allow these features to be embedded in
jdaggett@8225 603 the font itself and controlled by applications. Common typographic
jdaggett@8225 604 features which can be specified this way include ligatures, swashes,
jdaggett@8225 605 contextual alternates, proportional and tabular figures, and automatic
jdaggett@8225 606 fractions, to list just a few. For a visual overview of OpenType features,
jdaggett@8225 607 see the <a href="#OPENTYPE-FONT-GUIDE"
jdaggett@6659 608 rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
jdaggett@1662 609
jdaggett@6699 610 <h2 id=basic-font-props><span class=secno>3 </span>Basic Font Properties</h2>
jdaggett@512 611
jdaggett@512 612 <p>The particular font face used to render a character is determined by the
jdaggett@515 613 font family and other font properties that apply to a given element. This
jdaggett@515 614 structure allows settings to be varied independent of each other.</p>
jdaggett@512 615 <!-- prop: font-family -->
jdaggett@484 616
jdaggett@1662 617 <h3 id=font-family-prop><span class=secno>3.1 </span>Font family: the <a
jdaggett@1662 618 href="#propdef-font-family">font-family</a> property</h3>
jdaggett@1662 619
jdaggett@8225 620 <table class=propdef id=namefont-familyvalue-ltfamily-namegt-ltg>
jdaggett@484 621 <tbody>
jdaggett@484 622 <tr>
jdaggett@484 623 <td>Name:
jdaggett@484 624
jdaggett@8278 625 <td><dfn id=propdef-font-family
jdaggett@8278 626 title="font-family!!property">font-family</dfn>
jdaggett@484 627
jdaggett@484 628 <tr>
jdaggett@484 629 <td>Value:
jdaggett@484 630
jdaggett@8225 631 <td>[ <a href="#family-name-value"><var>&lt;family-name&gt;</var></a> |
jdaggett@8225 632 <a href="#generic-family-value"><var>&lt;generic-family&gt;</var></a> ]
jdaggett@8225 633 #
jdaggett@484 634
jdaggett@484 635 <tr>
jdaggett@484 636 <td>Initial:
jdaggett@484 637
jdaggett@484 638 <td>depends on user agent
jdaggett@484 639
jdaggett@484 640 <tr>
jdaggett@484 641 <td>Applies to:
jdaggett@484 642
jdaggett@484 643 <td>all elements
jdaggett@484 644
jdaggett@484 645 <tr>
jdaggett@484 646 <td>Inherited:
jdaggett@484 647
jdaggett@484 648 <td>yes
jdaggett@484 649
jdaggett@484 650 <tr>
jdaggett@484 651 <td>Percentages:
jdaggett@484 652
jdaggett@484 653 <td>N/A
jdaggett@484 654
jdaggett@484 655 <tr>
jdaggett@484 656 <td>Media:
jdaggett@484 657
jdaggett@484 658 <td>visual
jdaggett@484 659
jdaggett@484 660 <tr>
jdaggett@1148 661 <td>Computed value:
jdaggett@484 662
jdaggett@484 663 <td>as specified
jdaggett@7377 664
jdaggett@7377 665 <tr>
jdaggett@7377 666 <td>Animatable:
jdaggett@7377 667
jdaggett@7377 668 <td>no
jdaggett@484 669 </table>
jdaggett@484 670
jdaggett@514 671 <p>This property specifies a prioritized list of font family names or
jdaggett@6694 672 generic family names. A font family defines a set of faces that vary in
jdaggett@6694 673 weight, width or slope. CSS uses the combination of a family name with
jdaggett@6694 674 other style attributes to select an individual face. Using this selection
jdaggett@6694 675 mechanism, rather than selecting a face via the style name as is often
jdaggett@6694 676 done in design applications, allows some degree of regularity in textual
jdaggett@6694 677 display when fallback occurs.
jdaggett@6694 678
jdaggett@6694 679 <p class=note>Designers should note that the CSS definition of font
jdaggett@6694 680 attributes used for selection are explicitly not intended to define a font
jdaggett@6694 681 taxonomy. A type designer's idea of a family may often extend to a set of
jdaggett@6694 682 faces that vary along axes other than just the standard axes of weight,
jdaggett@6694 683 width and slope. A family may extend to include both a set of serif faces
jdaggett@6694 684 and a set of sans-serif faces or vary along axes that are unique to that
jdaggett@6694 685 family. The CSS font selection mechanism merely provides a way to
jdaggett@6694 686 determine the “closest” substitute when substitution is necessary.
jdaggett@6694 687
jdaggett@6694 688 <p>Unlike other CSS properties, component values are a comma-separated list
jdaggett@6694 689 indicating alternatives. A user agent iterates through the list of family
jdaggett@6694 690 names until it matches an available font that contains a glyph for the
jdaggett@6694 691 character to be rendered. This allows for differences in available fonts
jdaggett@6694 692 across platforms and for differences in the range of characters supported
jdaggett@6694 693 by individual fonts.
jdaggett@514 694
jdaggett@514 695 <p>A font family name only specifies a name given to a set of font faces,
jdaggett@8177 696 it does not specify an individual face. For example, given the
jdaggett@8177 697 availability of the fonts below, Futura would match but Futura Medium
jdaggett@8177 698 would not:
jdaggett@514 699
jdaggett@1150 700 <div class=figure><img alt="family and face names"
jdaggett@1150 701 src=familyvsfacename.png>
jdaggett@890 702 <p class=caption>Family and individual face names
jdaggett@514 703 </div>
jdaggett@514 704
jdaggett@514 705 <p>Consider the example below:
jdaggett@512 706
jdaggett@512 707 <div class=example>
jdaggett@8277 708 <pre>body {
jdaggett@8277 709 font-family: Helvetica, Verdana, sans-serif;
jdaggett@514 710 }</pre>
jdaggett@1758 711
jdaggett@1758 712 <p>If Helvetica is available it will be used when rendering. If neither
jdaggett@1758 713 Helvetica nor Verdana is present, then the user-agent-defined sans serif
jdaggett@1758 714 font will be used.</p>
jdaggett@512 715 </div>
jdaggett@512 716
jdaggett@514 717 <p>There are two types of font family names:
jdaggett@512 718
jdaggett@512 719 <dl>
jdaggett@8225 720 <dt><dfn id=family-name-value><var>&lt;family-name&gt;</var></dfn>
jdaggett@514 721
jdaggett@514 722 <dd>The name of a font family of choice such as Helvetica or Verdana in
jdaggett@2457 723 the previous example.
jdaggett@514 724
jdaggett@8225 725 <dt><dfn id=generic-family-value><var>&lt;generic-family&gt;</var></dfn>
jdaggett@514 726
jdaggett@4624 727 <dd> The following generic family keywords are defined: ‘<a
jdaggett@4624 728 href="#serif"><code class=property>serif</code></a>’, ‘<a
jdaggett@4624 729 href="#sans-serif"><code class=property>sans-serif</code></a>’, ‘<a
jdaggett@4624 730 href="#cursive"><code class=property>cursive</code></a>’, ‘<a
jdaggett@4624 731 href="#fantasy"><code class=property>fantasy</code></a>’, and ‘<a
jdaggett@4624 732 href="#monospace"><code class=property>monospace</code></a>’. These
jdaggett@1148 733 keywords can be used as a general fallback mechanism when an author's
jdaggett@1758 734 desired font choices are not available. As keywords, they must not be
jdaggett@1148 735 quoted. Authors are encouraged to append a generic font family as a last
jdaggett@1148 736 alternative for improved robustness.
jdaggett@512 737 </dl>
jdaggett@512 738
jdaggett@8272 739 <p>Font family names other than generic families must either be given
jdaggett@8272 740 quoted as <a
jdaggett@2457 741 href="//www.w3.org/TR/CSS21/syndata.html#strings">strings,</a> or unquoted
jdaggett@2457 742 as a sequence of one or more <a
jdaggett@2457 743 href="//www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifiers.</a>
jdaggett@2457 744 This means most punctuation characters and digits at the start of each
jdaggett@2457 745 token must be escaped in unquoted font family names.
jdaggett@2457 746
jdaggett@7377 747 <p>To illustrate this, the following declarations are invalid:
jdaggett@2457 748
jdaggett@2457 749 <pre>
jdaggett@2457 750 font-family: Red/Black, sans-serif;
jdaggett@2457 751 font-family: "Lucida" Grande, sans-serif;
jdaggett@2457 752 font-family: Ahem!, sans-serif;
jdaggett@2457 753 font-family: test@foo, sans-serif;
jdaggett@2457 754 font-family: #POUND, sans-serif;
jdaggett@2457 755 font-family: Hawaii 5-0, sans-serif;
jdaggett@2457 756 </pre>
jdaggett@2457 757
jdaggett@2457 758 <p>If a sequence of identifiers is given as a font family name, the
jdaggett@2457 759 computed value is the name converted to a string by joining all the
jdaggett@2457 760 identifiers in the sequence by single spaces.
jdaggett@2457 761
jdaggett@2457 762 <p>To avoid mistakes in escaping, it is recommended to quote font family
jdaggett@2457 763 names that contain white space, digits, or punctuation characters other
jdaggett@2457 764 than hyphens:
jdaggett@2457 765
jdaggett@2457 766 <pre>
jdaggett@2457 767 body { font-family: "New Century Schoolbook", serif }
jdaggett@2457 768
jdaggett@2457 769 &lt;BODY STYLE="font-family: '21st Century', fantasy">
jdaggett@2457 770 </pre>
jdaggett@2457 771
jdaggett@2457 772 <p>Font family <em>names</em> that happen to be the same as a keyword value
jdaggett@4624 773 (‘<code class=property>inherit</code>’, ‘<a href="#serif"><code
jdaggett@4624 774 class=property>serif</code></a>’, ‘<a href="#sans-serif"><code
jdaggett@4624 775 class=property>sans-serif</code></a>’, ‘<a href="#monospace"><code
jdaggett@4624 776 class=property>monospace</code></a>’, ‘<a href="#fantasy"><code
jdaggett@4624 777 class=property>fantasy</code></a>’, and ‘<a href="#cursive"><code
jdaggett@4624 778 class=property>cursive</code></a>’) must be quoted to prevent confusion
jdaggett@2457 779 with the keywords with the same names. The keywords ‘<code
jdaggett@2457 780 class=property>initial</code>’ and ‘<code
jdaggett@2457 781 class=property>default</code>’ are reserved for future use and must also
jdaggett@2457 782 be quoted when used as font names. UAs must not consider these keywords as
jdaggett@8225 783 matching the <a
jdaggett@8225 784 href="#family-name-value"><var>&lt;family-name&gt;</var></a> type.
jdaggett@2457 785
jdaggett@6694 786 <p>The precise way a set of fonts are grouped into font families varies
jdaggett@6694 787 depending upon the platform font management API's. The Windows GDI API
jdaggett@6694 788 only allows four faces to be grouped into a family while the DirectWrite
jdaggett@6694 789 API and API's on OSX and other platforms support font families with a
jdaggett@6695 790 variety of weights, widths and slopes (see <a
jdaggett@6694 791 href="#platform-props-to-css">Appendix A</a> for more details).
jdaggett@6694 792
jdaggett@2457 793 <p>Some font formats allow fonts to carry multiple localizations of the
jdaggett@2457 794 family name. User agents must recognize and correctly match all of these
jdaggett@2457 795 names independent of the underlying platform localization, system API used
jdaggett@2457 796 or document encoding:
jdaggett@2457 797
jdaggett@2457 798 <div class=figure><img alt="examples of localized family names"
jdaggett@2457 799 src=localizedfamilynames.png>
jdaggett@2457 800 <p class=caption>Localized family names
jdaggett@2457 801 </div>
jdaggett@2457 802
jdaggett@1244 803 <h4 id=generic-font-families><span class=secno>3.1.1 </span>Generic font
jdaggett@1244 804 families</h4>
jdaggett@514 805
jdaggett@518 806 <p>All five generic font families are defined to exist in all CSS
jdaggett@518 807 implementations (they need not necessarily map to five distinct actual
jdaggett@518 808 fonts). User agents should provide reasonable default choices for the
jdaggett@518 809 generic font families, which express the characteristics of each family as
jdaggett@518 810 well as possible within the limits allowed by the underlying technology.
jdaggett@518 811 User agents are encouraged to allow users to select alternative choices
jdaggett@514 812 for the generic fonts.
jdaggett@514 813
jdaggett@890 814 <h5 class="no-num no-toc"> <span class=index-def id=serif0 title="serif,
jdaggett@890 815 definition of"><a name=serif-def><dfn id=serif>serif</dfn></a></span></h5>
jdaggett@514 816
jdaggett@8178 817 <p>Serif fonts represent the formal text style for a script. This often
jdaggett@8178 818 means but is not limited to glyphs that have finishing strokes, flared or
jdaggett@8178 819 tapering ends, or have actual serifed endings (including slab serifs).
jdaggett@8178 820 Serif fonts are typically proportionately-spaced. They often display a
jdaggett@8178 821 greater variation between thick and thin strokes than fonts from the ‘<a
jdaggett@8178 822 href="#sans-serif"><code class=property>sans-serif</code></a>’ generic
jdaggett@8178 823 font family. CSS uses the term ‘<a href="#serif"><code
jdaggett@8178 824 class=property>serif</code></a>’ to apply to a font for any script,
jdaggett@8178 825 although other names may be more familiar for particular scripts, such as
jdaggett@8178 826 Mincho (Japanese), Sung, Song or Kai (Chinese), Batang (Korean). For
jdaggett@8178 827 Arabic, the Naskh style would correspond to ‘<a href="#serif"><code
jdaggett@8178 828 class=property>serif</code></a>’ more due to its typographic role rather
jdaggett@8178 829 than its actual design style. Any font that is so described may be used to
jdaggett@4624 830 represent the generic ‘<a href="#serif"><code
jdaggett@4624 831 class=property>serif</code></a>’ family.
jdaggett@514 832
jdaggett@1150 833 <div class=figure><img alt="sample serif fonts" src=serifexamples.png>
jdaggett@890 834 <p class=caption>Sample serif fonts
jdaggett@514 835 </div>
jdaggett@514 836
jdaggett@890 837 <h5 class="no-num no-toc"> <span class=index-def id=sans-serif0
jdaggett@890 838 title="sans-serif, definition of"> <a name=sans-serif-def><dfn
jdaggett@890 839 id=sans-serif>sans-serif</dfn></a></span></h5>
jdaggett@514 840
jdaggett@8178 841 <p>Glyphs in sans-serif fonts, as the term is used in CSS, are generally
jdaggett@8178 842 low contrast (vertical and horizontal stems have the close to the same
jdaggett@8178 843 thickness) and have stroke endings that are plain -- without any flaring,
jdaggett@8178 844 cross stroke, or other ornamentation. Sans-serif fonts are typically
jdaggett@8178 845 proportionately-spaced. They often have little variation between thick and
jdaggett@8178 846 thin strokes, compared to fonts from the ‘<a href="#serif"><code
jdaggett@4624 847 class=property>serif</code></a>’ family. CSS uses the term ‘<a
jdaggett@4624 848 href="#sans-serif"><code class=property>sans-serif</code></a>’ to apply
jdaggett@4624 849 to a font for any script, although other names may be more familiar for
jdaggett@3041 850 particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim
jdaggett@1148 851 (Korean). Any font that is so described may be used to represent the
jdaggett@4624 852 generic ‘<a href="#sans-serif"><code
jdaggett@4624 853 class=property>sans-serif</code></a>’ family.
jdaggett@518 854
jdaggett@1150 855 <div class=figure><img alt="sample sans-serif fonts"
jdaggett@1150 856 src=sansserifexamples.png>
jdaggett@890 857 <p class=caption>Sample sans-serif fonts
jdaggett@514 858 </div>
jdaggett@514 859
jdaggett@890 860 <h5 class="no-num no-toc"> <span class=index-def id=cursive0
jdaggett@545 861 title="cursive, definition of"> <a name=cursive-def><dfn
jdaggett@890 862 id=cursive>cursive</dfn></a></span></h5>
jdaggett@545 863
jdaggett@8178 864 <p>Glyphs in cursive fonts generally use a more informal script style, and
jdaggett@8178 865 the result looks more like handwritten pen or brush writing than printed
jdaggett@8178 866 letterwork. CSS uses the term ‘<a href="#cursive"><code
jdaggett@8178 867 class=property>cursive</code></a>’ to apply to a font for any script,
jdaggett@8178 868 although other names such as Chancery, Brush, Swing and Script are also
jdaggett@8178 869 used in font names.
jdaggett@514 870
jdaggett@1150 871 <div class=figure><img alt="sample cursive fonts" src=cursiveexamples.png>
jdaggett@890 872 <p class=caption>Sample cursive fonts
jdaggett@514 873 </div>
jdaggett@514 874
jdaggett@890 875 <h5 class="no-num no-toc"> <span class=index-def id=fantasy0
jdaggett@545 876 title="fantasy, definition of"> <a name=fantasy-def><dfn
jdaggett@890 877 id=fantasy>fantasy</dfn></a></span></h5>
jdaggett@514 878
jdaggett@8178 879 <p>Fantasy fonts are primarily decorative or expressive fonts that contain
jdaggett@8178 880 playful representations of characters. These do not include Pi or Picture
jdaggett@8178 881 fonts which do not represent actual characters.
jdaggett@514 882
jdaggett@1150 883 <div class=figure><img alt="sample fantasy fonts" src=fantasyexamples.png>
jdaggett@890 884 <p class=caption>Sample fantasy fonts
jdaggett@514 885 </div>
jdaggett@514 886
jdaggett@890 887 <h5 class="no-num no-toc"> <span class=index-def id=monospace0
jdaggett@545 888 title="monospace, definition of"> <a name=monospace-def><dfn
jdaggett@890 889 id=monospace>monospace</dfn></a></span></h5>
jdaggett@514 890
jdaggett@514 891 <p>The sole criterion of a monospace font is that all glyphs have the same
jdaggett@518 892 fixed width. This is often used to render samples of computer code.
jdaggett@514 893
jdaggett@1150 894 <div class=figure><img alt="sample monospace fonts"
jdaggett@1150 895 src=monospaceexamples.png>
jdaggett@890 896 <p class=caption>Sample monospace fonts
jdaggett@514 897 </div>
jdaggett@512 898 <!-- prop: font-weight -->
jdaggett@512 899
jdaggett@1662 900 <h3 id=font-weight-prop><span class=secno>3.2 </span>Font weight: the <a
jdaggett@1662 901 href="#propdef-font-weight">font-weight</a> property</h3>
jdaggett@1662 902
jdaggett@4624 903 <table class=propdef id=namefont-weightvaluenormal-bold-bolder-l>
jdaggett@484 904 <tbody>
jdaggett@484 905 <tr>
jdaggett@484 906 <td>Name:
jdaggett@484 907
jdaggett@8278 908 <td><dfn id=propdef-font-weight
jdaggett@8278 909 title="font-weight!!property">font-weight</dfn>
jdaggett@484 910
jdaggett@484 911 <tr>
jdaggett@484 912 <td>Value:
jdaggett@484 913
jdaggett@8278 914 <td><a href="#font-weight-normal-value"
jdaggett@8278 915 title="normal!!font-weight">normal</a> | <a href="#bold">bold</a> | <a
jdaggett@8278 916 href="#bolder">bolder</a> | <a href="#lighter">lighter</a> | <a
jdaggett@8278 917 href="#font-weight-numeric-values" title="100...900 weight
jdaggett@8278 918 values">100</a> | <a href="#font-weight-numeric-values"
jdaggett@8278 919 title="100...900 weight values">200</a> | <a
jdaggett@8278 920 href="#font-weight-numeric-values" title="100...900 weight
jdaggett@8278 921 values">300</a> | <a href="#font-weight-numeric-values"
jdaggett@8278 922 title="100...900 weight values">400</a> | <a
jdaggett@8278 923 href="#font-weight-numeric-values" title="100...900 weight
jdaggett@8278 924 values">500</a> | <a href="#font-weight-numeric-values"
jdaggett@8278 925 title="100...900 weight values">600</a> | <a
jdaggett@8278 926 href="#font-weight-numeric-values" title="100...900 weight
jdaggett@8278 927 values">700</a> | <a href="#font-weight-numeric-values"
jdaggett@8278 928 title="100...900 weight values">800</a> | <a
jdaggett@8278 929 href="#font-weight-numeric-values" title="100...900 weight
jdaggett@8278 930 values">900</a>
jdaggett@484 931
jdaggett@484 932 <tr>
jdaggett@484 933 <td>Initial:
jdaggett@484 934
jdaggett@484 935 <td>normal
jdaggett@484 936
jdaggett@484 937 <tr>
jdaggett@484 938 <td>Applies to:
jdaggett@484 939
jdaggett@484 940 <td>all elements
jdaggett@484 941
jdaggett@484 942 <tr>
jdaggett@484 943 <td>Inherited:
jdaggett@484 944
jdaggett@484 945 <td>yes
jdaggett@484 946
jdaggett@484 947 <tr>
jdaggett@484 948 <td>Percentages:
jdaggett@484 949
jdaggett@484 950 <td>N/A
jdaggett@484 951
jdaggett@484 952 <tr>
jdaggett@484 953 <td>Media:
jdaggett@484 954
jdaggett@484 955 <td>visual
jdaggett@484 956
jdaggett@484 957 <tr>
jdaggett@1148 958 <td>Computed value:
jdaggett@484 959
jdaggett@8177 960 <td>numeric weight value (see description)
jdaggett@7377 961
jdaggett@7377 962 <tr>
jdaggett@7377 963 <td>Animatable:
jdaggett@7377 964
jdaggett@7377 965 <td>as <a
jdaggett@7377 966 href="http://dev.w3.org/csswg/css3-transitions/#animtype-font-weight">font
jdaggett@7377 967 weight</a>
jdaggett@484 968 </table>
jdaggett@484 969
jdaggett@8278 970 <p>The <a href="#propdef-font-weight"
jdaggett@8278 971 title="font-weight!!property">‘<code
jdaggett@8278 972 class=property>font-weight</code>’</a> property specifies the weight of
jdaggett@8278 973 glyphs in the font, their degree of blackness or stroke thickness.
jdaggett@531 974
jdaggett@531 975 <p>Values have the following meanings:
jdaggett@512 976
jdaggett@512 977 <dl>
jdaggett@8278 978 <dt><dfn id=font-weight-numeric-values title="100...900 weight values">100
jdaggett@8278 979 to 900</dfn>
jdaggett@512 980
jdaggett@512 981 <dd>These values form an ordered sequence, where each number indicates a
jdaggett@514 982 weight that is at least as dark as its predecessor. These roughly
jdaggett@514 983 correspond to the commonly used weight names below:
jdaggett@512 984 </dl>
jdaggett@512 985
jdaggett@512 986 <ul>
jdaggett@512 987 <li>100 - Thin
jdaggett@512 988
jdaggett@518 989 <li>200 - Extra Light (Ultra Light)
jdaggett@512 990
jdaggett@512 991 <li>300 - Light
jdaggett@512 992
jdaggett@512 993 <li>400 - Normal
jdaggett@512 994
jdaggett@512 995 <li>500 - Medium
jdaggett@512 996
jdaggett@518 997 <li>600 - Semi Bold (Demi Bold)
jdaggett@512 998
jdaggett@512 999 <li>700 - Bold
jdaggett@512 1000
jdaggett@518 1001 <li>800 - Extra Bold (Ultra Bold)
jdaggett@512 1002
jdaggett@512 1003 <li>900 - Black (Heavy)
jdaggett@512 1004 </ul>
jdaggett@512 1005
jdaggett@512 1006 <dl>
jdaggett@8278 1007 <dt><dfn id=font-weight-normal-value
jdaggett@8278 1008 title="normal!!font-weight">normal</dfn>
jdaggett@512 1009
jdaggett@1148 1010 <dd>Same as ‘<code class=css>400</code>’.
jdaggett@512 1011
jdaggett@8278 1012 <dt><dfn id=bold>bold</dfn>
jdaggett@512 1013
jdaggett@1148 1014 <dd>Same as ‘<code class=css>700</code>’.
jdaggett@512 1015
jdaggett@8278 1016 <dt><dfn id=bolder>bolder</dfn>
jdaggett@512 1017
jdaggett@8177 1018 <dd>Specifies a bolder weight than the inherited value.
jdaggett@512 1019
jdaggett@8278 1020 <dt><dfn id=lighter>lighter</dfn>
jdaggett@512 1021
jdaggett@8177 1022 <dd>Specifies a lighter weight than the inherited value.
jdaggett@512 1023 </dl>
jdaggett@512 1024
jdaggett@8177 1025 <p>Font formats that use a scale other than a nine-step scale should map
jdaggett@531 1026 their scale onto the CSS scale so that 400 roughly corresponds with a face
jdaggett@531 1027 that would be labeled as Regular, Book, Roman and 700 roughly matches a
jdaggett@531 1028 face that would be labeled as Bold. Or weights may be inferred from the
jdaggett@531 1029 style names, ones that correspond roughly with the scale above. The scale
jdaggett@1662 1030 is relative, so a face with a larger weight value must never appear
jdaggett@1148 1031 lighter. If style names are used to infer weights, care should be taken to
jdaggett@1148 1032 handle variations in style names across locales.
jdaggett@531 1033
jdaggett@531 1034 <p>Quite often there are only a few weights available for a particular font
jdaggett@534 1035 family. When a weight is specified for which no face exists, a face with a
jdaggett@534 1036 nearby weight is used. In general, bold weights map to faces with heavier
jdaggett@1269 1037 weights and light weights map to faces with lighter weights (see the <a
jdaggett@1269 1038 href="#font-matching-algorithm">font matching section below</a> for a
jdaggett@1269 1039 precise definition). The examples here illustrate which face is used for
jdaggett@1269 1040 different weights, grey indicates a face for that weight does not exist so
jdaggett@1269 1041 a face with a nearby weight is used:
jdaggett@532 1042
jdaggett@1150 1043 <div class=figure><img alt="weight mappings for a family with 400, 700 and
jdaggett@1150 1044 900 weights" src=optimaweights.png>
jdaggett@532 1045 <p class=caption>Weight mappings for a font family with 400, 700 and 900
jdaggett@890 1046 weight faces
jdaggett@518 1047 </div>
jdaggett@518 1048
jdaggett@1150 1049 <div class=figure><img alt="weight mappings for a family with 300, 600
jdaggett@1150 1050 weights" src=hiraginoweights.png>
jdaggett@532 1051 <p class=caption>Weight mappings for a font family with 300 and 600 weight
jdaggett@890 1052 faces
jdaggett@531 1053 </div>
jdaggett@518 1054
jdaggett@2487 1055 <p>Although the practice is not well-loved by typographers, bold faces are
jdaggett@2487 1056 often synthesized by user agents for faces that lack actual bold faces.
jdaggett@2487 1057 For the purposes of style matching, these faces must be treated as if they
jdaggett@8177 1058 exist within the family. Authors can explicitly avoid this behavior by
jdaggett@8177 1059 using the ‘<a href="#propdef-font-synthesis"><code
jdaggett@8177 1060 class=property>font-synthesis</code></a>’ property.
jdaggett@8177 1061
jdaggett@8278 1062 <p>Specified values of ‘<a href="#bolder"><code
jdaggett@8278 1063 class=property>bolder</code></a>’ and ‘<a href="#lighter"><code
jdaggett@8278 1064 class=property>lighter</code></a>’ indicate weights relative to the
jdaggett@8177 1065 weight of the parent element. The computed weight is calculated based on
jdaggett@8278 1066 the inherited <a href="#propdef-font-weight"
jdaggett@8278 1067 title="font-weight!!property">‘<code
jdaggett@8278 1068 class=property>font-weight</code>’</a> value using the chart below.
jdaggett@1148 1069
jdaggett@6651 1070 <table class=data id=bolderlighter summary="Bolder/lighter mappings">
jdaggett@1148 1071 <thead>
jdaggett@1148 1072 <tr>
jdaggett@6651 1073 <th>Inherited value
jdaggett@6651 1074
jdaggett@6651 1075 <th>bolder
jdaggett@6651 1076
jdaggett@6651 1077 <th>lighter
jdaggett@1148 1078
jdaggett@1148 1079 <tbody>
jdaggett@1148 1080 <tr>
jdaggett@1244 1081 <th>100
jdaggett@1148 1082
jdaggett@1148 1083 <td>400
jdaggett@1148 1084
jdaggett@1148 1085 <td>100
jdaggett@1148 1086
jdaggett@1148 1087 <tr>
jdaggett@1244 1088 <th>200
jdaggett@1148 1089
jdaggett@1148 1090 <td>400
jdaggett@1148 1091
jdaggett@1148 1092 <td>100
jdaggett@1148 1093
jdaggett@1148 1094 <tr>
jdaggett@1244 1095 <th>300
jdaggett@1148 1096
jdaggett@1148 1097 <td>400
jdaggett@1148 1098
jdaggett@1148 1099 <td>100
jdaggett@1148 1100
jdaggett@1148 1101 <tr>
jdaggett@1244 1102 <th>400
jdaggett@1148 1103
jdaggett@1148 1104 <td>700
jdaggett@1148 1105
jdaggett@1148 1106 <td>100
jdaggett@1148 1107
jdaggett@1148 1108 <tr>
jdaggett@1244 1109 <th>500
jdaggett@1148 1110
jdaggett@1148 1111 <td>700
jdaggett@1148 1112
jdaggett@1148 1113 <td>100
jdaggett@1148 1114
jdaggett@1148 1115 <tr>
jdaggett@1244 1116 <th>600
jdaggett@1148 1117
jdaggett@1148 1118 <td>900
jdaggett@1148 1119
jdaggett@1148 1120 <td>400
jdaggett@1148 1121
jdaggett@1148 1122 <tr>
jdaggett@1244 1123 <th>700
jdaggett@1148 1124
jdaggett@1148 1125 <td>900
jdaggett@1148 1126
jdaggett@1148 1127 <td>400
jdaggett@1148 1128
jdaggett@1148 1129 <tr>
jdaggett@1244 1130 <th>800
jdaggett@1148 1131
jdaggett@1148 1132 <td>900
jdaggett@1148 1133
jdaggett@1148 1134 <td>700
jdaggett@1148 1135
jdaggett@1148 1136 <tr>
jdaggett@1244 1137 <th>900
jdaggett@1148 1138
jdaggett@1148 1139 <td>900
jdaggett@1148 1140
jdaggett@1148 1141 <td>700
jdaggett@1148 1142 </table>
jdaggett@1148 1143
jdaggett@1148 1144 <p>The table above is equivalent to selecting the next relative bolder or
jdaggett@1148 1145 lighter face, given a font family containing normal and bold faces along
jdaggett@1148 1146 with a thin and a heavy face. Authors who desire finer control over the
jdaggett@8177 1147 exact weight values used for a given element may use numerical values
jdaggett@1148 1148 instead of relative weights.</p>
jdaggett@512 1149 <!-- prop: font-stretch -->
jdaggett@512 1150
jdaggett@1662 1151 <h3 id=font-stretch-prop><span class=secno>3.3 </span>Font width: the <a
jdaggett@1662 1152 href="#propdef-font-stretch">font-stretch</a> property</h3>
jdaggett@1662 1153
jdaggett@8278 1154 <table class=propdef id=namefont-stretchvalue-normal-ultra-conde>
jdaggett@484 1155 <tbody>
jdaggett@484 1156 <tr>
jdaggett@484 1157 <td>Name:
jdaggett@484 1158
jdaggett@8278 1159 <td><dfn id=propdef-font-stretch
jdaggett@8278 1160 title="font-stretch!!property">font-stretch</dfn>
jdaggett@484 1161
jdaggett@484 1162 <tr>
jdaggett@484 1163 <td>Value:
jdaggett@484 1164
jdaggett@8278 1165 <td> <a href="#font-stretch-normal-value"
jdaggett@8278 1166 title="normal!!font-stretch">normal</a> | <a
jdaggett@8278 1167 href="#ultra-condensed">ultra-condensed</a> | <a
jdaggett@8278 1168 href="#extra-condensed">extra-condensed</a> | <a
jdaggett@8278 1169 href="#condensed">condensed</a> | <a
jdaggett@8278 1170 href="#semi-condensed-">semi-condensed</a> | <a
jdaggett@8278 1171 href="#semi-expanded">semi-expanded</a> | <a
jdaggett@8278 1172 href="#expanded">expanded</a> | <a
jdaggett@8278 1173 href="#extra-expanded">extra-expanded</a> | <a
jdaggett@8278 1174 href="#ultra-expanded">ultra-expanded</a>
jdaggett@484 1175
jdaggett@484 1176 <tr>
jdaggett@484 1177 <td>Initial:
jdaggett@484 1178
jdaggett@484 1179 <td>normal
jdaggett@484 1180
jdaggett@484 1181 <tr>
jdaggett@484 1182 <td>Applies to:
jdaggett@484 1183
jdaggett@484 1184 <td>all elements
jdaggett@484 1185
jdaggett@484 1186 <tr>
jdaggett@484 1187 <td>Inherited:
jdaggett@484 1188
jdaggett@484 1189 <td>yes
jdaggett@484 1190
jdaggett@484 1191 <tr>
jdaggett@484 1192 <td>Percentages:
jdaggett@484 1193
jdaggett@484 1194 <td>N/A
jdaggett@484 1195
jdaggett@484 1196 <tr>
jdaggett@484 1197 <td>Media:
jdaggett@484 1198
jdaggett@484 1199 <td>visual
jdaggett@484 1200
jdaggett@484 1201 <tr>
jdaggett@1148 1202 <td>Computed value:
jdaggett@484 1203
jdaggett@484 1204 <td>as specified
jdaggett@7377 1205
jdaggett@7377 1206 <tr>
jdaggett@7377 1207 <td>Animatable:
jdaggett@7377 1208
jdaggett@7377 1209 <td>as <a href="#font-stretch-animation">font stretch</a>
jdaggett@484 1210 </table>
jdaggett@484 1211
jdaggett@8278 1212 <p>The <a href="#propdef-font-stretch"
jdaggett@8278 1213 title="font-stretch!!property">‘<code
jdaggett@8278 1214 class=property>font-stretch</code>’</a> property selects a normal,
jdaggett@8278 1215 condensed, or expanded face from a font family. Absolute keyword values
jdaggett@8278 1216 have the following ordering, from narrowest to widest:
jdaggett@512 1217
jdaggett@512 1218 <ul>
jdaggett@8278 1219 <li><dfn id=ultra-condensed>ultra-condensed</dfn>
jdaggett@8278 1220
jdaggett@8278 1221 <li><dfn id=extra-condensed>extra-condensed</dfn>
jdaggett@8278 1222
jdaggett@8278 1223 <li><dfn id=condensed>condensed</dfn>
jdaggett@8278 1224
jdaggett@8278 1225 <li><dfn id=semi-condensed->semi-condensed </dfn>
jdaggett@8278 1226
jdaggett@8278 1227 <li><dfn id=font-stretch-normal-value
jdaggett@8278 1228 title="normal!!font-stretch">normal</dfn>
jdaggett@8278 1229
jdaggett@8278 1230 <li><dfn id=semi-expanded>semi-expanded</dfn>
jdaggett@8278 1231
jdaggett@8278 1232 <li><dfn id=expanded>expanded</dfn>
jdaggett@8278 1233
jdaggett@8278 1234 <li><dfn id=extra-expanded>extra-expanded</dfn>
jdaggett@8278 1235
jdaggett@8278 1236 <li><dfn id=ultra-expanded>ultra-expanded</dfn>
jdaggett@512 1237 </ul>
jdaggett@512 1238
jdaggett@8197 1239 <p>When a face does not exist for a given width, normal or condensed values
jdaggett@8197 1240 map to a narrower face, otherwise a wider face. Conversely, expanded
jdaggett@8197 1241 values map to a wider face, otherwise a narrower face. The figure below
jdaggett@8197 1242 shows how the nine font-stretch property settings affect font selection
jdaggett@8197 1243 for font family containing a variety of widths, grey indicates a width for
jdaggett@8197 1244 which no face exists and a different width is substituted:
jdaggett@1148 1245
jdaggett@1150 1246 <div class=figure><img alt="width mappings for a family with condensed,
jdaggett@1150 1247 normal and expanded faces" src=universwidths.png>
jdaggett@1148 1248 <p class=caption>Width mappings for a font family with condensed, normal
jdaggett@1148 1249 and expanded width faces
jdaggett@1148 1250 </div>
jdaggett@7377 1251
jdaggett@7377 1252 <p id=font-stretch-animation>Animation of font stretch: Font stretch is
jdaggett@7377 1253 interpolated in discrete steps. The interpolation happens as though the
jdaggett@7377 1254 ordered values are equally spaced real numbers. The interpolation result
jdaggett@7377 1255 is rounded to the nearest value, with values exactly halfway between two
jdaggett@7377 1256 values rounded towards the later value in the list above.</p>
jdaggett@512 1257 <!-- prop: font-style -->
jdaggett@512 1258
jdaggett@1662 1259 <h3 id=font-style-prop><span class=secno>3.4 </span>Font style: the <a
jdaggett@1662 1260 href="#propdef-font-style">font-style</a> property</h3>
jdaggett@1662 1261
jdaggett@4624 1262 <table class=propdef id=namefont-stylevaluenormal-italic-oblique>
jdaggett@484 1263 <tbody>
jdaggett@484 1264 <tr>
jdaggett@484 1265 <td>Name:
jdaggett@484 1266
jdaggett@8278 1267 <td><dfn id=propdef-font-style
jdaggett@8278 1268 title="font-style!!property">font-style</dfn>
jdaggett@484 1269
jdaggett@484 1270 <tr>
jdaggett@484 1271 <td>Value:
jdaggett@484 1272
jdaggett@8278 1273 <td><a href="#font-style-normal-value"
jdaggett@8278 1274 title="normal!!font-style">normal</a> | <a href="#italic">italic</a> |
jdaggett@8278 1275 <a href="#oblique">oblique</a>
jdaggett@484 1276
jdaggett@484 1277 <tr>
jdaggett@484 1278 <td>Initial:
jdaggett@484 1279
jdaggett@484 1280 <td>normal
jdaggett@484 1281
jdaggett@484 1282 <tr>
jdaggett@484 1283 <td>Applies to:
jdaggett@484 1284
jdaggett@484 1285 <td>all elements
jdaggett@484 1286
jdaggett@484 1287 <tr>
jdaggett@484 1288 <td>Inherited:
jdaggett@484 1289
jdaggett@484 1290 <td>yes
jdaggett@484 1291
jdaggett@484 1292 <tr>
jdaggett@484 1293 <td>Percentages:
jdaggett@484 1294
jdaggett@484 1295 <td>N/A
jdaggett@484 1296
jdaggett@484 1297 <tr>
jdaggett@484 1298 <td>Media:
jdaggett@484 1299
jdaggett@484 1300 <td>visual
jdaggett@484 1301
jdaggett@484 1302 <tr>
jdaggett@1148 1303 <td>Computed value:
jdaggett@484 1304
jdaggett@484 1305 <td>as specified
jdaggett@7377 1306
jdaggett@7377 1307 <tr>
jdaggett@7377 1308 <td>Animatable:
jdaggett@7377 1309
jdaggett@7377 1310 <td>no
jdaggett@484 1311 </table>
jdaggett@484 1312
jdaggett@8278 1313 <p>The <a href="#propdef-font-style" title="font-style!!property">‘<code
jdaggett@8278 1314 class=property>font-style</code>’</a> property allows italic or oblique
jdaggett@8278 1315 faces to be selected. Italic forms are generally cursive in nature while
jdaggett@8278 1316 oblique faces are typically sloped versions of the regular face. Oblique
jdaggett@8278 1317 faces can be simulated by artificially sloping the glyphs of the regular
jdaggett@8278 1318 face. Compare the artificially sloped renderings of Palatino ‘<code
jdaggett@2556 1319 class=property>a</code>’ and Baskerville ‘<code
jdaggett@1148 1320 class=property>N</code>’ in grey with the actual italic versions:
jdaggett@518 1321
jdaggett@1150 1322 <div class=figure><img alt="artificial sloping vs. real italics"
jdaggett@1150 1323 src=realvsfakeitalics.png>
jdaggett@890 1324 <p class=caption>Artificial sloping versus real italics
jdaggett@512 1325 </div>
jdaggett@518 1326
jdaggett@8278 1327 <p>Values have the following meanings:
jdaggett@8278 1328
jdaggett@8278 1329 <dl>
jdaggett@8278 1330 <dt><dfn id=font-style-normal-value
jdaggett@8278 1331 title="normal!!font-style">normal</dfn>
jdaggett@8278 1332
jdaggett@8278 1333 <dd>selects a face that is classified as a normal face, one that is
jdaggett@8278 1334 neither italic or obliqued
jdaggett@8278 1335
jdaggett@8278 1336 <dt><dfn id=italic>italic</dfn>
jdaggett@8278 1337
jdaggett@8278 1338 <dd>selects a font that is labeled as an italic face, or an oblique face
jdaggett@8278 1339 if one is not
jdaggett@8278 1340
jdaggett@8278 1341 <dt><dfn id=oblique>oblique</dfn>
jdaggett@8278 1342
jdaggett@8278 1343 <dd>selects a font that is labeled as an oblique face, or an italic face
jdaggett@8278 1344 if one is not
jdaggett@8278 1345 </dl>
jdaggett@8278 1346
jdaggett@8278 1347 <p>If no italic or oblique face is available, oblique faces can be
jdaggett@8363 1348 synthesized by rendering non-obliqued faces with an artificial obliquing
jdaggett@8363 1349 operation. The use of these artificially obliqued faces can be disabled
jdaggett@8363 1350 using the ‘<a href="#propdef-font-synthesis"><code
jdaggett@8363 1351 class=property>font-synthesis</code></a>’ property. The details of the
jdaggett@8363 1352 obliquing operation are not explicitly defined.</p>
jdaggett@8363 1353 <!-- resolution on the "undefined" nature of synthetics: http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
jdaggett@518 1354
jdaggett@518 1355 <p>Many scripts lack the tradition of mixing a cursive form within text
jdaggett@518 1356 rendered with a normal face. Chinese, Japanese and Korean fonts almost
jdaggett@518 1357 always lack italic or oblique faces. Fonts that support a mixture of
jdaggett@518 1358 scripts will sometimes omit specific scripts such as Arabic from the set
jdaggett@518 1359 of glyphs supported in the italic face. User agents should be careful
jdaggett@8225 1360 about making <a href="#character-map"><em>character map</em></a>
jdaggett@8363 1361 assumptions across faces when implementing support for <a
jdaggett@8363 1362 href="#system-font-fallback"><em>system font fallback</em></a>.</p>
jdaggett@1662 1363 <!-- prop: font-size -->
jdaggett@1662 1364
jdaggett@1662 1365 <h3 id=font-size-prop><span class=secno>3.5 </span>Font size: the <a
jdaggett@1662 1366 href="#propdef-font-size">font-size</a> property</h3>
jdaggett@1662 1367
jdaggett@8225 1368 <table class=propdef id=namefont-sizevalueltabsolute-sizegt-ltre>
jdaggett@484 1369 <tbody>
jdaggett@484 1370 <tr>
jdaggett@484 1371 <td>Name:
jdaggett@484 1372
jdaggett@1662 1373 <td><dfn id=propdef-font-size>font-size</dfn>
jdaggett@484 1374
jdaggett@484 1375 <tr>
jdaggett@484 1376 <td>Value:
jdaggett@484 1377
jdaggett@8225 1378 <td><a href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a>
jdaggett@8225 1379 | <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a> |
jdaggett@8225 1380 <a href="#length-size-value"><var>&lt;length&gt;</var></a> | <a
jdaggett@8225 1381 href="#percentage-size-value"><var>&lt;percentage&gt;</var></a>
jdaggett@484 1382
jdaggett@484 1383 <tr>
jdaggett@484 1384 <td>Initial:
jdaggett@484 1385
jdaggett@484 1386 <td>medium
jdaggett@484 1387
jdaggett@484 1388 <tr>
jdaggett@484 1389 <td>Applies to:
jdaggett@484 1390
jdaggett@484 1391 <td>all elements
jdaggett@484 1392
jdaggett@484 1393 <tr>
jdaggett@484 1394 <td>Inherited:
jdaggett@484 1395
jdaggett@484 1396 <td>yes
jdaggett@484 1397
jdaggett@484 1398 <tr>
jdaggett@484 1399 <td>Percentages:
jdaggett@484 1400
jdaggett@484 1401 <td>refer to parent element's font size
jdaggett@484 1402
jdaggett@484 1403 <tr>
jdaggett@484 1404 <td>Media:
jdaggett@484 1405
jdaggett@484 1406 <td>visual
jdaggett@484 1407
jdaggett@484 1408 <tr>
jdaggett@1148 1409 <td>Computed value:
jdaggett@484 1410
jdaggett@484 1411 <td>absolute length
jdaggett@7377 1412
jdaggett@7377 1413 <tr>
jdaggett@7377 1414 <td>Animatable:
jdaggett@7377 1415
jdaggett@7377 1416 <td>as <a
jdaggett@7377 1417 href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
jdaggett@484 1418 </table>
jdaggett@484 1419
jdaggett@512 1420 <p>This property indicates the desired height of glyphs from the font. For
jdaggett@512 1421 scalable fonts, the font-size is a scale factor applied to the EM unit of
jdaggett@512 1422 the font. (Note that certain glyphs may bleed outside their EM box.) For
jdaggett@512 1423 non-scalable fonts, the font-size is converted into absolute units and
jdaggett@512 1424 matched against the declared font-size of the font, using the same
jdaggett@512 1425 absolute coordinate space for both of the matched values. Values have the
jdaggett@512 1426 following meanings:
jdaggett@512 1427
jdaggett@512 1428 <dl>
jdaggett@8225 1429 <dt><dfn id=absolute-size-value><var>&lt;absolute-size&gt;</var></dfn>
jdaggett@8225 1430
jdaggett@8225 1431 <dd> An <a
jdaggett@8225 1432 href="#absolute-size-value"><var>&lt;absolute-size&gt;</var></a> keyword
jdaggett@8225 1433 refers to an entry in a table of font sizes computed and kept by the user
jdaggett@8225 1434 agent. Possible values are:
jdaggett@512 1435 <p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
jdaggett@512 1436
jdaggett@8225 1437 <dt><dfn id=relative-size-value><var>&lt;relative-size&gt;</var></dfn>
jdaggett@8225 1438
jdaggett@8225 1439 <dd> A <a href="#relative-size-value"><var>&lt;relative-size&gt;</var></a>
jdaggett@8225 1440 keyword is interpreted relative to the table of font sizes and the
jdaggett@8225 1441 computed ‘<a href="#propdef-font-size"><code
jdaggett@8225 1442 class=property>font-size</code></a>’ of the parent element. Possible
jdaggett@8225 1443 values are:
jdaggett@890 1444 <p> [ larger | smaller ]
jdaggett@890 1445
jdaggett@1148 1446 <p> For example, if the parent element has a font size of ‘<code
jdaggett@1148 1447 class=property>medium</code>’, a value of ‘<code
jdaggett@1148 1448 class=property>larger</code>’ will make the font size of the current
jdaggett@1148 1449 element be ‘<code class=property>large</code>’. If the parent
jdaggett@1148 1450 element's size is not close to a table entry, the user agent is free to
jdaggett@1148 1451 interpolate between table entries or round off to the closest one. The
jdaggett@1148 1452 user agent may have to extrapolate table values if the numerical value
jdaggett@1148 1453 goes beyond the keywords.
jdaggett@512 1454
jdaggett@8225 1455 <dt><dfn id=length-size-value><var>&lt;length&gt;</var></dfn>
jdaggett@512 1456
jdaggett@8187 1457 <dd>A length value specifies an absolute font size (independent of the
jdaggett@8187 1458 user agent's font table). Negative lengths are illegal.
jdaggett@512 1459
jdaggett@8225 1460 <dt><dfn id=percentage-size-value><var>&lt;percentage&gt;</var></dfn>
jdaggett@512 1461
jdaggett@512 1462 <dd>A percentage value specifies an absolute font size relative to the
jdaggett@512 1463 parent element's font size. Use of percentage values, or values in
jdaggett@1148 1464 ‘<code class=property>em</code>’s, leads to more robust and
jdaggett@512 1465 cascadable style sheets.
jdaggett@512 1466 </dl>
jdaggett@512 1467
jdaggett@8187 1468 <p>The following table provides user agent guidelines for the absolute-size
jdaggett@8187 1469 scaling factor and their mapping to HTML heading and absolute font-sizes.
jdaggett@8187 1470 The ‘<code class=property>medium</code>’ value is used as the
jdaggett@8187 1471 reference middle value. The user agent may fine-tune these values for
jdaggett@8187 1472 different fonts or different types of display devices.
jdaggett@1244 1473
jdaggett@1244 1474 <table class=data>
jdaggett@1152 1475 <thead>
jdaggett@1152 1476 <tr>
jdaggett@1152 1477 <th>CSS absolute-size values
jdaggett@1152 1478
jdaggett@1152 1479 <th>xx-small
jdaggett@1152 1480
jdaggett@1152 1481 <th>x-small
jdaggett@1152 1482
jdaggett@1152 1483 <th>small
jdaggett@1152 1484
jdaggett@1152 1485 <th>medium
jdaggett@1152 1486
jdaggett@1152 1487 <th>large
jdaggett@1152 1488
jdaggett@1152 1489 <th>x-large
jdaggett@1152 1490
jdaggett@1152 1491 <th>xx-large
jdaggett@1152 1492
jdaggett@1152 1493 <th> 
jdaggett@1152 1494
jdaggett@512 1495 <tbody>
jdaggett@512 1496 <tr>
jdaggett@1152 1497 <th>scaling factor
jdaggett@1152 1498
jdaggett@1152 1499 <td>3/5
jdaggett@1152 1500
jdaggett@1152 1501 <td>3/4
jdaggett@1152 1502
jdaggett@1152 1503 <td>8/9
jdaggett@1152 1504
jdaggett@1152 1505 <td>1
jdaggett@1152 1506
jdaggett@1152 1507 <td>6/5
jdaggett@1152 1508
jdaggett@1152 1509 <td>3/2
jdaggett@1152 1510
jdaggett@1152 1511 <td>2/1
jdaggett@1152 1512
jdaggett@1152 1513 <td>3/1
jdaggett@512 1514
jdaggett@512 1515 <tr>
jdaggett@8187 1516 <th>HTML headings
jdaggett@1152 1517
jdaggett@1152 1518 <td>h6
jdaggett@1152 1519
jdaggett@1152 1520 <td> 
jdaggett@1152 1521
jdaggett@1152 1522 <td>h5
jdaggett@1152 1523
jdaggett@1152 1524 <td>h4
jdaggett@1152 1525
jdaggett@1152 1526 <td>h3
jdaggett@1152 1527
jdaggett@1152 1528 <td>h2
jdaggett@1152 1529
jdaggett@1152 1530 <td>h1
jdaggett@1152 1531
jdaggett@1152 1532 <td> 
jdaggett@512 1533
jdaggett@512 1534 <tr>
jdaggett@8187 1535 <th>HTML font sizes
jdaggett@1152 1536
jdaggett@1152 1537 <td>1
jdaggett@1152 1538
jdaggett@1152 1539 <td> 
jdaggett@1152 1540
jdaggett@1152 1541 <td>2
jdaggett@1152 1542
jdaggett@1152 1543 <td>3
jdaggett@1152 1544
jdaggett@1152 1545 <td>4
jdaggett@1152 1546
jdaggett@1152 1547 <td>5
jdaggett@1152 1548
jdaggett@1152 1549 <td>6
jdaggett@1152 1550
jdaggett@1152 1551 <td>7
jdaggett@512 1552 </table>
jdaggett@512 1553
jdaggett@512 1554 <p class=note><em><strong>Note 1.</strong> To preserve readability, an UA
jdaggett@512 1555 applying these guidelines should nevertheless avoid creating font-size
jdaggett@8272 1556 resulting in less than 9 device pixels per EM unit on a computer
jdaggett@8272 1557 display.</em>
jdaggett@512 1558
jdaggett@512 1559 <p class=note><em><strong>Note 2.</strong> In CSS1, the suggested scaling
jdaggett@512 1560 factor between adjacent indexes was 1.5 which user experience proved to be
jdaggett@512 1561 too large. In CSS2, the suggested scaling factor for computer screen
jdaggett@512 1562 between adjacent indexes was 1.2 which still created issues for the small
jdaggett@512 1563 sizes. The new scaling factor varies between each index to provide a
jdaggett@512 1564 better readability.</em>
jdaggett@512 1565
jdaggett@6659 1566 <p>The actual value of this property may differ from the computed value due
jdaggett@6659 1567 a numerical value on ‘<a href="#propdef-font-size-adjust"><code
jdaggett@4624 1568 class=property>font-size-adjust</code></a>’ and the unavailability of
jdaggett@4624 1569 certain font sizes.
jdaggett@512 1570
jdaggett@512 1571 <p>Child elements inherit the computed <a class=noxref
jdaggett@6659 1572 href="#font-size-prop"> <span class=property>‘<code
jdaggett@1148 1573 class=property>font-size</code>’</span></a> value (otherwise, the effect
jdaggett@2556 1574 of <a class=noxref href="#font-size-adjust-prop"><span
jdaggett@2556 1575 class=property>‘<code
jdaggett@1148 1576 class=property>font-size-adjust</code>’</span></a> would compound).
jdaggett@512 1577
jdaggett@512 1578 <div class=example>
jdaggett@4624 1579 <p style="display:none">Example(s):
jdaggett@890 1580
jdaggett@890 1581 <p>
jdaggett@512 1582
jdaggett@512 1583 <pre>p { font-size: 12pt; }
jdaggett@512 1584 blockquote { font-size: larger }
jdaggett@512 1585 em { font-size: 150% }
jdaggett@512 1586 em { font-size: 1.5em }
jdaggett@512 1587 </pre>
jdaggett@512 1588 </div>
jdaggett@512 1589 <!-- prop: font-size-adjust -->
jdaggett@512 1590
jdaggett@1662 1591 <h3 id=font-size-adjust-prop><span class=secno>3.6 </span>Relative sizing:
jdaggett@1662 1592 the <a href="#propdef-font-size-adjust">font-size-adjust</a> property</h3>
jdaggett@1662 1593
jdaggett@6659 1594 <table class=propdef id=namefont-size-adjustvaluenone-auto-ltnum>
jdaggett@484 1595 <tbody>
jdaggett@484 1596 <tr>
jdaggett@484 1597 <td>Name:
jdaggett@484 1598
jdaggett@1662 1599 <td><dfn id=propdef-font-size-adjust>font-size-adjust</dfn>
jdaggett@484 1600
jdaggett@484 1601 <tr>
jdaggett@484 1602 <td>Value:
jdaggett@484 1603
jdaggett@8278 1604 <td><a href="#font-size-adjust-none-value"
jdaggett@8278 1605 title="none!!font-size-adjust">none</a> | <a
jdaggett@8278 1606 href="#font-size-adjust-auto-value"
jdaggett@8278 1607 title="auto!!font-size-adjust">auto</a> | <a
jdaggett@8225 1608 href="#aspect-ratio-value"><var>&lt;number&gt;</var></a>
jdaggett@484 1609
jdaggett@484 1610 <tr>
jdaggett@484 1611 <td>Initial:
jdaggett@484 1612
jdaggett@484 1613 <td>none
jdaggett@484 1614
jdaggett@484 1615 <tr>
jdaggett@484 1616 <td>Applies to:
jdaggett@484 1617
jdaggett@484 1618 <td>all elements
jdaggett@484 1619
jdaggett@484 1620 <tr>
jdaggett@484 1621 <td>Inherited:
jdaggett@484 1622
jdaggett@484 1623 <td>yes
jdaggett@484 1624
jdaggett@484 1625 <tr>
jdaggett@484 1626 <td>Percentages:
jdaggett@484 1627
jdaggett@554 1628 <td>N/A
jdaggett@484 1629
jdaggett@484 1630 <tr>
jdaggett@484 1631 <td>Media:
jdaggett@484 1632
jdaggett@484 1633 <td>visual
jdaggett@484 1634
jdaggett@484 1635 <tr>
jdaggett@1148 1636 <td>Computed value:
jdaggett@484 1637
jdaggett@554 1638 <td>as specified
jdaggett@7377 1639
jdaggett@7377 1640 <tr>
jdaggett@7377 1641 <td>Animatable:
jdaggett@7377 1642
jdaggett@7377 1643 <td>as <a
jdaggett@7377 1644 href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a>
jdaggett@484 1645 </table>
jdaggett@484 1646
jdaggett@555 1647 <p>For any given font size, the apparent size and legibility of text varies
jdaggett@555 1648 across fonts. For scripts such as Latin or Cyrillic that distinguish
jdaggett@555 1649 between upper and lowercase letters, the relative height of lowercase
jdaggett@555 1650 letters compared to their uppercase counterparts is a determining factor
jdaggett@555 1651 of legibility. This is commonly referred to as the <a class=index-def
jdaggett@4624 1652 href="#aspect-value" id=aspect-value0 title="aspect value"><dfn
jdaggett@4624 1653 id=aspect-value>aspect value</dfn></a>. Precisely defined, it is equal to
jdaggett@4624 1654 the x-height of a font divided by the font size.
jdaggett@555 1655
jdaggett@555 1656 <p>In situations where font fallback occurs, fallback fonts may not share
jdaggett@555 1657 the same aspect ratio as the desired font family and will thus appear less
jdaggett@555 1658 readable. The font-size-adjust property is a way to preserve the
jdaggett@547 1659 readability of text when font fallback occurs. It does this by adjusting
jdaggett@1662 1660 the font-size so that the x-height is the same regardless of the font
jdaggett@555 1661 used.
jdaggett@547 1662
jdaggett@547 1663 <div class=example>
jdaggett@547 1664 <p>The style defined below defines Verdana as the desired font family, but
jdaggett@547 1665 if Verdana is not available Futura or Times will be used.</p>
jdaggett@547 1666
jdaggett@8277 1667 <pre>p {
jdaggett@8277 1668 font-family: Verdana, Futura, Times;
jdaggett@547 1669 }
jdaggett@547 1670
jdaggett@547 1671 &lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
jdaggett@547 1672 </pre>
jdaggett@547 1673
jdaggett@547 1674 <p>Verdana has a relatively high aspect ratio, lowercase letters are
jdaggett@547 1675 relatively tall compared to uppercase letters, so at small sizes text
jdaggett@547 1676 appears legible. Times has a lower aspect ratio and so if fallback
jdaggett@547 1677 occurs, the text will be less legible at small sizes than Verdana.</p>
jdaggett@547 1678 </div>
jdaggett@547 1679
jdaggett@547 1680 <p>How text rendered in each of these fonts compares is shown below, the
jdaggett@547 1681 columns show text rendered in Verdana, Futura and Times. The same
jdaggett@547 1682 font-size value is used across cells within each row and red lines are
jdaggett@547 1683 included to show the differences in x-height. In the upper half each row
jdaggett@547 1684 is rendered in the same font-size value. The same is true for the lower
jdaggett@547 1685 half but in this half the font-size-adjust property is also set so that
jdaggett@2462 1686 the actual font size is adjusted to preserve the x-height across each row.
jdaggett@547 1687 Note how small text remains relatively legible across each row in the
jdaggett@547 1688 lower half.
jdaggett@547 1689
jdaggett@1150 1690 <div class=figure><img alt="text with and without font-size-adjust"
jdaggett@1150 1691 src=fontsizeadjust.png>
jdaggett@890 1692 <p class=caption>Text with and without the use of font-size-adjust
jdaggett@547 1693 </div>
jdaggett@512 1694
jdaggett@512 1695 <p>This property allows authors to specify an aspect value for an element
jdaggett@554 1696 that will effectively preserve the x-height of the first choice font,
jdaggett@554 1697 whether it is substituted or not. Values have the following meanings:
jdaggett@512 1698
jdaggett@512 1699 <dl>
jdaggett@8278 1700 <dt><dfn id=font-size-adjust-none-value
jdaggett@8278 1701 title="none!!font-size-adjust">none</dfn>
jdaggett@512 1702
jdaggett@512 1703 <dd>Do not preserve the font's x-height.
jdaggett@512 1704
jdaggett@8278 1705 <dt><dfn id=font-size-adjust-auto-value
jdaggett@8278 1706 title="auto!!font-size-adjust">auto</dfn>
jdaggett@6659 1707
jdaggett@6659 1708 <dd>Behaves just like &lt;number>, except the number used is the aspect
jdaggett@6659 1709 value calculated by user agents for the first font in the list of fonts
jdaggett@8278 1710 defined for the initial value of the <a href="#propdef-font-family"
jdaggett@8278 1711 title="font-family!!property">‘<code
jdaggett@8278 1712 class=property>font-family</code>’</a> property. Effectively this is
jdaggett@8278 1713 the default font used when <a href="#propdef-font-family"
jdaggett@8278 1714 title="font-family!!property">‘<code
jdaggett@8278 1715 class=property>font-family</code>’</a> is not otherwise specified.
jdaggett@6659 1716 <p>Authors can use this value to specify that font size should be
jdaggett@6659 1717 normalized across fonts based on the x-height without the need to
jdaggett@6659 1718 specify the aspect ratio explicitly.</p>
jdaggett@6659 1719
jdaggett@8225 1720 <dt><dfn id=aspect-ratio-value><var>&lt;number&gt;</var></dfn>
jdaggett@512 1721
jdaggett@554 1722 <dd>Specifies the aspect value used in the calculation below to calculate
jdaggett@554 1723 the adjusted font size:
jdaggett@8277 1724 <pre>c = ( a / a' ) s
jdaggett@512 1725 </pre>
jdaggett@512 1726
jdaggett@512 1727 <p>where:</p>
jdaggett@512 1728
jdaggett@554 1729 <pre>s = font-size value
jdaggett@554 1730 a = aspect value as specified by the font-size-adjust property
jdaggett@554 1731 a' = aspect value of actual font
jdaggett@554 1732 c = adjusted font-size to use
jdaggett@512 1733 </pre>
jdaggett@554 1734
jdaggett@554 1735 <p>This value applies to any font that is selected but in typical usage
jdaggett@554 1736 it should be based on the aspect value of the first font in the
jdaggett@555 1737 font-family list. If this is specified accurately, the <tt>(a/a')</tt>
jdaggett@555 1738 term in the formula above is effectively 1 for the first font and no
jdaggett@555 1739 adjustment occurs. If the value is specified inaccurately, text rendered
jdaggett@555 1740 using the first font in the family list will display differently in
jdaggett@555 1741 older user agents that don't support font-size-adjust.</p>
jdaggett@512 1742 </dl>
jdaggett@512 1743
jdaggett@554 1744 <p>Authors can calculate the aspect value for a given font by comparing
jdaggett@554 1745 spans with the same content but different font-size-adjust properties. If
jdaggett@554 1746 the same font-size is used, the spans will match when the font-size-adjust
jdaggett@554 1747 value is accurate for the given font.
jdaggett@554 1748
jdaggett@554 1749 <div class=example>
jdaggett@554 1750 <p>Two spans with borders are used to determine the aspect value of a
jdaggett@554 1751 font. The font-size is the same for both spans but the font-size-adjust
jdaggett@554 1752 property is specified only for the right span. Starting with a value of
jdaggett@554 1753 0.5, the aspect value can be adjusted until the borders around the two
jdaggett@554 1754 letters line up.</p>
jdaggett@554 1755
jdaggett@554 1756 <pre>p {
jdaggett@554 1757 font-family: Futura;
jdaggett@554 1758 font-size: 500px;
jdaggett@554 1759 }
jdaggett@554 1760
jdaggett@554 1761 span {
jdaggett@554 1762 border: solid 1px red;
jdaggett@554 1763 }
jdaggett@554 1764
jdaggett@554 1765 .adjust {
jdaggett@554 1766 font-size-adjust: 0.5;
jdaggett@554 1767 }
jdaggett@554 1768
jdaggett@554 1769 &lt;p>&lt;span>b&lt;/span>&lt;span class="adjust">b&lt;/span>&lt;/p>
jdaggett@554 1770 </pre>
jdaggett@554 1771
jdaggett@1150 1772 <div class=figure><img alt="Futura with an aspect value of 0.5"
jdaggett@1150 1773 src=beforefontsizeadjust.png>
jdaggett@890 1774 <p class=caption>Futura with an aspect value of 0.5
jdaggett@554 1775 </div>
jdaggett@554 1776
jdaggett@554 1777 <p>The box on the right is a bit bigger than the one on the left, so the
jdaggett@554 1778 aspect value of this font is something less than 0.5. Adjust the value
jdaggett@554 1779 until the boxes align.</p>
jdaggett@554 1780 </div>
jdaggett@512 1781 <!-- prop: font -->
jdaggett@512 1782
jdaggett@1662 1783 <h3 id=font-prop><span class=secno>3.7 </span>Shorthand font property: the
jdaggett@1662 1784 <a href="#propdef-font">font</a> property</h3>
jdaggett@1662 1785
jdaggett@8225 1786 <table class=propdef id=namefontvalue-ltlsquofont-stylersquogt-l>
jdaggett@484 1787 <tbody>
jdaggett@484 1788 <tr>
jdaggett@484 1789 <td>Name:
jdaggett@484 1790
jdaggett@1662 1791 <td><dfn id=propdef-font>font</dfn>
jdaggett@484 1792
jdaggett@484 1793 <tr>
jdaggett@484 1794 <td>Value:
jdaggett@484 1795
jdaggett@8278 1796 <td>[ [ <var>&lt;<a href="#propdef-font-style"
jdaggett@8278 1797 title="font-style!!property">‘<code
jdaggett@8278 1798 class=property>font-style</code>’</a>&gt;</var> || <a
jdaggett@8225 1799 href="#font-variant-css21-values"><var>&lt;font-variant-css21&gt;</var></a>
jdaggett@8278 1800 || <var>&lt;<a href="#propdef-font-weight"
jdaggett@8278 1801 title="font-weight!!property">‘<code
jdaggett@8278 1802 class=property>font-weight</code>’</a>&gt;</var> || <var>&lt;<a
jdaggett@8278 1803 href="#propdef-font-stretch" title="font-stretch!!property">‘<code
jdaggett@8278 1804 class=property>font-stretch</code>’</a></var> ]? <var>&lt;‘<a
jdaggett@8225 1805 href="#propdef-font-size"><code
jdaggett@8225 1806 class=property>font-size</code></a>’&gt;</var> [ / <var>&lt;‘<code
jdaggett@8278 1807 class=property>line-height</code>’&gt;</var> ]? <var>&lt;<a
jdaggett@8278 1808 href="#propdef-font-family" title="font-family!!property">‘<code
jdaggett@8278 1809 class=property>font-family</code>’</a>&gt;</var> ] | caption | icon |
jdaggett@8225 1810 menu | message-box | small-caption | status-bar
jdaggett@484 1811
jdaggett@484 1812 <tr>
jdaggett@484 1813 <td>Initial:
jdaggett@484 1814
jdaggett@484 1815 <td>see individual properties
jdaggett@484 1816
jdaggett@484 1817 <tr>
jdaggett@484 1818 <td>Applies to:
jdaggett@484 1819
jdaggett@484 1820 <td>all elements
jdaggett@484 1821
jdaggett@484 1822 <tr>
jdaggett@484 1823 <td>Inherited:
jdaggett@484 1824
jdaggett@484 1825 <td>yes
jdaggett@484 1826
jdaggett@484 1827 <tr>
jdaggett@484 1828 <td>Percentages:
jdaggett@484 1829
jdaggett@484 1830 <td>see individual properties
jdaggett@484 1831
jdaggett@484 1832 <tr>
jdaggett@484 1833 <td>Media:
jdaggett@484 1834
jdaggett@484 1835 <td>visual
jdaggett@484 1836
jdaggett@484 1837 <tr>
jdaggett@1148 1838 <td>Computed value:
jdaggett@484 1839
jdaggett@484 1840 <td>see individual properties
jdaggett@7377 1841
jdaggett@7377 1842 <tr>
jdaggett@7377 1843 <td>Animatable:
jdaggett@7377 1844
jdaggett@7377 1845 <td>see individual properties
jdaggett@484 1846 </table>
jdaggett@1732 1847
jdaggett@4624 1848 <p>The <span class=property>‘<a href="#propdef-font"><code
jdaggett@4624 1849 class=property>font</code></a>’</span> property is, except as described
jdaggett@8278 1850 below, a shorthand property for setting <a href="#propdef-font-style"
jdaggett@8278 1851 title="font-style!!property">‘<code
jdaggett@8278 1852 class=property>font-style</code>’</a>, <a href="#propdef-font-variant"
jdaggett@8278 1853 title="font-variant!!property">‘<code
jdaggett@8278 1854 class=property>font-variant</code>’</a>, <a href="#propdef-font-weight"
jdaggett@8278 1855 title="font-weight!!property">‘<code
jdaggett@8278 1856 class=property>font-weight</code>’</a>, <a href="#propdef-font-stretch"
jdaggett@8278 1857 title="font-stretch!!property">‘<code
jdaggett@8278 1858 class=property>font-stretch</code>’</a>, <span class=property>‘<a
jdaggett@8278 1859 href="#propdef-font-size"><code
jdaggett@8278 1860 class=property>font-size</code></a>’</span>, <a class=property
jdaggett@8278 1861 href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
jdaggett@8278 1862 class=property>line-height</code>’</a>, <a href="#propdef-font-family"
jdaggett@8278 1863 title="font-family!!property">‘<code
jdaggett@8278 1864 class=property>font-family</code>’</a> at the same place in the
jdaggett@8278 1865 stylesheet. Values for the <a href="#propdef-font-variant"
jdaggett@8278 1866 title="font-variant!!property">‘<code
jdaggett@8278 1867 class=property>font-variant</code>’</a> property may also be included
jdaggett@8313 1868 but only those supported in CSS 2.1, none of the <a
jdaggett@8313 1869 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8313 1870 class=property>font-variant</code>’</a> values added in this
jdaggett@8313 1871 specification can be used in the <span class=property>‘<a
jdaggett@8278 1872 href="#propdef-font"><code class=property>font</code></a>’</span>
jdaggett@8278 1873 shorthand:
jdaggett@1732 1874
jdaggett@1732 1875 <pre
jdaggett@8225 1876 class=prod><dfn id=font-variant-css21-values><var>&lt;font-variant-css21&gt;</var></dfn> = [normal | small-caps]</pre>
jdaggett@1732 1877
jdaggett@1732 1878 <p>The syntax of this property is based on a traditional typographical
jdaggett@1732 1879 shorthand notation to set multiple properties related to fonts.
jdaggett@512 1880
jdaggett@8197 1881 <p>All subproperties of the ‘<a href="#propdef-font"><code
jdaggett@8197 1882 class=property>font</code></a>’ property are first reset to their
jdaggett@8197 1883 initial values, including those listed above plus <span
jdaggett@4624 1884 class=property>‘<a href="#propdef-font-size-adjust"><code
jdaggett@4624 1885 class=property>font-size-adjust</code></a>’</span>, <span
jdaggett@4624 1886 class=property>‘<a href="#propdef-font-kerning"><code
jdaggett@8278 1887 class=property>font-kerning</code></a>’</span>, subproperties of <a
jdaggett@8278 1888 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8278 1889 class=property>font-variant</code>’</a> and and <span>‘<a
jdaggett@8278 1890 href="#propdef-font-language-override"><code
jdaggett@8197 1891 class=property>font-language-override</code></a>’</span>. Then, those
jdaggett@8197 1892 properties that are given explicit values in the <span
jdaggett@8197 1893 class=property>‘<a href="#propdef-font"><code
jdaggett@4624 1894 class=property>font</code></a>’</span> shorthand are set to those
jdaggett@512 1895 values. For a definition of allowed and initial values, see the previously
jdaggett@512 1896 defined properties. For reasons of backwards compatibility, it is not
jdaggett@4624 1897 possible to set <span class=property>‘<a
jdaggett@7020 1898 href="#propdef-font-size-adjust"><code
jdaggett@7020 1899 class=property>font-size-adjust</code></a>’</span> to anything other
jdaggett@7020 1900 than its initial value using the <span class=property>‘<a
jdaggett@4624 1901 href="#propdef-font"><code class=property>font</code></a>’</span>
jdaggett@7020 1902 shorthand property; instead, use the individual property.
jdaggett@512 1903
jdaggett@512 1904 <div class=example>
jdaggett@4624 1905 <p style="display:none">Example(s):
jdaggett@890 1906
jdaggett@890 1907 <p>
jdaggett@512 1908
jdaggett@512 1909 <pre>p { font: 12pt/14pt sans-serif }
jdaggett@512 1910 p { font: 80% sans-serif }
jdaggett@512 1911 p { font: x-large/110% &quot;new century schoolbook&quot;, serif }
jdaggett@512 1912 p { font: bold italic large Palatino, serif }
jdaggett@512 1913 p { font: normal small-caps 120%/120% fantasy }
jdaggett@7020 1914 p { font: condensed oblique 12pt &quot;Helvetica Neue&quot;, serif; }
jdaggett@512 1915 </pre>
jdaggett@512 1916
jdaggett@1148 1917 <p> In the second rule, the font size percentage value (‘<code
jdaggett@8187 1918 class=css>80%</code>’) refers to the computed ‘<a
jdaggett@8187 1919 href="#propdef-font-size"><code class=property>font-size</code></a>’ of
jdaggett@8187 1920 the parent element. In the third rule, the line height percentage
jdaggett@8187 1921 (‘<code class=css>110%</code>’) refers to the font size of the
jdaggett@8187 1922 element itself.
jdaggett@512 1923
jdaggett@8278 1924 <p>The first three rules do not specify the <a
jdaggett@8278 1925 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8278 1926 class=property>font-variant</code>’</a> and <a
jdaggett@8278 1927 href="#propdef-font-weight" title="font-weight!!property">‘<code
jdaggett@8278 1928 class=property>font-weight</code>’</a> explicitly, so these properties
jdaggett@8368 1929 receive their initial values (<span title="normal value">‘<code
jdaggett@8368 1930 class=property>normal</code>’</span>). Notice that the font family name
jdaggett@8279 1931 "new century schoolbook", which contains spaces, is enclosed in quotes.
jdaggett@8279 1932 The fourth rule sets the <a href="#propdef-font-weight"
jdaggett@8279 1933 title="font-weight!!property">‘<code
jdaggett@8278 1934 class=property>font-weight</code>’</a> to ‘<a href="#bold"><code
jdaggett@8278 1935 class=property>bold</code></a>’, the <a href="#propdef-font-style"
jdaggett@8278 1936 title="font-style!!property">‘<code
jdaggett@8278 1937 class=property>font-style</code>’</a> to ‘<a href="#italic"><code
jdaggett@8278 1938 class=property>italic</code></a>’, and implicitly sets <a
jdaggett@8278 1939 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8368 1940 class=property>font-variant</code>’</a> to <a
jdaggett@8368 1941 href="#font-variant-normal-value" title="normal!!font-variant">‘<code
jdaggett@8368 1942 class=property>normal</code>’</a>.
jdaggett@8278 1943
jdaggett@8278 1944 <p> The fifth rule sets the <a href="#propdef-font-variant"
jdaggett@8278 1945 title="font-variant!!property">‘<code
jdaggett@8278 1946 class=property>font-variant</code>’</a> (‘<a href="#small-caps"><code
jdaggett@8278 1947 class=property>small-caps</code></a>’), the <span class=property>‘<a
jdaggett@8278 1948 href="#propdef-font-size"><code
jdaggett@4624 1949 class=property>font-size</code></a>’</span> (120% of the parent's font
jdaggett@8278 1950 size), the <a class=property
jdaggett@8278 1951 href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">‘<code
jdaggett@8278 1952 class=property>line-height</code>’</a> (120% of the font size) and the
jdaggett@8278 1953 <a href="#propdef-font-family" title="font-family!!property">‘<code
jdaggett@8278 1954 class=property>font-family</code>’</a> (‘<a href="#fantasy"><code
jdaggett@8368 1955 class=property>fantasy</code></a>’). It follows that the keyword <span
jdaggett@8368 1956 title="normal value">‘<code class=property>normal</code>’</span>
jdaggett@8368 1957 applies to the two remaining properties: <a href="#propdef-font-style"
jdaggett@8278 1958 title="font-style!!property">‘<code
jdaggett@8278 1959 class=property>font-style</code>’</a> and <a
jdaggett@8278 1960 href="#propdef-font-weight" title="font-weight!!property">‘<code
jdaggett@8278 1961 class=property>font-weight</code>’</a>.
jdaggett@8278 1962
jdaggett@8278 1963 <p>The sixth rule sets the <a href="#propdef-font-style"
jdaggett@8278 1964 title="font-style!!property">‘<code
jdaggett@8278 1965 class=property>font-style</code>’</a>, <a href="#propdef-font-stretch"
jdaggett@8278 1966 title="font-stretch!!property">‘<code
jdaggett@8278 1967 class=property>font-stretch</code>’</a>, <span class=property>‘<a
jdaggett@8278 1968 href="#propdef-font-size"><code
jdaggett@8278 1969 class=property>font-size</code></a>’</span>, and <a
jdaggett@8278 1970 href="#propdef-font-family" title="font-family!!property">‘<code
jdaggett@8278 1971 class=property>font-family</code>’</a>, the other font properties being
jdaggett@8278 1972 set to their initial values.
jdaggett@512 1973 </div>
jdaggett@512 1974
jdaggett@8278 1975 <p>Since the <a href="#propdef-font-stretch"
jdaggett@8278 1976 title="font-stretch!!property">‘<code
jdaggett@8278 1977 class=property>font-stretch</code>’</a> property was not defined in CSS
jdaggett@8278 1978 2.1, when using <a href="#propdef-font-stretch"
jdaggett@8278 1979 title="font-stretch!!property">‘<code
jdaggett@8278 1980 class=property>font-stretch</code>’</a> values within ‘<a
jdaggett@7020 1981 href="#propdef-font"><code class=property>font</code></a>’ rules,
jdaggett@7020 1982 authors should include a extra version compatible with older user agents:
jdaggett@7020 1983
jdaggett@7020 1984 <pre>p {
jdaggett@7020 1985 font: 80% sans-serif; /* for older user agents */
jdaggett@7020 1986 font: condensed 80% sans-serif;
jdaggett@7020 1987 }</pre>
jdaggett@7020 1988
jdaggett@1662 1989 <p>The following values refer to system fonts:
jdaggett@512 1990
jdaggett@512 1991 <dl>
jdaggett@512 1992 <dt><strong>caption</strong>
jdaggett@512 1993
jdaggett@512 1994 <dd>The font used for captioned controls (e.g., buttons, drop-downs,
jdaggett@512 1995 etc.).
jdaggett@512 1996
jdaggett@512 1997 <dt><strong>icon</strong>
jdaggett@512 1998
jdaggett@512 1999 <dd>The font used to label icons.
jdaggett@512 2000
jdaggett@512 2001 <dt><strong>menu</strong>
jdaggett@512 2002
jdaggett@512 2003 <dd>The font used in menus (e.g., dropdown menus and menu lists).
jdaggett@512 2004
jdaggett@512 2005 <dt><strong>message-box</strong>
jdaggett@512 2006
jdaggett@512 2007 <dd>The font used in dialog boxes.
jdaggett@512 2008
jdaggett@512 2009 <dt><strong>small-caption</strong>
jdaggett@512 2010
jdaggett@512 2011 <dd>The font used for labeling small controls.
jdaggett@512 2012
jdaggett@512 2013 <dt><strong>status-bar</strong>
jdaggett@512 2014
jdaggett@512 2015 <dd>The font used in window status bars.
jdaggett@512 2016 </dl>
jdaggett@512 2017
jdaggett@512 2018 <p>System fonts may only be set as a whole; that is, the font family, size,
jdaggett@1662 2019 weight, style, etc. are all set at the same time. These values may then be
jdaggett@512 2020 altered individually if desired. If no font with the indicated
jdaggett@512 2021 characteristics exists on a given platform, the user agent should either
jdaggett@1148 2022 intelligently substitute (e.g., a smaller version of the ‘<code
jdaggett@1148 2023 class=property>caption</code>’ font might be used for the ‘<code
jdaggett@7242 2024 class=property>small-caption</code>’ font), or substitute a user agent
jdaggett@1148 2025 default font. As for regular fonts, if, for a system font, any of the
jdaggett@1148 2026 individual properties are not part of the operating system's available
jdaggett@1148 2027 user preferences, those properties should be set to their initial values.
jdaggett@512 2028
jdaggett@1662 2029 <p>That is why this property is "almost" a shorthand property: system fonts
jdaggett@8278 2030 can only be specified with this property, not with <a
jdaggett@8278 2031 href="#propdef-font-family" title="font-family!!property">‘<code
jdaggett@8278 2032 class=property>font-family</code>’</a> itself, so <span
jdaggett@4624 2033 class=property>‘<a href="#propdef-font"><code
jdaggett@4624 2034 class=property>font</code></a>’</span> allows authors to do more than
jdaggett@4624 2035 the sum of its subproperties. However, the individual properties such as
jdaggett@8278 2036 <a href="#propdef-font-weight" title="font-weight!!property">‘<code
jdaggett@8278 2037 class=property>font-weight</code>’</a> are still given values taken from
jdaggett@8278 2038 the system font, which can be independently varied.
jdaggett@512 2039
jdaggett@7235 2040 <p>Note that the keywords used for the system fonts listed above are only
jdaggett@7235 2041 treated as keywords when they occur in the initial position, in other
jdaggett@7235 2042 positions the same string is treated as part of the font family name:
jdaggett@7235 2043
jdaggett@7235 2044 <pre> font: menu; /* use the font settings for system menus */
jdaggett@7235 2045 font: large menu; /* use a font family named "menu" */</pre>
jdaggett@7235 2046
jdaggett@512 2047 <div class=example>
jdaggett@4624 2048 <p style="display:none">Example(s):
jdaggett@890 2049
jdaggett@890 2050 <p>
jdaggett@512 2051
jdaggett@512 2052 <pre>button { font: 300 italic 1.3em/1.7em &quot;FB Armada&quot;, sans-serif }
jdaggett@512 2053 button p { font: menu }
jdaggett@512 2054 button p em { font-weight: bolder }
jdaggett@512 2055 </pre>
jdaggett@512 2056
jdaggett@512 2057 <p>If the font used for dropdown menus on a particular system happened to
jdaggett@512 2058 be, for example, 9-point Charcoal, with a weight of 600, then P elements
jdaggett@512 2059 that were descendants of BUTTON would be displayed as if this rule were
jdaggett@890 2060 in effect:
jdaggett@512 2061
jdaggett@512 2062 <pre>button p { font: 600 9pt Charcoal }
jdaggett@512 2063 </pre>
jdaggett@512 2064
jdaggett@4624 2065 <p>Because the <span class=property>‘<a href="#propdef-font"><code
jdaggett@4624 2066 class=property>font</code></a>’</span> shorthand resets to its initial
jdaggett@4624 2067 value any property not explicitly given a value, this has the same effect
jdaggett@4624 2068 as this declaration:
jdaggett@512 2069
jdaggett@512 2070 <pre>button p {
jdaggett@512 2071 font-style: normal;
jdaggett@512 2072 font-variant: normal;
jdaggett@512 2073 font-weight: 600;
jdaggett@512 2074 font-size: 9pt;
jdaggett@512 2075 line-height: normal;
jdaggett@512 2076 font-family: Charcoal
jdaggett@8277 2077 }
jdaggett@512 2078 </pre>
jdaggett@512 2079 </div>
jdaggett@2487 2080 <!-- prop: font-synthesis -->
jdaggett@2487 2081
jdaggett@2487 2082 <h3 id=font-synthesis-prop><span class=secno>3.8 </span>Controlling
jdaggett@2487 2083 synthetic faces: the <a href="#propdef-font-synthesis">font-synthesis</a>
jdaggett@2487 2084 property</h3>
jdaggett@2487 2085
jdaggett@4624 2086 <table class=propdef id=namefont-synthesisvaluenone-weight-style>
jdaggett@2457 2087 <tbody>
jdaggett@2457 2088 <tr>
jdaggett@2457 2089 <td>Name:
jdaggett@2457 2090
jdaggett@2487 2091 <td><dfn id=propdef-font-synthesis>font-synthesis</dfn>
jdaggett@2457 2092
jdaggett@2457 2093 <tr>
jdaggett@2457 2094 <td>Value:
jdaggett@2457 2095
jdaggett@2487 2096 <td>none | [ weight || style ]
jdaggett@2457 2097
jdaggett@2457 2098 <tr>
jdaggett@2457 2099 <td>Initial:
jdaggett@2457 2100
jdaggett@2487 2101 <td>weight style
jdaggett@2457 2102
jdaggett@2457 2103 <tr>
jdaggett@2457 2104 <td>Applies to:
jdaggett@2457 2105
jdaggett@2457 2106 <td>all elements
jdaggett@2457 2107
jdaggett@2457 2108 <tr>
jdaggett@2457 2109 <td>Inherited:
jdaggett@2457 2110
jdaggett@2457 2111 <td>yes
jdaggett@2457 2112
jdaggett@2457 2113 <tr>
jdaggett@2457 2114 <td>Percentages:
jdaggett@2457 2115
jdaggett@2457 2116 <td>N/A
jdaggett@2457 2117
jdaggett@2457 2118 <tr>
jdaggett@2457 2119 <td>Media:
jdaggett@2457 2120
jdaggett@2457 2121 <td>visual
jdaggett@2457 2122
jdaggett@2457 2123 <tr>
jdaggett@2457 2124 <td>Computed value:
jdaggett@2457 2125
jdaggett@2457 2126 <td>as specified
jdaggett@7377 2127
jdaggett@7377 2128 <tr>
jdaggett@7377 2129 <td>Animatable:
jdaggett@7377 2130
jdaggett@7377 2131 <td>no
jdaggett@2457 2132 </table>
jdaggett@2457 2133
jdaggett@2487 2134 <p>This property controls whether user agents are allowed to synthesize
jdaggett@2487 2135 bold or oblique font faces when a font family lacks bold or italic faces.
jdaggett@7311 2136 If ‘<a href="#weight"><code class=property>weight</code></a>’ is not
jdaggett@7311 2137 specified, user agents must not synthesize bold faces and if ‘<code
jdaggett@2487 2138 class=property>style</code>’ is not specified user agents must not
jdaggett@8278 2139 synthesize italic faces. A value of ‘<code class=property>none</code>’
jdaggett@8278 2140 disallows all synthetic faces.
jdaggett@2457 2141
jdaggett@2457 2142 <div class=example>
jdaggett@2488 2143 <p>The style rule below disables the use of synthetically obliqued Arabic:</p>
jdaggett@2457 2144
jdaggett@2487 2145 <pre>*:lang(ar) { font-synthesis: none; }
jdaggett@2457 2146 </pre>
jdaggett@2457 2147 </div>
jdaggett@512 2148
jdaggett@6699 2149 <h2 id=font-resources><span class=secno>4 </span>Font Resources</h2>
jdaggett@545 2150
jdaggett@8311 2151 <h3 id=font-face-rule><span class=secno>4.1 </span>The <dfn
jdaggett@8311 2152 id=at-font-face-rule style="font-weight: inherit; font-style:
jdaggett@8311 2153 inherit"><code>@font-face</code></dfn> rule</h3>
jdaggett@8311 2154
jdaggett@8311 2155 <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule allows
jdaggett@8311 2156 for linking to fonts that are automatically fetched and activated when
jdaggett@8311 2157 needed. This allows authors to select a font that closely matches the
jdaggett@8311 2158 design goals for a given page rather than limiting the font choice to a
jdaggett@8311 2159 set of fonts available on all platforms. A set of font descriptors define
jdaggett@8311 2160 the location of a font resource, either locally or externally, along with
jdaggett@8311 2161 the style characteristics of an individual face. Multiple <a
jdaggett@8311 2162 href="#at-font-face-rule"><code>@font-face</code></a> rules can be used to
jdaggett@8311 2163 construct font families with a variety of faces. Using CSS font matching
jdaggett@8311 2164 rules, a user agent can selectively download only those faces that are
jdaggett@8311 2165 needed for a given piece of text.
jdaggett@8311 2166
jdaggett@8311 2167 <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule
jdaggett@8311 2168 consists of the <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 2169 at-keyword followed by a block of descriptor declarations. In terms of the
jdaggett@8311 2170 grammar, this specification defines the following productions:
jdaggett@8031 2171
jdaggett@8031 2172 <pre><dfn id=fontfacerule>font_face_rule</dfn>
jdaggett@8225 2173 : <a href="#fontfacesym"><i>FONT_FACE_SYM</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* '{' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#descriptordeclaration"><i>descriptor_declaration</i></a>? [ ';' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="#descriptordeclaration"><i>descriptor_declaration</i></a>? ]* '}' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
jdaggett@8031 2174 ;
jdaggett@8031 2175
jdaggett@8031 2176 <dfn id=descriptordeclaration>descriptor_declaration</dfn>
jdaggett@8225 2177 : <a href="http://www.w3.org/TR/CSS21/grammar.html#grammar"><i>property</i></a> ':' <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a href="http://www.w3.org/TR/CSS21/grammar.html#grammar"><i>expr</i></a>
jdaggett@8031 2178 ;</pre>
jdaggett@8031 2179
jdaggett@8032 2180 <p>The following new definitions are introduced:
jdaggett@8032 2181
jdaggett@8032 2182 <pre>- -|\\0{0,4}2d(\r\n|[ \t\r\n\f])?
jdaggett@8032 2183 F f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?</pre>
jdaggett@8032 2184
jdaggett@8032 2185 <p>The following new token is introduced:
jdaggett@8032 2186
jdaggett@8225 2187 <pre>@{F}{O}{N}{T}{-}{F}{A}{C}{E} {return <dfn id=fontfacesym>FONT_FACE_SYM</dfn>;}</pre>
jdaggett@8032 2188
jdaggett@8311 2189 <p>Each <a href="#at-font-face-rule"><code>@font-face</code></a> rule
jdaggett@8311 2190 specifies a value for every font descriptor, either implicitly or
jdaggett@8311 2191 explicitly. Those not given explicit values in the rule take the initial
jdaggett@8311 2192 value listed with each descriptor in this specification. These descriptors
jdaggett@8311 2193 apply solely within the context of the <a
jdaggett@8311 2194 href="#at-font-face-rule"><code>@font-face</code></a> rule in which they
jdaggett@8311 2195 are defined, and do not apply to document language elements. There is no
jdaggett@8311 2196 notion of which elements the descriptors apply to or whether the values
jdaggett@8311 2197 are inherited by child elements. When a given descriptor occurs multiple
jdaggett@8311 2198 times in a given <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 2199 rule, only the last descriptor declaration is used and all prior
jdaggett@8311 2200 declarations for that descriptor are ignored.
jdaggett@512 2201
jdaggett@525 2202 <div class=example>
jdaggett@525 2203 <p>To use a downloadable font called Gentium:</p>
jdaggett@512 2204
jdaggett@512 2205 <pre>
jdaggett@525 2206 @font-face {
jdaggett@525 2207 font-family: Gentium;
jdaggett@2556 2208 src: url(http://example.com/fonts/Gentium.ttf);
jdaggett@525 2209 }
jdaggett@525 2210
jdaggett@525 2211 p { font-family: Gentium, serif; }
jdaggett@512 2212 </pre>
jdaggett@512 2213
jdaggett@573 2214 <p>The user agent will download Gentium and use it when rendering text
jdaggett@573 2215 within paragraph elements. If for some reason the site serving the font
jdaggett@573 2216 is unavailable, the default serif font will be used.</p>
jdaggett@512 2217 </div>
jdaggett@512 2218
jdaggett@8311 2219 <p>A given set of <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 2220 rules define a set of fonts available for use within the documents that
jdaggett@8311 2221 contain these rules. When font matching is done, fonts defined using these
jdaggett@8311 2222 rules are considered before other available fonts on a system.
jdaggett@8198 2223
jdaggett@8198 2224 <p>Downloaded fonts are only available to documents that reference them.
jdaggett@8198 2225 The process of activating these fonts must not make them available to
jdaggett@2472 2226 other applications or to documents that don't directly link to the same
jdaggett@2556 2227 font. User agent implementers might consider it convenient to use
jdaggett@2472 2228 downloaded fonts when rendering characters in other documents for which no
jdaggett@8363 2229 other available font exists as part of the <a
jdaggett@8363 2230 href="#system-font-fallback"><em>system font fallback</em></a> procedure.
jdaggett@8198 2231 However, this would cause a security leak since the contents of one page
jdaggett@8198 2232 would be able to affect other pages, something an attacker could use as an
jdaggett@8198 2233 attack vector. These restrictions do not affect caching behavior, fonts
jdaggett@8198 2234 are cached the same way other web resources are cached.
jdaggett@8198 2235
jdaggett@8198 2236 <p>This at-rule follows the forward-compatible parsing rules of CSS. Like
jdaggett@8198 2237 properties in a declaration block, declarations of any descriptors that
jdaggett@8311 2238 are not supported by the user agent must be ignored. <a
jdaggett@8311 2239 href="#at-font-face-rule"><code>@font-face</code></a> rules require a
jdaggett@8311 2240 font-family and src descriptor; if either of these are missing, the <a
jdaggett@8311 2241 href="#at-font-face-rule"><code>@font-face</code></a> rule is invalid and
jdaggett@8311 2242 must be ignored entirely.
jdaggett@1244 2243
jdaggett@1244 2244 <p>In cases where user agents have limited platform resources or implement
jdaggett@8311 2245 the ability to disable downloadable font resources, <a
jdaggett@8311 2246 href="#at-font-face-rule"><code>@font-face</code></a> rules must simply be
jdaggett@8311 2247 ignored; the behavior of individual descriptors as defined in this
jdaggett@8311 2248 specification should not be altered.
jdaggett@1662 2249
jdaggett@1662 2250 <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
jdaggett@1662 2251 href="#descdef-font-family">font-family</a> descriptor</h3>
jdaggett@512 2252
jdaggett@512 2253 <table class=descdef>
jdaggett@512 2254 <tbody>
jdaggett@512 2255 <tr>
jdaggett@512 2256 <td>Name:
jdaggett@512 2257
jdaggett@8278 2258 <td><dfn id=descdef-font-family
jdaggett@8278 2259 title="font-family!!descriptor">font-family</dfn>
jdaggett@512 2260
jdaggett@512 2261 <tr>
jdaggett@512 2262 <td>Value:
jdaggett@512 2263
jdaggett@8225 2264 <td><a href="#family-name-value"><var>&lt;family-name&gt;</var></a>
jdaggett@890 2265
jdaggett@890 2266 <tr>
jdaggett@890 2267 <td><em>Initial:</em>
jdaggett@890 2268
jdaggett@890 2269 <td>N/A
jdaggett@512 2270 </table>
jdaggett@512 2271
jdaggett@525 2272 <p>This descriptor defines the font family name that will be used in all
jdaggett@8311 2273 CSS font family name matching. It is required for the <a
jdaggett@8311 2274 href="#at-font-face-rule"><code>@font-face</code></a> rule to be valid. It
jdaggett@8311 2275 overrides the font family names contained in the underlying font data. If
jdaggett@8311 2276 the font family name is the same as a font family available in a given
jdaggett@8311 2277 user's environment, it effectively hides the underlying font for documents
jdaggett@8311 2278 that use the stylesheet. This permits a web author to freely choose
jdaggett@8311 2279 font-family names without worrying about conflicts with font family names
jdaggett@8311 2280 present in a given user's environment. Likewise, platform substitutions
jdaggett@8311 2281 for a given font family name must not be used.
jdaggett@1244 2282
jdaggett@1662 2283 <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
jdaggett@1662 2284 href="#descdef-src">src</a> descriptor</h3>
jdaggett@512 2285
jdaggett@512 2286 <table class=descdef>
jdaggett@512 2287 <tbody>
jdaggett@512 2288 <tr>
jdaggett@512 2289 <td>Name:
jdaggett@512 2290
jdaggett@1662 2291 <td><dfn id=descdef-src>src</dfn>
jdaggett@512 2292
jdaggett@512 2293 <tr>
jdaggett@512 2294 <td>Value:
jdaggett@512 2295
jdaggett@8225 2296 <td>[ &lt;url> [format(&lt;string> #)]? | <a
jdaggett@8225 2297 href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> ] #
jdaggett@890 2298
jdaggett@890 2299 <tr>
jdaggett@890 2300 <td><em>Initial:</em>
jdaggett@890 2301
jdaggett@890 2302 <td>N/A
jdaggett@512 2303 </table>
jdaggett@512 2304
jdaggett@899 2305 <p>This descriptor specifies the resource containing font data. It is
jdaggett@8311 2306 required for the <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 2307 rule to be valid. Its value is a prioritized, comma-separated list of
jdaggett@8311 2308 external references or locally-installed font face names. When a font is
jdaggett@8311 2309 needed the user agent iterates over the set of references listed, using
jdaggett@8311 2310 the first one it can successfully activate. Fonts containing invalid data
jdaggett@8311 2311 or local font faces that are not found are ignored and the user agent
jdaggett@8311 2312 loads the next font in the list.
jdaggett@8272 2313
jdaggett@8272 2314 <p>As with other URLs in CSS, the URL may be relative, in which case it is
jdaggett@8311 2315 resolved relative to the location of the style sheet containing the <a
jdaggett@8311 2316 href="#at-font-face-rule"><code>@font-face</code></a> rule. In the case of
jdaggett@8311 2317 SVG fonts, the URL points to an element within a document containing SVG
jdaggett@8311 2318 font definitions. If the element reference is omitted, a reference to the
jdaggett@8311 2319 first defined font is implied. Similarly, font container formats that can
jdaggett@7096 2320 contain more than one font must load one and only one of the fonts for a
jdaggett@8311 2321 given <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
jdaggett@8311 2322 Fragment identifiers are used to indicate which font to load. If a
jdaggett@8311 2323 container format lacks a defined fragment identifier scheme,
jdaggett@8311 2324 implementations should use a simple 1-based indexing scheme (e.g.
jdaggett@8311 2325 "font-collection#1" for the first font, "font-collection#2" for the second
jdaggett@8311 2326 font).
jdaggett@1244 2327
jdaggett@2527 2328 <pre>
jdaggett@2527 2329 src: url(fonts/simple.ttf); /* load simple.ttf relative to stylesheet location */
jdaggett@2527 2330 src: url(/fonts/simple.ttf); /* load simple.ttf from absolute location */
jdaggett@2527 2331 src: url(fonts.svg#simple); /* load SVG font with id 'simple' */
jdaggett@2527 2332 </pre>
jdaggett@2527 2333
jdaggett@8198 2334 <p>External references consist of a URL, followed by an optional hint
jdaggett@8198 2335 describing the format of the font resource referenced by that URL. The
jdaggett@2527 2336 format hint contains a comma-separated list of format strings that denote
jdaggett@2527 2337 well-known font formats. Conformant user agents must skip downloading a
jdaggett@2527 2338 font resource if the format hints indicate only unsupported or unknown
jdaggett@2527 2339 font formats. If no format hints are supplied, the user agent should
jdaggett@2527 2340 download the font resource.
jdaggett@2527 2341
jdaggett@2527 2342 <pre>
jdaggett@2527 2343 /* load WOFF font if possible, otherwise use OpenType font */
jdaggett@2527 2344 @font-face {
jdaggett@2527 2345 font-family: bodytext;
jdaggett@2527 2346 src: url(ideal-sans-serif.woff) format("woff"),
jdaggett@2527 2347 url(basic-sans-serif.ttf) format("opentype");
jdaggett@2527 2348 }
jdaggett@2527 2349 </pre>
jdaggett@2527 2350
jdaggett@2527 2351 <p>Format strings defined by this specification:
jdaggett@2527 2352
jdaggett@2527 2353 <table class=data id=fontformats>
jdaggett@2527 2354 <thead>
jdaggett@2527 2355 <tr>
jdaggett@2527 2356 <th>String
jdaggett@2527 2357
jdaggett@2527 2358 <th>Font Format
jdaggett@2527 2359
jdaggett@2527 2360 <th>Common extensions
jdaggett@2527 2361
jdaggett@2527 2362 <tbody>
jdaggett@2527 2363 <tr>
jdaggett@2527 2364 <th>"woff"
jdaggett@2527 2365
jdaggett@4624 2366 <td><a href="http://www.w3.org/TR/WOFF/">WOFF (Web Open Font Format)</a>
jdaggett@2527 2367
jdaggett@2527 2368 <td>.woff
jdaggett@2527 2369
jdaggett@2527 2370 <tr>
jdaggett@2527 2371 <th>"truetype"
jdaggett@2527 2372
jdaggett@4624 2373 <td><a
jdaggett@4624 2374 href="http://www.microsoft.com/typography/otspec/default.htm">TrueType</a>
jdaggett@2527 2375
jdaggett@2527 2376 <td>.ttf
jdaggett@2527 2377
jdaggett@2527 2378 <tr>
jdaggett@2527 2379 <th>"opentype"
jdaggett@2527 2380
jdaggett@4624 2381 <td><a
jdaggett@4624 2382 href="http://www.microsoft.com/typography/otspec/default.htm">OpenType</a>
jdaggett@2527 2383
jdaggett@2527 2384 <td>.ttf, .otf
jdaggett@2527 2385
jdaggett@2527 2386 <tr>
jdaggett@2527 2387 <th>"embedded-opentype"
jdaggett@2527 2388
jdaggett@4624 2389 <td><a
jdaggett@4624 2390 href="http://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded
jdaggett@4624 2391 OpenType</a>
jdaggett@2527 2392
jdaggett@2527 2393 <td>.eot
jdaggett@2527 2394
jdaggett@2527 2395 <tr>
jdaggett@2527 2396 <th>"svg"
jdaggett@2527 2397
jdaggett@4624 2398 <td><a href="http://www.w3.org/TR/SVG/fonts.html">SVG Font</a>
jdaggett@2527 2399
jdaggett@2527 2400 <td>.svg, .svgz
jdaggett@2527 2401 </table>
jdaggett@2527 2402
jdaggett@2527 2403 <p>Given the overlap in common usage between TrueType and OpenType, the
jdaggett@2527 2404 format hints "truetype" and "opentype" must be considered as synonymous; a
jdaggett@2527 2405 format hint of "opentype" does not imply that the font contains Postscript
jdaggett@2527 2406 CFF style glyph data or that it contains OpenType layout information (see
jdaggett@7377 2407 <a href="#platform-props-to-css">Appendix A</a> for more background on
jdaggett@7377 2408 this).
jdaggett@2527 2409
jdaggett@2527 2410 <p>When authors would prefer to use a locally available copy of a given
jdaggett@8198 2411 font and download it if it's not, <code>local()</code> can be used. The
jdaggett@8225 2412 locally-installed <dfn
jdaggett@8225 2413 id=font-face-name-value><var>&lt;font-face-name&gt;</var></dfn> argument
jdaggett@8272 2414 to <code>local()</code> is a format-specific string that uniquely
jdaggett@8272 2415 identifies a single font face within a larger family. The syntax for a <a
jdaggett@8225 2416 href="#font-face-name-value"><var>&lt;font-face-name&gt;</var></a> is a
jdaggett@8241 2417 unique font face name enclosed by "local(" and ")". The name can
jdaggett@8241 2418 optionally be enclosed in quotes. If unquoted, the unquoted font family
jdaggett@8241 2419 name processing conventions apply; the name must be a sequence of
jdaggett@8241 2420 identifiers separated by whitespace which is converted to a string by
jdaggett@8241 2421 joining the identifiers together separated by a single space.
jdaggett@2527 2422
jdaggett@2527 2423 <pre>
jdaggett@2527 2424 /* regular face of Gentium */
jdaggett@573 2425 @font-face {
jdaggett@2527 2426 font-family: MyGentium;
jdaggett@2527 2427 src: local(Gentium), /* use locally available Gentium */
jdaggett@2527 2428 url(Gentium.ttf); /* otherwise, download it */
jdaggett@573 2429 }
jdaggett@573 2430 </pre>
jdaggett@573 2431
jdaggett@8241 2432 <p>For OpenType and TrueType fonts, this string is used to match only the
jdaggett@8241 2433 Postscript name or the full font name in the name table of locally
jdaggett@8241 2434 available fonts. Which type of name is used varies by platform and font,
jdaggett@8241 2435 so authors should include both of these names to assure proper matching
jdaggett@8241 2436 across platforms. Platform substitutions for a given font name must not be
jdaggett@8241 2437 used.
jdaggett@2527 2438
jdaggett@2527 2439 <pre>
jdaggett@2527 2440 /* bold face of Gentium */
jdaggett@2527 2441 @font-face {
jdaggett@2527 2442 font-family: MyGentium;
jdaggett@2527 2443 src: local(Gentium Bold), /* full font name */
jdaggett@2527 2444 local(Gentium-Bold), /* Postscript name */
jdaggett@2527 2445 url(GentiumBold.ttf); /* otherwise, download it */
jdaggett@2527 2446 font-weight: bold;
jdaggett@2527 2447 }
jdaggett@2527 2448 </pre>
jdaggett@2527 2449
jdaggett@8311 2450 <p>Just as a <a href="#at-font-face-rule"><code>@font-face</code></a> rule
jdaggett@8311 2451 specifies the characteristics of a single font within a family, the unique
jdaggett@8311 2452 name used with <code>local()</code> specifies a single font, not an entire
jdaggett@8311 2453 font family. Defined in terms of OpenType font data, the Postscript name
jdaggett@8311 2454 is found in the font's <a
jdaggett@2527 2455 href="http://www.microsoft.com/typography/otspec/name.htm">name table</a>,
jdaggett@2527 2456 in the name record with nameID = 6 (see <a href="#OPENTYPE"
jdaggett@2556 2457 rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> for more details). The
jdaggett@2527 2458 Postscript name is the commonly used key for all fonts on OSX and for
jdaggett@2527 2459 Postscript CFF fonts under Windows. The full font name (nameID = 4) is
jdaggett@2527 2460 used as a unique key for fonts with TrueType glyphs on Windows.
jdaggett@2527 2461
jdaggett@2527 2462 <p>For OpenType fonts with multiple localizations of the full font name,
jdaggett@2527 2463 the US English version is used (language ID = 0x409 for Windows and
jdaggett@2527 2464 language ID = 0 for Macintosh) or the first localization when a US English
jdaggett@2527 2465 full font name is not available (the OpenType specification recommends
jdaggett@2527 2466 that <a href="http://www.microsoft.com/typography/otspec/recom.htm">all
jdaggett@2527 2467 fonts minimally include US English names</a>). User agents that also match
jdaggett@2527 2468 other full font names, e.g. matching the Dutch name when the current
jdaggett@2527 2469 system locale is set to Dutch, are considered non-conformant. This is done
jdaggett@2527 2470 not to prefer English but to avoid matching inconsistencies across font
jdaggett@2527 2471 versions and OS localizations, since font style names (e.g. "Bold") are
jdaggett@2527 2472 frequently localized into many languages and the set of localizations
jdaggett@2527 2473 available varies widely across platform and font version. User agents that
jdaggett@2527 2474 match a concatenation of family name (nameID = 1) with style name (nameID
jdaggett@2527 2475 = 2) are considered non-conformant.
jdaggett@2527 2476
jdaggett@2527 2477 <p>This also allows for referencing faces that belong to larger families
jdaggett@2527 2478 that cannot otherwise be referenced.
jdaggett@2527 2479
jdaggett@2527 2480 <div class=example>
jdaggett@525 2481 <p>Use a local font or reference an SVG font in another document:</p>
jdaggett@525 2482
jdaggett@525 2483 <pre>
jdaggett@525 2484 @font-face {
jdaggett@525 2485 font-family: Headline;
jdaggett@8277 2486 src: local(Futura-Medium),
jdaggett@1148 2487 url(fonts.svg#MyGeometricModern) format("svg");
jdaggett@525 2488 }
jdaggett@525 2489 </pre>
jdaggett@525 2490
jdaggett@525 2491 <p>Create an alias for local Japanese fonts on different platforms:</p>
jdaggett@525 2492
jdaggett@525 2493 <pre>
jdaggett@525 2494 @font-face {
jdaggett@2527 2495 font-family: jpgothic;
jdaggett@525 2496 src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
jdaggett@525 2497 }
jdaggett@525 2498 </pre>
jdaggett@525 2499
jdaggett@525 2500 <p>Reference a font face that cannot be matched within a larger family:</p>
jdaggett@525 2501
jdaggett@525 2502 <pre>
jdaggett@525 2503 @font-face {
jdaggett@525 2504 font-family: Hoefler Text Ornaments;
jdaggett@525 2505 /* has the same font properties as Hoefler Text Regular */
jdaggett@8277 2506 src: local(HoeflerText-Ornaments);
jdaggett@525 2507 }
jdaggett@525 2508 </pre>
jdaggett@2527 2509
jdaggett@8198 2510 <p>Since localized fullnames never match, a document with the header style
jdaggett@8198 2511 rules below would always render using the default serif font, regardless
jdaggett@8198 2512 whether a particular system locale parameter is set to Finnish or not:</p>
jdaggett@1662 2513
jdaggett@1662 2514 <pre>
jdaggett@1662 2515 @font-face {
jdaggett@1662 2516 font-family: SectionHeader;
jdaggett@6653 2517 src: local("Arial Lihavoitu"); /* Finnish fullname for Arial Bold, should fail */
jdaggett@1662 2518 font-weight: bold;
jdaggett@1662 2519 }
jdaggett@1662 2520
jdaggett@1662 2521 h2 { font-family: SectionHeader, serif; }
jdaggett@1662 2522 </pre>
jdaggett@1662 2523
jdaggett@8198 2524 <p>A conformant user agent would never load the font ‘<code
jdaggett@1662 2525 class=css>gentium.eot</code>’ in the example below, since it is
jdaggett@4624 2526 included in the first definition of the ‘<a href="#descdef-src"><code
jdaggett@4624 2527 class=property>src</code></a>’ descriptor which is overridden by the
jdaggett@8311 2528 second definition in the same <a
jdaggett@8311 2529 href="#at-font-face-rule"><code>@font-face</code></a> rule:</p>
jdaggett@1662 2530
jdaggett@1662 2531 <pre>
jdaggett@1662 2532 @font-face {
jdaggett@1662 2533 font-family: MainText;
jdaggett@6653 2534 src: url(gentium.eot); /* for use with older non-conformant user agents */
jdaggett@1662 2535 src: local("Gentium"), url(gentium.ttf); /* Overrides src definition */
jdaggett@1662 2536 }
jdaggett@1662 2537 </pre>
jdaggett@1662 2538 </div>
jdaggett@1662 2539
jdaggett@1662 2540 <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
jdaggett@1662 2541 descriptors: the <a href="#descdef-font-style">font-style</a>, <a
jdaggett@1662 2542 href="#descdef-font-weight">font-weight</a>, <a
jdaggett@1662 2543 href="#descdef-font-stretch">font-stretch</a> descriptors</h3>
jdaggett@518 2544
jdaggett@518 2545 <table class=descdef>
jdaggett@518 2546 <tbody>
jdaggett@518 2547 <tr>
jdaggett@518 2548 <td>Name:
jdaggett@518 2549
jdaggett@8278 2550 <td><dfn id=descdef-font-style
jdaggett@8278 2551 title="font-style!!descriptor">font-style</dfn>
jdaggett@518 2552
jdaggett@518 2553 <tr>
jdaggett@518 2554 <td>Value:
jdaggett@518 2555
jdaggett@545 2556 <td>normal | italic | oblique
jdaggett@890 2557
jdaggett@890 2558 <tr>
jdaggett@890 2559 <td><em>Initial:</em>
jdaggett@890 2560
jdaggett@890 2561 <td>normal
jdaggett@518 2562 </table>
jdaggett@518 2563
jdaggett@518 2564 <table class=descdef>
jdaggett@518 2565 <tbody>
jdaggett@518 2566 <tr>
jdaggett@518 2567 <td>Name:
jdaggett@518 2568
jdaggett@8278 2569 <td><dfn id=descdef-font-weight
jdaggett@8278 2570 title="font-weight!!descriptor">font-weight</dfn>
jdaggett@518 2571
jdaggett@518 2572 <tr>
jdaggett@518 2573 <td>Value:
jdaggett@518 2574
jdaggett@545 2575 <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
jdaggett@890 2576
jdaggett@890 2577 <tr>
jdaggett@890 2578 <td><em>Initial:</em>
jdaggett@890 2579
jdaggett@890 2580 <td>normal
jdaggett@518 2581 </table>
jdaggett@518 2582
jdaggett@518 2583 <table class=descdef>
jdaggett@518 2584 <tbody>
jdaggett@518 2585 <tr>
jdaggett@518 2586 <td>Name:
jdaggett@518 2587
jdaggett@8278 2588 <td><dfn id=descdef-font-stretch
jdaggett@8278 2589 title="font-stretch!!descriptor">font-stretch</dfn>
jdaggett@518 2590
jdaggett@518 2591 <tr>
jdaggett@518 2592 <td>Value:
jdaggett@518 2593
jdaggett@545 2594 <td>normal | ultra-condensed | extra-condensed | condensed |
jdaggett@518 2595 semi-condensed | semi-expanded | expanded | extra-expanded |
jdaggett@525 2596 ultra-expanded
jdaggett@890 2597
jdaggett@890 2598 <tr>
jdaggett@890 2599 <td><em>Initial:</em>
jdaggett@890 2600
jdaggett@890 2601 <td>normal
jdaggett@518 2602 </table>
jdaggett@518 2603
jdaggett@573 2604 <p>These descriptors define the characteristics of a font face and are used
jdaggett@573 2605 in the process of matching styles to specific faces. For a font family
jdaggett@8311 2606 defined with several <a
jdaggett@8311 2607 href="#at-font-face-rule"><code>@font-face</code></a> rules, user agents
jdaggett@8311 2608 can either download all faces in the family or use these descriptors to
jdaggett@8311 2609 selectively download font faces that match actual styles used in document.
jdaggett@8311 2610 The values for these descriptors are the same as those for the
jdaggett@8311 2611 corresponding font properties except that relative keywords are not
jdaggett@8311 2612 allowed, ‘<a href="#bolder"><code class=property>bolder</code></a>’
jdaggett@8311 2613 and ‘<a href="#lighter"><code class=property>lighter</code></a>’. If
jdaggett@8311 2614 these descriptors are omitted, initial values are assumed.
jdaggett@890 2615
jdaggett@890 2616 <p>The value for these font face style attributes is used in place of the
jdaggett@890 2617 style implied by the underlying font data. This allows authors to combine
jdaggett@890 2618 faces in flexible combinations, even in situations where the original font
jdaggett@890 2619 data was arranged differently. User agents that implement synthetic
jdaggett@8272 2620 bolding and obliquing must only apply synthetic styling in cases where the
jdaggett@8272 2621 font descriptors imply this is needed, rather than based on the style
jdaggett@890 2622 attributes implied by the font data.
jdaggett@573 2623
jdaggett@1662 2624 <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
jdaggett@1662 2625 <a href="#descdef-unicode-range">unicode-range</a> descriptor</h3>
jdaggett@518 2626
jdaggett@518 2627 <table class=descdef>
jdaggett@518 2628 <tbody>
jdaggett@518 2629 <tr>
jdaggett@518 2630 <td>Name:
jdaggett@518 2631
jdaggett@1662 2632 <td><dfn id=descdef-unicode-range>unicode-range</dfn>
jdaggett@518 2633
jdaggett@518 2634 <tr>
jdaggett@518 2635 <td>Value:
jdaggett@518 2636
jdaggett@8225 2637 <td><a href="#urange-value"><var>&lt;urange&gt;</var></a> #
jdaggett@890 2638
jdaggett@890 2639 <tr>
jdaggett@890 2640 <td><em>Initial:</em>
jdaggett@890 2641
jdaggett@1148 2642 <td>U+0-10FFFF
jdaggett@518 2643 </table>
jdaggett@518 2644
jdaggett@8213 2645 <p>This descriptor defines the set of Unicode codepoints that may be
jdaggett@8213 2646 supported by the font face for which it is declared. The descriptor value
jdaggett@8225 2647 is a comma-delimited list of Unicode range (<a
jdaggett@8225 2648 href="#urange-value"><var>&lt;urange&gt;</var></a>) values. The union of
jdaggett@8225 2649 these ranges defines the set of codepoints that serves as a hint for user
jdaggett@8225 2650 agents when deciding whether or not to download a font resource for a
jdaggett@8225 2651 given text run.
jdaggett@8225 2652
jdaggett@8225 2653 <p>Each <dfn id=urange-value><var>&lt;urange&gt;</var></dfn> value is a <a
jdaggett@8225 2654 href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
jdaggett@8225 2655 title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token made up of a
jdaggett@8225 2656 "U+" or "u+" prefix followed by a codepoint range in one of the three
jdaggett@8241 2657 forms listed below. Ranges that do not fit one of the these forms are
jdaggett@8241 2658 invalid and cause the declaration to be ignored.
jdaggett@8241 2659
jdaggett@8241 2660 <dl>
jdaggett@8241 2661 <dt>single codepoint (e.g. U+416)
jdaggett@8241 2662
jdaggett@8241 2663 <dd>a valid Unicode codepoint, represented as one to six hexadecimal
jdaggett@8241 2664 digits
jdaggett@8241 2665
jdaggett@8246 2666 <dt>interval range (e.g. U+400-4ff)
jdaggett@8241 2667
jdaggett@8241 2668 <dd>represented as two hyphen-separated valid Unicode codepoints
jdaggett@8241 2669 indicating the inclusive start and end codepoints of a range
jdaggett@8241 2670
jdaggett@8246 2671 <dt>wildcard range (e.g. U+4??)
jdaggett@8241 2672
jdaggett@8241 2673 <dd>defined by the set of codepoints implied when trailing ‘<code
jdaggett@8246 2674 class=css>?</code>’ characters signify any hexadeximal digit
jdaggett@8241 2675 </dl>
jdaggett@573 2676
jdaggett@8213 2677 <p>Individual codepoints are written using hexadecimal values that
jdaggett@8213 2678 correspond to <a href="http://www.unicode.org/charts/">Unicode character
jdaggett@8225 2679 codepoints</a>. Valid Unicode codepoint values vary between 0 and 10FFFF
jdaggett@8225 2680 inclusive. Digit values of codepoints are ASCII case-insensitive. For
jdaggett@8360 2681 interval ranges, the start and end codepoints are valid Unicode values and
jdaggett@8360 2682 the end codepoint is greater than or equal to the start codepoint.
jdaggett@8225 2683
jdaggett@8225 2684 <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g.
jdaggett@8225 2685 "U+???") are valid and equivalent to a wildcard range with an initial zero
jdaggett@8225 2686 digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond
jdaggett@8225 2687 the range of valid Unicode codepoints are invalid. Because of this, the
jdaggett@8225 2688 maximum number of trailing ‘<code class=css>?</code>’ wildcard
jdaggett@8272 2689 characters is five, even though the <a
jdaggett@8225 2690 href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><code
jdaggett@8225 2691 title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.
jdaggett@8213 2692
jdaggett@8213 2693 <p>Within the comma-delimited list of Unicode ranges in a ‘<a
jdaggett@8213 2694 href="#descdef-unicode-range"><code
jdaggett@8213 2695 class=property>unicode-range</code></a>’ descriptor declaration, ranges
jdaggett@8241 2696 may overlap. The union of these ranges defines the set of codepoints for
jdaggett@8241 2697 which the corresponding font may be used. User agents must not download or
jdaggett@8241 2698 use the font for codepoints outside this set. User agents may normalize
jdaggett@8241 2699 the list of ranges into a list that is different but represents the same
jdaggett@8241 2700 set of codepoints.
jdaggett@8213 2701
jdaggett@8272 2702 <p>The associated font might not contain glyphs for the entire set of
jdaggett@8213 2703 codepoints defined by the ‘<a href="#descdef-unicode-range"><code
jdaggett@8213 2704 class=property>unicode-range</code></a>’ descriptor. When the font is
jdaggett@8225 2705 used the effective <a href="#character-map"><em>character map</em></a> is
jdaggett@8225 2706 the intersection of the codepoints defined by ‘<a
jdaggett@8225 2707 href="#descdef-unicode-range"><code
jdaggett@8225 2708 class=property>unicode-range</code></a>’ with the font's <a
jdaggett@8225 2709 href="#character-map"><em>character map</em></a>. This allows authors to
jdaggett@8225 2710 define supported ranges in terms of broad ranges without worrying about
jdaggett@8225 2711 the precise codepoint ranges supported by the underlying font.
jdaggett@8225 2712
jdaggett@8225 2713 <h3 id=composite-fonts><span class=secno>4.6 </span>Using character ranges
jdaggett@8225 2714 to define composite fonts</h3>
jdaggett@8225 2715
jdaggett@8311 2716 <p>Multiple <a href="#at-font-face-rule"><code>@font-face</code></a> rules
jdaggett@8311 2717 with different unicode ranges for the same family and style descriptor
jdaggett@8311 2718 values can be used to create composite fonts that mix the glyphs from
jdaggett@8311 2719 different fonts for different scripts. This can be used to combine fonts
jdaggett@8311 2720 that only contain glyphs for a single script (e.g. Latin, Greek, Cyrillic)
jdaggett@8311 2721 or it can be used by authors as a way of segmenting a font into fonts for
jdaggett@8311 2722 commonly used characters and less frequently used characters. Since the
jdaggett@8311 2723 user agent will only pull down the fonts it needs this helps reduce page
jdaggett@8311 2724 bandwidth.
jdaggett@8311 2725
jdaggett@8311 2726 <p>If the unicode ranges overlap for a set of <a
jdaggett@8311 2727 href="#at-font-face-rule"><code>@font-face</code></a> rules with the same
jdaggett@8311 2728 family and style descriptor values, the rules are ordered in the reverse
jdaggett@8311 2729 order they were defined; the last rule defined is the first to be checked
jdaggett@8311 2730 for a given character.
jdaggett@890 2731
jdaggett@890 2732 <p>Example ranges for specific languages or characters:
jdaggett@518 2733
jdaggett@518 2734 <dl>
jdaggett@529 2735 <dt>unicode-range: U+A5;
jdaggett@529 2736
jdaggett@1149 2737 <dd>a single code point, the yen/yuan symbol
jdaggett@529 2738
jdaggett@1148 2739 <dt>unicode-range: U+0-7F;
jdaggett@1148 2740
jdaggett@1148 2741 <dd>code range for basic ASCII characters
jdaggett@1148 2742
jdaggett@529 2743 <dt>unicode-range: U+590-5ff;
jdaggett@529 2744
jdaggett@529 2745 <dd>code range for Hebrew characters
jdaggett@529 2746
jdaggett@529 2747 <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;
jdaggett@529 2748
jdaggett@529 2749 <dd>code range for Japanese kanji, hiragana and katakana characters plus
jdaggett@529 2750 yen/yuan symbol
jdaggett@518 2751 </dl>
jdaggett@518 2752
jdaggett@529 2753 <div class=example>
jdaggett@531 2754 <p>The BBC provides news services in a wide variety of languages, many
jdaggett@8311 2755 that are not well supported across all platforms. Using an <a
jdaggett@8311 2756 href="#at-font-face-rule"><code>@font-face</code></a> rule, the BBC could
jdaggett@8311 2757 provide a font for any of these languages, as it already does via a
jdaggett@8311 2758 manual font download.</p>
jdaggett@531 2759
jdaggett@531 2760 <pre>
jdaggett@531 2761 @font-face {
jdaggett@531 2762 font-family: BBCBengali;
jdaggett@531 2763 src: url(fonts/BBCBengali.ttf) format("opentype");
jdaggett@531 2764 unicode-range: U+00-FF, U+980-9FF;
jdaggett@531 2765 }
jdaggett@531 2766 </pre>
jdaggett@529 2767 </div>
jdaggett@529 2768
jdaggett@529 2769 <div class=example>
jdaggett@531 2770 <p>Technical documents often require a wide range of symbols. The STIX
jdaggett@531 2771 Fonts project is one project aimed at providing fonts to support a wide
jdaggett@531 2772 range of technical typesetting in a standardized way. The example below
jdaggett@531 2773 shows the use of a font that provides glyphs for many of the mathematical
jdaggett@531 2774 and technical symbol ranges within Unicode:</p>
jdaggett@531 2775
jdaggett@531 2776 <pre>
jdaggett@531 2777 @font-face {
jdaggett@531 2778 font-family: STIXGeneral;
jdaggett@531 2779 src: local(STIXGeneral), url(/stixfonts/STIXGeneral.otf);
jdaggett@531 2780 unicode-range: U+000-49F, U+2000-27FF, U+2900-2BFF, U+1D400-1D7FF;
jdaggett@531 2781 }
jdaggett@531 2782 </pre>
jdaggett@529 2783 </div>
jdaggett@529 2784
jdaggett@529 2785 <div class=example>
jdaggett@529 2786 <p>This example shows how an author can override the glyphs used for Latin
jdaggett@529 2787 characters in a Japanese font with glyphs from a different font. The
jdaggett@529 2788 first rule specifies no range so it defaults to the entire range. The
jdaggett@529 2789 range specified in the second rule overlaps but takes precedence because
jdaggett@529 2790 it is defined later.</p>
jdaggett@529 2791
jdaggett@529 2792 <pre>
jdaggett@529 2793 @font-face {
jdaggett@529 2794 font-family: JapaneseWithGentium;
jdaggett@529 2795 src: local(MSMincho);
jdaggett@529 2796 /* no range specified, defaults to entire range */
jdaggett@529 2797 }
jdaggett@529 2798
jdaggett@529 2799 @font-face {
jdaggett@529 2800 font-family: JapaneseWithGentium;
jdaggett@529 2801 src: url(../fonts/Gentium.ttf);
jdaggett@529 2802 unicode-range: U+0-2FF;
jdaggett@529 2803 }
jdaggett@529 2804 </pre>
jdaggett@529 2805 </div>
jdaggett@1148 2806
jdaggett@1148 2807 <div class=example>
jdaggett@1148 2808 <p>Consider a family constructed to optimize bandwidth by separating out
jdaggett@1148 2809 Latin, Japanese and other characters into different font files:</p>
jdaggett@1148 2810
jdaggett@1148 2811 <pre>
jdaggett@1148 2812 /* fallback font - size: 4.5MB */
jdaggett@1148 2813 @font-face {
jdaggett@1148 2814 font-family: DroidSans;
jdaggett@1148 2815 src: url(DroidSansFallback.ttf);
jdaggett@1148 2816 /* no range specified, defaults to entire range */
jdaggett@1148 2817 }
jdaggett@1148 2818
jdaggett@1148 2819 /* Japanese glyphs - size: 1.2MB */
jdaggett@1148 2820 @font-face {
jdaggett@1148 2821 font-family: DroidSans;
jdaggett@1148 2822 src: url(DroidSansJapanese.ttf);
jdaggett@1148 2823 unicode-range: U+3000-9FFF, U+ff??;
jdaggett@1148 2824 }
jdaggett@1148 2825
jdaggett@8277 2826 /* Latin, Greek, Cyrillic along with some
jdaggett@1148 2827 punctuation and symbols - size: 190KB */
jdaggett@1148 2828 @font-face {
jdaggett@1148 2829 font-family: DroidSans;
jdaggett@1148 2830 src: url(DroidSans.ttf);
jdaggett@1148 2831 unicode-range: U+000-5FF, U+1e00-1fff, U+2000-2300;
jdaggett@1148 2832 }
jdaggett@1148 2833 </pre>
jdaggett@1148 2834
jdaggett@1148 2835 <p>For simple Latin text, only the font for Latin characters is
jdaggett@1148 2836 downloaded:</p>
jdaggett@1148 2837
jdaggett@1148 2838 <pre>
jdaggett@1148 2839 body { font-family: DroidSans; }
jdaggett@1148 2840
jdaggett@1148 2841 &lt;p>This is that&lt;/p>
jdaggett@1148 2842 </pre>
jdaggett@1148 2843
jdaggett@1148 2844 <p>In this case the user agent first checks the unicode-range for the font
jdaggett@1148 2845 containing Latin characters (DroidSans.ttf). Since all the characters
jdaggett@1148 2846 above are in the range U+0-5FF, the user agent downloads the font and
jdaggett@1148 2847 renders the text with that font.</p>
jdaggett@1148 2848
jdaggett@1148 2849 <p>Next, consider text that makes use of an arrow character (⇨):</p>
jdaggett@1148 2850
jdaggett@1148 2851 <pre>
jdaggett@1148 2852 &lt;p>This &amp;#x21e8; that&lt;p>
jdaggett@1148 2853 </pre>
jdaggett@1148 2854
jdaggett@1148 2855 <p>The user agent again first checks the unicode-range of the font
jdaggett@1149 2856 containing Latin characters. Since U+2000-2300 includes the arrow code
jdaggett@1149 2857 point (U+21E8), the user agent downloads the font. For this character
jdaggett@1148 2858 however the Latin font does not have a matching glyph, so the effective
jdaggett@1149 2859 unicode-range used for font matching excludes this code point. Next, the
jdaggett@1148 2860 user agent evaluates the Japanese font. The unicode-range for the
jdaggett@1148 2861 Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the
jdaggett@1662 2862 user agent does not download the Japanese font. Next the fallback font is
jdaggett@8311 2863 considered. The <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 2864 rule for the fallback font does not define unicode-range so its value
jdaggett@8311 2865 defaults to the range of all Unicode code points. The fallback font is
jdaggett@8311 2866 downloaded and used to render the arrow character.</p>
jdaggett@1148 2867 </div>
jdaggett@890 2868
jdaggett@8225 2869 <h3 id=font-rend-desc><span class=secno>4.7 </span>Font features: the <a
jdaggett@1662 2870 href="#descdef-font-variant">font-variant</a> and <a
jdaggett@1662 2871 href="#descdef-font-feature-settings">font-feature-settings</a>
jdaggett@1662 2872 descriptors</h3>
jdaggett@1662 2873
jdaggett@1662 2874 <table class=descdef>
jdaggett@1662 2875 <tbody>
jdaggett@1662 2876 <tr>
jdaggett@1662 2877 <td>Name:
jdaggett@1662 2878
jdaggett@8278 2879 <td><dfn id=descdef-font-variant
jdaggett@8278 2880 title="font-variant!!descriptor">font-variant</dfn>
jdaggett@1662 2881
jdaggett@1662 2882 <tr>
jdaggett@1662 2883 <td>Value:
jdaggett@1662 2884
jdaggett@8278 2885 <td><a href="#font-variant-normal-value"
jdaggett@8278 2886 title="normal!!font-variant">normal</a> | <a
jdaggett@8278 2887 href="#font-variant-none-value" title="none!!font-variant">none</a> | [
jdaggett@8278 2888 <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
jdaggett@8278 2889 || <a
jdaggett@8225 2890 href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
jdaggett@8225 2891 || <a
jdaggett@8225 2892 href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
jdaggett@8225 2893 || <a
jdaggett@8225 2894 href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
jdaggett@8225 2895 || <a href="#stylistic"><var
jdaggett@8225 2896 title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
jdaggett@8225 2897 href="#historical-forms"><var>historical-forms</var></a> || <a
jdaggett@8225 2898 href="#styleset"><var
jdaggett@8225 2899 title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
jdaggett@8225 2900 href="#character-variant"><var
jdaggett@8225 2901 title=character-variant>character-variant(&lt;feature-value-name&gt;
jdaggett@8225 2902 #)</var></a> || <a href="#swash"><var
jdaggett@8225 2903 title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
jdaggett@8225 2904 href="#ornaments"><var
jdaggett@8225 2905 title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
jdaggett@8225 2906 href="#annotation"><var
jdaggett@8225 2907 title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
jdaggett@8225 2908 <a href="#small-caps"><i>small-caps</i></a> | <a
jdaggett@8225 2909 href="#all-small-caps"><i>all-small-caps</i></a> | <a
jdaggett@8225 2910 href="#petite-caps"><i>petite-caps</i></a> | <a
jdaggett@8225 2911 href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
jdaggett@8225 2912 href="#unicase"><i>unicase</i></a> | <a
jdaggett@8225 2913 href="#titling-caps"><i>titling-caps</i></a> ] || <a
jdaggett@8225 2914 href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
jdaggett@8225 2915 || <a
jdaggett@8225 2916 href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
jdaggett@8225 2917 || <a
jdaggett@8225 2918 href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
jdaggett@8225 2919 || <a href="#ordinal"><i>ordinal</i></a> || <a
jdaggett@8225 2920 href="#slashed-zero"><i>slashed-zero</i></a> || <a
jdaggett@8225 2921 href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
jdaggett@8225 2922 || <a
jdaggett@8225 2923 href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
jdaggett@8225 2924 || <a href="#ruby"><i>ruby</i></a> ]
jdaggett@1662 2925
jdaggett@1662 2926 <tr>
jdaggett@1662 2927 <td><em>Initial:</em>
jdaggett@1662 2928
jdaggett@1662 2929 <td>normal
jdaggett@1662 2930 </table>
jdaggett@1662 2931
jdaggett@1662 2932 <table class=descdef>
jdaggett@1662 2933 <tbody>
jdaggett@1662 2934 <tr>
jdaggett@1662 2935 <td>Name:
jdaggett@1662 2936
jdaggett@8278 2937 <td><dfn id=descdef-font-feature-settings
jdaggett@8278 2938 title="font-feature-settings!!descriptor">font-feature-settings</dfn>
jdaggett@1662 2939
jdaggett@1662 2940 <tr>
jdaggett@1662 2941 <td>Value:
jdaggett@1662 2942
jdaggett@8278 2943 <td><a href="#font-feature-settings-normal-value"
jdaggett@8278 2944 title="normal!!font-feature-settings">normal</a> | <a
jdaggett@8225 2945 href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
jdaggett@1662 2946
jdaggett@1662 2947 <tr>
jdaggett@1662 2948 <td><em>Initial:</em>
jdaggett@1662 2949
jdaggett@1662 2950 <td>normal
jdaggett@1662 2951 </table>
jdaggett@1662 2952
jdaggett@8213 2953 <p>These descriptors define initial settings that apply when the font
jdaggett@8311 2954 defined by an <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 2955 rule is rendered. They do not affect font selection. Values are identical
jdaggett@8311 2956 to those defined for the corresponding <a href="#propdef-font-variant"
jdaggett@8278 2957 title="font-variant!!property">‘<code
jdaggett@8279 2958 class=property>font-variant</code>’</a> and <a
jdaggett@8279 2959 href="#propdef-font-feature-settings"
jdaggett@8279 2960 title="font-feature-settings!!property">‘<code
jdaggett@8279 2961 class=property>font-feature-settings</code>’</a> properties defined
jdaggett@8279 2962 below except that the value ‘<code class=property>inherit</code>’ is
jdaggett@8279 2963 omitted. When multiple font feature descriptors or properties are used,
jdaggett@8279 2964 the cumulative effect on text rendering is detailed in the section <a
jdaggett@8031 2965 href="#font-feature-resolution">Font Feature Resolution</a> below. In
jdaggett@8278 2966 cases where specific values define synthesized fallback for certain <a
jdaggett@8278 2967 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8278 2968 class=property>font-variant</code>’</a> subproperties, the same
jdaggett@8031 2969 synthesized fallback applies when used within those values are used with
jdaggett@8278 2970 the <a href="#descdef-font-style" title="font-style!!descriptor">‘<code
jdaggett@8031 2971 class=property>font-variant</code>’</a> descriptor.
jdaggett@1662 2972
jdaggett@8225 2973 <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
jdaggett@2563 2974 guidelines</h3>
jdaggett@2563 2975
jdaggett@8311 2976 <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule is
jdaggett@8311 2977 designed to allow lazy loading of font resources that are only downloaded
jdaggett@8311 2978 when used within a document. A stylesheet can include <a
jdaggett@8311 2979 href="#at-font-face-rule"><code>@font-face</code></a> rules for a library
jdaggett@8311 2980 of fonts of which only a select set are used; user agents must only
jdaggett@8311 2981 download those fonts that are referred to within the style rules
jdaggett@8311 2982 applicable to a given page. User agents that download all fonts defined in
jdaggett@8311 2983 <a href="#at-font-face-rule"><code>@font-face</code></a> rules without
jdaggett@8311 2984 considering whether those fonts are in fact used within a page are
jdaggett@8311 2985 considered non-conformant. In cases where a font might be downloaded in
jdaggett@8360 2986 character fallback cases, user agents may download a font if it's
jdaggett@8360 2987 contained within the computed value of <a href="#propdef-font-family"
jdaggett@8360 2988 title="font-family!!property">‘<code
jdaggett@8360 2989 class=property>font-family</code>’</a> for a given text run.
jdaggett@2563 2990
jdaggett@2563 2991 <pre>
jdaggett@2563 2992 @font-face {
jdaggett@2563 2993 font-family: GeometricModern;
jdaggett@2563 2994 src: url(font.ttf);
jdaggett@2563 2995 }
jdaggett@2563 2996
jdaggett@2563 2997 p {
jdaggett@2563 2998 /* font will be downloaded for pages with p elements */
jdaggett@2563 2999 font-family: GeometricModern, sans-serif;
jdaggett@2563 3000 }
jdaggett@2563 3001
jdaggett@2563 3002 h2 {
jdaggett@2563 3003 /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
jdaggett@2563 3004 font-family: Futura, GeometricModern, sans-serif;
jdaggett@2563 3005 }
jdaggett@2563 3006 </pre>
jdaggett@2563 3007
jdaggett@2563 3008 <p>In cases where textual content is loaded before downloadable fonts are
jdaggett@2563 3009 available, user agents may render text as it would be rendered if
jdaggett@2563 3010 downloadable font resources are not available or they may render text
jdaggett@2563 3011 transparently with fallback fonts to avoid a flash of text using a
jdaggett@2563 3012 fallback font. In cases where the font download fails user agents must
jdaggett@2563 3013 display text, simply leaving transparent text is considered non-conformant
jdaggett@2563 3014 behavior. Authors are advised to use fallback fonts in their font lists
jdaggett@2563 3015 that closely match the vertical metrics of the downloadable fonts to avoid
jdaggett@2563 3016 large page reflows where possible.
jdaggett@2563 3017
jdaggett@8225 3018 <h3 id=same-origin-restriction><span class=secno>4.9 </span>Same-origin
jdaggett@2737 3019 restriction for fonts</h3>
jdaggett@2737 3020
jdaggett@8225 3021 <h4 id=default-same-origin-restriction><span class=secno>4.9.1
jdaggett@2740 3022 </span>Default same-origin restriction</h4>
jdaggett@7253 3023 <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
jdaggett@7253 3024 http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
jdaggett@7253 3025 http://www.w3.org/2011/10/31-webapps-minutes.html#item02
jdaggett@7253 3026 -->
jdaggett@2740 3027
jdaggett@2737 3028 <p>User agents must implement a same-origin restriction when loading fonts
jdaggett@8311 3029 via the <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 3030 mechanism. This restriction limits the loading of fonts for a given
jdaggett@8311 3031 document to fonts loaded from the same origin. Fonts can only be loaded
jdaggett@8311 3032 via the same host, port, and method combination as the containing
jdaggett@8311 3033 document, using the <a
jdaggett@7179 3034 href="http://www.w3.org/TR/html5/browsers.html#origin">origin matching
jdaggett@2737 3035 algorithm</a> described in the <a href="#HTML5"
jdaggett@2737 3036 rel=biblioentry>[HTML5]<!--{{!HTML5}}--></a> specification. The origin of
jdaggett@8311 3037 the stylesheet containing <a
jdaggett@8311 3038 href="#at-font-face-rule"><code>@font-face</code></a> rules is not used
jdaggett@8311 3039 when deciding whether a font is same origin or not, only the origin of the
jdaggett@7096 3040 containing document is used. The restriction applies to all font types.
jdaggett@2737 3041
jdaggett@2737 3042 <p>Given a document located at http://example.com/page.html, fonts defined
jdaggett@4624 3043 with ‘<a href="#descdef-src"><code class=property>src</code></a>’
jdaggett@2737 3044 definitions considered cross origin must not be loaded:
jdaggett@2737 3045
jdaggett@2737 3046 <pre>
jdaggett@2737 3047 /* same origin (i.e. domain, protocol, port match document) */
jdaggett@8277 3048 src: url(fonts/simple.ttf);
jdaggett@8277 3049 src: url(//fonts/simple.ttf);
jdaggett@2737 3050
jdaggett@2737 3051 /* cross origin, different protocol */
jdaggett@8277 3052 src: url(https://example.com/fonts/simple.ttf);
jdaggett@2737 3053
jdaggett@2737 3054 /* cross origin, different domain */
jdaggett@8277 3055 src: url(http://another.example.com/fonts/simple.ttf);
jdaggett@2737 3056 </pre>
jdaggett@2737 3057
jdaggett@8225 3058 <h4 id=allowing-cross-origin-font-loading><span class=secno>4.9.2
jdaggett@2740 3059 </span>Allowing cross-origin font loading</h4>
jdaggett@2740 3060
jdaggett@2737 3061 <p>User agents must also implement the ability to relax this restriction
jdaggett@2737 3062 using cross-site origin controls <a href="#CORS"
jdaggett@7253 3063 rel=biblioentry>[CORS]<!--{{!CORS}}--></a> for fonts loaded via HTTP.
jdaggett@7253 3064 Sites can explicitly allow cross-site downloading of font data using the
jdaggett@7253 3065 <code>Access-Control-Allow-Origin</code> HTTP header. For other protocols,
jdaggett@7253 3066 no explicit relaxation mechanism is defined or required.
jdaggett@7253 3067
jdaggett@7253 3068 <p>For font loads over HTTP, cross-origin requests must be made with the
jdaggett@7253 3069 following parameter settings which are used in conjunction with the <a
jdaggett@7254 3070 href="http://www.w3.org/TR/cors/#cross-origin-request-0"> <em>cross-origin
jdaggett@7254 3071 request algorithm</em></a> <a href="#CORS"
jdaggett@7254 3072 rel=biblioentry>[CORS]<!--{{!CORS}}--></a>:
jdaggett@7253 3073
jdaggett@7253 3074 <ul>
jdaggett@7253 3075 <li><em>request URL</em> — the URL of the font resource in the <a
jdaggett@7253 3076 href="#descdef-src"><code>src</code></a> descriptor
jdaggett@7253 3077
jdaggett@7253 3078 <li><em>request method</em> — GET
jdaggett@7253 3079
jdaggett@7253 3080 <li><em>author request headers</em> — none
jdaggett@7253 3081
jdaggett@7253 3082 <li><em>request entity body</em> — empty
jdaggett@7253 3083
jdaggett@7253 3084 <li><em>source origin</em> — the origin of the page which linked to the
jdaggett@7253 3085 stylesheet
jdaggett@7253 3086
jdaggett@7253 3087 <li><em>manual redirect flag</em> — false
jdaggett@7253 3088
jdaggett@7253 3089 <li><em>omit credentials flag</em> — true
jdaggett@7253 3090
jdaggett@7253 3091 <li><em>force preflight flag</em> — false
jdaggett@7253 3092 </ul>
jdaggett@2737 3093
jdaggett@6699 3094 <h2 id=font-matching-algorithm><span class=secno>5 </span>Font Matching
jdaggett@6699 3095 Algorithm</h2>
jdaggett@484 3096
jdaggett@2457 3097 <p>The algorithm below describes how fonts are associated with individual
jdaggett@2457 3098 runs of text. For each character in the run a font family is chosen and a
jdaggett@2457 3099 particular font face is selected containing a glyph for that character.
jdaggett@2457 3100
jdaggett@7309 3101 <h3 id=font-family-casing><span class=secno>5.1 </span>Case sensitivity of
jdaggett@7309 3102 font family names</h3>
jdaggett@7309 3103
jdaggett@7309 3104 <p>As part of the font matching algorithm outlined below, user agents must
jdaggett@7309 3105 match font family names used in style rules with actual font family names
jdaggett@8311 3106 contained in fonts available in a given environment or defined via <a
jdaggett@8311 3107 href="#at-font-face-rule"><code>@font-face</code></a> rules. User agents
jdaggett@8311 3108 must match these names case insensitively, using the "Default Caseless
jdaggett@8311 3109 Matching" algorithm outlined in the Unicode specification <a
jdaggett@8311 3110 href="#UNICODE6" rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>. This
jdaggett@8311 3111 algorithm is detailed in section 3.13 entitled "Default Case Algorithms".
jdaggett@8311 3112 Specifically, the algorithm must be applied without normalizing the
jdaggett@8311 3113 strings involved and without applying any language-specific tailorings.
jdaggett@8311 3114 The case folding method specified by this algorithm uses the case mappings
jdaggett@8311 3115 with status field ‘<code class=property>C</code>’ or ‘<code
jdaggett@8311 3116 class=property>F</code>’ in the CaseFolding.txt file of the Unicode
jdaggett@8311 3117 Character Database.
jdaggett@7355 3118
jdaggett@7355 3119 <p class=note> Implementors should take care to verify that a given
jdaggett@7355 3120 caseless string comparison implementation uses this precise algorithm and
jdaggett@7355 3121 not assume that a given platform string matching routine follows it, as
jdaggett@7355 3122 many of these have locale-specific behavior or use some level of string
jdaggett@7355 3123 normalization.
jdaggett@7355 3124
jdaggett@7355 3125 <p class=note> For authors this means that font family names are matched
jdaggett@8272 3126 case insensitively, whether those names exist in a platform font or in the
jdaggett@8311 3127 <a href="#at-font-face-rule"><code>@font-face</code></a> rules contained
jdaggett@8311 3128 in a stylesheet. Authors should take care to ensure that names use a
jdaggett@8311 3129 character sequence consistent with the actual font family name,
jdaggett@8311 3130 particularly when using combining characters such as diacritical marks.
jdaggett@8311 3131 For example, a family name that contains an uppercase A (U+0041) followed
jdaggett@8311 3132 by a combining ring (U+030A) will <strong>not</strong> match a name that
jdaggett@8311 3133 looks identical but which uses the precomposed lowercase a-ring character
jdaggett@8311 3134 (U+00E5) instead of the combining sequence.
jdaggett@7309 3135
jdaggett@7309 3136 <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
jdaggett@2457 3137 styles</h3>
jdaggett@2457 3138
jdaggett@6701 3139 <p>The procedure for choosing fonts consists of iterating over the font
jdaggett@531 3140 families determined by the font-family property, selecting a font face
jdaggett@531 3141 with the appropriate style based on other font properties and then
jdaggett@7311 3142 determining whether a glyph exists for a given character. This is done
jdaggett@7311 3143 using the <dfn id=character-map>character map</dfn> of the font, data
jdaggett@7311 3144 which maps characters to the default glyph for that character. Codepoint
jdaggett@6701 3145 sequences consisting of a base character followed by a sequence of
jdaggett@6701 3146 combining characters are treated slightly differently, see the section on
jdaggett@6701 3147 <a href="#cluster-matching">cluster matching</a> below.
jdaggett@531 3148
jdaggett@7232 3149 <p>For this procedure, the <dfn id=default-face>default face</dfn> for a
jdaggett@7232 3150 given font family is defined to be the face that would be selected if all
jdaggett@7232 3151 font style properties were set to their initial value.
jdaggett@7232 3152
jdaggett@531 3153 <ol id=fontmatchingalg>
jdaggett@2457 3154 <li>Using the computed font property values for a given element, the user
jdaggett@2457 3155 agent starts with the first family name in the fontlist specified by the
jdaggett@8278 3156 <a href="#propdef-font-family" title="font-family!!property">‘<code
jdaggett@8278 3157 class=property>font-family</code>’</a> property.
jdaggett@2457 3158
jdaggett@2457 3159 <li>If the family name is unquoted and is a generic family name, the user
jdaggett@2457 3160 agent looks up the appropriate font family name to be used. User agents
jdaggett@2457 3161 may choose the generic font family to use based on the language of the
jdaggett@2457 3162 containing element or the Unicode range of the character.
jdaggett@2457 3163
jdaggett@2457 3164 <li>For other family names, the user agent attempts to find the family
jdaggett@8311 3165 name among fonts defined via <a
jdaggett@8311 3166 href="#at-font-face-rule"><code>@font-face</code></a> rules and then
jdaggett@8311 3167 among available system fonts, matching names with a case-insensitive
jdaggett@8311 3168 comparison as outlined <a href="#font-family-casing">in the section
jdaggett@8311 3169 above</a>. On systems containing fonts with multiple localized font
jdaggett@8311 3170 family names, user agents must match any of these names independent of
jdaggett@8311 3171 the underlying system locale or platform API used. If the font resources
jdaggett@8311 3172 defined for a given face in an <a
jdaggett@8311 3173 href="#at-font-face-rule"><code>@font-face</code></a> rule are either not
jdaggett@8311 3174 available or contain invalid font data, then the face should be treated
jdaggett@8311 3175 as not present in the family. If no faces are present for a family
jdaggett@8311 3176 defined via <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 3177 rules, the family should be treated as missing; matching a platform font
jdaggett@8311 3178 with the same name must not occur in this case.
jdaggett@2457 3179
jdaggett@2457 3180 <li>If a font family match occurs, the user agent assembles the set of
jdaggett@6701 3181 font faces in that family and then narrows the set to a single face using
jdaggett@6701 3182 other font properties in the order given below:
jdaggett@2457 3183 <ol id=fontstylematchingalg>
jdaggett@8278 3184 <li><a href="#propdef-font-stretch"
jdaggett@8278 3185 title="font-stretch!!property">‘<code
jdaggett@8278 3186 class=property>font-stretch</code>’</a> is tried first. If the
jdaggett@8278 3187 matching set contains faces with width values matching the <a
jdaggett@8278 3188 href="#propdef-font-stretch" title="font-stretch!!property">‘<code
jdaggett@8278 3189 class=property>font-stretch</code>’</a> value, faces with other width
jdaggett@4624 3190 values are removed from the matching set. If there is no face that
jdaggett@4624 3191 exactly matches the width value the nearest width is used instead. If
jdaggett@8278 3192 the value of <a href="#propdef-font-stretch"
jdaggett@8278 3193 title="font-stretch!!property">‘<code
jdaggett@8368 3194 class=property>font-stretch</code>’</a> is <a
jdaggett@8368 3195 href="#font-stretch-normal-value" title="normal!!font-stretch">‘<code
jdaggett@8368 3196 class=property>normal</code>’</a> or one of the condensed values,
jdaggett@8278 3197 narrower width values are checked first, then wider values. If the
jdaggett@8278 3198 value of <a href="#propdef-font-stretch"
jdaggett@8278 3199 title="font-stretch!!property">‘<code
jdaggett@8278 3200 class=property>font-stretch</code>’</a> is one of the expanded
jdaggett@4624 3201 values, wider values are checked first, followed by narrower values.
jdaggett@4624 3202 Once the closest matching width has been determined by this process,
jdaggett@4624 3203 faces with other widths are removed from the matching set.
jdaggett@4624 3204
jdaggett@8278 3205 <li><a href="#propdef-font-style" title="font-style!!property">‘<code
jdaggett@8278 3206 class=property>font-style</code>’</a> is tried next. If the value of
jdaggett@8278 3207 <a href="#propdef-font-style" title="font-style!!property">‘<code
jdaggett@8278 3208 class=property>font-style</code>’</a> is ‘<a href="#italic"><code
jdaggett@8278 3209 class=property>italic</code></a>’, italic faces are checked first,
jdaggett@8278 3210 then oblique, then normal faces. If the value is ‘<a
jdaggett@8278 3211 href="#oblique"><code class=property>oblique</code></a>’, oblique
jdaggett@8278 3212 faces are checked first, then italic faces and then normal faces. If
jdaggett@8368 3213 the value is <a href="#font-style-normal-value"
jdaggett@8368 3214 title="normal!!font-style">‘<code
jdaggett@8368 3215 class=property>normal</code>’</a>, normal faces are checked first,
jdaggett@8279 3216 then oblique faces, then italic faces. Faces with other style values
jdaggett@8279 3217 are excluded from the matching set. User agents are permitted to
jdaggett@8279 3218 distinguish between italic and oblique faces within platform font
jdaggett@8279 3219 families but this is not required, they may treat all italic or oblique
jdaggett@8311 3220 faces as italic faces. However, within font families defined via <a
jdaggett@8311 3221 href="#at-font-face-rule"><code>@font-face</code></a> rules, italic and
jdaggett@8311 3222 oblique faces must be distinguished using the value of the <a
jdaggett@8311 3223 href="#descdef-font-style" title="font-style!!descriptor">‘<code
jdaggett@8278 3224 class=property>font-style</code>’</a> descriptor.
jdaggett@8278 3225
jdaggett@8278 3226 <li><a href="#propdef-font-weight"
jdaggett@8278 3227 title="font-weight!!property">‘<code
jdaggett@8278 3228 class=property>font-weight</code>’</a> is matched next, it will
jdaggett@8278 3229 always reduce the matching set to a single font face. If bolder/lighter
jdaggett@8278 3230 relative weights are used, the effective weight is calculated based on
jdaggett@8278 3231 the inherited weight value, as described in the definition of the <a
jdaggett@8278 3232 href="#propdef-font-weight" title="font-weight!!property">‘<code
jdaggett@8278 3233 class=property>font-weight</code>’</a> property. Given the desired
jdaggett@4624 3234 weight and the weights of faces in the matching set after the steps
jdaggett@4624 3235 above, if the desired weight is available that face matches. Otherwise,
jdaggett@4624 3236 a weight is chosen using the rules below:
jdaggett@531 3237 <ul>
jdaggett@531 3238 <li>If the desired weight is less than 400, weights below the desired
jdaggett@531 3239 weight are checked in descending order followed by weights above the
jdaggett@531 3240 desired weight in ascending order until a match is found.
jdaggett@531 3241
jdaggett@531 3242 <li>If the desired weight is greater than 500, weights above the
jdaggett@531 3243 desired weight are checked in ascending order followed by weights
jdaggett@531 3244 below the desired weight in descending order until a match is found.
jdaggett@531 3245
jdaggett@531 3246 <li>If the desired weight is 400, 500 is checked first and then the
jdaggett@531 3247 rule for desired weights less than 400 is used.
jdaggett@531 3248
jdaggett@531 3249 <li>If the desired weight is 500, 400 is checked first and then the
jdaggett@532 3250 rule for desired weights less than 400 is used.
jdaggett@531 3251 </ul>
jdaggett@531 3252
jdaggett@4624 3253 <li><span class=property>‘<a href="#propdef-font-size"><code
jdaggett@4624 3254 class=property>font-size</code></a>’</span> must be matched within a
jdaggett@4624 3255 UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
jdaggett@4624 3256 are rounded to the nearest whole pixel, while the tolerance for
jdaggett@4624 3257 bitmapped fonts could be as large as 20%.) Further computations, e.g.,
jdaggett@4624 3258 by ‘<code class=property>em</code>’ values in other properties, are
jdaggett@4624 3259 based on the <span class=property>‘<a href="#propdef-font-size"><code
jdaggett@4624 3260 class=property>font-size</code></a>’</span> value that is used, not
jdaggett@4624 3261 the one that is specified.
jdaggett@531 3262 </ol>
jdaggett@531 3263
jdaggett@7232 3264 <li>
jdaggett@7232 3265 <p>If no matching face exists or the matched face does not contain a
jdaggett@7232 3266 glyph for the character to be rendered, the next family name is selected
jdaggett@7232 3267 and the previous two steps repeated. Glyphs from other faces in the
jdaggett@7232 3268 family are not considered. The only exception is that user agents may
jdaggett@7232 3269 optionally substitute a synthetic version of the <a
jdaggett@7232 3270 href="#default-face"><em>default face</em></a> if that face supports a
jdaggett@7232 3271 given glyph (e.g. a synthetic italic version of the regular face may be
jdaggett@7232 3272 used if the italic face doesn't support glyphs for Arabic).</p>
jdaggett@7242 3273 <!-- resolution on the above: http://lists.w3.org/Archives/Public/www-style/2012Nov/0292.html -->
jdaggett@7242 3274
jdaggett@8311 3275 <p>If the matched font is defined via an <a
jdaggett@8311 3276 href="#at-font-face-rule"><code>@font-face</code></a> rule and needs to
jdaggett@8311 3277 be downloaded, the font resource is downloaded. While the download
jdaggett@8311 3278 occurs, the user agent can either wait until the font is downloaded or
jdaggett@8311 3279 render once with substituted font metrics and render again once the font
jdaggett@8311 3280 is downloaded.</p>
jdaggett@531 3281
jdaggett@531 3282 <li>If there are no more font families to be evaluated and no matching
jdaggett@8363 3283 face has been found, then the user agent performs a <dfn
jdaggett@8363 3284 id=system-font-fallback>system font fallback</dfn> procedure to find the
jdaggett@8363 3285 best match for the character to be rendered. The result of this procedure
jdaggett@8363 3286 may vary across user agents.
jdaggett@531 3287
jdaggett@531 3288 <li>If a particular character cannot be displayed using any font, the user
jdaggett@531 3289 agent should indicate by some means that a character is not being
jdaggett@2457 3290 displayed, displaying either a symbolic representation of the missing
jdaggett@2457 3291 glyph (e.g. using a <a
jdaggett@2457 3292 href="http://en.wikipedia.org/wiki/Last_resort_font">Last Resort
jdaggett@2457 3293 Font</a>) or using the missing character glyph from a default font.
jdaggett@512 3294 </ol>
jdaggett@2457 3295
jdaggett@7309 3296 <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
jdaggett@6701 3297
jdaggett@6701 3298 <p>When text contains characters such as combining diacritics, ideally the
jdaggett@6701 3299 base character should be rendered using the same font as the diacritic,
jdaggett@6701 3300 this assures proper placement of the diacritic. For this reason, the font
jdaggett@6701 3301 matching algorithm for clusters is more specialized than the general case
jdaggett@6701 3302 of matching a single character by itself. For sequences containing
jdaggett@6701 3303 variation selectors, which indicate the precise glyph to be used for a
jdaggett@8363 3304 given character, user agents always attempt <a
jdaggett@8363 3305 href="#system-font-fallback"><em>system font fallback</em></a> to find the
jdaggett@8363 3306 appropriate glyph before using the default glyph of the base character.
jdaggett@6701 3307
jdaggett@7020 3308 <p>A font is considered to <em>support</em> a given character if (1) the
jdaggett@7311 3309 character is contained in the font's <a
jdaggett@7311 3310 href="#character-map"><em>character map</em></a> and (2) if required by
jdaggett@7020 3311 the containing script, shaping information is available for that
jdaggett@7311 3312 character. Some legacy fonts may include a given character in the <a
jdaggett@7311 3313 href="#character-map"><em>character map</em></a> but lack the shaping
jdaggett@7311 3314 information (e.g. <a
jdaggett@7020 3315 href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
jdaggett@7020 3316 layout tables</a> or <a
jdaggett@7103 3317 href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
jdaggett@7020 3318 tables</a>) necessary for correctly rendering text runs containing that
jdaggett@7020 3319 character.
jdaggett@7020 3320
jdaggett@6701 3321 <p>A sequence of codepoints containing combining diacritics or other
jdaggett@6701 3322 modifiers is termed a grapheme cluster (see <a href="#CSS3TEXT"
jdaggett@6701 3323 rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
jdaggett@6701 3324 description). For a given cluster containing a base character, <em>b</em>
jdaggett@6701 3325 and a sequence of combining characters <em>c1, c2…</em>, the entire
jdaggett@6701 3326 cluster is matched using these steps:
jdaggett@6701 3327
jdaggett@6701 3328 <ol>
jdaggett@6701 3329 <li>For each family in the font list, a face is chosen using the style
jdaggett@6701 3330 selection rules defined in the previous section.
jdaggett@6701 3331 <ol>
jdaggett@7020 3332 <li>If all characters in the sequence <em>b + c1 + c2 …</em> are
jdaggett@7021 3333 completely supported by the font, select this font for the sequence.
jdaggett@6701 3334
jdaggett@6701 3335 <li>If a sequence of multiple codepoints is canonically equivalent to a
jdaggett@7021 3336 single character and the font supports that character, select this font
jdaggett@7021 3337 for the sequence.
jdaggett@6701 3338 </ol>
jdaggett@6701 3339
jdaggett@6701 3340 <li>If no font was found in the font list in step 1:
jdaggett@6701 3341 <ol>
jdaggett@6701 3342 <li>If <em>c1</em> is a variation selector, system fallback must be used
jdaggett@6701 3343 to find a font that supports the full sequence of <em>b + c1</em>. If
jdaggett@6701 3344 no font on the system supports the full sequence, match the single
jdaggett@6701 3345 character <em>b</em> using the normal procedure for matching single
jdaggett@6701 3346 characters and ignore the variation selector. Note: a sequence with
jdaggett@6701 3347 more than one variation selector is treated as an encoding error and
jdaggett@6701 3348 the trailing selectors are ignored.
jdaggett@6701 3349
jdaggett@6701 3350 <li>Otherwise, the user agent may optionally use system font fallback to
jdaggett@6701 3351 match a font that supports the entire cluster.
jdaggett@6701 3352 </ol>
jdaggett@6701 3353
jdaggett@6701 3354 <li>If no font is found in step 2, use the matching sequence from step 1
jdaggett@6701 3355 to determine the longest sequence that is completely matched by a font in
jdaggett@6701 3356 the font list and attempt to match the remaining combining characters
jdaggett@6701 3357 separately using the rules for single characters.
jdaggett@6701 3358 </ol>
jdaggett@6701 3359
jdaggett@7309 3360 <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
jdaggett@2457 3361 issues</h3>
jdaggett@2457 3362
jdaggett@2461 3363 <p>The procedure above is always performed on text runs containing Unicode
jdaggett@2461 3364 characters, documents using legacy encodings are assumed to have been
jdaggett@7311 3365 transcoded before matching fonts. For fonts containing <a
jdaggett@7311 3366 href="#character-map"><em title="character map">character maps</em></a>
jdaggett@7311 3367 for both legacy encodings and Unicode, the contents of the legacy encoding
jdaggett@7311 3368 <a href="#character-map"><em>character map</em></a> must have no effect on
jdaggett@7311 3369 the results of the font matching process.
jdaggett@2461 3370
jdaggett@2461 3371 <p>The font matching process does not assume that text runs are in either
jdaggett@2461 3372 normalized or denormalized form (see <a href="#CHARMOD-NORM"
jdaggett@3042 3373 rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
jdaggett@2461 3374 details). Layout engines often convert base character plus combining
jdaggett@6701 3375 character sequences into precomposed characters if they exist. The font
jdaggett@6701 3376 matching algorithm outlined here supports both ways and fonts can
jdaggett@6701 3377 generally support either but variations can occur. Authors should always
jdaggett@6701 3378 tailor their choice of fonts to their content, including whether that
jdaggett@6701 3379 content contains normalized or denormalized character streams.
jdaggett@2457 3380
jdaggett@2457 3381 <p>If a given character is a Private-Use Area Unicode codepoint and none of
jdaggett@2457 3382 the fonts in the fontlist contain a glyph for that codepoint, user agents
jdaggett@2457 3383 must display some form of missing glyph symbol for that character rather
jdaggett@8363 3384 than attempting <a href="#system-font-fallback"><em>system font
jdaggett@8363 3385 fallback</em></a> for that codepoint. When matching the replacement
jdaggett@8363 3386 character U+FFFD, user agents may skip the font matching process and
jdaggett@8363 3387 immediately display some form of missing glyph symbol, they are not
jdaggett@8363 3388 required to display the glyph from the font that would be selected by the
jdaggett@8363 3389 font matching process.
jdaggett@2457 3390
jdaggett@2457 3391 <p>In general, the fonts for a given family will all have the same or
jdaggett@7311 3392 similar <a href="#character-map"><em title="character map">character
jdaggett@7311 3393 maps</em></a>. The process outlined here is designed to handle even font
jdaggett@7311 3394 families containing faces with widely variant <a href="#character-map"><em
jdaggett@7311 3395 title="character map">character maps</em></a>. However, authors are
jdaggett@7311 3396 cautioned that the use of such families can lead to unexpected results.
jdaggett@2457 3397
jdaggett@2457 3398 <p>Optimizations of this process are allowed provided that an
jdaggett@2457 3399 implementation behaves as if the algorithm had been followed exactly.
jdaggett@2457 3400 Matching occurs in a well-defined order to insure that the results are as
jdaggett@2457 3401 consistent as possible across user agents, given an identical set of
jdaggett@2509 3402 available fonts and rendering technology.
jdaggett@2509 3403
jdaggett@7309 3404 <h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
jdaggett@2509 3405 changes since CSS 2.1</h3>
jdaggett@2509 3406
jdaggett@2509 3407 <p>The algorithm above is different from CSS 2.1 in a number of key places.
jdaggett@2509 3408 These changes were made to better reflect actual font matching behavior
jdaggett@2509 3409 across user agent implementations.
jdaggett@2509 3410
jdaggett@2509 3411 <p>Differences compared to the font matching algorithm in CSS 2.1:
jdaggett@2509 3412
jdaggett@2509 3413 <ul>
jdaggett@2509 3414 <li>The algorithm includes font-stretch matching.
jdaggett@2509 3415
jdaggett@2509 3416 <li>All possible font-style matching scenarios are delineated.
jdaggett@2509 3417
jdaggett@2509 3418 <li>Small-caps fonts are not matched as part of the font matching process,
jdaggett@2509 3419 they are now handled via font features.
jdaggett@2509 3420
jdaggett@2509 3421 <li>Unicode variation selector matching is required.
jdaggett@6701 3422
jdaggett@6701 3423 <li>Cluster sequences are matched as a unit.
jdaggett@2509 3424 </ul>
jdaggett@531 3425
jdaggett@7309 3426 <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
jdaggett@6701 3427 examples</h3>
jdaggett@6701 3428
jdaggett@531 3429 <div class=example>
jdaggett@531 3430 <p>It's useful to note that the CSS selector syntax may be used to create
jdaggett@531 3431 language-sensitive typography. For example, some Chinese and Japanese
jdaggett@1149 3432 characters are unified to have the same Unicode code point, although the
jdaggett@890 3433 abstract glyphs are not the same in the two languages.
jdaggett@531 3434
jdaggett@531 3435 <pre>*:lang(ja-jp) { font: 900 14pt/16pt &quot;Heisei Mincho W9&quot;, serif; }
jdaggett@531 3436 *:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
jdaggett@512 3437 </pre>
jdaggett@531 3438
jdaggett@531 3439 <p>This selects any element that has the given language - Japanese or
jdaggett@890 3440 Traditional Chinese - and uses the appropriate font.
jdaggett@512 3441 </div>
jdaggett@1662 3442
jdaggett@6699 3443 <h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>
jdaggett@1662 3444
jdaggett@1856 3445 <p>Modern font technologies support a variety of advanced typographic and
jdaggett@1856 3446 language-specific font features. Using these features, a single font can
jdaggett@1856 3447 provide glyphs for a wide range of ligatures, contextual and stylistic
jdaggett@1856 3448 alternates, tabular and old-style figures, small capitals, automatic
jdaggett@1856 3449 fractions, swashes, and alternates specific to a given language. To allow
jdaggett@8313 3450 authors control over these font capabilities, the ‘<code
jdaggett@8313 3451 class=property>font-variant</code>’ property has been expanded for CSS3.
jdaggett@8313 3452 It now functions as a shorthand for a set of properties that provide
jdaggett@8313 3453 control over stylistic font features.
jdaggett@1856 3454
jdaggett@1856 3455 <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
jdaggett@1856 3456 selection and positioning</h3>
jdaggett@1856 3457
jdaggett@1856 3458 <p>Simple fonts used for displaying Latin text use a very basic processing
jdaggett@8313 3459 model. Fonts contain a <a href="#character-map"><em>character map</em></a>
jdaggett@8313 3460 which maps each character to a glyph for that character. Glyphs for
jdaggett@8313 3461 subsequent characters are simply placed one after the other along a run of
jdaggett@8313 3462 text. Modern font formats such as OpenType and AAT (Apple Advanced
jdaggett@8313 3463 Typography) use a richer processing model. The glyph for a given character
jdaggett@8313 3464 can be chosen and positioned not just based on the codepoint of the
jdaggett@8313 3465 character itself, but also on adjacent characters as well as the language,
jdaggett@8313 3466 script, and features enabled for the text. Font features may be required
jdaggett@8313 3467 for specific scripts, or recommended as enabled by default or they might
jdaggett@8313 3468 be stylistic features meant to be used under author control.
jdaggett@1856 3469
jdaggett@1856 3470 <p>For a good visual overview of these features, see the <a
jdaggett@1856 3471 href="#OPENTYPE-FONT-GUIDE"
jdaggett@1856 3472 rel=biblioentry>[OPENTYPE-FONT-GUIDE]<!--{{OPENTYPE-FONT-GUIDE}}--></a>.
jdaggett@1856 3473 For a detailed description of glyph processing for OpenType fonts, see <a
jdaggett@1856 3474 href="#WINDOWS-GLYPH-PROC"
jdaggett@1856 3475 rel=biblioentry>[WINDOWS-GLYPH-PROC]<!--{{WINDOWS-GLYPH-PROC}}--></a>.
jdaggett@1856 3476
jdaggett@8313 3477 <p>Stylistic font features can be classified into two broad categories:
jdaggett@6177 3478 ones that affect the harmonization of glyph shapes with the surrounding
jdaggett@8313 3479 context, such as kerning and ligature features, and ones such as the
jdaggett@6177 3480 small-caps, subscript/superscript and alternate features that affect shape
jdaggett@6177 3481 selection.
jdaggett@6176 3482
jdaggett@8313 3483 <p>The subproperties of <a href="#propdef-font-variant"
jdaggett@8313 3484 title="font-variant!!property">‘<code
jdaggett@8313 3485 class=property>font-variant</code>’</a> listed below are used to control
jdaggett@8313 3486 these stylistic font features. They do not control features that are
jdaggett@8313 3487 required for displaying certain scripts, such as the OpenType features
jdaggett@8313 3488 used when displaying Arabic or Indic language text. They affect glyph
jdaggett@8313 3489 selection and positioning, but do not affect font selection as described
jdaggett@8313 3490 in the font matching section (except in cases required for compatibility
jdaggett@8313 3491 with CSS 2.1).
jdaggett@1856 3492
jdaggett@1856 3493 <p>To assure consistent behavior across user agents, the equivalent
jdaggett@8313 3494 OpenType property settings are listed for individual properties and are
jdaggett@8313 3495 normative. When using other font formats these should be used as a
jdaggett@8313 3496 guideline to map CSS font feature property values to specific font
jdaggett@8313 3497 features.
jdaggett@1856 3498
jdaggett@1856 3499 <h3 id=language-specific-support><span class=secno>6.2
jdaggett@1856 3500 </span>Language-specific display</h3>
jdaggett@1856 3501
jdaggett@1856 3502 <p>OpenType also supports language-specific glyph selection and
jdaggett@1856 3503 positioning, so that text can be displayed correctly in cases where the
jdaggett@8313 3504 language dictates a specific display behavior. Many languages share a
jdaggett@8313 3505 common script, but the shape of certain letters can vary across those
jdaggett@8313 3506 languages. For example, certain Cyrillic letters have different shapes in
jdaggett@8313 3507 Russian text than in Bulgarian. In Latin text, it's common to render "fi"
jdaggett@8313 3508 with an explicit fi-ligature that lacks a dot on the "i". However, in
jdaggett@8313 3509 languages such as Turkish which uses both a dotted-i and a dotless-i, it's
jdaggett@8313 3510 important to not use this ligature or use a specialized version that
jdaggett@8313 3511 contains a dot over the "i". The example below shows language-specific
jdaggett@8313 3512 variations based on stylistic traditions found in Spanish, Italian and
jdaggett@8313 3513 French orthography:
jdaggett@2515 3514
jdaggett@2515 3515 <div class=featex><img alt="language specific forms, spanish"
jdaggett@2515 3516 src=locl-1.png></div>
jdaggett@2515 3517
jdaggett@2515 3518 <div class=featex><img alt="language specific forms, italian"
jdaggett@2515 3519 src=locl-2.png></div>
jdaggett@2515 3520
jdaggett@2515 3521 <div class=featex><img alt="language specific forms, french"
jdaggett@2515 3522 src=locl-3.png></div>
jdaggett@1856 3523
jdaggett@8313 3524 <p>If the content language of the element is known according to the rules
jdaggett@7355 3525 of the <a
jdaggett@7355 3526 href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document
jdaggett@7355 3527 language</a>, user agents are required to infer the OpenType language
jdaggett@7355 3528 system from the content language and use that when selecting and
jdaggett@7355 3529 positioning glyphs using an OpenType font.
jdaggett@7355 3530
jdaggett@7355 3531 <p>For OpenType fonts, in some cases it may be necessary to explicitly
jdaggett@7355 3532 declare the OpenType language to be used, for example when displaying text
jdaggett@7355 3533 in a given language that uses the typographic conventions of another
jdaggett@7355 3534 language or when the font does not explicitly support a given language but
jdaggett@7355 3535 supports a language that shares common typographic conventions. The ‘<a
jdaggett@4624 3536 href="#propdef-font-language-override"><code
jdaggett@4624 3537 class=property>font-language-override</code></a>’ property is used for
jdaggett@8225 3538 this purpose.</p>
jdaggett@1662 3539 <!-- prop: font-kerning -->
jdaggett@1662 3540
jdaggett@1856 3541 <h3 id=font-kerning-prop><span class=secno>6.3 </span>Kerning: the <a
jdaggett@1662 3542 href="#propdef-font-kerning">font-kerning</a> property</h3>
jdaggett@1662 3543
jdaggett@4624 3544 <table class=propdef id=namefont-kerningvalueauto-normal-noneini>
jdaggett@1662 3545 <tbody>
jdaggett@1662 3546 <tr>
jdaggett@1662 3547 <td>Name:
jdaggett@1662 3548
jdaggett@1662 3549 <td><dfn id=propdef-font-kerning>font-kerning</dfn>
jdaggett@1662 3550
jdaggett@1662 3551 <tr>
jdaggett@1662 3552 <td>Value:
jdaggett@1662 3553
jdaggett@8278 3554 <td><a href="#font-kerning-auto-value"
jdaggett@8278 3555 title="auto!!font-kerning">auto</a> | <a
jdaggett@8278 3556 href="#font-kerning-normal-value"
jdaggett@8278 3557 title="normal!!font-kerning">normal</a> | <a
jdaggett@8278 3558 href="#font-kerning-none-value" title="none!!font-kerning">none</a>
jdaggett@1662 3559
jdaggett@1662 3560 <tr>
jdaggett@1662 3561 <td>Initial:
jdaggett@1662 3562
jdaggett@1856 3563 <td>auto
jdaggett@1662 3564
jdaggett@1662 3565 <tr>
jdaggett@1662 3566 <td>Applies to:
jdaggett@1662 3567
jdaggett@1662 3568 <td>all elements
jdaggett@1662 3569
jdaggett@1662 3570 <tr>
jdaggett@1662 3571 <td>Inherited:
jdaggett@1662 3572
jdaggett@1662 3573 <td>yes
jdaggett@1662 3574
jdaggett@1662 3575 <tr>
jdaggett@1662 3576 <td>Percentages:
jdaggett@1662 3577
jdaggett@1662 3578 <td>N/A
jdaggett@1662 3579
jdaggett@1662 3580 <tr>
jdaggett@1662 3581 <td>Media:
jdaggett@1662 3582
jdaggett@1662 3583 <td>visual
jdaggett@1662 3584
jdaggett@1662 3585 <tr>
jdaggett@1662 3586 <td>Computed value:
jdaggett@1662 3587
jdaggett@1662 3588 <td>as specified
jdaggett@7377 3589
jdaggett@7377 3590 <tr>
jdaggett@7377 3591 <td>Animatable:
jdaggett@7377 3592
jdaggett@7377 3593 <td>no
jdaggett@1662 3594 </table>
jdaggett@1662 3595
jdaggett@2509 3596 <p>Kerning is the contextual adjustment of inter-glyph spacing. This
jdaggett@2509 3597 property controls metric kerning, kerning that utilizes adjustment data
jdaggett@8276 3598 contained in the font.
jdaggett@8276 3599
jdaggett@8276 3600 <dl>
jdaggett@8278 3601 <dt><dfn id=font-kerning-auto-value title="auto!!font-kerning">auto</dfn>
jdaggett@8276 3602
jdaggett@8276 3603 <dd>Specifies that kerning is applied at the discretion of the user agent
jdaggett@8276 3604
jdaggett@8278 3605 <dt><dfn id=font-kerning-normal-value
jdaggett@8278 3606 title="normal!!font-kerning">normal</dfn>
jdaggett@8276 3607
jdaggett@8276 3608 <dd>Specifies that kerning is applied
jdaggett@8276 3609
jdaggett@8278 3610 <dt><dfn id=font-kerning-none-value title="none!!font-kerning">none</dfn>
jdaggett@8276 3611
jdaggett@8276 3612 <dd>Specifies that kerning is not applied
jdaggett@8276 3613 </dl>
jdaggett@1662 3614
jdaggett@1662 3615 <p>For fonts that do not include kerning data this property will have no
jdaggett@1662 3616 visible effect. When rendering with OpenType fonts, the <a
jdaggett@1662 3617 href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>
jdaggett@2515 3618 specification suggests that kerning be enabled by default. When kerning is
jdaggett@6436 3619 enabled, the OpenType <span class=tag>kern</span> feature is enabled (for
jdaggett@8276 3620 vertical text runs the <span class=tag>vkrn</span> feature is enabled
jdaggett@8276 3621 instead). User agents must also support fonts that only support kerning
jdaggett@8276 3622 via data contained in a <span class=tag>kern</span> font table, as
jdaggett@8276 3623 detailed in the OpenType specification. If the ‘<code
jdaggett@8276 3624 class=property>letter-spacing</code>’ property is defined, kerning
jdaggett@8276 3625 adjustments are considered part of the default spacing and letter spacing
jdaggett@8276 3626 adjustments are made after kerning has been applied.
jdaggett@8276 3627
jdaggett@8276 3628 <p>When set to ‘<code class=property>auto</code>’, user agents can
jdaggett@8276 3629 determine whether to apply kerning or not based on a number of factors:
jdaggett@8276 3630 text size, script, or other factors that influence text processing speed.
jdaggett@8368 3631 Authors who want proper kerning should use <a
jdaggett@8368 3632 href="#font-kerning-normal-value" title="normal!!font-kerning">‘<code
jdaggett@8368 3633 class=property>normal</code>’</a> to explicitly enable kerning.
jdaggett@8279 3634 Likewise, some authors may prefer to disable kerning in situations where
jdaggett@8279 3635 performance is more important than precise appearance. However, in
jdaggett@8279 3636 well-designed modern implementations the use of kerning generally does not
jdaggett@8279 3637 have a large impact on text rendering speed.</p>
jdaggett@6176 3638 <!-- prop: font-variant-ligatures -->
jdaggett@6176 3639
jdaggett@6176 3640 <h3 id=font-variant-ligatures-prop><span class=secno>6.4 </span>Ligatures:
jdaggett@6176 3641 the <a href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
jdaggett@6176 3642 property</h3>
jdaggett@6176 3643
jdaggett@6436 3644 <table class=propdef id=namefont-variant-ligaturesvaluenormal-no>
jdaggett@6176 3645 <tbody>
jdaggett@6176 3646 <tr>
jdaggett@6176 3647 <td>Name:
jdaggett@6176 3648
jdaggett@6176 3649 <td><dfn id=propdef-font-variant-ligatures>font-variant-ligatures</dfn>
jdaggett@6176 3650
jdaggett@6176 3651 <tr>
jdaggett@6176 3652 <td>Value:
jdaggett@6176 3653
jdaggett@8278 3654 <td><a href="#font-variant-ligatures-normal-value"
jdaggett@8278 3655 title="normal!!font-variant-ligatures">normal</a> | <a
jdaggett@8278 3656 href="#font-variant-ligatures-none-value"
jdaggett@8278 3657 title="none!!font-variant-ligatures">none</a> | [ <a
jdaggett@8225 3658 href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a> ||
jdaggett@8225 3659 <a
jdaggett@8225 3660 href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
jdaggett@8225 3661 || <a
jdaggett@8225 3662 href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
jdaggett@8225 3663 || <a
jdaggett@8225 3664 href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
jdaggett@8225 3665 ]
jdaggett@6176 3666
jdaggett@6176 3667 <tr>
jdaggett@6176 3668 <td>Initial:
jdaggett@6176 3669
jdaggett@6176 3670 <td>normal
jdaggett@6176 3671
jdaggett@6176 3672 <tr>
jdaggett@6176 3673 <td>Applies to:
jdaggett@6176 3674
jdaggett@6176 3675 <td>all elements
jdaggett@6176 3676
jdaggett@6176 3677 <tr>
jdaggett@6176 3678 <td>Inherited:
jdaggett@6176 3679
jdaggett@6176 3680 <td>yes
jdaggett@6176 3681
jdaggett@6176 3682 <tr>
jdaggett@6176 3683 <td>Percentages:
jdaggett@6176 3684
jdaggett@6176 3685 <td>N/A
jdaggett@6176 3686
jdaggett@6176 3687 <tr>
jdaggett@6176 3688 <td>Media:
jdaggett@6176 3689
jdaggett@6176 3690 <td>visual
jdaggett@6176 3691
jdaggett@6176 3692 <tr>
jdaggett@6176 3693 <td>Computed value:
jdaggett@6176 3694
jdaggett@6176 3695 <td>as specified
jdaggett@7377 3696
jdaggett@7377 3697 <tr>
jdaggett@7377 3698 <td>Animatable:
jdaggett@7377 3699
jdaggett@7377 3700 <td>no
jdaggett@6176 3701 </table>
jdaggett@6176 3702
jdaggett@6436 3703 <p>Ligatures and contextual forms are ways of combining glyphs to produce
jdaggett@8276 3704 more harmonized forms.
jdaggett@6176 3705
jdaggett@6176 3706 <pre
jdaggett@8225 3707 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>
jdaggett@6176 3708
jdaggett@6176 3709 <pre
jdaggett@8225 3710 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>
jdaggett@6176 3711
jdaggett@6176 3712 <pre
jdaggett@8225 3713 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>
jdaggett@6176 3714
jdaggett@6176 3715 <pre
jdaggett@8225 3716 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>
jdaggett@6176 3717
jdaggett@6176 3718 <p>Individual values have the following meanings:
jdaggett@6176 3719
jdaggett@6176 3720 <dl>
jdaggett@8278 3721 <dt><dfn id=font-variant-ligatures-normal-value
jdaggett@8278 3722 title="normal!!font-variant-ligatures">normal</dfn>
jdaggett@8278 3723
jdaggett@8368 3724 <dd>A value of <a href="#font-variant-ligatures-normal-value"
jdaggett@8368 3725 title="normal!!font-variant-ligatures">‘<code
jdaggett@8368 3726 class=property>normal</code>’</a> specifies that common default
jdaggett@8279 3727 features are enabled, <a href="#font-feature-resolution">as described in
jdaggett@8279 3728 detail in the next section</a>. For OpenType fonts, common ligatures and
jdaggett@8279 3729 contextual forms are on by default, discretionary and historical
jdaggett@8279 3730 ligatures are not.
jdaggett@8278 3731
jdaggett@8278 3732 <dt><dfn id=font-variant-ligatures-none-value
jdaggett@8278 3733 title="none!!font-variant-ligatures">none</dfn>
jdaggett@8276 3734
jdaggett@8276 3735 <dd>Specifies that all types of ligatures and contextual forms covered by
jdaggett@8276 3736 this property are explicitly disabled. In situations where ligatures are
jdaggett@8276 3737 not considered necessary, this may improve the speed of text rendering.
jdaggett@8276 3738
jdaggett@6176 3739 <dt><dfn id=common-ligatures>common-ligatures</dfn>
jdaggett@6176 3740
jdaggett@6436 3741 <dd>Enables display of common ligatures (OpenType features: <span
jdaggett@6436 3742 class=tag>liga, clig</span>). For OpenType fonts, common ligatures are
jdaggett@6436 3743 enabled by default.
jdaggett@6176 3744 </dl>
jdaggett@6176 3745
jdaggett@6176 3746 <div class=featex><img alt="common ligature example" src=liga.png></div>
jdaggett@6176 3747
jdaggett@6176 3748 <dl>
jdaggett@6176 3749 <dt><dfn id=no-common-ligatures>no-common-ligatures</dfn>
jdaggett@6176 3750
jdaggett@6436 3751 <dd>Disables display of common ligatures (OpenType features: <span
jdaggett@6436 3752 class=tag>liga, clig</span>).
jdaggett@6176 3753
jdaggett@6176 3754 <dt><dfn id=discretionary-ligatures>discretionary-ligatures</dfn>
jdaggett@6176 3755
jdaggett@6436 3756 <dd>Enables display of discretionary ligatures (OpenType feature: <span
jdaggett@8277 3757 class=tag>dlig</span>). Which ligatures are discretionary or optional is
jdaggett@8277 3758 decided by the type designer, so authors will need to refer to the
jdaggett@6176 3759 documentation of a given font to understand which ligatures are
jdaggett@6176 3760 considered discretionary.
jdaggett@6176 3761 </dl>
jdaggett@6176 3762
jdaggett@6176 3763 <div class=featex><img alt="discretionary ligature example" src=dlig.png></div>
jdaggett@6176 3764
jdaggett@6176 3765 <dl>
jdaggett@6176 3766 <dt><dfn id=no-discretionary-ligatures>no-discretionary-ligatures</dfn>
jdaggett@6176 3767
jdaggett@6436 3768 <dd>Disables display of discretionary ligatures (OpenType feature: <span
jdaggett@6436 3769 class=tag>dlig</span>).
jdaggett@6176 3770
jdaggett@6176 3771 <dt><dfn id=historical-ligatures>historical-ligatures</dfn>
jdaggett@6176 3772
jdaggett@6436 3773 <dd>Enables display of historical ligatures (OpenType feature: <span
jdaggett@6436 3774 class=tag>hlig</span>).
jdaggett@6176 3775 </dl>
jdaggett@6176 3776
jdaggett@6176 3777 <div class=featex><img alt="historical ligature example" src=hlig.png></div>
jdaggett@6176 3778
jdaggett@6176 3779 <dl>
jdaggett@6176 3780 <dt><dfn id=no-historical-ligatures>no-historical-ligatures</dfn>
jdaggett@6176 3781
jdaggett@6436 3782 <dd>Disables display of historical ligatures (OpenType feature: <span
jdaggett@6436 3783 class=tag>hlig</span>).
jdaggett@6176 3784
jdaggett@6176 3785 <dt><dfn id=contextual>contextual</dfn>
jdaggett@6176 3786
jdaggett@6436 3787 <dd>Enables display of contextual alternates (OpenType feature: <span
jdaggett@6436 3788 class=tag>calt</span>). Although not strictly a ligature feature, like
jdaggett@6176 3789 ligatures this feature is commonly used to harmonize the shapes of glyphs
jdaggett@6436 3790 with the surrounding context. For OpenType fonts, this feature is on by
jdaggett@6436 3791 default.
jdaggett@6176 3792 </dl>
jdaggett@6176 3793
jdaggett@6176 3794 <div class=featex><img alt="contextual alternate example" src=calt.png></div>
jdaggett@6176 3795
jdaggett@6176 3796 <dl>
jdaggett@6176 3797 <dt><dfn id=no-contextual>no-contextual</dfn>
jdaggett@6176 3798
jdaggett@6436 3799 <dd>Disables display of contextual alternates (OpenType feature: <span
jdaggett@6436 3800 class=tag>calt</span>).
jdaggett@6176 3801 </dl>
jdaggett@6176 3802
jdaggett@6176 3803 <p>Required ligatures, needed for correctly rendering complex scripts, are
jdaggett@8278 3804 not affected by the settings above, including ‘<code
jdaggett@8278 3805 class=property>none</code>’ (OpenType feature: <span
jdaggett@6436 3806 class=tag>rlig</span>).</p>
jdaggett@3460 3807 <!-- prop: font-variant-position -->
jdaggett@3460 3808
jdaggett@6176 3809 <h3 id=font-variant-position-prop><span class=secno>6.5 </span>Subscript
jdaggett@3638 3810 and superscript forms: the <a
jdaggett@3460 3811 href="#propdef-font-variant-position">font-variant-position</a> property</h3>
jdaggett@3460 3812
jdaggett@4624 3813 <table class=propdef id=namefont-variant-positionvaluenormal-sub>
jdaggett@1662 3814 <tbody>
jdaggett@1662 3815 <tr>
jdaggett@1662 3816 <td>Name:
jdaggett@1662 3817
jdaggett@3460 3818 <td><dfn id=propdef-font-variant-position>font-variant-position</dfn>
jdaggett@1662 3819
jdaggett@1662 3820 <tr>
jdaggett@1662 3821 <td>Value:
jdaggett@1662 3822
jdaggett@8368 3823 <td><a href="#font-variant-position-normal-value"
jdaggett@8368 3824 title="normal!!font-variant-position">normal</a> | <a
jdaggett@8279 3825 href="#sub">sub</a> | <a href="#super">super</a>
jdaggett@1732 3826
jdaggett@1732 3827 <tr>
jdaggett@1732 3828 <td>Initial:
jdaggett@1732 3829
jdaggett@1732 3830 <td>normal
jdaggett@1732 3831
jdaggett@1732 3832 <tr>
jdaggett@1732 3833 <td>Applies to:
jdaggett@1732 3834
jdaggett@1732 3835 <td>all elements
jdaggett@1732 3836
jdaggett@1732 3837 <tr>
jdaggett@1732 3838 <td>Inherited:
jdaggett@1732 3839
jdaggett@1732 3840 <td>yes
jdaggett@1732 3841
jdaggett@1732 3842 <tr>
jdaggett@1732 3843 <td>Percentages:
jdaggett@1732 3844
jdaggett@1732 3845 <td>N/A
jdaggett@1732 3846
jdaggett@1732 3847 <tr>
jdaggett@1732 3848 <td>Media:
jdaggett@1732 3849
jdaggett@1732 3850 <td>visual
jdaggett@1732 3851
jdaggett@1732 3852 <tr>
jdaggett@1732 3853 <td>Computed value:
jdaggett@1732 3854
jdaggett@1732 3855 <td>as specified
jdaggett@7377 3856
jdaggett@7377 3857 <tr>
jdaggett@7377 3858 <td>Animatable:
jdaggett@7377 3859
jdaggett@7377 3860 <td>no
jdaggett@1732 3861 </table>
jdaggett@1732 3862
jdaggett@5890 3863 <p>This property is used to enable typographic subscript and superscript
jdaggett@5890 3864 glyphs. These are alternate glyphs designed within the same em-box as
jdaggett@5890 3865 default glyphs and are intended to be laid out on the same baseline as the
jdaggett@5890 3866 default glyphs, with no resizing or repositioning of the baseline. They
jdaggett@5890 3867 are explicitly designed to match the surrounding text and to be more
jdaggett@5890 3868 readable without affecting the line height.
jdaggett@3511 3869
jdaggett@3511 3870 <div class=figure><img alt="comparison between real subscript glyphs and
jdaggett@3511 3871 synthesized ones" src=realsubscripts.png>
jdaggett@3511 3872 <p class=caption>Subscript glyphs (top) vs. typical synthesized subscripts
jdaggett@3511 3873 (bottom)
jdaggett@3511 3874 </div>
jdaggett@3460 3875
jdaggett@8279 3876 <p>Individual values have the following meanings:
jdaggett@8279 3877
jdaggett@8279 3878 <dl>
jdaggett@8368 3879 <dt><dfn id=font-variant-position-normal-value
jdaggett@8368 3880 title="normal!!font-variant-position">normal</dfn>
jdaggett@8279 3881
jdaggett@8279 3882 <dd>None of the features listed below are enabled.
jdaggett@8279 3883
jdaggett@8279 3884 <dt><dfn id=sub>sub</dfn>
jdaggett@8279 3885
jdaggett@8279 3886 <dd>Enables display of subscript variants (OpenType feature: <span
jdaggett@8279 3887 class=tag>subs</span>).
jdaggett@8279 3888
jdaggett@8279 3889 <dt><dfn id=super>super</dfn>
jdaggett@8279 3890
jdaggett@8279 3891 <dd>Enables display of superscript variants (OpenType feature: <span
jdaggett@8279 3892 class=tag>sups</span>).
jdaggett@8279 3893 </dl>
jdaggett@5890 3894
jdaggett@5890 3895 <p>Because of the semantic nature of subscripts and superscripts, when the
jdaggett@8279 3896 value is either ‘<a href="#sub"><code class=property>sub</code></a>’
jdaggett@8279 3897 or ‘<a href="#super"><code class=property>super</code></a>’ for a
jdaggett@8279 3898 given contiguous run of text, if a variant glyph is not available for all
jdaggett@8279 3899 the characters in the run, simulated glyphs must be synthesized for all
jdaggett@8279 3900 characters using reduced forms of the glyphs that would be used without
jdaggett@8280 3901 this feature applied. This is done per run to avoid a mixture of variant
jdaggett@8280 3902 glyphs and synthesized ones that would not align correctly. In the case of
jdaggett@8280 3903 OpenType fonts that lack subscript or superscript glyphs for a given
jdaggett@8280 3904 character, user agents must use the appropriate subscript and superscript
jdaggett@8280 3905 metrics specified in the selected font's <a
jdaggett@3460 3906 href="http://www.microsoft.com/typography/otspec/os2.htm#subxs">OS/2
jdaggett@3460 3907 table</a> <a href="#OPENTYPE"
jdaggett@5891 3908 rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a> to calculate the size
jdaggett@5891 3909 and offset of the synthesized substitutes.
jdaggett@2461 3910
jdaggett@8280 3911 <div class=figure><img alt="alternate superscripts vs. glyphs synthesized
jdaggett@8280 3912 using superscript metrics" src=superscript-alt-synth.png>
jdaggett@8280 3913 <p class=caption>Superscript alternate glyph (left), synthesized
jdaggett@8280 3914 superscript glyphs (middle), and incorrect mixture of the two (right)
jdaggett@8280 3915 </div>
jdaggett@8280 3916
jdaggett@8385 3917 <p>In situations where text decorations are only applied to runs of text
jdaggett@8385 3918 containing superscript or subscript glyphs, the synthesized glyphs must be
jdaggett@8385 3919 used to avoid problems with the placement of decorations.
jdaggett@8385 3920
jdaggett@2461 3921 <p>In the past, user agents have used font-size and vertical-align to
jdaggett@8368 3922 simulate subscripts and superscripts for the <code title="HTML sub
jdaggett@8368 3923 element">sub</code> and <code title="HTML sup element">sup</code>
jdaggett@8368 3924 elements. To allow a backwards compatible way of defining subscripts and
jdaggett@8368 3925 superscripts, it is recommended that authors use conditional rules <a
jdaggett@8368 3926 href="#CSS3-CONDITIONAL"
jdaggett@3460 3927 rel=biblioentry>[CSS3-CONDITIONAL]<!--{{CSS3-CONDITIONAL}}--></a> so that
jdaggett@5890 3928 older user agents will still render subscripts and superscripts via the
jdaggett@5890 3929 older mechanism.
jdaggett@5890 3930
jdaggett@5890 3931 <p>Authors should note that fonts typically only provide subscript and
jdaggett@5890 3932 superscript glyphs for a subset of all characters supported by the font.
jdaggett@8280 3933 For example, while subscript and superscript glyphs are often available
jdaggett@8280 3934 for Latin numbers, glyphs for punctuation and letter characters are less
jdaggett@8280 3935 frequently provided. The synthetic fallback rules defined for this
jdaggett@8280 3936 property assure that subscripts and superscripts will always appear but
jdaggett@8280 3937 the appearance may not match author expectations if the font used does not
jdaggett@8280 3938 provide the appropriate alternate glyph for all characters contained in a
jdaggett@8280 3939 subscript or superscript.
jdaggett@8280 3940
jdaggett@8280 3941 <p>This property is not cumulative. Applying it to elements within a
jdaggett@5890 3942 subscript or superscript won't nest the placement of a subscript or
jdaggett@5890 3943 superscript glyph. Images contained within text runs where the value of
jdaggett@8279 3944 this property is ‘<a href="#sub"><code class=property>sub</code></a>’
jdaggett@8279 3945 or ‘<a href="#super"><code class=property>super</code></a>’ will be
jdaggett@8368 3946 drawn just as they would if the value was <a
jdaggett@8368 3947 href="#font-variant-position-normal-value"
jdaggett@8368 3948 title="normal!!font-variant-position">‘<code
jdaggett@8368 3949 class=property>normal</code>’</a>.</p>
jdaggett@8364 3950 <!-- due to lack of consensus, couldn't resolve on exact positioning of text decorations:
jdaggett@8364 3951 http://www.w3.org/2013/06/06-css-minutes.html#item03 -->
jdaggett@8280 3952
jdaggett@8280 3953 <p>Because of these limitations, ‘<a
jdaggett@8280 3954 href="#propdef-font-variant-position"><code
jdaggett@8280 3955 class=property>font-variant-position</code></a>’ is not recommended for
jdaggett@8280 3956 use in user agent stylesheets. Authors should use it in cases where
jdaggett@5890 3957 subscripts or superscripts will only contain the narrow range of
jdaggett@5890 3958 characters supported by the fonts specified.
jdaggett@2509 3959
jdaggett@8368 3960 <p class=note>The variant glyphs use the same baseline as the default
jdaggett@8368 3961 glyphs would use. There is no shift in the placement along the baseline,
jdaggett@8368 3962 so the use of variant glyphs doesn't affect the height of the inline box
jdaggett@8368 3963 or alter the height of the linebox. This makes superscript and subscript
jdaggett@8368 3964 variants ideal for situations where it's important that leading remain
jdaggett@8368 3965 constant, such as in multi-column layout.
jdaggett@8368 3966
jdaggett@2461 3967 <div class=example>
jdaggett@8279 3968 <p>A typical user agent default style for the <a class=tag
jdaggett@8279 3969 href="#sub">sub</a> element:</p>
jdaggett@2461 3970
jdaggett@2461 3971 <pre>sub {
jdaggett@2461 3972 vertical-align: sub;
jdaggett@2461 3973 font-size: smaller;
jdaggett@2461 3974 line-height: normal;
jdaggett@2461 3975 }
jdaggett@2461 3976 </pre>
jdaggett@2461 3977
jdaggett@3460 3978 <p>Using font-variant-position to specify typographic subscripts in a way
jdaggett@3460 3979 that will still show subscripts in older user agents:</p>
jdaggett@3460 3980
jdaggett@3460 3981 <pre>@supports ( font-variant-position: sub ) {
jdaggett@3460 3982
jdaggett@3460 3983 sub {
jdaggett@8280 3984 vertical-align: baseline;
jdaggett@3460 3985 font-size: 100%;
jdaggett@3460 3986 line-height: inherit;
jdaggett@3460 3987 font-variant-position: sub;
jdaggett@3460 3988 }
jdaggett@3460 3989
jdaggett@2461 3990 }
jdaggett@2461 3991 </pre>
jdaggett@2461 3992
jdaggett@4624 3993 <p>User agents that support the ‘<a
jdaggett@4624 3994 href="#propdef-font-variant-position"><code
jdaggett@4624 3995 class=property>font-variant-position</code></a>’ property will select a
jdaggett@4624 3996 subscript variant glyph and render this without adjusting the baseline or
jdaggett@4624 3997 font-size. Older user agents will ignore the ‘<a
jdaggett@4624 3998 href="#propdef-font-variant-position"><code
jdaggett@4624 3999 class=property>font-variant-position</code></a>’ property definition
jdaggett@4624 4000 and use the standard defaults for subscripts.</p>
jdaggett@2461 4001 </div>
jdaggett@2118 4002 <!-- prop: font-variant-caps -->
jdaggett@2118 4003
jdaggett@2118 4004 <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
jdaggett@1662 4005 the <a href="#propdef-font-variant-caps">font-variant-caps</a> property</h3>
jdaggett@1662 4006
jdaggett@5809 4007 <table class=propdef id=namefont-variant-capsvaluenormal-small-c>
jdaggett@1662 4008 <tbody>
jdaggett@1662 4009 <tr>
jdaggett@1662 4010 <td>Name:
jdaggett@1662 4011
jdaggett@1662 4012 <td><dfn id=propdef-font-variant-caps>font-variant-caps</dfn>
jdaggett@1662 4013
jdaggett@1662 4014 <tr>
jdaggett@1662 4015 <td>Value:
jdaggett@1662 4016
jdaggett@8278 4017 <td><a href="#font-variant-caps-normal-value"
jdaggett@8278 4018 title="normal!!font-variant-caps">normal</a> | <a
jdaggett@8278 4019 href="#small-caps">small-caps</a> | <a
jdaggett@8278 4020 href="#all-small-caps">all-small-caps</a> | <a
jdaggett@8278 4021 href="#petite-caps">petite-caps</a> | <a
jdaggett@8278 4022 href="#all-petite-caps">all-petite-caps</a> | <a
jdaggett@8278 4023 href="#unicase">unicase</a> | <a href="#titling-caps">titling-caps</a>
jdaggett@1662 4024
jdaggett@1662 4025 <tr>
jdaggett@1662 4026 <td>Initial:
jdaggett@1662 4027
jdaggett@1662 4028 <td>normal
jdaggett@1662 4029
jdaggett@1662 4030 <tr>
jdaggett@1662 4031 <td>Applies to:
jdaggett@1662 4032
jdaggett@1662 4033 <td>all elements
jdaggett@1662 4034
jdaggett@1662 4035 <tr>
jdaggett@1662 4036 <td>Inherited:
jdaggett@1662 4037
jdaggett@1662 4038 <td>yes
jdaggett@1662 4039
jdaggett@1662 4040 <tr>
jdaggett@1662 4041 <td>Percentages:
jdaggett@1662 4042
jdaggett@1662 4043 <td>N/A
jdaggett@1662 4044
jdaggett@1662 4045 <tr>
jdaggett@1662 4046 <td>Media:
jdaggett@1662 4047
jdaggett@1662 4048 <td>visual
jdaggett@1662 4049
jdaggett@1662 4050 <tr>
jdaggett@1662 4051 <td>Computed value:
jdaggett@1662 4052
jdaggett@1662 4053 <td>as specified
jdaggett@7377 4054
jdaggett@7377 4055 <tr>
jdaggett@7377 4056 <td>Animatable:
jdaggett@7377 4057
jdaggett@7377 4058 <td>no
jdaggett@1662 4059 </table>
jdaggett@1662 4060
jdaggett@8280 4061 <p>This property allows the selection of alternate glyphs used for small or
jdaggett@8280 4062 petite capitals or for titling. These glyphs are specifically designed to
jdaggett@8280 4063 blend well with the surrounding normal glyphs, to maintain the weight and
jdaggett@8280 4064 readability which suffers when text is simply resized to fit this purpose.
jdaggett@1662 4065
jdaggett@1732 4066 <p>Individual values have the following meanings:
jdaggett@1662 4067
jdaggett@1662 4068 <dl>
jdaggett@8278 4069 <dt><dfn id=font-variant-caps-normal-value
jdaggett@8278 4070 title="normal!!font-variant-caps">normal</dfn>
jdaggett@5809 4071
jdaggett@5809 4072 <dd>None of the features listed below are enabled.
jdaggett@5809 4073
jdaggett@1662 4074 <dt><dfn id=small-caps>small-caps</dfn>
jdaggett@1662 4075
jdaggett@6436 4076 <dd>Enables display of small capitals (OpenType feature: <span
jdaggett@6436 4077 class=tag>smcp</span>). Small-caps glyphs typically use the form of
jdaggett@6436 4078 uppercase letters but are reduced to the size of lowercase letters.
jdaggett@1662 4079 </dl>
jdaggett@1662 4080
jdaggett@1662 4081 <div class=featex><img alt="small-caps example" src=smcp.png></div>
jdaggett@1662 4082
jdaggett@1662 4083 <dl>
jdaggett@1732 4084 <dt><dfn id=all-small-caps>all-small-caps</dfn>
jdaggett@1732 4085
jdaggett@1732 4086 <dd>Enables display of small capitals for both upper and lowercase letters
jdaggett@6436 4087 (OpenType features: <span class=tag>c2sc, smcp</span>).
jdaggett@1732 4088
jdaggett@1662 4089 <dt><dfn id=petite-caps>petite-caps</dfn>
jdaggett@1662 4090
jdaggett@6436 4091 <dd>Enables display of petite capitals (OpenType feature: <span
jdaggett@6436 4092 class=tag>pcap</span>).
jdaggett@1662 4093
jdaggett@1732 4094 <dt><dfn id=all-petite-caps>all-petite-caps</dfn>
jdaggett@1732 4095
jdaggett@1732 4096 <dd>Enables display of petite capitals for both upper and lowercase
jdaggett@6436 4097 letters (OpenType features: <span class=tag>c2pc, pcap</span>).
jdaggett@1732 4098
jdaggett@6648 4099 <dt><dfn id=unicase>unicase</dfn>
jdaggett@6648 4100
jdaggett@6648 4101 <dd>Enables display of mixture of small capitals for uppercase letters
jdaggett@6648 4102 with normal lowercase letters (OpenType feature: <span
jdaggett@6648 4103 class=tag>unic</span>).
jdaggett@6648 4104
jdaggett@1662 4105 <dt><dfn id=titling-caps>titling-caps</dfn>
jdaggett@1662 4106
jdaggett@6436 4107 <dd>Enables display of titling capitals (OpenType feature: <span
jdaggett@6436 4108 class=tag>titl</span>). Uppercase letter glyphs are often designed for
jdaggett@6436 4109 use with lowercase letters. When used in all uppercase titling sequences
jdaggett@6436 4110 they can appear too strong. Titling capitals are designed specifically
jdaggett@6436 4111 for this situation.
jdaggett@1662 4112 </dl>
jdaggett@1662 4113
jdaggett@6648 4114 <p>The availability of these glyphs is based on whether a given feature is
jdaggett@6648 4115 defined or not in the feature list of the font. User agents can optionally
jdaggett@6648 4116 decide this on a per-script basis but should explicitly not decide this on
jdaggett@6648 4117 a per-character basis.
jdaggett@6648 4118
jdaggett@6648 4119 <p>Some fonts may only support a subset or none of the features described
jdaggett@6648 4120 for this property. For backwards compatibility with CSS 2.1, if ‘<a
jdaggett@4624 4121 href="#small-caps"><code class=property>small-caps</code></a>’ or ‘<a
jdaggett@4624 4122 href="#all-small-caps"><code class=property>all-small-caps</code></a>’
jdaggett@4624 4123 is specified but small-caps glyphs are not available for a given font,
jdaggett@4624 4124 user agents should simulate a small-caps font, for example by taking a
jdaggett@6648 4125 normal font and replacing the glyphs for lowercase letters with scaled
jdaggett@6648 4126 versions of the glyphs for uppercase characters (replacing the glyphs for
jdaggett@6648 4127 both upper and lowercase letters in the case of ‘<a
jdaggett@4624 4128 href="#all-small-caps"><code class=property>all-small-caps</code></a>’).
jdaggett@6648 4129
jdaggett@6648 4130 <div class=figure style="padding: 0; margin: auto;"><img alt="synthetic vs.
jdaggett@6648 4131 real small-caps" class=hires src=synthetic-vs-real-small-caps.png
jdaggett@6648 4132 width=512px>
jdaggett@6648 4133 <p class=caption>Synthetic vs. real small-caps
jdaggett@6648 4134 </div>
jdaggett@6648 4135
jdaggett@6648 4136 <p>To match the surrounding text, a font may provide alternate glyphs for
jdaggett@6648 4137 caseless characters when these features are enabled but when a user agent
jdaggett@6648 4138 simulates small capitals, it must not attempt to simulate alternates for
jdaggett@6648 4139 codepoints which are considered caseless.
jdaggett@6648 4140
jdaggett@6648 4141 <div class=figure style="padding: 0; margin: auto;"><img alt="caseless
jdaggett@6648 4142 characters with small-caps, all-small-caps enabled" class=hires
jdaggett@6648 4143 src=small-capitals-variations.png width=418px>
jdaggett@6648 4144 <p class=caption>Caseless characters with small-caps, all-small-caps
jdaggett@6648 4145 enabled
jdaggett@6648 4146 </div>
jdaggett@6648 4147
jdaggett@6648 4148 <p>If either ‘<a href="#petite-caps"><code
jdaggett@4624 4149 class=property>petite-caps</code></a>’ or ‘<a
jdaggett@4624 4150 href="#all-petite-caps"><code class=property>all-petite-caps</code></a>’
jdaggett@4624 4151 is specified for a font that doesn't support these features, the property
jdaggett@4624 4152 behaves as if ‘<a href="#small-caps"><code
jdaggett@4624 4153 class=property>small-caps</code></a>’ or ‘<a
jdaggett@4624 4154 href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
jdaggett@6648 4155 respectively, had been specified. If ‘<a href="#unicase"><code
jdaggett@6648 4156 class=property>unicase</code></a>’ is specified for a font that doesn't
jdaggett@6648 4157 support that feature, the property behaves as if ‘<a
jdaggett@6648 4158 href="#small-caps"><code class=property>small-caps</code></a>’ was
jdaggett@6648 4159 applied only to lowercased uppercase letters. If ‘<a
jdaggett@6648 4160 href="#titling-caps"><code class=property>titling-caps</code></a>’ is
jdaggett@6648 4161 specified with a font that does not support this feature, this property
jdaggett@6648 4162 has no visible effect. When simulated small capital glyphs are used, for
jdaggett@4624 4163 scripts that lack uppercase and lowercase letters, ‘<a
jdaggett@4624 4164 href="#small-caps"><code class=property>small-caps</code></a>’, ‘<a
jdaggett@4624 4165 href="#all-small-caps"><code class=property>all-small-caps</code></a>’,
jdaggett@4624 4166 ‘<a href="#petite-caps"><code class=property>petite-caps</code></a>’,
jdaggett@4624 4167 ‘<a href="#all-petite-caps"><code
jdaggett@4624 4168 class=property>all-petite-caps</code></a>’ and ‘<a
jdaggett@4624 4169 href="#unicase"><code class=property>unicase</code></a>’ have no visible
jdaggett@2462 4170 effect.
jdaggett@1662 4171
jdaggett@6648 4172 <p>When casing transforms are used to simulate small capitals, the casing
jdaggett@8280 4173 transformations must match those used for the <span
jdaggett@6648 4174 class=property>‘<code class=property>text-transform</code>’</span>
jdaggett@6648 4175 property.
jdaggett@6648 4176
jdaggett@6648 4177 <p>As a last resort, unscaled uppercase letter glyphs in a normal font may
jdaggett@6648 4178 replace glyphs in a small-caps font so that the text appears in all
jdaggett@6648 4179 uppercase letters.
jdaggett@6648 4180
jdaggett@6648 4181 <div class=figure style="padding: 0; margin: auto;"><img alt="using
jdaggett@6648 4182 all-small-caps in acronym-laden text" class=hires
jdaggett@6648 4183 src=acronym-laden-text.png width=596px>
jdaggett@6648 4184 <p class=caption>Using small capitals to improve readability in
jdaggett@6648 4185 acronym-laden text
jdaggett@6648 4186 </div>
jdaggett@6648 4187
jdaggett@1662 4188 <div class=example>
jdaggett@1662 4189 <p>Quotes rendered italicised, with small-caps on the first line:</p>
jdaggett@1662 4190
jdaggett@1662 4191 <pre>blockquote { font-style: italic; }
jdaggett@1662 4192 blockquote:first-line { font-variant: small-caps; }
jdaggett@1662 4193
jdaggett@1662 4194 &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>
jdaggett@1662 4195 </pre>
jdaggett@1662 4196 </div>
jdaggett@2118 4197 <!-- prop: font-variant-numeric -->
jdaggett@2118 4198
jdaggett@2118 4199 <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
jdaggett@1662 4200 formatting: the <a
jdaggett@1662 4201 href="#propdef-font-variant-numeric">font-variant-numeric</a> property</h3>
jdaggett@1662 4202
jdaggett@5809 4203 <table class=propdef id=namefont-variant-numericvaluenormal-ltnu>
jdaggett@1662 4204 <tbody>
jdaggett@1662 4205 <tr>
jdaggett@1662 4206 <td>Name:
jdaggett@1662 4207
jdaggett@1662 4208 <td><dfn id=propdef-font-variant-numeric>font-variant-numeric</dfn>
jdaggett@1662 4209
jdaggett@1662 4210 <tr>
jdaggett@1662 4211 <td>Value:
jdaggett@1662 4212
jdaggett@8278 4213 <td><a href="#font-variant-numeric-normal-value"
jdaggett@8278 4214 title="normal!!font-variant-numeric">normal</a> | [ <a
jdaggett@8225 4215 href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
jdaggett@8225 4216 || <a
jdaggett@8225 4217 href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
jdaggett@8225 4218 || <a
jdaggett@8225 4219 href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
jdaggett@8225 4220 || <a href="#ordinal">ordinal</a> || <a
jdaggett@8225 4221 href="#slashed-zero">slashed-zero</a> ]
jdaggett@1662 4222
jdaggett@1662 4223 <tr>
jdaggett@1662 4224 <td>Initial:
jdaggett@1662 4225
jdaggett@1662 4226 <td>normal
jdaggett@1662 4227
jdaggett@1662 4228 <tr>
jdaggett@1662 4229 <td>Applies to:
jdaggett@1662 4230
jdaggett@1662 4231 <td>all elements
jdaggett@1662 4232
jdaggett@1662 4233 <tr>
jdaggett@1662 4234 <td>Inherited:
jdaggett@1662 4235
jdaggett@1662 4236 <td>yes
jdaggett@1662 4237
jdaggett@1662 4238 <tr>
jdaggett@1662 4239 <td>Percentages:
jdaggett@1662 4240
jdaggett@1662 4241 <td>N/A
jdaggett@1662 4242
jdaggett@1662 4243 <tr>
jdaggett@1662 4244 <td>Media:
jdaggett@1662 4245
jdaggett@1662 4246 <td>visual
jdaggett@1662 4247
jdaggett@1662 4248 <tr>
jdaggett@1662 4249 <td>Computed value:
jdaggett@1662 4250
jdaggett@1662 4251 <td>as specified
jdaggett@7377 4252
jdaggett@7377 4253 <tr>
jdaggett@7377 4254 <td>Animatable:
jdaggett@7377 4255
jdaggett@7377 4256 <td>no
jdaggett@1662 4257 </table>
jdaggett@1662 4258
jdaggett@8311 4259 <p>Specifies control over numerical forms. The example below shows how some
jdaggett@8311 4260 of these values can be combined to influence the rendering of tabular data
jdaggett@8311 4261 with fonts that support these features. Within normal paragraph text,
jdaggett@8311 4262 proportional numbers are used while tabular numbers are used so that
jdaggett@8311 4263 columns of numbers line up properly:
jdaggett@1662 4264
jdaggett@1662 4265 <div class=figure style="padding: 0; margin: auto;"><img alt="combining
jdaggett@1662 4266 number styles" src=numberstyles.png>
jdaggett@1662 4267 <p class=caption>Using number styles
jdaggett@1662 4268 </div>
jdaggett@1662 4269
jdaggett@8311 4270 <p>Possible combinations:
jdaggett@8311 4271
jdaggett@8311 4272 <pre
jdaggett@8311 4273 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>
jdaggett@8311 4274
jdaggett@8311 4275 <pre
jdaggett@8311 4276 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>
jdaggett@8311 4277
jdaggett@8311 4278 <pre
jdaggett@8311 4279 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>
jdaggett@8311 4280
jdaggett@8311 4281 <p>Individual values have the following meanings:
jdaggett@8311 4282
jdaggett@1662 4283 <dl>
jdaggett@8311 4284 <dt><dfn id=font-variant-numeric-normal-value
jdaggett@8311 4285 title="normal!!font-variant-numeric">normal</dfn>
jdaggett@8311 4286
jdaggett@8311 4287 <dd>None of the features listed below are enabled.
jdaggett@8311 4288
jdaggett@8311 4289 <dt><dfn id=lining-nums>lining-nums</dfn>
jdaggett@8311 4290
jdaggett@8311 4291 <dd>Enables display of lining numerals (OpenType feature: <span
jdaggett@8311 4292 class=tag>lnum</span>).
jdaggett@8311 4293
jdaggett@8311 4294 <dt><dfn id=oldstyle-nums>oldstyle-nums</dfn>
jdaggett@8311 4295
jdaggett@8311 4296 <dd>Enables display of old-style numerals (OpenType feature: <span
jdaggett@8311 4297 class=tag>onum</span>).
jdaggett@8311 4298
jdaggett@8311 4299 <dt><dfn id=proportional-nums>proportional-nums</dfn>
jdaggett@8311 4300
jdaggett@8311 4301 <dd>Enables display of proportional numerals (OpenType feature: <span
jdaggett@8311 4302 class=tag>pnum</span>).
jdaggett@8311 4303
jdaggett@8311 4304 <dt><dfn id=tabular-nums>tabular-nums</dfn>
jdaggett@8311 4305
jdaggett@8311 4306 <dd>Enables display of tabular numerals (OpenType feature: <span
jdaggett@8311 4307 class=tag>tnum</span>).
jdaggett@8311 4308
jdaggett@1662 4309 <dt><dfn id=diagonal-fractions>diagonal-fractions</dfn>
jdaggett@1662 4310
jdaggett@6436 4311 <dd>Enables display of lining diagonal fractions (OpenType feature: <span
jdaggett@6436 4312 class=tag>frac</span>).
jdaggett@1662 4313 </dl>
jdaggett@1662 4314
jdaggett@1662 4315 <div class=featex><img alt="diagonal fraction example" src=frac.png></div>
jdaggett@1662 4316
jdaggett@1662 4317 <dl>
jdaggett@1662 4318 <dt><dfn id=stacked-fractions>stacked-fractions</dfn>
jdaggett@1662 4319
jdaggett@6436 4320 <dd>Enables display of lining stacked fractions (OpenType feature: <span
jdaggett@6436 4321 class=tag>afrc</span>).
jdaggett@1662 4322 </dl>
jdaggett@1662 4323
jdaggett@1662 4324 <div class=featex><img alt="stacked fraction example" src=afrc.png></div>
jdaggett@1662 4325
jdaggett@1662 4326 <dl>
jdaggett@3638 4327 <dt><dfn id=ordinal>ordinal</dfn>
jdaggett@3638 4328
jdaggett@3638 4329 <dd>Enables display of forms used with ordinal numbers (OpenType feature:
jdaggett@6436 4330 <span class=tag>ordn</span>).
jdaggett@3638 4331
jdaggett@1662 4332 <dt><dfn id=slashed-zero>slashed-zero</dfn>
jdaggett@1662 4333
jdaggett@6436 4334 <dd>Enables display of slashed zeros (OpenType feature: <span
jdaggett@6436 4335 class=tag>zero</span>).
jdaggett@1662 4336 </dl>
jdaggett@1662 4337
jdaggett@1662 4338 <div class=featex><img alt="slashed zero example" src=zero.png></div>
jdaggett@1662 4339
jdaggett@1662 4340 <div class=example id=steak-marinade>
jdaggett@1662 4341 <p>A simple flank steak marinade recipe, rendered with automatic fractions
jdaggett@1662 4342 and old-style numerals:</p>
jdaggett@1662 4343
jdaggett@1662 4344 <pre>.amount { font-variant-numeric: oldstyle-nums diagonal-fractions; }
jdaggett@1662 4345
jdaggett@1662 4346 &lt;h4>Steak marinade:&lt;/h4>
jdaggett@1662 4347 &lt;ul>
jdaggett@1662 4348 &lt;li>&lt;span class="amount">2&lt;/span> tbsp olive oil&lt;/li>
jdaggett@1662 4349 &lt;li>&lt;span class="amount">1&lt;/span> tbsp lemon juice&lt;/li>
jdaggett@1662 4350 &lt;li>&lt;span class="amount">1&lt;/span> tbsp soy sauce&lt;/li>
jdaggett@1662 4351 &lt;li>&lt;span class="amount">1 1/2&lt;/span> tbsp dry minced onion&lt;/li>
jdaggett@1662 4352 &lt;li>&lt;span class="amount">2 1/2&lt;/span> tsp italian seasoning&lt;/li>
jdaggett@1732 4353 &lt;li>Salt &amp;amp; pepper&lt;/li>
jdaggett@1662 4354 &lt;/ul>
jdaggett@1662 4355
jdaggett@5596 4356 &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator
jdaggett@5596 4357 for a few hours or overnight.&lt;/p>
jdaggett@1662 4358 </pre>
jdaggett@8311 4359
jdaggett@8311 4360 <p>Note that the fraction feature is only applied to values not the entire
jdaggett@8311 4361 paragraph. Fonts often implement this feature using contextual rules
jdaggett@8311 4362 based on the use of the slash (‘<code class=css>/</code>’) character.
jdaggett@8311 4363 As such, it's not suitable for use as a paragraph-level style.</p>
jdaggett@1662 4364 </div>
jdaggett@2118 4365 <!-- prop: font-variant-alternates -->
jdaggett@2118 4366
jdaggett@2118 4367 <h3 id=font-variant-alternates-prop><span class=secno>6.8 </span>Alternates
jdaggett@2118 4368 and swashes: the <a
jdaggett@2118 4369 href="#propdef-font-variant-alternates">font-variant-alternates</a>
jdaggett@2118 4370 property</h3>
jdaggett@2118 4371
jdaggett@6176 4372 <table class=propdef id=namefont-variant-alternatesvaluenormal-s>
jdaggett@2118 4373 <tbody>
jdaggett@2118 4374 <tr>
jdaggett@2118 4375 <td>Name:
jdaggett@2118 4376
jdaggett@2118 4377 <td><dfn
jdaggett@2118 4378 id=propdef-font-variant-alternates>font-variant-alternates</dfn>
jdaggett@2118 4379
jdaggett@2118 4380 <tr>
jdaggett@2118 4381 <td>Value:
jdaggett@2118 4382
jdaggett@8225 4383 <td>normal | [ <a href="#stylistic"
jdaggett@8225 4384 title=stylistic>stylistic(&lt;feature-value-name&gt;)</a> || <a
jdaggett@8225 4385 href="#historical-forms">historical-forms</a> || <a href="#styleset"
jdaggett@8225 4386 title=styleset>styleset(&lt;feature-value-name&gt; #)</a> || <a
jdaggett@8225 4387 href="#character-variant"
jdaggett@8225 4388 title=character-variant>character-variant(&lt;feature-value-name&gt;
jdaggett@8225 4389 #)</a> || <a href="#swash"
jdaggett@8225 4390 title=swash>swash(&lt;feature-value-name&gt;)</a> || <a
jdaggett@8225 4391 href="#ornaments"
jdaggett@8225 4392 title=ornaments>ornaments(&lt;feature-value-name&gt;)</a> || <a
jdaggett@8225 4393 href="#annotation"
jdaggett@8225 4394 title=annotation>annotation(&lt;feature-value-name&gt;)</a> ]
jdaggett@2118 4395
jdaggett@2118 4396 <tr>
jdaggett@2118 4397 <td>Initial:
jdaggett@2118 4398
jdaggett@2118 4399 <td>normal
jdaggett@2118 4400
jdaggett@2118 4401 <tr>
jdaggett@2118 4402 <td>Applies to:
jdaggett@2118 4403
jdaggett@2118 4404 <td>all elements
jdaggett@2118 4405
jdaggett@2118 4406 <tr>
jdaggett@2118 4407 <td>Inherited:
jdaggett@2118 4408
jdaggett@2118 4409 <td>yes
jdaggett@2118 4410
jdaggett@2118 4411 <tr>
jdaggett@2118 4412 <td>Percentages:
jdaggett@2118 4413
jdaggett@2118 4414 <td>N/A
jdaggett@2118 4415
jdaggett@2118 4416 <tr>
jdaggett@2118 4417 <td>Media:
jdaggett@2118 4418
jdaggett@2118 4419 <td>visual
jdaggett@2118 4420
jdaggett@2118 4421 <tr>
jdaggett@2118 4422 <td>Computed value:
jdaggett@2118 4423
jdaggett@2118 4424 <td>as specified
jdaggett@7377 4425
jdaggett@7377 4426 <tr>
jdaggett@7377 4427 <td>Animatable:
jdaggett@7377 4428
jdaggett@7377 4429 <td>no
jdaggett@2118 4430 </table>
jdaggett@2118 4431
jdaggett@2118 4432 <p>For any given character, fonts can provide a variety of alternate glyphs
jdaggett@2118 4433 in addition to the default glyph for that character. This property
jdaggett@2118 4434 provides control over the selection of these alternate glyphs.
jdaggett@2118 4435
jdaggett@8311 4436 <p>For many of the property values listed below, several different
jdaggett@8311 4437 alternate glyphs are available. How many alternates are available and what
jdaggett@8356 4438 they represent is font-specific, so these are each marked <dfn
jdaggett@8356 4439 id=font-specific>font specific</dfn> in the value definitions below.
jdaggett@8356 4440 Because the nature of these alternates is font-specific, the <a
jdaggett@8311 4441 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8311 4442 rule is used to define values for a specific font family or set of
jdaggett@8311 4443 families that associate a font-specific numeric
jdaggett@8311 4444 <code>&lt;feature-index&gt;</code> with a custom
jdaggett@8311 4445 <code>&lt;feature-value-name&gt;</code>, which is then used in this
jdaggett@8311 4446 property to select specific alternates:
jdaggett@8311 4447
jdaggett@8311 4448 <pre>@font-feature-values Noble Script { @swash { swishy: 1; flowing: 2; } }
jdaggett@8311 4449
jdaggett@8311 4450 p {
jdaggett@8311 4451 font-family: Noble Script;
jdaggett@8311 4452 font-variant-alternates: swash(flowing); /* use swash alternate #2 */
jdaggett@8311 4453 }</pre>
jdaggett@8311 4454
jdaggett@8312 4455 <p>When a particular <code>&lt;feature-value-name&gt;</code> has not been
jdaggett@8312 4456 defined for a given family or for a particular feature type, the computed
jdaggett@8312 4457 value must be the same as if it had been defined. However, property values
jdaggett@8312 4458 that contain these undefined <code>&lt;feature-value-name&gt;</code>
jdaggett@8312 4459 identifiers must be ignored when choosing glyphs.
jdaggett@8312 4460
jdaggett@8312 4461 <pre>/* these two style rules are effectively the same */
jdaggett@8312 4462 p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
jdaggett@8312 4463 p { font-variant-alternates: normal; }
jdaggett@8312 4464 </pre>
jdaggett@8312 4465
jdaggett@8312 4466 <p>This allows values to be defined and used for a given set of font
jdaggett@8312 4467 families but ignored if fallback occurs, since the font family name would
jdaggett@8312 4468 be different. If a given value is outside the range supported by a given
jdaggett@8312 4469 font, the value is ignored. These values never apply to generic font
jdaggett@8312 4470 families.
jdaggett@2556 4471
jdaggett@2118 4472 <p>Individual values have the following meanings:
jdaggett@2118 4473
jdaggett@2118 4474 <dl>
jdaggett@8278 4475 <dt><dfn id=font-variant-alternates-normal-value
jdaggett@8278 4476 title="normal!!font-variant-alternates">normal</dfn>
jdaggett@5809 4477
jdaggett@5809 4478 <dd>None of the features listed below are enabled.
jdaggett@5809 4479
jdaggett@2118 4480 <dt><dfn id=historical-forms>historical-forms</dfn>
jdaggett@2118 4481
jdaggett@6436 4482 <dd>Enables display of historical forms (OpenType feature: <span
jdaggett@6436 4483 class=tag>hist</span>).
jdaggett@2118 4484 </dl>
jdaggett@2118 4485
jdaggett@2118 4486 <div class=featex><img alt="historical form example" src=hist.png></div>
jdaggett@2118 4487
jdaggett@2118 4488 <dl>
jdaggett@8311 4489 <dt><dfn id=stylistic
jdaggett@8311 4490 title=stylistic>stylistic(&lt;feature-value-name&gt;)</dfn>
jdaggett@8311 4491
jdaggett@8356 4492 <dd>Enables display of stylistic alternates (<a
jdaggett@8356 4493 href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
jdaggett@8356 4494 class=tag>salt &lt;feature-index&gt;</span>).
jdaggett@8311 4495 </dl>
jdaggett@8311 4496
jdaggett@8311 4497 <div class=featex><img alt="stylistic alternate example" src=salt.png></div>
jdaggett@8311 4498
jdaggett@8311 4499 <dl>
jdaggett@8225 4500 <dt><dfn id=styleset title=styleset>styleset(&lt;feature-value-name&gt;
jdaggett@8225 4501 #)</dfn>
jdaggett@2118 4502
jdaggett@8356 4503 <dd>Enables display with stylistic sets (<a href="#font-specific"><em>font
jdaggett@8356 4504 specific</em></a>, OpenType feature: <span
jdaggett@8356 4505 class=tag>ss&lt;feature-index&gt;</span> OpenType currently defines <span
jdaggett@8356 4506 class=tag>ss01</span> through <span class=tag>ss20</span>).
jdaggett@2118 4507 </dl>
jdaggett@2118 4508
jdaggett@2118 4509 <div class=featex><img alt="styleset example" src=ssnn.png></div>
jdaggett@2118 4510
jdaggett@2118 4511 <dl>
jdaggett@8225 4512 <dt><dfn id=character-variant
jdaggett@8225 4513 title=character-variant>character-variant(&lt;feature-value-name&gt;
jdaggett@8225 4514 #)</dfn>
jdaggett@2118 4515
jdaggett@8356 4516 <dd>Enables display of specific character variants (<a
jdaggett@8356 4517 href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
jdaggett@6436 4518 class=tag>cv&lt;feature-index&gt;</span> OpenType currently defines <span
jdaggett@6436 4519 class=tag>cv01</span> through <span class=tag>cv99</span>).
jdaggett@2118 4520
jdaggett@8225 4521 <dt><dfn id=swash title=swash>swash(&lt;feature-value-name&gt;)</dfn>
jdaggett@2118 4522
jdaggett@8356 4523 <dd>Enables display of swash glyphs (<a href="#font-specific"><em>font
jdaggett@8356 4524 specific</em></a>, OpenType feature: <span class=tag>swsh
jdaggett@8356 4525 &lt;feature-index&gt;, cswh &lt;feature-index&gt;</span>).
jdaggett@2118 4526 </dl>
jdaggett@2118 4527
jdaggett@2118 4528 <div class=featex><img alt="swash example" src=swsh.png></div>
jdaggett@2118 4529
jdaggett@2118 4530 <dl>
jdaggett@8225 4531 <dt><dfn id=ornaments
jdaggett@7060 4532 title=ornaments>ornaments(&lt;feature-value-name&gt;)</dfn>
jdaggett@2118 4533
jdaggett@2118 4534 <dd>Enables replacement of default glyphs with ornaments, if provided in
jdaggett@8356 4535 the font (<a href="#font-specific"><em>font specific</em></a>, OpenType
jdaggett@8356 4536 feature: <span class=tag>ornm &lt;feature-index&gt;</span>). Some fonts
jdaggett@8356 4537 may offer ornament glyphs as alternates for a wide collection of
jdaggett@8356 4538 characters; however, displaying arbitrary characters (e.g.,
jdaggett@8356 4539 alphanumerics) as ornaments is poor practice as it distorts the semantics
jdaggett@8356 4540 of the data. Font designers are encouraged to encode all ornaments
jdaggett@8356 4541 (except those explicitly encoded in the Unicode Dingbats blocks, etc.) as
jdaggett@8356 4542 alternates for the bullet character (U+2022) to allow authors to select
jdaggett@8356 4543 the desired glyph using ‘<a href="#ornaments"><code
jdaggett@8356 4544 class=property>ornaments</code></a>’.
jdaggett@2118 4545 </dl>
jdaggett@2118 4546
jdaggett@2118 4547 <div class=featex><img alt="ornaments example" src=ornm.png></div>
jdaggett@2118 4548
jdaggett@2118 4549 <dl>
jdaggett@8225 4550 <dt><dfn id=annotation
jdaggett@7060 4551 title=annotation>annotation(&lt;feature-value-name&gt;)</dfn>
jdaggett@2118 4552
jdaggett@8356 4553 <dd>Enables display of alternate annotation forms (<a
jdaggett@8356 4554 href="#font-specific"><em>font specific</em></a>, OpenType feature: <span
jdaggett@8356 4555 class=tag>nalt &lt;feature-index&gt;</span>).
jdaggett@2118 4556 </dl>
jdaggett@2118 4557
jdaggett@2118 4558 <div class=featex><img alt="alternate annotation form example"
jdaggett@2118 4559 src=nalt.png></div>
jdaggett@2118 4560
jdaggett@2472 4561 <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
jdaggett@8311 4562 specific alternates: the <dfn id=at-font-feature-values-rule
jdaggett@8311 4563 style="font-weight: inherit; font-style:
jdaggett@8311 4564 inherit"><code>@font-feature-values</code></dfn> rule</h3>
jdaggett@2472 4565
jdaggett@4624 4566 <p>Several of the possible values of ‘<a
jdaggett@4624 4567 href="#propdef-font-variant-alternates"><code
jdaggett@4624 4568 class=property>font-variant-alternates</code></a>’ listed above are
jdaggett@8356 4569 labeled as <a href="#font-specific"><em>font specific</em></a>. For these
jdaggett@8356 4570 features fonts may define not just a single glyph but a set of alternate
jdaggett@8356 4571 glyphs with an index to select a given alternate. Since these are font
jdaggett@8356 4572 family specific, the <a
jdaggett@8311 4573 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8356 4574 rule is used to define named values for these indices for a given family.
jdaggett@8356 4575
jdaggett@8356 4576 <p class=note>See the <a href="#om-fontfeaturevalues">object model
jdaggett@8356 4577 reference section</a> for a description of the interfaces used to modify
jdaggett@8356 4578 these rules via the CSS Object Model.
jdaggett@8356 4579
jdaggett@8356 4580 <div class=example>
jdaggett@8356 4581 <p>In the case of the swash Q in the example shown above, the swash could
jdaggett@8356 4582 be specified using these style rules:</p>
jdaggett@8356 4583
jdaggett@8356 4584 <pre>
jdaggett@7041 4585
jdaggett@2472 4586 @font-feature-values Jupiter Sans {
jdaggett@7041 4587 @swash {
jdaggett@7041 4588 delicate: 1;
jdaggett@7041 4589 flowing: 2;
jdaggett@7041 4590 }
jdaggett@2472 4591 }
jdaggett@2472 4592
jdaggett@2472 4593 h2 { font-family: Jupiter Sans, sans-serif; }
jdaggett@2472 4594
jdaggett@2472 4595 /* show the second swash variant in h2 headings */
jdaggett@2472 4596 h2:first-letter { font-variant-alternates: swash(flowing); }
jdaggett@2472 4597
jdaggett@2479 4598 &lt;h2>Quick&lt;/h2></pre>
jdaggett@2472 4599
jdaggett@8356 4600 <p>When Jupiter Sans is present, the second alternate swash alternate will
jdaggett@8356 4601 be displayed. When not present, no swash character will be shown, since
jdaggett@8356 4602 the specific named value "flowing" is only defined for the Jupiter Sans
jdaggett@8356 4603 family. The @-mark indicates the name of the property value for which a
jdaggett@8356 4604 named value can be used. The name "flowing" is chosen by the author. The
jdaggett@8356 4605 index that represents each alternate is defined within a given font's
jdaggett@8356 4606 data.</p>
jdaggett@8356 4607 </div>
jdaggett@8356 4608
jdaggett@8356 4609 <h4 id=basic-syntax><span class=secno>6.9.1 </span>Basic syntax</h4>
jdaggett@8356 4610
jdaggett@8356 4611 <p>An <a
jdaggett@8356 4612 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8356 4613 rule is composed of a list of font families followed by a block containing
jdaggett@8356 4614 individual <a href="#featurevalueblock"><i
jdaggett@8356 4615 title="feature_value_block">feature value blocks</i></a> that take the
jdaggett@8356 4616 form of @-rules. Each block defines a set of named values for a specific
jdaggett@8356 4617 font feature when a given set of font families is used. Effectively, they
jdaggett@8356 4618 define a mapping of ⟨family, feature, ident⟩ → ⟨values⟩ where
jdaggett@8356 4619 ⟨values⟩ are the numeric indices used for specific features defined
jdaggett@8356 4620 for a given font.
jdaggett@8031 4621
jdaggett@8031 4622 <p>In terms of the grammar, this specification defines the following
jdaggett@8312 4623 productions:
jdaggett@8225 4624
jdaggett@8225 4625 <pre><dfn id=fontfeaturevaluesrule>font_feature_values_rule</dfn>
jdaggett@8225 4626 : <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>*
jdaggett@8225 4627 '{' <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>*
jdaggett@8225 4628 ;
jdaggett@8225 4629
jdaggett@8225 4630 <dfn id=fontfamilynamelist>font_family_name_list</dfn>
jdaggett@8225 4631 : <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> ]*
jdaggett@8225 4632 ;
jdaggett@8225 4633
jdaggett@8225 4634 <dfn id=fontfamilyname>font_family_name</dfn>
jdaggett@8225 4635 : <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> ]* ]
jdaggett@8225 4636 ;
jdaggett@8225 4637
jdaggett@8225 4638 <dfn id=featurevalueblock>feature_value_block</dfn>
jdaggett@8225 4639 : <a href="#featuretype"><i>feature_type</i></a> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>*
jdaggett@8225 4640 '{' <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>*
jdaggett@8225 4641 ;
jdaggett@8225 4642
jdaggett@8225 4643 <dfn id=featuretype>feature_type</dfn>:
jdaggett@8225 4644 <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>ATKEYWORD</i></a>
jdaggett@8225 4645 ;
jdaggett@8225 4646
jdaggett@8225 4647 <dfn id=featurevaluedefinition>feature_value_definition</dfn>
jdaggett@8225 4648 : <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> ]*
jdaggett@8225 4649 ;
jdaggett@8225 4650 </pre>
jdaggett@8225 4651
jdaggett@8032 4652 <p>The following new token is introduced:
jdaggett@8032 4653
jdaggett@8225 4654 <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>;}
jdaggett@2118 4655 </pre>
jdaggett@2118 4656
jdaggett@8356 4657 <p><a href="#featurevalueblock"><i title="feature_value_block">Feature
jdaggett@8356 4658 value blocks</i></a> are handled as <a
jdaggett@8356 4659 href="http://www.w3.org/TR/CSS2/syndata.html#at-rules">at-rules</a>, they
jdaggett@8356 4660 consist of everything up to the next block or semi-colon, whichever comes
jdaggett@8356 4661 first.
jdaggett@8356 4662
jdaggett@8356 4663 <p>The <a href="#fontfamilynamelist"><i title="font_family_name_list">font
jdaggett@8356 4664 family list</i></a> is a comma-delimited list of <a
jdaggett@8356 4665 href="#fontfamilyname"><i title="font_family_name">font family
jdaggett@8356 4666 names</i></a> that match the definition of <a
jdaggett@8356 4667 href="#family-name-value"><var>&lt;family-name&gt;</var></a> for the <a
jdaggett@8278 4668 href="#propdef-font-family" title="font-family!!property">‘<code
jdaggett@8356 4669 class=property>font-family</code>’</a> property. This means that only
jdaggett@8356 4670 named font families are allowed, rules that include generic or system
jdaggett@8356 4671 fonts in the list of font families are syntax errors. However, if a user
jdaggett@8356 4672 agent defines a generic font to be a specific named font (e.g. Helvetica),
jdaggett@8356 4673 the settings associated with that family name will be used. If syntax
jdaggett@8356 4674 errors occur within the font family list, the entire rule must be ignored.
jdaggett@8356 4675
jdaggett@8356 4676 <p>Within <a href="#featurevalueblock"><i
jdaggett@8356 4677 title="feature_value_block">feature value blocks</i></a>, the <a
jdaggett@8356 4678 href="#featuretype"><i title="feature_type">feature type</i></a> is
jdaggett@8356 4679 ‘<code class=css>@</code>’ followed by the name of one of the <a
jdaggett@8356 4680 href="#font-specific"><em>font specific</em></a> property values of ‘<a
jdaggett@8356 4681 href="#propdef-font-variant-alternates"><code
jdaggett@8356 4682 class=property>font-variant-alternates</code></a>’ (e.g. <a
jdaggett@8356 4683 href="#swash"><code>@swash</code></a>). The identifiers used within
jdaggett@8356 4684 feature value definitions follow the rules of CSS user identifiers and are
jdaggett@8356 4685 case-sensitive. They are unique only for a given set of font families and
jdaggett@8356 4686 <a href="#featuretype"><i title="feature_type">feature type</i></a>. The
jdaggett@8356 4687 same identifier used with a different <a href="#featuretype"><i
jdaggett@8356 4688 title="feature_type">feature type</i></a> is treated as a separate and
jdaggett@8356 4689 distinct value. If the same identifier is defined mulitple times for a
jdaggett@8356 4690 given <a href="#featuretype"><i title="feature_type">feature type</i></a>
jdaggett@8356 4691 and font family, the last defined value is used. Values associated with a
jdaggett@8356 4692 given identifier are limited to integer values 0 or greater.
jdaggett@8356 4693
jdaggett@8356 4694 <p>When syntax errors occur within a <a href="#featurevaluedefinition"><i
jdaggett@8356 4695 title="feature_value_definition">feature value definition</i></a>, such as
jdaggett@8356 4696 invalid identifiers or values, the entire <a
jdaggett@8356 4697 href="#featurevaluedefinition"><i title="feature_value_definition">feature
jdaggett@8356 4698 value definition</i></a> must be omitted, just as syntax errors in style
jdaggett@8356 4699 declarations are handled. When the <a href="#featuretype"><i
jdaggett@8356 4700 title="feature_type">feature type</i></a> is invalid, the entire
jdaggett@8356 4701 associated <a href="#featurevalueblock"><i
jdaggett@8356 4702 title="feature_value_block">feature value block</i></a> must be ignored.
jdaggett@8356 4703
jdaggett@8356 4704 <div class=example>
jdaggett@8356 4705 <p>Rules that are equivalent given syntax error handling:</p>
jdaggett@8356 4706
jdaggett@8356 4707 <pre>@font-feature-values Bongo {
jdaggett@7679 4708 @swash { ornate: 1; }
jdaggett@7679 4709 annotation { boxed: 4; } /* should be @annotation! */
jdaggett@8031 4710 @swash { double-loops: 1; flowing: -1; } /* negative value */
jdaggett@8031 4711 @ornaments ; /* incomplete definition */
jdaggett@8031 4712 @styleset { double-W: 14; sharp-terminals: 16 1 } /* missing ; */
jdaggett@8356 4713 <a href="http://www.angryalien.com/0504/shiningbunnies.html" style="text-decoration: none; border: none;">redrum</a> /* random editing mistake */
jdaggett@7679 4714 }</pre>
jdaggett@7679 4715
jdaggett@8356 4716 <p>The example above is equivalent to:</p>
jdaggett@8356 4717
jdaggett@8356 4718 <pre>@font-feature-values Bongo {
jdaggett@7679 4719 @swash { ornate: 1; }
jdaggett@8031 4720 @swash { double-loops: 1; }
jdaggett@8031 4721 @styleset { double-W: 14; sharp-terminals: 16 1; }
jdaggett@7679 4722 }</pre>
jdaggett@8356 4723 </div>
jdaggett@7096 4724
jdaggett@8311 4725 <p>If multiple <a
jdaggett@8311 4726 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8356 4727 rules are defined for a given family, the resulting values definitions are
jdaggett@8356 4728 the union of the definitions contained within these rules. This allows a
jdaggett@8356 4729 set of named values to be defined for a given font family globally for a
jdaggett@8356 4730 site and specific additions made per-page.
jdaggett@8356 4731
jdaggett@8356 4732 <div class=example>
jdaggett@8356 4733 <p>Using both site-wide and per-page feature values:</p>
jdaggett@8356 4734
jdaggett@8356 4735 <pre>
jdaggett@2472 4736 site.css:
jdaggett@2472 4737
jdaggett@2472 4738 @font-feature-values Mercury Serif {
jdaggett@7041 4739 @styleset {
jdaggett@7041 4740 stacked-g: 3; /* "two-storey" versions of g, a */
jdaggett@7041 4741 stacked-a: 4;
jdaggett@7041 4742 }
jdaggett@2472 4743 }
jdaggett@2472 4744
jdaggett@2472 4745 page.css:
jdaggett@8277 4746
jdaggett@2472 4747 @font-feature-values Mercury Serif {
jdaggett@7041 4748 @styleset {
jdaggett@7041 4749 geometric-m: 7; /* alternate version of m */
jdaggett@7041 4750 }
jdaggett@2472 4751 }
jdaggett@8277 4752
jdaggett@2472 4753 body {
jdaggett@2472 4754 font-family: Mercury Serif, serif;
jdaggett@2472 4755
jdaggett@2472 4756 /* enable both the use of stacked g and alternate m */
jdaggett@2472 4757 font-variant-alternates: styleset(stacked-g, geometric-m);
jdaggett@2472 4758 }</pre>
jdaggett@8356 4759 </div>
jdaggett@8356 4760
jdaggett@8356 4761 <div class=example>
jdaggett@8356 4762 <p>Using a commonly named value allows authors to use a single style rule
jdaggett@8356 4763 to cover a set of fonts for which the underlying selector is different
jdaggett@8356 4764 for each font. If either font in the example below is found, a circled
jdaggett@8356 4765 number glyph will be used:</p>
jdaggett@8356 4766
jdaggett@8356 4767 <pre>@font-feature-values Taisho Gothic {
jdaggett@7041 4768 @annotation { boxed: 1; circled: 4; }
jdaggett@2118 4769 }
jdaggett@2118 4770
jdaggett@2118 4771 @font-feature-values Otaru Kisa {
jdaggett@7041 4772 @annotation { circled: 1; black-boxed: 3; }
jdaggett@2118 4773 }
jdaggett@2118 4774
jdaggett@2118 4775 h3.title {
jdaggett@2118 4776 /* circled form defined for both fonts */
jdaggett@2118 4777 font-family: Taisho Gothic, Otaru Kisa;
jdaggett@2118 4778 font-variant: annotation(circled);
jdaggett@2118 4779 }</pre>
jdaggett@8356 4780 </div>
jdaggett@8356 4781
jdaggett@8356 4782 <h4 id=multi-valued-feature-value-definitions><span class=secno>6.9.2
jdaggett@8356 4783 </span>Multi-valued feature value definitions</h4>
jdaggett@8356 4784
jdaggett@8356 4785 <p>Most <a href="#font-specific"><em>font specific</em></a> ‘<a
jdaggett@8356 4786 href="#propdef-font-variant-alternates"><code
jdaggett@8356 4787 class=property>font-variant-alternates</code></a>’ property values take
jdaggett@8356 4788 a single value (e.g. ‘<a href="#swash"><code
jdaggett@8356 4789 class=property>swash</code></a>’). The ‘<a
jdaggett@8356 4790 href="#character-variant"><code
jdaggett@8356 4791 class=property>character-variant</code></a>’ property value allows two
jdaggett@8356 4792 values and ‘<a href="#styleset"><code
jdaggett@8356 4793 class=property>styleset</code></a>’ allows an unlimited number.
jdaggett@3571 4794
jdaggett@3571 4795 <p>For the styleset property value, multiple values indicate the style sets
jdaggett@7095 4796 to be enabled. Values between 1 and 99 enable OpenType features <span
jdaggett@7095 4797 class=tag>ss01</span> through <span class=tag>ss99</span>. However, the
jdaggett@7095 4798 OpenType standard only officially defines <span class=tag>ss01</span>
jdaggett@8356 4799 through <span class=tag>ss20</span>. For OpenType fonts, values greater
jdaggett@8356 4800 than 99 or equal to 0 do not generate a syntax error when parsed but
jdaggett@8356 4801 enable no OpenType features.
jdaggett@2472 4802
jdaggett@2472 4803 <pre>@font-feature-values Mars Serif {
jdaggett@8277 4804 @styleset {
jdaggett@7041 4805 alt-g: 1; /* implies ss01 = 1 */
jdaggett@7041 4806 curly-quotes: 3; /* implies ss03 = 1 */
jdaggett@7041 4807 code: 4 5; /* implies ss04 = 1, ss05 = 1 */
jdaggett@7041 4808 }
jdaggett@7041 4809
jdaggett@7041 4810 @styleset {
jdaggett@7095 4811 dumb: 125; /* &gt;99, ignored */
jdaggett@7041 4812 }
jdaggett@7041 4813
jdaggett@7041 4814 @swash {
jdaggett@7041 4815 swishy: 3 5; /* more than 1 value for swash, syntax error */
jdaggett@7041 4816 }
jdaggett@2472 4817 }
jdaggett@2472 4818
jdaggett@2472 4819 p.codeblock {
jdaggett@2472 4820 /* implies ss03 = 1, ss04 = 1, ss05 = 1 */
jdaggett@2472 4821 font-variant-alternates: styleset(curly-quotes, code);
jdaggett@2472 4822 }</pre>
jdaggett@2472 4823
jdaggett@2472 4824 <p>For character-variant, a single value between 1 and 99 indicates the
jdaggett@6436 4825 enabling of OpenType feature <span class=tag>cv01</span> through <span
jdaggett@7095 4826 class=tag>cv99</span>. For OpenType fonts, values greater than 99 or equal
jdaggett@8356 4827 to 0 are ignored but do not generate a syntax error when parsed but enable
jdaggett@8356 4828 no OpenType features. When two values are listed, the first value
jdaggett@8356 4829 indicates the feature used and the second the value passed for that
jdaggett@8356 4830 feature. If more than two values are assigned to a given name, a syntax
jdaggett@8356 4831 error occurs and the entire <a href="#featurevaluedefinition"><i
jdaggett@8356 4832 title="feature_value_definition">feature value definition</i></a> is
jdaggett@8356 4833 ignored.
jdaggett@2472 4834
jdaggett@2472 4835 <pre>@font-feature-values MM Greek {
jdaggett@7041 4836 @character-variant { alpha-2: 1 2; } /* implies cv01 = 2 */
jdaggett@7041 4837 @character-variant { beta-3: 2 3; } /* implies cv02 = 3 */
jdaggett@8356 4838 @character-variant { epsilon: 5 3 6; } /* more than 2 values, syntax error, definition ignored */
jdaggett@7041 4839 @character-variant { gamma: 12; } /* implies cv12 = 1 */
jdaggett@7041 4840 @character-variant { zeta: 20 3; } /* implies cv20 = 3 */
jdaggett@7041 4841 @character-variant { zeta-2: 20 2; } /* implies cv20 = 2 */
jdaggett@7041 4842 @character-variant { silly: 105; } /* &gt;99, ignored */
jdaggett@7041 4843 @character-variant { dumb: 323 3; } /* &gt;99, ignored */
jdaggett@2472 4844 }
jdaggett@2472 4845
jdaggett@2472 4846 #title {
jdaggett@2472 4847 /* use the third alternate beta, first alternate gamma */
jdaggett@2472 4848 font-variant-alternates: character-variant(beta-3, gamma);
jdaggett@3571 4849 }
jdaggett@3571 4850
jdaggett@3571 4851 p {
jdaggett@3571 4852 /* zeta-2 follows zeta, implies cv20 = 2 */
jdaggett@3571 4853 font-variant-alternates: character-variant(zeta, zeta-2);
jdaggett@3571 4854 }
jdaggett@3571 4855
jdaggett@3571 4856 .special {
jdaggett@3571 4857 /* zeta follows zeta-2, implies cv20 = 3 */
jdaggett@3571 4858 font-variant-alternates: character-variant(zeta-2, zeta);
jdaggett@2472 4859 }</pre>
jdaggett@2472 4860
jdaggett@2472 4861 <div class=figure><img alt="Matching text on Byzantine seals using
jdaggett@2472 4862 character variants" src=byzantineseal.png>
jdaggett@2472 4863 <p class=caption>Byzantine seal text displayed with character variants
jdaggett@2472 4864 </div>
jdaggett@2472 4865
jdaggett@2472 4866 <div class=example>
jdaggett@2472 4867 <p>In the figure above, the text in red is rendered using a font
jdaggett@2472 4868 containing character variants that mimic the character forms found on a
jdaggett@2472 4869 Byzantine seal from the 8th century A.D. Two lines below is the same text
jdaggett@2472 4870 displayed in a font without variants. Note the two variants for U and N
jdaggett@2509 4871 used on the seal.</p>
jdaggett@2472 4872
jdaggett@2472 4873 <pre>@font-feature-values Athena Ruby {
jdaggett@7041 4874 @character-variant {
jdaggett@7041 4875 leo-B: 2 1;
jdaggett@7041 4876 leo-M: 13 3;
jdaggett@7041 4877 leo-alt-N: 14 1;
jdaggett@7041 4878 leo-N: 14 2;
jdaggett@8277 4879 leo-T: 20 1;
jdaggett@7041 4880 leo-U: 21 2;
jdaggett@7041 4881 leo-alt-U: 21 4;
jdaggett@7041 4882 }
jdaggett@2472 4883 }
jdaggett@2472 4884
jdaggett@2472 4885 p {
jdaggett@6653 4886 font-variant: discretionary-ligatures,
jdaggett@6653 4887 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
jdaggett@2472 4888 }
jdaggett@2472 4889
jdaggett@8277 4890 span.alt-N {
jdaggett@2472 4891 font-variant-alternates: character-variant(leo-alt-N);
jdaggett@2472 4892 }
jdaggett@2472 4893
jdaggett@2472 4894 span.alt-U {
jdaggett@2472 4895 font-variant-alternates: character-variant(leo-alt-U);
jdaggett@2472 4896 }
jdaggett@2472 4897
jdaggett@2472 4898 &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>
jdaggett@2472 4899
jdaggett@8277 4900 &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>
jdaggett@2472 4901 </pre>
jdaggett@2118 4902 </div>
jdaggett@2118 4903
jdaggett@2118 4904 <h3 id=font-variant-east-asian-prop><span class=secno>6.10 </span>East
jdaggett@2118 4905 Asian text rendering: the <a
jdaggett@1662 4906 href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
jdaggett@1662 4907 property</h3>
jdaggett@1662 4908
jdaggett@5809 4909 <table class=propdef id=namefont-variant-east-asianvaluenormal-l>
jdaggett@1662 4910 <tbody>
jdaggett@1662 4911 <tr>
jdaggett@1662 4912 <td>Name:
jdaggett@1662 4913
jdaggett@1662 4914 <td><dfn
jdaggett@1662 4915 id=propdef-font-variant-east-asian>font-variant-east-asian</dfn>
jdaggett@1662 4916
jdaggett@1662 4917 <tr>
jdaggett@1662 4918 <td>Value:
jdaggett@1662 4919
jdaggett@8278 4920 <td><a href="#font-variant-east-asian-normal-value"
jdaggett@8278 4921 title="normal!!font-variant-east-asian">normal</a> | [ <a
jdaggett@8225 4922 href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
jdaggett@8225 4923 || <a
jdaggett@8225 4924 href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
jdaggett@8225 4925 || <a href="#ruby">ruby</a> ]
jdaggett@1662 4926
jdaggett@1662 4927 <tr>
jdaggett@1662 4928 <td>Initial:
jdaggett@1662 4929
jdaggett@1662 4930 <td>normal
jdaggett@1662 4931
jdaggett@1662 4932 <tr>
jdaggett@1662 4933 <td>Applies to:
jdaggett@1662 4934
jdaggett@1662 4935 <td>all elements
jdaggett@1662 4936
jdaggett@1662 4937 <tr>
jdaggett@1662 4938 <td>Inherited:
jdaggett@1662 4939
jdaggett@1662 4940 <td>yes
jdaggett@1662 4941
jdaggett@1662 4942 <tr>
jdaggett@1662 4943 <td>Percentages:
jdaggett@1662 4944
jdaggett@1662 4945 <td>N/A
jdaggett@1662 4946
jdaggett@1662 4947 <tr>
jdaggett@1662 4948 <td>Media:
jdaggett@1662 4949
jdaggett@1662 4950 <td>visual
jdaggett@1662 4951
jdaggett@1662 4952 <tr>
jdaggett@1662 4953 <td>Computed value:
jdaggett@1662 4954
jdaggett@1662 4955 <td>as specified
jdaggett@7377 4956
jdaggett@7377 4957 <tr>
jdaggett@7377 4958 <td>Animatable:
jdaggett@7377 4959
jdaggett@7377 4960 <td>no
jdaggett@1662 4961 </table>
jdaggett@1662 4962
jdaggett@6693 4963 <p>Allows control of glyph substitution and sizing in East Asian text.
jdaggett@1662 4964
jdaggett@1662 4965 <pre
jdaggett@8225 4966 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>
jdaggett@1662 4967
jdaggett@1662 4968 <pre
jdaggett@8225 4969 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>
jdaggett@1732 4970
jdaggett@1732 4971 <p>Individual values have the following meanings:
jdaggett@1662 4972
jdaggett@1662 4973 <dl>
jdaggett@8278 4974 <dt><dfn id=font-variant-east-asian-normal-value
jdaggett@8278 4975 title="normal!!font-variant-east-asian">normal</dfn>
jdaggett@5809 4976
jdaggett@5809 4977 <dd>None of the features listed below are enabled.
jdaggett@5809 4978
jdaggett@1662 4979 <dt><dfn id=jis78>jis78</dfn>
jdaggett@1662 4980
jdaggett@6436 4981 <dd>Enables rendering of JIS78 forms (OpenType feature: <span
jdaggett@6436 4982 class=tag>jp78</span>).
jdaggett@1662 4983 </dl>
jdaggett@1662 4984
jdaggett@1662 4985 <div class=featex><img alt="JIS78 form example" src=jp78.png></div>
jdaggett@1662 4986
jdaggett@1662 4987 <dl>
jdaggett@1662 4988 <dt><dfn id=jis83>jis83</dfn>
jdaggett@1662 4989
jdaggett@6436 4990 <dd>Enables rendering of JIS83 forms (OpenType feature: <span
jdaggett@6436 4991 class=tag>jp83</span>).
jdaggett@1662 4992
jdaggett@1662 4993 <dt><dfn id=jis90>jis90</dfn>
jdaggett@1662 4994
jdaggett@6436 4995 <dd>Enables rendering of JIS90 forms (OpenType feature: <span
jdaggett@6436 4996 class=tag>jp90</span>).
jdaggett@1662 4997
jdaggett@1662 4998 <dt><dfn id=jis04>jis04</dfn>
jdaggett@1662 4999
jdaggett@6436 5000 <dd>Enables rendering of JIS2004 forms (OpenType feature: <span
jdaggett@6436 5001 class=tag>jp04</span>).
jdaggett@6693 5002 <p>The various JIS variants reflect the glyph forms defined in different
jdaggett@6693 5003 Japanese national standards. Fonts generally include glyphs defined by
jdaggett@6693 5004 the most recent national standard but it's sometimes necessary to use
jdaggett@6693 5005 older variants, to match signage for example.</p>
jdaggett@1662 5006
jdaggett@2504 5007 <dt><dfn id=simplified>simplified</dfn>
jdaggett@2504 5008
jdaggett@6436 5009 <dd>Enables rendering of simplified forms (OpenType feature: <span
jdaggett@6436 5010 class=tag>smpl</span>).
jdaggett@2504 5011
jdaggett@2504 5012 <dt><dfn id=traditional>traditional</dfn>
jdaggett@2504 5013
jdaggett@6436 5014 <dd>Enables rendering of traditional forms (OpenType feature: <span
jdaggett@6436 5015 class=tag>trad</span>).
jdaggett@1662 5016 </dl>
jdaggett@1662 5017
jdaggett@8312 5018 <p>The ‘<a href="#simplified"><code
jdaggett@8312 5019 class=property>simplified</code></a>’ and ‘<a
jdaggett@8312 5020 href="#traditional"><code class=property>traditional</code></a>’ values
jdaggett@8312 5021 allow control over the glyph forms for characters which have been
jdaggett@8312 5022 simplified over time but for which the older, traditional form is still
jdaggett@8312 5023 used in some contexts. The exact set of characters and glyph forms will
jdaggett@8312 5024 vary to some degree by context for which a given font was designed.
jdaggett@8312 5025
jdaggett@1662 5026 <div class=featex><img alt="tradtional form example" src=trad.png></div>
jdaggett@1662 5027
jdaggett@1662 5028 <dl>
jdaggett@1662 5029 <dt><dfn id=full-width>full-width</dfn>
jdaggett@1662 5030
jdaggett@6436 5031 <dd>Enables rendering of full-width variants (OpenType feature: <span
jdaggett@6436 5032 class=tag>fwid</span>).
jdaggett@1662 5033
jdaggett@1662 5034 <dt><dfn id=proportional-width>proportional-width</dfn>
jdaggett@1662 5035
jdaggett@1662 5036 <dd>Enables rendering of proportionally-spaced variants (OpenType feature:
jdaggett@6436 5037 <span class=tag>pwid</span>).
jdaggett@1662 5038 </dl>
jdaggett@1662 5039
jdaggett@1662 5040 <div class=featex><img alt="proportionally spaced Japanese example"
jdaggett@1662 5041 src=pwid.png></div>
jdaggett@1662 5042
jdaggett@3638 5043 <dl>
jdaggett@3638 5044 <dt><dfn id=ruby>ruby</dfn>
jdaggett@3638 5045
jdaggett@6436 5046 <dd>Enables display of ruby variant glyphs (OpenType feature: <span
jdaggett@6436 5047 class=tag>ruby</span>). Since ruby text is generally smaller than the
jdaggett@3638 5048 associated body text, font designers can design special glyphs for use
jdaggett@3638 5049 with ruby that are more readable than scaled down versions of the default
jdaggett@3638 5050 glyphs. Only glyph selection is affected, there is no associated font
jdaggett@3638 5051 scaling or other change that affects line layout. The red ruby text below
jdaggett@3638 5052 is shown with default glyphs (top) and with ruby variant glyphs (bottom).
jdaggett@3638 5053 Note the slight difference in stroke thickness.
jdaggett@3638 5054 </dl>
jdaggett@3638 5055
jdaggett@3638 5056 <div class=featex><img alt="ruby variant example" src=rubyshinkansen.png></div>
jdaggett@3638 5057
jdaggett@2118 5058 <h3 id=font-variant-prop><span class=secno>6.11 </span>Overall shorthand
jdaggett@1856 5059 for font rendering: the <a href="#propdef-font-variant">font-variant</a>
jdaggett@1662 5060 property</h3>
jdaggett@1662 5061
jdaggett@6436 5062 <table class=propdef id=namefont-variantvaluenormal-none-ltcommo>
jdaggett@1662 5063 <tbody>
jdaggett@1662 5064 <tr>
jdaggett@1662 5065 <td>Name:
jdaggett@1662 5066
jdaggett@8278 5067 <td><dfn id=propdef-font-variant
jdaggett@8278 5068 title="font-variant!!property">font-variant</dfn>
jdaggett@1662 5069
jdaggett@1662 5070 <tr>
jdaggett@1662 5071 <td>Value:
jdaggett@1662 5072
jdaggett@8278 5073 <td><a href="#font-variant-normal-value"
jdaggett@8278 5074 title="normal!!font-variant">normal</a> | <a
jdaggett@8278 5075 href="#font-variant-none-value" title="none!!font-variant">none</a> | [
jdaggett@8278 5076 <a href="#common-lig-values"><var>&lt;common-lig-values&gt;</var></a>
jdaggett@8278 5077 || <a
jdaggett@8225 5078 href="#discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></a>
jdaggett@8225 5079 || <a
jdaggett@8225 5080 href="#historical-lig-values"><var>&lt;historical-lig-values&gt;</var></a>
jdaggett@8225 5081 || <a
jdaggett@8225 5082 href="#contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></a>
jdaggett@8225 5083 || <a href="#stylistic"><var
jdaggett@8225 5084 title=stylistic>stylistic(&lt;feature-value-name&gt;)</var></a> || <a
jdaggett@8225 5085 href="#historical-forms"><var>historical-forms</var></a> || <a
jdaggett@8225 5086 href="#styleset"><var
jdaggett@8225 5087 title=styleset>styleset(&lt;feature-value-name&gt; #)</var></a> || <a
jdaggett@8225 5088 href="#character-variant"><var
jdaggett@8225 5089 title=character-variant>character-variant(&lt;feature-value-name&gt;
jdaggett@8225 5090 #)</var></a> || <a href="#swash"><var
jdaggett@8225 5091 title=swash>swash(&lt;feature-value-name&gt;)</var></a> || <a
jdaggett@8225 5092 href="#ornaments"><var
jdaggett@8225 5093 title=ornaments>ornaments(&lt;feature-value-name&gt;)</var></a> || <a
jdaggett@8225 5094 href="#annotation"><var
jdaggett@8225 5095 title=annotation>annotation(&lt;feature-value-name&gt;)</var></a> || [
jdaggett@8225 5096 <a href="#small-caps"><i>small-caps</i></a> | <a
jdaggett@8225 5097 href="#all-small-caps"><i>all-small-caps</i></a> | <a
jdaggett@8225 5098 href="#petite-caps"><i>petite-caps</i></a> | <a
jdaggett@8225 5099 href="#all-petite-caps"><i>all-petite-caps</i></a> | <a
jdaggett@8225 5100 href="#unicase"><i>unicase</i></a> | <a
jdaggett@8225 5101 href="#titling-caps"><i>titling-caps</i></a> ] || <a
jdaggett@8225 5102 href="#numeric-figure-values"><var>&lt;numeric-figure-values&gt;</var></a>
jdaggett@8225 5103 || <a
jdaggett@8225 5104 href="#numeric-spacing-values"><var>&lt;numeric-spacing-values&gt;</var></a>
jdaggett@8225 5105 || <a
jdaggett@8225 5106 href="#numeric-fraction-values"><var>&lt;numeric-fraction-values&gt;</var></a>
jdaggett@8225 5107 || <a href="#ordinal"><i>ordinal</i></a> || <a
jdaggett@8225 5108 href="#slashed-zero"><i>slashed-zero</i></a> || <a
jdaggett@8225 5109 href="#east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></a>
jdaggett@8225 5110 || <a
jdaggett@8225 5111 href="#east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></a>
jdaggett@8225 5112 || <a href="#ruby"><i>ruby</i></a> ]
jdaggett@1662 5113
jdaggett@1662 5114 <tr>
jdaggett@1662 5115 <td>Initial:
jdaggett@1662 5116
jdaggett@1662 5117 <td>normal
jdaggett@1662 5118
jdaggett@1662 5119 <tr>
jdaggett@1662 5120 <td>Applies to:
jdaggett@1662 5121
jdaggett@1662 5122 <td>all elements
jdaggett@1662 5123
jdaggett@1662 5124 <tr>
jdaggett@1662 5125 <td>Inherited:
jdaggett@1662 5126
jdaggett@1662 5127 <td>yes
jdaggett@1662 5128
jdaggett@1662 5129 <tr>
jdaggett@1662 5130 <td>Percentages:
jdaggett@1662 5131
jdaggett@7377 5132 <td>see individual properties
jdaggett@1662 5133
jdaggett@1662 5134 <tr>
jdaggett@1662 5135 <td>Media:
jdaggett@1662 5136
jdaggett@1662 5137 <td>visual
jdaggett@1662 5138
jdaggett@1662 5139 <tr>
jdaggett@1662 5140 <td>Computed value:
jdaggett@1662 5141
jdaggett@7377 5142 <td>see individual properties
jdaggett@7377 5143
jdaggett@7377 5144 <tr>
jdaggett@7377 5145 <td>Animatable:
jdaggett@7377 5146
jdaggett@7377 5147 <td>see individual properties
jdaggett@1662 5148 </table>
jdaggett@1662 5149
jdaggett@8313 5150 <p>The <a href="#propdef-font-variant"
jdaggett@8313 5151 title="font-variant!!property">‘<code
jdaggett@8313 5152 class=property>font-variant</code>’</a> property is a shorthand for all
jdaggett@8313 5153 font-variant subproperties. The value <dfn id=font-variant-normal-value
jdaggett@8313 5154 title="normal!!font-variant">‘<code
jdaggett@8313 5155 class=property>normal</code>’</dfn> resets all subproperties of <a
jdaggett@8313 5156 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8313 5157 class=property>font-variant</code>’</a> to their inital value. The <dfn
jdaggett@8313 5158 id=font-variant-none-value title="none!!font-variant">‘<code
jdaggett@8313 5159 class=property>none</code>’</dfn> value sets ‘<a
jdaggett@8313 5160 href="#propdef-font-variant-ligatures"><code
jdaggett@8278 5161 class=property>font-variant-ligatures</code></a>’ to ‘<code
jdaggett@8278 5162 class=property>none</code>’ and resets all other font feature properties
jdaggett@8278 5163 to their initial value. Like other shorthands, using <a
jdaggett@8278 5164 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8313 5165 class=property>font-variant</code>’</a> resets unspecified <a
jdaggett@8313 5166 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8313 5167 class=property>font-variant</code>’</a> subproperties to their initial
jdaggett@8313 5168 values. It does not reset the values of either ‘<a
jdaggett@8313 5169 href="#propdef-font-language-override"><code
jdaggett@8279 5170 class=property>font-language-override</code></a>’ or <a
jdaggett@8279 5171 href="#propdef-font-feature-settings"
jdaggett@8279 5172 title="font-feature-settings!!property">‘<code
jdaggett@8279 5173 class=property>font-feature-settings</code>’</a>.
jdaggett@1662 5174
jdaggett@2118 5175 <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
jdaggett@2509 5176 font feature settings control: the <a
jdaggett@1662 5177 href="#propdef-font-feature-settings">font-feature-settings</a> property</h3>
jdaggett@1662 5178
jdaggett@4624 5179 <table class=propdef id=namefont-feature-settingsvaluenormal-ltf>
jdaggett@1662 5180 <tbody>
jdaggett@1662 5181 <tr>
jdaggett@1662 5182 <td>Name:
jdaggett@1662 5183
jdaggett@8279 5184 <td><dfn id=propdef-font-feature-settings
jdaggett@8279 5185 title="font-feature-settings!!property">font-feature-settings</dfn>
jdaggett@1662 5186
jdaggett@1662 5187 <tr>
jdaggett@1662 5188 <td>Value:
jdaggett@1662 5189
jdaggett@8278 5190 <td><a href="#font-feature-settings-normal-value"
jdaggett@8278 5191 title="normal!!font-feature-settings">normal</a> | <a
jdaggett@8225 5192 href="#feature-tag-value"><var>&lt;feature-tag-value&gt;</var></a> #
jdaggett@1662 5193
jdaggett@1662 5194 <tr>
jdaggett@1662 5195 <td>Initial:
jdaggett@1662 5196
jdaggett@1662 5197 <td>normal
jdaggett@1662 5198
jdaggett@1662 5199 <tr>
jdaggett@1662 5200 <td>Applies to:
jdaggett@1662 5201
jdaggett@1662 5202 <td>all elements
jdaggett@1662 5203
jdaggett@1662 5204 <tr>
jdaggett@1662 5205 <td>Inherited:
jdaggett@1662 5206
jdaggett@1662 5207 <td>yes
jdaggett@1662 5208
jdaggett@1662 5209 <tr>
jdaggett@1662 5210 <td>Percentages:
jdaggett@1662 5211
jdaggett@1662 5212 <td>N/A
jdaggett@1662 5213
jdaggett@1662 5214 <tr>
jdaggett@1662 5215 <td>Media:
jdaggett@1662 5216
jdaggett@1662 5217 <td>visual
jdaggett@1662 5218
jdaggett@1662 5219 <tr>
jdaggett@1662 5220 <td>Computed value:
jdaggett@1662 5221
jdaggett@1662 5222 <td>as specified
jdaggett@7377 5223
jdaggett@7377 5224 <tr>
jdaggett@7377 5225 <td>Animatable:
jdaggett@7377 5226
jdaggett@7377 5227 <td>no
jdaggett@1662 5228 </table>
jdaggett@2474 5229
jdaggett@2474 5230 <p>This property provides low-level control over OpenType font features. It
jdaggett@2474 5231 is intended as a way of providing access to font features that are not
jdaggett@8312 5232 widely used but are needed for a particular use case.
jdaggett@8312 5233
jdaggett@8312 5234 <p>Authors should generally use <a href="#propdef-font-variant"
jdaggett@8312 5235 title="font-variant!!property">‘<code
jdaggett@8312 5236 class=property>font-variant</code>’</a> and its related subproperties
jdaggett@8312 5237 whenever possible and only use this property for special cases where its
jdaggett@8312 5238 use is the only way of accessing a particular infrequently used font
jdaggett@8312 5239 feature.
jdaggett@8312 5240
jdaggett@8312 5241 <pre>/* enable small caps and use second swash alternate */
jdaggett@8312 5242 font-feature-settings: "smcp", "swsh" 2;</pre>
jdaggett@8312 5243
jdaggett@8312 5244 <p>A value of <dfn id=font-feature-settings-normal-value
jdaggett@8278 5245 title="normal!!font-feature-settings">‘<code
jdaggett@8278 5246 class=property>normal</code>’</dfn> means that no change in glyph
jdaggett@8278 5247 selection or positioning occurs due to this property.
jdaggett@2474 5248
jdaggett@2509 5249 <p>Feature tag values have the following syntax:
jdaggett@2474 5250
jdaggett@2474 5251 <pre
jdaggett@8225 5252 class=prod><dfn id=feature-tag-value><var>&lt;feature-tag-value&gt;</var></dfn> = &lt;string&gt; [ &lt;integer&gt; | on | off ]?</pre>
jdaggett@2509 5253
jdaggett@5532 5254 <p>The &lt;string&gt; is a case-sensitive OpenType feature tag. As
jdaggett@5532 5255 specified in the OpenType specification, feature tags contain four ASCII
jdaggett@5532 5256 characters. Tag strings longer or shorter than four characters, or
jdaggett@5596 5257 containing characters outside the U+20–7E codepoint range are invalid.
jdaggett@8312 5258 Feature tags need only match a feature tag defined in the font, so they
jdaggett@8312 5259 are not limited to explicitly registered OpenType features. Fonts defining
jdaggett@8312 5260 custom feature tags should follow the <a
jdaggett@2474 5261 href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
jdaggett@2474 5262 rules</a> defined in the OpenType specification <a
jdaggett@1662 5263 href="#OPENTYPE-FEATURES"
jdaggett@2474 5264 rel=biblioentry>[OPENTYPE-FEATURES]<!--{{!OPENTYPE-FEATURES}}--></a>.
jdaggett@2474 5265 Feature tags not present in the font are ignored; a user agent must not
jdaggett@2474 5266 attempt to synthesize fallback behavior based on these feature tags.
jdaggett@2474 5267
jdaggett@6436 5268 <p>This means that explicitly disabling the <span class=tag>kern</span>
jdaggett@6436 5269 feature will not affect the application of kerning data found in the
jdaggett@6436 5270 ‘<code class=property>kern</code>’ table (as opposed to kerning data
jdaggett@6436 5271 associated with the <span class=tag>kern</span> feature in the ‘<code
jdaggett@5946 5272 class=property>GPOS</code>’ table). Authors should use the ‘<a
jdaggett@5946 5273 href="#propdef-font-kerning"><code
jdaggett@5946 5274 class=property>font-kerning</code></a>’ property to explictly enable or
jdaggett@5946 5275 disable kerning since this property affects both types of kerning.
jdaggett@5946 5276
jdaggett@2509 5277 <p>If present, a value indicates an index used for glyph selection. An
jdaggett@2509 5278 &lt;integer&gt; value must be 0 or greater. A value of 0 indicates that
jdaggett@2509 5279 the feature is disabled. For boolean features, a value of 1 enables the
jdaggett@2509 5280 feature. For non-boolean features, a value of 1 or greater enables the
jdaggett@2509 5281 feature and indicates the feature selection index. A value of ‘<code
jdaggett@2509 5282 class=property>on</code>’ is synonymous with 1 and ‘<code
jdaggett@2509 5283 class=property>off</code>’ is synonymous with 0. If the value is
jdaggett@2509 5284 omitted, a value of 1 is assumed.
jdaggett@2474 5285
jdaggett@2474 5286 <pre>
jdaggett@2509 5287 font-feature-settings: "dlig" 1; /* dlig=1 enable discretionary ligatures */
jdaggett@2509 5288 font-feature-settings: "smcp" on; /* smcp=1 enable small caps */
jdaggett@2515 5289 font-feature-settings: 'c2sc'; /* c2sc=1 enable caps to small caps */
jdaggett@2509 5290 font-feature-settings: "liga" off; /* liga=0 no common ligatures */
jdaggett@2515 5291 font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
jdaggett@5530 5292 font-feature-settings: "tnum" "hist"; /* invalid, need a comma-delimited list */
jdaggett@5530 5293 font-feature-settings: "palin" off; /* good idea but invalid tagname */
jdaggett@2509 5294 font-feature-settings: "PKRN"; /* PKRN=1 enable custom feature */
jdaggett@5530 5295 font-feature-settings: dlig; /* invalid, tag must be a string */
jdaggett@2474 5296 </pre>
jdaggett@1662 5297
jdaggett@8272 5298 <p>When values greater than the range supported by the font are specified,
jdaggett@8272 5299 the behavior is explicitly undefined. For boolean features, in general
jdaggett@8272 5300 these will enable the feature. For non-boolean features, out of range
jdaggett@8272 5301 values will in general be equivalent to a 0 value. However, in both cases
jdaggett@8272 5302 the exact behavior will depend upon the way the font is designed
jdaggett@8272 5303 (specifically, which type of lookup is used to define the feature).
jdaggett@8272 5304
jdaggett@2474 5305 <p>Although specifically defined for OpenType feature tags, feature tags
jdaggett@2474 5306 for other modern font formats that support font features may be added in
jdaggett@5530 5307 the future. Where possible, features defined for other font formats should
jdaggett@5530 5308 attempt to follow the pattern of registered OpenType tags.
jdaggett@2509 5309
jdaggett@1662 5310 <div class=example>
jdaggett@1662 5311 <p>The Japanese text below will be rendered with half-width kana
jdaggett@1662 5312 characters:</p>
jdaggett@1662 5313
jdaggett@1662 5314 <pre lang=ja>
jdaggett@2509 5315 body { font-feature-settings: "hwid"; /* Half-width OpenType feature */ }
jdaggett@1662 5316
jdaggett@1662 5317 &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>
jdaggett@1662 5318 </pre>
jdaggett@1662 5319 </div>
jdaggett@1662 5320
jdaggett@2118 5321 <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
jdaggett@1732 5322 language override: the <a
jdaggett@1732 5323 href="#propdef-font-language-override">font-language-override</a> property</h3>
jdaggett@1732 5324
jdaggett@5809 5325 <table class=propdef id=namefont-language-overridevaluenormal-lt>
jdaggett@1662 5326 <tbody>
jdaggett@1662 5327 <tr>
jdaggett@1662 5328 <td>Name:
jdaggett@1662 5329
jdaggett@1732 5330 <td><dfn id=propdef-font-language-override>font-language-override</dfn>
jdaggett@1662 5331
jdaggett@1662 5332 <tr>
jdaggett@1662 5333 <td>Value:
jdaggett@1662 5334
jdaggett@8278 5335 <td><a href="#font-language-override-normal-value"
jdaggett@8278 5336 title="normal!!font-language-override">normal</a> | <a
jdaggett@8278 5337 href="#font-language-override-string-value"><var>&lt;string&gt;</var></a>
jdaggett@1662 5338
jdaggett@1662 5339 <tr>
jdaggett@1662 5340 <td>Initial:
jdaggett@1662 5341
jdaggett@8278 5342 <td><a href="#font-language-override-normal-value"
jdaggett@8278 5343 title="normal!!font-language-override">normal</a>
jdaggett@1662 5344
jdaggett@1662 5345 <tr>
jdaggett@1662 5346 <td>Applies to:
jdaggett@1662 5347
jdaggett@1662 5348 <td>all elements
jdaggett@1662 5349
jdaggett@1662 5350 <tr>
jdaggett@1662 5351 <td>Inherited:
jdaggett@1662 5352
jdaggett@1662 5353 <td>yes
jdaggett@1662 5354
jdaggett@1662 5355 <tr>
jdaggett@1662 5356 <td>Percentages:
jdaggett@1662 5357
jdaggett@1662 5358 <td>N/A
jdaggett@1662 5359
jdaggett@1662 5360 <tr>
jdaggett@1662 5361 <td>Media:
jdaggett@1662 5362
jdaggett@1662 5363 <td>visual
jdaggett@1662 5364
jdaggett@1662 5365 <tr>
jdaggett@1662 5366 <td>Computed value:
jdaggett@1662 5367
jdaggett@1662 5368 <td>as specified
jdaggett@7377 5369
jdaggett@7377 5370 <tr>
jdaggett@7377 5371 <td>Animatable:
jdaggett@7377 5372
jdaggett@7377 5373 <td>no
jdaggett@1662 5374 </table>
jdaggett@1662 5375
jdaggett@8278 5376 <p>Normally, authors can control the use of language-specific glyph
jdaggett@8278 5377 substitutions and positioning by setting the content language of an
jdaggett@8278 5378 element, as <a href="#language-specific-support">described above</a>:
jdaggett@8278 5379
jdaggett@8278 5380 <pre>&lt;!-- Display text using S'gaw Karen specific features -->
jdaggett@8387 5381 &lt;p lang="ksw">...&lt;/p></pre>
jdaggett@8278 5382
jdaggett@8278 5383 <p>In some cases, authors may need to specify a language system that
jdaggett@8278 5384 differs from the content language, for example due to the need to mimic
jdaggett@8278 5385 another language's typographic traditions. The ‘<a
jdaggett@8278 5386 href="#propdef-font-language-override"><code
jdaggett@8278 5387 class=property>font-language-override</code></a>’ property allows
jdaggett@8278 5388 authors to explicitly specify the language system of the font, overriding
jdaggett@8278 5389 the language system implied by the content language.
jdaggett@8278 5390
jdaggett@8278 5391 <p>Values have the following meanings:
jdaggett@8278 5392
jdaggett@8278 5393 <dl>
jdaggett@8278 5394 <dt><dfn id=font-language-override-normal-value
jdaggett@8278 5395 title="normal!!font-language-override">normal</dfn>
jdaggett@8278 5396
jdaggett@8278 5397 <dd>specifies that when rendering with OpenType fonts, the content
jdaggett@8278 5398 language of the element is used to infer the OpenType language system
jdaggett@8278 5399
jdaggett@8278 5400 <dt><dfn
jdaggett@8278 5401 id=font-language-override-string-value><var>&lt;string&gt;</var></dfn>
jdaggett@8278 5402
jdaggett@8368 5403 <dd>single three-letter case-sensitive OpenType <a
jdaggett@8278 5404 href="http://www.microsoft.com/typography/otspec/languagetags.htm">language
jdaggett@8278 5405 system tag</a>, specifies the OpenType language system to be used instead
jdaggett@8278 5406 of the language system implied by the language of the element
jdaggett@8278 5407 </dl>
jdaggett@8385 5408 <!-- For this level, string represents a single language code, there's no concept of "fallback"
jdaggett@8385 5409 http://www.w3.org/2013/06/07-css-minutes.html#item04 -->
jdaggett@1662 5410
jdaggett@8312 5411 <p>Use of invalid OpenType language system tags must not generate a parse
jdaggett@8312 5412 error but must be ignored when doing glyph selection and placement.
jdaggett@8312 5413
jdaggett@1662 5414 <div class=example>
jdaggett@7179 5415 <p>The <a href="http://www.un.org/en/documents/udhr/index.shtml">Universal
jdaggett@1662 5416 Declaration of Human Rights</a> has been translated into a wide variety
jdaggett@1662 5417 of languages. In Turkish, Article 9 of this document might be marked up
jdaggett@1662 5418 as below:</p>
jdaggett@1662 5419
jdaggett@1662 5420 <pre lang=tr>&lt;body lang="tr">
jdaggett@1662 5421
jdaggett@1662 5422 &lt;h4>Madde 9&lt;/h4>
jdaggett@1662 5423 &lt;p>Hiç kimse keyfi olarak tutuklanamaz, alıkonulanamaz veya sürülemez.&lt;/p>
jdaggett@1662 5424 </pre>
jdaggett@1662 5425
jdaggett@1662 5426 <p>Here the user agent uses the value of the ‘<code
jdaggett@1662 5427 class=property>lang</code>’ attribute when rendering text and
jdaggett@1662 5428 appropriately renders this text without ‘<code
jdaggett@4624 5429 class=property>fi</code>’ ligatures. There is no need to use the ‘<a
jdaggett@4624 5430 href="#propdef-font-language-override"><code
jdaggett@4624 5431 class=property>font-language-override</code></a>’ property.</p>
jdaggett@1662 5432
jdaggett@1662 5433 <p>However, a given font may lack support for a specific language. In this
jdaggett@1662 5434 situation authors may need to use the typographic conventions of a
jdaggett@1662 5435 related language that are supported by that font:</p>
jdaggett@1662 5436
jdaggett@1662 5437 <pre lang=mk>&lt;body lang="mk"> &lt;!-- Macedonian lang code --&gt;
jdaggett@1662 5438
jdaggett@1732 5439 body { font-language-override: "SRB"; /* Serbian OpenType language tag */ }
jdaggett@1662 5440
jdaggett@1662 5441 &lt;h4>Члeн 9&lt;/h4>
jdaggett@1662 5442 &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>
jdaggett@1662 5443
jdaggett@1662 5444 </pre>
jdaggett@1662 5445
jdaggett@1662 5446 <p>The Macedonian text here will be rendered using Serbian typographic
jdaggett@1662 5447 conventions, with the assumption that the font specified supports
jdaggett@1662 5448 Serbian.</p>
jdaggett@1662 5449 </div>
jdaggett@1662 5450
jdaggett@6176 5451 <p><a id=rendering-considerations></a>
jdaggett@6176 5452
jdaggett@6699 5453 <h2 id=font-feature-resolution><span class=secno>7 </span>Font Feature
jdaggett@6699 5454 Resolution</h2>
jdaggett@6176 5455
jdaggett@6176 5456 <p>As described in the previous section, font features can be enabled in a
jdaggett@8278 5457 variety of ways, either via the use of <a href="#propdef-font-variant"
jdaggett@8278 5458 title="font-variant!!property">‘<code
jdaggett@8279 5459 class=property>font-variant</code>’</a> or <a
jdaggett@8279 5460 href="#propdef-font-feature-settings"
jdaggett@8279 5461 title="font-feature-settings!!property">‘<code
jdaggett@8279 5462 class=property>font-feature-settings</code>’</a> in a style rule or
jdaggett@8311 5463 within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
jdaggett@8311 5464 The resolution order for the union of these settings is defined below.
jdaggett@8311 5465 Features defined via CSS properties are applied on top of layout engine
jdaggett@8311 5466 default features.
jdaggett@6176 5467
jdaggett@6699 5468 <h3 id=default-features><span class=secno>7.1 </span>Default features</h3>
jdaggett@6699 5469
jdaggett@6176 5470 <p>For OpenType fonts, user agents must enable the default features defined
jdaggett@6436 5471 in the OpenType documentation for a given script and writing mode.
jdaggett@6436 5472 Required ligatures, common ligatures and contextual forms must be enabled
jdaggett@6436 5473 by default (OpenType features: <span class=tag>rlig, liga, clig,
jdaggett@6436 5474 calt</span>), along with localized forms (OpenType feature: <span
jdaggett@6436 5475 class=tag>locl</span>), and features required for proper display of
jdaggett@6436 5476 composed characters and marks (OpenType features: <span class=tag>ccmp,
jdaggett@6436 5477 mark, mkmk</span>). These features must always be enabled, even when the
jdaggett@8278 5478 value of the <a href="#propdef-font-variant"
jdaggett@8278 5479 title="font-variant!!property">‘<code
jdaggett@8279 5480 class=property>font-variant</code>’</a> and <a
jdaggett@8279 5481 href="#propdef-font-feature-settings"
jdaggett@8279 5482 title="font-feature-settings!!property">‘<code
jdaggett@8368 5483 class=property>font-feature-settings</code>’</a> properties is <span
jdaggett@8368 5484 title="normal value">‘<code class=property>normal</code>’</span>.
jdaggett@8368 5485 Individual features are only disabled when explicitly overridden by the
jdaggett@8368 5486 author, as when ‘<a href="#propdef-font-variant-ligatures"><code
jdaggett@6176 5487 class=property>font-variant-ligatures</code></a>’ is set to ‘<a
jdaggett@6176 5488 href="#no-common-ligatures"><code
jdaggett@7377 5489 class=property>no-common-ligatures</code></a>’. For handling complex
jdaggett@7377 5490 scripts such as <a
jdaggett@6176 5491 href="http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>,
jdaggett@6176 5492 <a
jdaggett@6176 5493 href="http://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a>
jdaggett@6176 5494 or <a
jdaggett@6176 5495 href="http://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a>
jdaggett@6436 5496 additional features are required. For upright text within vertical text
jdaggett@6436 5497 runs, vertical alternates (OpenType feature: <span class=tag>vert</span>)
jdaggett@6436 5498 must be enabled.
jdaggett@1662 5499
jdaggett@6699 5500 <h3 id=feature-precedence><span class=secno>7.2 </span>Feature precedence</h3>
jdaggett@6699 5501
jdaggett@8356 5502 <p>General and <a href="#font-specific"><em>font specific</em></a> font
jdaggett@8356 5503 feature property settings are resolved in the order below, in ascending
jdaggett@8360 5504 order of precedence. This ordering is used to construct a combined list of
jdaggett@8356 5505 font features that affect a given text run.
jdaggett@1662 5506
jdaggett@1662 5507 <ol>
jdaggett@6436 5508 <li>Font features enabled by default, including features required for a
jdaggett@6436 5509 given script.
jdaggett@6176 5510
jdaggett@8311 5511 <li>If the font is defined via an <a
jdaggett@8311 5512 href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
jdaggett@8311 5513 features implied by the font-variant descriptor in the <a
jdaggett@8311 5514 href="#at-font-face-rule"><code>@font-face</code></a> rule.
jdaggett@8311 5515
jdaggett@8311 5516 <li>If the font is defined via an <a
jdaggett@8311 5517 href="#at-font-face-rule"><code>@font-face</code></a> rule, the font
jdaggett@8311 5518 features implied by the font-feature-settings descriptor in the <a
jdaggett@8311 5519 href="#at-font-face-rule"><code>@font-face</code></a> rule.
jdaggett@1662 5520
jdaggett@8278 5521 <li>Feature settings determined by properties other than <a
jdaggett@8278 5522 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8279 5523 class=property>font-variant</code>’</a> or <a
jdaggett@8279 5524 href="#propdef-font-feature-settings"
jdaggett@8279 5525 title="font-feature-settings!!property">‘<code
jdaggett@8279 5526 class=property>font-feature-settings</code>’</a>. For example, setting
jdaggett@8279 5527 a non-default value for the ‘<code
jdaggett@8360 5528 class=property>letter-spacing</code>’ property disables common
jdaggett@8360 5529 ligatures.
jdaggett@6176 5530
jdaggett@8278 5531 <li>Font features implied by the value of the <a
jdaggett@8278 5532 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8313 5533 class=property>font-variant</code>’</a> property, the related <a
jdaggett@8313 5534 href="#propdef-font-variant" title="font-variant!!property">‘<code
jdaggett@8313 5535 class=property>font-variant</code>’</a> subproperties and any other CSS
jdaggett@8360 5536 property that uses OpenType features (e.g. the ‘<a
jdaggett@8313 5537 href="#propdef-font-kerning"><code
jdaggett@4624 5538 class=property>font-kerning</code></a>’ property).
jdaggett@4624 5539
jdaggett@8279 5540 <li>Font features implied by the value of <a
jdaggett@8279 5541 href="#propdef-font-feature-settings"
jdaggett@8279 5542 title="font-feature-settings!!property">‘<code
jdaggett@8279 5543 class=property>font-feature-settings</code>’</a> property.
jdaggett@1662 5544 </ol>
jdaggett@1662 5545
jdaggett@3511 5546 <p>This ordering allows authors to set up a general set of defaults for
jdaggett@8311 5547 fonts within their <a
jdaggett@8311 5548 href="#at-font-face-rule"><code>@font-face</code></a> rules, then override
jdaggett@8311 5549 them with property settings for specific elements. General property
jdaggett@8311 5550 settings override the settings in <a
jdaggett@8311 5551 href="#at-font-face-rule"><code>@font-face</code></a> rules and low-level
jdaggett@8311 5552 font feature settings override <a href="#propdef-font-variant"
jdaggett@8278 5553 title="font-variant!!property">‘<code
jdaggett@8278 5554 class=property>font-variant</code>’</a> property settings.
jdaggett@1732 5555
jdaggett@1732 5556 <p>For situations where the combined list of font feature settings contains
jdaggett@3511 5557 more than one value for the same feature, the last value is used. When a
jdaggett@3511 5558 font lacks support for a given underlying font feature, text is simply
jdaggett@3511 5559 rendered as if that font feature was not enabled; font fallback does not
jdaggett@3511 5560 occur and no attempt is made to synthesize the feature except where
jdaggett@8360 5561 explicitly defined for specific properties.
jdaggett@1662 5562
jdaggett@6699 5563 <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
jdaggett@6699 5564 precedence examples</h3>
jdaggett@6699 5565
jdaggett@1662 5566 <div class=example>
jdaggett@1662 5567 <p>With the styles below, numbers are rendered proportionally when used
jdaggett@1662 5568 within a paragraph but are shown in tabular form within tables of prices:</p>
jdaggett@1662 5569
jdaggett@8277 5570 <pre>body {
jdaggett@8277 5571 font-variant-numeric: proportional-nums;
jdaggett@1662 5572 }
jdaggett@1662 5573
jdaggett@1662 5574 table.prices td {
jdaggett@8277 5575 font-variant-numeric: tabular-nums;
jdaggett@1662 5576 }
jdaggett@1662 5577 </pre>
jdaggett@1662 5578 </div>
jdaggett@1662 5579
jdaggett@1662 5580 <div class=example>
jdaggett@8360 5581 <p>When the <a href="#descdef-font-variant"
jdaggett@8360 5582 title="font-variant!!descriptor">font-variant</a> descriptor is used
jdaggett@8360 5583 within an <a href="#at-font-face-rule"><code>@font-face</code></a> rule,
jdaggett@8360 5584 it only applies to the font defined by that rule.</p>
jdaggett@1662 5585
jdaggett@1662 5586 <pre>@font-face {
jdaggett@1662 5587 font-family: MainText;
jdaggett@2556 5588 src: url(http://example.com/font.ttf);
jdaggett@1662 5589 font-variant: oldstyle-nums proportional-nums styleset(1,3);
jdaggett@1662 5590 }
jdaggett@1662 5591
jdaggett@1662 5592 body {
jdaggett@1662 5593 font-family: MainText, Helvetica;
jdaggett@1662 5594 }
jdaggett@1662 5595
jdaggett@1662 5596 table.prices td {
jdaggett@8277 5597 font-variant-numeric: tabular-nums;
jdaggett@1662 5598 }
jdaggett@1662 5599 </pre>
jdaggett@1662 5600
jdaggett@1662 5601 <p>In this case, old-style numerals will be used throughout but only where
jdaggett@1662 5602 the font "MainText" is used. Just as in the previous example, tabular
jdaggett@4624 5603 values will be used in price tables since ‘<a
jdaggett@4624 5604 href="#tabular-nums"><code class=property>tabular-nums</code></a>’
jdaggett@4624 5605 appears in a general style rule and its use is mutually exclusive with
jdaggett@4624 5606 ‘<a href="#proportional-nums"><code
jdaggett@4624 5607 class=property>proportional-nums</code></a>’. Stylistic alternate sets
jdaggett@4624 5608 will only be used where MainText is used.</p>
jdaggett@1662 5609 </div>
jdaggett@1662 5610
jdaggett@1662 5611 <div class=example>
jdaggett@8311 5612 <p>The <a href="#at-font-face-rule"><code>@font-face</code></a> rule can
jdaggett@8311 5613 also be used to access font features in locally available fonts via the
jdaggett@8311 5614 use of <code>local()</code> in the ‘<a href="#descdef-src"><code
jdaggett@8311 5615 class=property>src</code></a>’ descriptor of the <a
jdaggett@8311 5616 href="#at-font-face-rule"><code>@font-face</code></a> definition:</p>
jdaggett@1662 5617
jdaggett@1662 5618 <pre>@font-face {
jdaggett@1662 5619 font-family: BodyText;
jdaggett@1662 5620 src: local("HiraMaruPro-W4");
jdaggett@1662 5621 font-variant: proportional-width;
jdaggett@2509 5622 font-feature-settings: "ital"; /* Latin italics within CJK text feature */
jdaggett@1662 5623 }
jdaggett@1662 5624
jdaggett@1662 5625 body { font-family: BodyText, serif; }
jdaggett@1662 5626 </pre>
jdaggett@1662 5627
jdaggett@1662 5628 <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When
jdaggett@1662 5629 text rendering occurs, Japanese kana will be proportionally spaced and
jdaggett@1662 5630 Latin text will be italicised. Text rendered with the fallback serif font
jdaggett@1662 5631 will use default rendering properties.</p>
jdaggett@1662 5632 </div>
jdaggett@1662 5633
jdaggett@1662 5634 <div class=example>
jdaggett@3460 5635 <p>In the example below, discretionary ligatures are enabled only for a
jdaggett@1662 5636 downloadable font but are disabled within spans of class "special":</p>
jdaggett@1662 5637
jdaggett@1662 5638 <pre>@font-face {
jdaggett@1662 5639 font-family: main;
jdaggett@1662 5640 src: url(fonts/ffmeta.woff) format("woff");
jdaggett@3460 5641 font-variant: discretionary-ligatures;
jdaggett@1662 5642 }
jdaggett@1662 5643
jdaggett@1662 5644 body { font-family: main, Helvetica; }
jdaggett@3460 5645 span.special { font-variant-ligatures: no-discretionary-ligatures; }
jdaggett@1662 5646 </pre>
jdaggett@1662 5647
jdaggett@8360 5648 <p>Suppose one adds a rule using ‘<code
jdaggett@8360 5649 class=property>font-feature-settings</code>’ to enable discretionary
jdaggett@8360 5650 ligatures:</p>
jdaggett@1662 5651
jdaggett@1662 5652 <pre>body { font-family: main, Helvetica; }
jdaggett@2509 5653 span { font-feature-settings: "dlig"; }
jdaggett@3460 5654 span.special { font-variant-ligatures: no-discretionary-ligatures; }
jdaggett@1662 5655 </pre>
jdaggett@1662 5656
jdaggett@8360 5657 <p>In this case, discretionary ligatures <em>will</em> be rendered within
jdaggett@8360 5658 spans of class "special". This is because both the <a
jdaggett@8279 5659 href="#propdef-font-feature-settings"
jdaggett@8279 5660 title="font-feature-settings!!property">‘<code
jdaggett@8279 5661 class=property>font-feature-settings</code>’</a> and ‘<a
jdaggett@4624 5662 href="#propdef-font-variant-ligatures"><code
jdaggett@4624 5663 class=property>font-variant-ligatures</code></a>’ properties apply to
jdaggett@4624 5664 these spans. Although the ‘<code class=css>no-discretionary
jdaggett@4624 5665 ligatures</code>’ setting of ‘<a
jdaggett@4624 5666 href="#propdef-font-variant-ligatures"><code
jdaggett@4624 5667 class=property>font-variant-ligatures</code></a>’ effectively disables
jdaggett@8279 5668 the OpenType <span class=tag>dlig</span> feature, because the <a
jdaggett@8279 5669 href="#propdef-font-feature-settings"
jdaggett@8279 5670 title="font-feature-settings!!property">‘<code
jdaggett@8279 5671 class=property>font-feature-settings</code>’</a> is resolved after
jdaggett@8279 5672 that, the ‘<code class=property>dlig</code>’ value reenables
jdaggett@4624 5673 discretionary ligatures.</p>
jdaggett@1662 5674 </div>
jdaggett@1244 5675
jdaggett@7021 5676 <h2 id=object-model><span class=secno>8 </span>Object Model</h2>
jdaggett@7021 5677
jdaggett@8311 5678 <p>The contents of <a href="#at-font-face-rule"><code>@font-face</code></a>
jdaggett@8311 5679 and <a
jdaggett@8311 5680 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8311 5681 rules can be accessed via the following extensions to the CSS Object
jdaggett@8311 5682 Model.
jdaggett@7021 5683
jdaggett@7021 5684 <h3 id=om-fontface><span class=secno>8.1 </span>The <a
jdaggett@7021 5685 href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> interface</h3>
jdaggett@7021 5686
jdaggett@7021 5687 <p>The <dfn id=cssfontfacerule>CSSFontFaceRule</dfn> interface represents a
jdaggett@8311 5688 <a href="#at-font-face-rule"><code>@font-face</code></a> rule.
jdaggett@7021 5689
jdaggett@7021 5690 <pre class=idl>
jdaggett@7021 5691 interface CSSFontFaceRule : CSSRule {
jdaggett@7041 5692 attribute DOMString family;
jdaggett@7041 5693 attribute DOMString src;
jdaggett@7041 5694 attribute DOMString style;
jdaggett@7041 5695 attribute DOMString weight;
jdaggett@7041 5696 attribute DOMString stretch;
jdaggett@7041 5697 attribute DOMString unicodeRange;
jdaggett@7041 5698 attribute DOMString variant;
jdaggett@7041 5699 attribute DOMString featureSettings;
jdaggett@7021 5700 }</pre>
jdaggett@7021 5701
jdaggett@7022 5702 <p>The DOM Level 2 Style specification <a href="#DOM-LEVEL-2-STYLE"
jdaggett@7022 5703 rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
jdaggett@7022 5704 defined a different variant of this rule. This definition supercedes that
jdaggett@7022 5705 one.
jdaggett@7021 5706
jdaggett@7021 5707 <h3 id=om-fontfeaturevalues><span class=secno>8.2 </span>The <a
jdaggett@7021 5708 href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
jdaggett@7021 5709 interface</h3>
jdaggett@7021 5710
jdaggett@7021 5711 <p>The <code>CSSRule</code> interface is extended as follows:
jdaggett@7021 5712
jdaggett@7021 5713 <pre class=idl>partial interface CSSRule {
jdaggett@7021 5714 const unsigned short FONT_FEATURE_VALUES_RULE = 14;
jdaggett@7021 5715 }</pre>
jdaggett@7021 5716
jdaggett@7021 5717 <p>The <dfn id=cssfontfeaturevaluesrule>CSSFontFeatureValuesRule</dfn>
jdaggett@8311 5718 interface represents a <a
jdaggett@8311 5719 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8311 5720 rule.
jdaggett@7021 5721
jdaggett@7021 5722 <pre class=idl>interface CSSFontFeatureValuesRule : CSSRule {
jdaggett@7021 5723 readonly attribute DOMString familyList;
jdaggett@7021 5724 readonly attribute DOMString valueText;
jdaggett@7021 5725 };</pre>
jdaggett@7021 5726
jdaggett@7021 5727 <dl class=idl-attributes>
jdaggett@7021 5728 <dt><var>familyList</var> of type <code>DOMString</code>, readonly
jdaggett@7021 5729
jdaggett@7021 5730 <dd>The list of one or more font families for which a given set of feature
jdaggett@7021 5731 values is defined.
jdaggett@7021 5732
jdaggett@7021 5733 <dt><var>valueText</var> of type <code>DOMString</code>, readonly
jdaggett@7021 5734
jdaggett@7021 5735 <dd>Serialized set of feature values.
jdaggett@7021 5736 </dl>
jdaggett@7021 5737
jdaggett@8365 5738 <p class=issue>This needs to be reworked along the lines of <a
jdaggett@8365 5739 href="http://lists.w3.org/Archives/Public/www-style/2013May/0781.html">Tab's
jdaggett@8365 5740 proposal</a> for a rule containing a family list and map objects for each
jdaggett@8365 5741 of the feature types.
jdaggett@8279 5742
jdaggett@2737 5743 <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
jdaggett@1662 5744 properties to CSS properties</h2>
jdaggett@1662 5745
jdaggett@1662 5746 <p><em>This appendix is included as background for some of the problems and
jdaggett@890 5747 situations that are described in other sections. It should be viewed as
jdaggett@890 5748 informative only.</em>
jdaggett@890 5749
jdaggett@512 5750 <p>Font properties in CSS are designed to be independent of the underlying
jdaggett@512 5751 font formats used; they can be used to specify bitmap fonts, Type1 fonts,
jdaggett@890 5752 SVG fonts in addition to the common TrueType and OpenType fonts. But there
jdaggett@1244 5753 are facets of the TrueType and OpenType formats that often cause confusion
jdaggett@2556 5754 for authors and present challenges to implementers on different platforms.
jdaggett@1244 5755
jdaggett@1244 5756 <p>Originally developed at Apple, TrueType was designed as an outline font
jdaggett@1244 5757 format for both screen and print. Microsoft joined Apple in developing the
jdaggett@1244 5758 TrueType format and both platforms have supported TrueType fonts since
jdaggett@1244 5759 then. Font data in the TrueType format consists of a set of tables
jdaggett@1244 5760 distinguished with common four-letter tag names, each containing a
jdaggett@1244 5761 specific type of data. For example, naming information, including
jdaggett@1244 5762 copyright and license information, is stored in the ‘<code
jdaggett@7311 5763 class=property>name</code>’ table. The <a
jdaggett@7311 5764 href="#character-map"><em>character map</em></a> (‘<code
jdaggett@1244 5765 class=property>cmap</code>’) table contains a mapping of character
jdaggett@1244 5766 encodings to glyphs. Apple later added additional tables for supporting
jdaggett@1244 5767 enhanced typographic functionality; these are now called Apple Advanced
jdaggett@1244 5768 Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of
jdaggett@1662 5769 tables for advanced typography and called their format OpenType <a
jdaggett@1662 5770 href="#OPENTYPE" rel=biblioentry>[OPENTYPE]<!--{{!OPENTYPE}}--></a>.
jdaggett@890 5771
jdaggett@890 5772 <p>In many cases the font data used under Microsoft Windows or Linux is
jdaggett@890 5773 slightly different from the data used under Apple's Mac OS X because the
jdaggett@6694 5774 TrueType format allowed for explicit variation across platforms. This
jdaggett@7311 5775 includes font metrics, names and <a href="#character-map"><em>character
jdaggett@7311 5776 map</em></a> data.
jdaggett@6694 5777
jdaggett@6694 5778 <p>Specifically, font family name data is handled differently across
jdaggett@6694 5779 platforms. For TrueType and OpenType fonts these names are contained in
jdaggett@6694 5780 the ‘<code class=property>name</code>’ table, in name records with
jdaggett@8276 5781 name ID 1. Mulitple names can be stored for different locales, but
jdaggett@6694 5782 Microsoft recommends fonts always include at least a US English version of
jdaggett@6694 5783 the name. On Windows, Microsoft made the decision for backwards
jdaggett@6694 5784 compatibility to limit this family name to a maximum of four faces; for
jdaggett@6694 5785 larger groupings the "preferred family" (name ID 16) or "WWS family" (name
jdaggett@6694 5786 ID 21) can be used. Other platforms such as OSX don't have this
jdaggett@8276 5787 limitation, so the family name is used to define all possible groupings.
jdaggett@6694 5788
jdaggett@6694 5789 <p>Other name table data provides names used to uniquely identify a
jdaggett@6694 5790 specific face within a family. The full font name (name ID 4) and the
jdaggett@8276 5791 Postscript name (name ID 6) describe a single face uniquely. For example,
jdaggett@8276 5792 the bold face of the Gill Sans family has a fullname of "Gill Sans Bold"
jdaggett@8276 5793 and a Postscript name of "GillSans-Bold". There can be multiple localized
jdaggett@8276 5794 versions of the fullname for a given face, but the Postscript name is
jdaggett@1244 5795 always a unique name made from a limited set of ASCII characters.
jdaggett@1244 5796
jdaggett@1244 5797 <p>On various platforms, different names are used to search for a font. For
jdaggett@1244 5798 example, with the Windows GDI CreateIndirectFont API, either a family or
jdaggett@8276 5799 fullname can be used to lookup a face, while on Mac OS X the
jdaggett@8095 5800 CTFontCreateWithName API call is used to lookup a given face using the
jdaggett@8095 5801 fullname and Postscript name. Under Linux, the fontconfig API allows fonts
jdaggett@8095 5802 to be searched using any of these names. In situations where platform
jdaggett@8095 5803 API's automatically substitute other font choices, it may be necessary to
jdaggett@8095 5804 verify a returned font matches a given name.
jdaggett@1244 5805
jdaggett@1244 5806 <p>The weight of a given face can be determined via the usWeightClass field
jdaggett@1244 5807 of the OS/2 table or inferred from the style name (name ID 2). Likewise,
jdaggett@1244 5808 the width can be determined via the usWidthClass of the OS/2 table or
jdaggett@6694 5809 inferred from the style name. For historical reasons related to synthetic
jdaggett@6694 5810 bolding at weights 200 or lower with the Windows GDI API, font designers
jdaggett@6694 5811 have sometimes skewed values in the OS/2 table to avoid these weights.
jdaggett@1244 5812
jdaggett@1244 5813 <p>Rendering complex scripts that use contextual shaping such as Thai,
jdaggett@1244 5814 Arabic and Devanagari requires features present only in OpenType or AAT
jdaggett@1244 5815 fonts. Currently, complex script rendering is supported on Windows and
jdaggett@7521 5816 Linux using OpenType font features while both OpenType and AAT font
jdaggett@7521 5817 features are used under Mac OS X.
jdaggett@1244 5818
jdaggett@2472 5819 <h2 class=no-num id=ch-ch-ch-changes>Changes</h2>
jdaggett@2472 5820
jdaggett@2472 5821 <h3 class=no-num id=recent-changes> Changes from the <a
jdaggett@7451 5822 href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">February 2013
jdaggett@7242 5823 CSS3 Fonts Working Draft</a></h3>
jdaggett@2472 5824
jdaggett@2472 5825 <p>Major changes include:
jdaggett@2472 5826
jdaggett@2472 5827 <ul>
jdaggett@7521 5828 <li>Moved font load events into a separate <a
jdaggett@7521 5829 href="http://dev.w3.org/csswg/css3-font-load-events/">spec</a>
jdaggett@7679 5830
jdaggett@8356 5831 <li>Tightened syntax rules for <a
jdaggett@8311 5832 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@7679 5833 rules
jdaggett@8031 5834
jdaggett@8311 5835 <li>Added grammar productions for <a
jdaggett@8311 5836 href="#at-font-face-rule"><code>@font-face</code></a> and <a
jdaggett@8311 5837 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8311 5838 rules
jdaggett@8095 5839
jdaggett@8095 5840 <li>Tightened definition of synthetic oblique
jdaggett@8225 5841
jdaggett@8225 5842 <li>Revised definition of ‘<a href="#descdef-unicode-range"><code
jdaggett@8225 5843 class=property>unicode-range</code></a>’ descriptor
jdaggett@2472 5844 </ul>
jdaggett@2472 5845
jdaggett@529 5846 <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
jdaggett@529 5847
jdaggett@1662 5848 <p>I'd like to thank Tal Leming, Jonathan Kew and Christopher Slye for all
jdaggett@1662 5849 their help and feedback. John Hudson was kind enough to take the time to
jdaggett@2472 5850 explain the subtleties of OpenType language tags and provided the example
jdaggett@2472 5851 of character variant usage for displaying text on Byzantine seals. Ken
jdaggett@2472 5852 Lunde and Eric Muller provided valuable feedback on CJK OpenType features
jdaggett@2472 5853 and Unicode variation selectors. The idea for supporting font features by
jdaggett@8313 5854 using <a href="#propdef-font-variant"
jdaggett@8313 5855 title="font-variant!!property">‘<code
jdaggett@8313 5856 class=property>font-variant</code>’</a> subproperties originated with
jdaggett@8313 5857 Håkon Wium Lie, Adam Twardoch and Tal Leming. Elika Etemad supplied some
jdaggett@8313 5858 of the initial design ideas for the <a
jdaggett@8311 5859 href="#at-font-feature-values-rule"><code>@font-feature-values</code></a>
jdaggett@8311 5860 rule. Thanks also to House Industries for allowing the use of Ed Interlock
jdaggett@8311 5861 in the discretionary ligatures example.
jdaggett@1662 5862
jdaggett@529 5863 <p>A special thanks to Robert Bringhurst for the sublime mind expansion
jdaggett@529 5864 that is <em>The Elements of Typographic Style</em>.
jdaggett@529 5865
jdaggett@7242 5866 <h2 class=no-num id=conformance> Conformance</h2>
jdaggett@7242 5867
jdaggett@7242 5868 <h3 class=no-num id=conventions> Document Conventions</h3>
jdaggett@7242 5869
jdaggett@7242 5870 <p>Conformance requirements are expressed with a combination of descriptive
jdaggett@7242 5871 assertions and RFC 2119 terminology. The key words “MUST”, “MUST
jdaggett@7242 5872 NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
jdaggett@7242 5873 “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
jdaggett@7242 5874 normative parts of this document are to be interpreted as described in RFC
jdaggett@7242 5875 2119. However, for readability, these words do not appear in all uppercase
jdaggett@7242 5876 letters in this specification.
jdaggett@7242 5877
jdaggett@7242 5878 <p>All of the text of this specification is normative except sections
jdaggett@7242 5879 explicitly marked as non-normative, examples, and notes. <a
jdaggett@7242 5880 href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
jdaggett@7242 5881
jdaggett@7242 5882 <p>Examples in this specification are introduced with the words “for
jdaggett@7242 5883 example” or are set apart from the normative text with
jdaggett@7242 5884 <code>class="example"</code>, like this:
jdaggett@7242 5885
jdaggett@7242 5886 <div class=example>
jdaggett@7242 5887 <p>This is an example of an informative example.
jdaggett@7242 5888 </div>
jdaggett@7242 5889
jdaggett@7242 5890 <p>Informative notes begin with the word “Note” and are set apart from
jdaggett@7242 5891 the normative text with <code>class="note"</code>, like this:
jdaggett@7242 5892
jdaggett@7242 5893 <p class=note>Note, this is an informative note.
jdaggett@7242 5894
jdaggett@7242 5895 <h3 class=no-num id=conformance-classes> Conformance Classes</h3>
jdaggett@7242 5896
jdaggett@7242 5897 <p>Conformance to CSS Fonts Level 3 Module is defined for three conformance
jdaggett@7242 5898 classes:
jdaggett@7242 5899
jdaggett@7242 5900 <dl>
jdaggett@7243 5901 <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
jdaggett@7242 5902 sheet</dfn>
jdaggett@7242 5903
jdaggett@7242 5904 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
jdaggett@7242 5905 style sheet</a>.
jdaggett@7242 5906
jdaggett@7243 5907 <dt><dfn id=renderer>renderer</dfn>
jdaggett@7242 5908
jdaggett@7242 5909 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
jdaggett@7242 5910 that interprets the semantics of a style sheet and renders documents that
jdaggett@7242 5911 use them.
jdaggett@7242 5912
jdaggett@7242 5913 <dt><dfn id=authoring-tool>authoring tool</dfn>
jdaggett@7242 5914
jdaggett@7242 5915 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
jdaggett@7242 5916 that writes a style sheet.
jdaggett@7242 5917 </dl>
jdaggett@7242 5918
jdaggett@7242 5919 <p>A style sheet is conformant to CSS Fonts Level 3 Module if all of its
jdaggett@7242 5920 declarations that use properties defined in this module have values that
jdaggett@7242 5921 are valid according to the generic CSS grammar and the individual grammars
jdaggett@7242 5922 of each property as given in this module.
jdaggett@7242 5923
jdaggett@7242 5924 <p>A renderer is conformant to CSS Fonts Level 3 Module if, in addition to
jdaggett@7242 5925 interpreting the style sheet as defined by the appropriate specifications,
jdaggett@7242 5926 it supports all the features defined by CSS Fonts Level 3 Module by
jdaggett@7242 5927 parsing them correctly and rendering the document accordingly. However,
jdaggett@7242 5928 the inability of a UA to correctly render a document due to limitations of
jdaggett@7242 5929 the device does not make the UA non-conformant. (For example, a UA is not
jdaggett@7242 5930 required to render color on a monochrome monitor.)
jdaggett@7242 5931
jdaggett@7242 5932 <p>An authoring tool is conformant to CSS Fonts Level 3 Module if it writes
jdaggett@7242 5933 style sheets that are syntactically correct according to the generic CSS
jdaggett@7242 5934 grammar and the individual grammars of each feature in this module, and
jdaggett@7242 5935 meet all other conformance requirements of style sheets as described in
jdaggett@7242 5936 this module.
jdaggett@7242 5937
jdaggett@7242 5938 <h3 class=no-num id=partial> Partial Implementations</h3>
jdaggett@7242 5939
jdaggett@7242 5940 <p>So that authors can exploit the forward-compatible parsing rules to
jdaggett@7242 5941 assign fallback values, CSS renderers <strong>must</strong> treat as
jdaggett@7242 5942 invalid (and <a
jdaggett@7242 5943 href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
jdaggett@7242 5944 appropriate</a>) any at-rules, properties, property values, keywords, and
jdaggett@7242 5945 other syntactic constructs for which they have no usable level of support.
jdaggett@7242 5946 In particular, user agents <strong>must not</strong> selectively ignore
jdaggett@7242 5947 unsupported component values and honor supported values in a single
jdaggett@7242 5948 multi-value property declaration: if any value is considered invalid (as
jdaggett@7242 5949 unsupported values must be), CSS requires that the entire declaration be
jdaggett@7242 5950 ignored.
jdaggett@7242 5951
jdaggett@7242 5952 <h3 class=no-num id=experimental> Experimental Implementations</h3>
jdaggett@7242 5953
jdaggett@7242 5954 <p>To avoid clashes with future CSS features, the CSS2.1 specification
jdaggett@7242 5955 reserves a <a
jdaggett@7242 5956 href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
jdaggett@7242 5957 syntax</a> for proprietary and experimental extensions to CSS.
jdaggett@7242 5958
jdaggett@7242 5959 <p>Prior to a specification reaching the Candidate Recommendation stage in
jdaggett@7242 5960 the W3C process, all implementations of a CSS feature are considered
jdaggett@7242 5961 experimental. The CSS Working Group recommends that implementations use a
jdaggett@7242 5962 vendor-prefixed syntax for such features, including those in W3C Working
jdaggett@7242 5963 Drafts. This avoids incompatibilities with future changes in the draft.
jdaggett@7242 5964
jdaggett@7242 5965 <h3 class=no-num id=testing> Non-Experimental Implementations</h3>
jdaggett@7242 5966
jdaggett@7242 5967 <p>Once a specification reaches the Candidate Recommendation stage,
jdaggett@7242 5968 non-experimental implementations are possible, and implementors should
jdaggett@7242 5969 release an unprefixed implementation of any CR-level feature they can
jdaggett@7242 5970 demonstrate to be correctly implemented according to spec.
jdaggett@7242 5971
jdaggett@7242 5972 <p>To establish and maintain the interoperability of CSS across
jdaggett@7242 5973 implementations, the CSS Working Group requests that non-experimental CSS
jdaggett@7242 5974 renderers submit an implementation report (and, if necessary, the
jdaggett@7242 5975 testcases used for that implementation report) to the W3C before releasing
jdaggett@7242 5976 an unprefixed implementation of any CSS features. Testcases submitted to
jdaggett@7242 5977 W3C are subject to review and correction by the CSS Working Group.
jdaggett@7242 5978
jdaggett@7242 5979 <p>Further information on submitting testcases and implementation reports
jdaggett@7242 5980 can be found from on the CSS Working Group's website at <a
jdaggett@7242 5981 href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
jdaggett@7242 5982 Questions should be directed to the <a
jdaggett@7242 5983 href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
jdaggett@7242 5984 mailing list.
jdaggett@7242 5985
jdaggett@484 5986 <h2 class=no-num id=references>References</h2>
jdaggett@484 5987
jdaggett@1662 5988 <h3 class=no-num id=normative-references>Normative References</h3>
jdaggett@484 5989 <!--begin-normative-->
jdaggett@484 5990 <!-- Sorted by label -->
jdaggett@484 5991
jdaggett@484 5992 <dl class=bibliography>
jdaggett@8031 5993 <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
jdaggett@484 5994 <!---->
jdaggett@531 5995
jdaggett@2461 5996 <dt id=CHARMOD>[CHARMOD]
jdaggett@2461 5997
jdaggett@2461 5998 <dd>Martin J. Dürst; et al. <a
jdaggett@2737 5999 href="http://www.w3.org/TR/2005/REC-charmod-20050215/"><cite>Character
jdaggett@2461 6000 Model for the World Wide Web 1.0: Fundamentals.</cite></a> 15 February
jdaggett@2461 6001 2005. W3C Recommendation. URL: <a
jdaggett@2737 6002 href="http://www.w3.org/TR/2005/REC-charmod-20050215/">http://www.w3.org/TR/2005/REC-charmod-20050215/</a>
jdaggett@2461 6003 </dd>
jdaggett@2461 6004 <!---->
jdaggett@2461 6005
jdaggett@2457 6006 <dt id=CORS>[CORS]
jdaggett@1662 6007
jdaggett@1662 6008 <dd>Anne van Kesteren. <a
jdaggett@7242 6009 href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
jdaggett@7242 6010 Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
jdaggett@7242 6011 Recommendation. (Work in progress.) URL: <a
jdaggett@7242 6012 href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
jdaggett@1662 6013 </dd>
jdaggett@1662 6014 <!---->
jdaggett@1662 6015
jdaggett@3041 6016 <dt id=CSS21>[CSS21]
jdaggett@3041 6017
jdaggett@3041 6018 <dd>Bert Bos; et al. <a
jdaggett@8031 6019 href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
jdaggett@3041 6020 Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
jdaggett@3041 6021 2011. W3C Recommendation. URL: <a
jdaggett@8031 6022 href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
jdaggett@3041 6023 </dd>
jdaggett@3041 6024 <!---->
jdaggett@3041 6025
jdaggett@5833 6026 <dt id=CSS3VAL>[CSS3VAL]
jdaggett@5833 6027
jdaggett@5833 6028 <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
jdaggett@8386 6029 href="http://www.w3.org/TR/2013/CR-css3-values-20130404/"><cite>CSS
jdaggett@8386 6030 Values and Units Module Level 3.</cite></a> 4 April 2013. W3C Candidate
jdaggett@6701 6031 Recommendation. (Work in progress.) URL: <a
jdaggett@8386 6032 href="http://www.w3.org/TR/2013/CR-css3-values-20130404/">http://www.w3.org/TR/2013/CR-css3-values-20130404/</a>
jdaggett@5833 6033 </dd>
jdaggett@5833 6034 <!---->
jdaggett@5833 6035
jdaggett@1662 6036 <dt id=HTML5>[HTML5]
jdaggett@1662 6037
jdaggett@1856 6038 <dd>Ian Hickson. <a
jdaggett@7242 6039 href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
jdaggett@7242 6040 17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
jdaggett@7242 6041 <a
jdaggett@7242 6042 href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
jdaggett@1662 6043 </dd>
jdaggett@1662 6044 <!---->
jdaggett@1662 6045
jdaggett@1662 6046 <dt id=OPEN-FONT-FORMAT>[OPEN-FONT-FORMAT]
jdaggett@1662 6047
jdaggett@1662 6048 <dd><a
jdaggett@1662 6049 href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009(E).zip"><cite>Information
jdaggett@1662 6050 technology — Coding of audio-visual objects — Part 22: Open Font
jdaggett@1662 6051 Format.</cite></a> International Organization for Standardization.
jdaggett@1662 6052 ISO/IEC 14496-22:2009. URL: <a
jdaggett@1662 6053 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>
jdaggett@1662 6054 </dd>
jdaggett@1662 6055 <!---->
jdaggett@1662 6056
jdaggett@1662 6057 <dt id=OPENTYPE>[OPENTYPE]
jdaggett@1662 6058
jdaggett@1662 6059 <dd><a
jdaggett@1662 6060 href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType
jdaggett@1662 6061 specification.</cite></a> Microsoft. URL: <a
jdaggett@1662 6062 href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a>
jdaggett@1662 6063 </dd>
jdaggett@1662 6064 <!---->
jdaggett@1662 6065
jdaggett@1662 6066 <dt id=OPENTYPE-FEATURES>[OPENTYPE-FEATURES]
jdaggett@1662 6067
jdaggett@1662 6068 <dd><a
jdaggett@1662 6069 href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType
jdaggett@1662 6070 feature registry.</cite></a> Microsoft. URL: <a
jdaggett@1662 6071 href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a>
jdaggett@1662 6072 </dd>
jdaggett@1662 6073 <!---->
jdaggett@1662 6074
jdaggett@7103 6075 <dt id=RFC2119>[RFC2119]
jdaggett@7103 6076
jdaggett@7103 6077 <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
jdaggett@7103 6078 words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
jdaggett@7103 6079 RFC 2119. URL: <a
jdaggett@7103 6080 href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
jdaggett@7103 6081 </dd>
jdaggett@7103 6082 <!---->
jdaggett@7103 6083
jdaggett@2457 6084 <dt id=UAX15>[UAX15]
jdaggett@2457 6085
jdaggett@7242 6086 <dd>Mark Davis; Ken Whistler. <a
jdaggett@7242 6087 href="http://www.unicode.org/reports/tr15/"><cite>Unicode Normalization
jdaggett@7242 6088 Forms.</cite></a> 31 August 2012. Unicode Standard Annex #15. URL: <a
jdaggett@7242 6089 href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a>
jdaggett@2457 6090 </dd>
jdaggett@2457 6091 <!---->
jdaggett@2457 6092
jdaggett@1856 6093 <dt id=UAX29>[UAX29]
jdaggett@1856 6094
jdaggett@1856 6095 <dd>Mark Davis. <a
jdaggett@5809 6096 href="http://www.unicode.org/reports/tr29/"><cite>Unicode Text
jdaggett@7242 6097 Segmentation.</cite></a> 12 September 2012. Unicode Standard Annex #29.
jdaggett@2461 6098 URL: <a
jdaggett@5809 6099 href="http://www.unicode.org/reports/tr29/">http://www.unicode.org/reports/tr29/</a>
jdaggett@1856 6100 </dd>
jdaggett@1856 6101 <!---->
jdaggett@1856 6102
jdaggett@3041 6103 <dt id=UNICODE6>[UNICODE6]
jdaggett@531 6104
jdaggett@531 6105 <dd>The Unicode Consortium. <a
jdaggett@7242 6106 href="http://www.unicode.org/versions/Unicode6.2.0/"><cite>The Unicode
jdaggett@7242 6107 Standard, Version 6.2.0.</cite></a> Defined by: The Unicode Standard,
jdaggett@7242 6108 Version 6.2.0 URL: <a
jdaggett@7242 6109 href="http://www.unicode.org/versions/Unicode6.2.0/">http://www.unicode.org/versions/Unicode6.2.0/</a>
jdaggett@531 6110 </dd>
jdaggett@531 6111 <!---->
jdaggett@484 6112 </dl>
jdaggett@484 6113 <!--end-normative-->
jdaggett@3041 6114 <!--{{!CSS21}}-->
jdaggett@5833 6115 <!--{{!CSS3VAL}}-->
jdaggett@1662 6116 <!--{{!OPENTYPE}}-->
jdaggett@1662 6117 <!--{{!OPENTYPE-FEATURES}}-->
jdaggett@1662 6118 <!--{{!OPEN-FONT-FORMAT}}-->
jdaggett@3041 6119 <!--{{!UNICODE6}}-->
jdaggett@2457 6120 <!--{{!UAX15}}-->
jdaggett@1856 6121 <!--{{!UAX29}}-->
jdaggett@2457 6122 <!--{{!CORS}}-->
jdaggett@1662 6123 <!--{{!HTML5}}-->
jdaggett@2461 6124 <!--{{!CHARMOD}}-->
jdaggett@1662 6125
jdaggett@1662 6126 <h3 class=no-num id=other-references>Other References</h3>
jdaggett@484 6127 <!--begin-informative-->
jdaggett@484 6128 <!-- Sorted by label -->
jdaggett@484 6129
jdaggett@484 6130 <dl class=bibliography>
jdaggett@8031 6131 <dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
jdaggett@484 6132 <!---->
jdaggett@484 6133
jdaggett@3042 6134 <dt id=AAT-FEATURES>[AAT-FEATURES]
jdaggett@3042 6135
jdaggett@3042 6136 <dd><a href="http://developer.apple.com/fonts/registry/"><cite>Apple
jdaggett@3042 6137 Advanced Typography font feature registry.</cite></a> Apple. URL: <a
jdaggett@3042 6138 href="http://developer.apple.com/fonts/registry/">http://developer.apple.com/fonts/registry/</a>
jdaggett@3042 6139 </dd>
jdaggett@3042 6140 <!---->
jdaggett@3042 6141
jdaggett@512 6142 <dt id=ARABIC-TYPO>[ARABIC-TYPO]
jdaggett@512 6143
jdaggett@513 6144 <dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
jdaggett@1148 6145 Sourcebook.</cite> Saqi Books. 2001. ISBN 0-86356-347-3.</dd>
jdaggett@512 6146 <!---->
jdaggett@512 6147
jdaggett@3042 6148 <dt id=CHARMOD-NORM>[CHARMOD-NORM]
jdaggett@3042 6149
jdaggett@3042 6150 <dd>François Yergeau; et al. <a
jdaggett@5809 6151 href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/"><cite>Character
jdaggett@5809 6152 Model for the World Wide Web 1.0: Normalization.</cite></a> 1 May 2012.
jdaggett@5809 6153 W3C Working Draft. (Work in progress.) URL: <a
jdaggett@5809 6154 href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">http://www.w3.org/TR/2012/WD-charmod-norm-20120501/</a>
jdaggett@3042 6155 </dd>
jdaggett@3042 6156 <!---->
jdaggett@3042 6157
jdaggett@1732 6158 <dt id=CJKV-INFO-PROCESSING>[CJKV-INFO-PROCESSING]
jdaggett@1732 6159
jdaggett@1732 6160 <dd>Ken Lunde. <cite>CJKV Information Processing, Second Edition.</cite>
jdaggett@1732 6161 O'Reilly Media, Inc. 2009. ISBN 0-596-51447-1.</dd>
jdaggett@1732 6162 <!---->
jdaggett@1732 6163
jdaggett@3460 6164 <dt id=CSS3-CONDITIONAL>[CSS3-CONDITIONAL]
jdaggett@3460 6165
jdaggett@3460 6166 <dd>L. David Baron. <a
jdaggett@8386 6167 href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/"><cite>CSS
jdaggett@8386 6168 Conditional Rules Module Level 3.</cite></a> 4 April 2013. W3C Candidate
jdaggett@8386 6169 Recommendation. (Work in progress.) URL: <a
jdaggett@8386 6170 href="http://www.w3.org/TR/2013/CR-css3-conditional-20130404/">http://www.w3.org/TR/2013/CR-css3-conditional-20130404/</a>
jdaggett@3460 6171 </dd>
jdaggett@3460 6172 <!---->
jdaggett@3460 6173
jdaggett@6701 6174 <dt id=CSS3TEXT>[CSS3TEXT]
jdaggett@6701 6175
jdaggett@6701 6176 <dd>Elika J. Etemad; Koji Ishii. <a
jdaggett@7041 6177 href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
jdaggett@7041 6178 Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
jdaggett@6701 6179 progress.) URL: <a
jdaggett@7041 6180 href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
jdaggett@6701 6181 </dd>
jdaggett@6701 6182 <!---->
jdaggett@6701 6183
jdaggett@1856 6184 <dt id=DIGITAL-TYPOGRAPHY>[DIGITAL-TYPOGRAPHY]
jdaggett@1856 6185
jdaggett@1856 6186 <dd>Richard Rubinstein. <cite>Digital Typography, An Introduction to Type
jdaggett@1856 6187 and Composition for Computer System Design.</cite> Addison-Wesley. 1988.
jdaggett@1856 6188 ISBN 0-201-17633-5.</dd>
jdaggett@1856 6189 <!---->
jdaggett@1856 6190
jdaggett@7022 6191 <dt id=DOM-LEVEL-2-STYLE>[DOM-LEVEL-2-STYLE]
jdaggett@7022 6192
jdaggett@7022 6193 <dd>Chris Wilson; Philippe Le Hégaret; Vidur Apparao. <a
jdaggett@7179 6194 href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/"><cite>Document
jdaggett@7022 6195 Object Model (DOM) Level 2 Style Specification.</cite></a> 13 November
jdaggett@7022 6196 2000. W3C Recommendation. URL: <a
jdaggett@7179 6197 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>
jdaggett@7022 6198 </dd>
jdaggett@7022 6199 <!---->
jdaggett@7022 6200
jdaggett@498 6201 <dt id=ELEMTYPO>[ELEMTYPO]
jdaggett@498 6202
jdaggett@498 6203 <dd>Robert Bringhurst. <cite>The Elements of Typographic Style, Version
jdaggett@7488 6204 4.</cite> Hartley &amp; Marks. 2013. ISBN 0-88179-212-8.</dd>
jdaggett@498 6205 <!---->
jdaggett@498 6206
jdaggett@513 6207 <dt id=LANGCULTTYPE>[LANGCULTTYPE]
jdaggett@513 6208
jdaggett@1148 6209 <dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> Graphis. 2001.
jdaggett@1148 6210 ISBN 1-932026-01-0.</dd>
jdaggett@512 6211 <!---->
jdaggett@1662 6212
jdaggett@1662 6213 <dt id=OPENTYPE-FONT-GUIDE>[OPENTYPE-FONT-GUIDE]
jdaggett@1662 6214
jdaggett@1662 6215 <dd><a
jdaggett@3538 6216 href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf"><cite>OpenType
jdaggett@1662 6217 User Guide.</cite></a> FontShop International. URL: <a
jdaggett@3538 6218 href="https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf">https://www.fontfont.com/staticcontent/downloads/FF_OT_User_Guide.pdf</a>
jdaggett@1662 6219 </dd>
jdaggett@1662 6220 <!---->
jdaggett@1856 6221
jdaggett@2527 6222 <dt id=RASTER-TRAGEDY>[RASTER-TRAGEDY]
jdaggett@2527 6223
jdaggett@2527 6224 <dd>Beat Stamm. <a href="http://www.rastertragedy.com/"><cite>The Raster
jdaggett@6659 6225 Tragedy at Low-Resolution Revisited.</cite></a> 7 December 2011. URL: <a
jdaggett@2527 6226 href="http://www.rastertragedy.com/">http://www.rastertragedy.com/</a></dd>
jdaggett@2527 6227 <!---->
jdaggett@2527 6228
jdaggett@1856 6229 <dt id=WINDOWS-GLYPH-PROC>[WINDOWS-GLYPH-PROC]
jdaggett@1856 6230
jdaggett@1856 6231 <dd>John Hudson. <a
jdaggett@1856 6232 href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows
jdaggett@1856 6233 Glyph Processing.</cite></a> Microsoft Typogrraphy. URL: <a
jdaggett@1856 6234 href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a>
jdaggett@1856 6235 </dd>
jdaggett@1856 6236 <!---->
jdaggett@484 6237 </dl>
jdaggett@484 6238 <!--end-informative-->
jdaggett@518 6239 <!--{{ARABIC-TYPO}}-->
jdaggett@1732 6240 <!--{{CJKV-INFO-PROCESSING}}-->
jdaggett@1856 6241 <!--{{DIGITAL-TYPOGRAPHY}}-->
jdaggett@7022 6242 <!--{{DOM-LEVEL-2-STYLE}}-->
jdaggett@518 6243 <!--{{ELEMTYPO}}-->
jdaggett@1856 6244 <!--{{LANGCULTTYPE}}-->
jdaggett@1662 6245 <!--{{OPENTYPE-FONT-GUIDE}}-->
jdaggett@2527 6246 <!--{{RASTER-TRAGEDY}}-->
jdaggett@1856 6247 <!--{{WINDOWS-GLYPH-PROC}}-->
jdaggett@3042 6248 <!--{{CHARMOD-NORM}}-->
jdaggett@3042 6249 <!--{{AAT-FEATURES}}-->
jdaggett@3460 6250 <!--{{CSS3-CONDITIONAL}}-->
jdaggett@6701 6251 <!--{{CSS3TEXT}}-->
jdaggett@484 6252
jdaggett@484 6253 <h2 class=no-num id=index>Index</h2>
jdaggett@484 6254 <!--begin-index-->
jdaggett@484 6255
jdaggett@484 6256 <ul class=indexlist>
jdaggett@8278 6257 <li>100...900 weight values, <a href="#font-weight-numeric-values"
jdaggett@8278 6258 title="100...900 weight values"><strong>3.2</strong></a>
jdaggett@8278 6259
jdaggett@8225 6260 <li><var>&lt;absolute-size&gt;</var>, <a href="#absolute-size-value"
jdaggett@7060 6261 title="&lt;absolute-size&gt;"><strong>3.5</strong></a>
jdaggett@890 6262
jdaggett@8225 6263 <li><var>&lt;common-lig-values&gt;</var>, <a href="#common-lig-values"
jdaggett@8225 6264 title="&lt;common-lig-values&gt;"><strong>6.4</strong></a>
jdaggett@2479 6265
jdaggett@2479 6266 <li><var>&lt;contextual-alt-values&gt;</var>, <a
jdaggett@8225 6267 href="#contextual-alt-values"
jdaggett@6176 6268 title="&lt;contextual-alt-values&gt;"><strong>6.4</strong></a>
jdaggett@2479 6269
jdaggett@8225 6270 <li><var>&lt;discretionary-lig-values&gt;</var>, <a
jdaggett@8225 6271 href="#discretionary-lig-values"
jdaggett@8225 6272 title="&lt;discretionary-lig-values&gt;"><strong>6.4</strong></a>
jdaggett@3460 6273
jdaggett@2479 6274 <li><var>&lt;east-asian-variant-values&gt;</var>, <a
jdaggett@8225 6275 href="#east-asian-variant-values"
jdaggett@2479 6276 title="&lt;east-asian-variant-values&gt;"><strong>6.10</strong></a>
jdaggett@2479 6277
jdaggett@2479 6278 <li><var>&lt;east-asian-width-values&gt;</var>, <a
jdaggett@8225 6279 href="#east-asian-width-values"
jdaggett@2479 6280 title="&lt;east-asian-width-values&gt;"><strong>6.10</strong></a>
jdaggett@2479 6281
jdaggett@8225 6282 <li><var>&lt;family-name&gt;</var>, <a href="#family-name-value"
jdaggett@8225 6283 title="&lt;family-name&gt;"><strong>3.1</strong></a>
jdaggett@8225 6284
jdaggett@8225 6285 <li><var>&lt;feature-tag-value&gt;</var>, <a href="#feature-tag-value"
jdaggett@2515 6286 title="&lt;feature-tag-value&gt;"><strong>6.12</strong></a>
jdaggett@2515 6287
jdaggett@8225 6288 <li><var>&lt;font-face-name&gt;</var>, <a href="#font-face-name-value"
jdaggett@7060 6289 title="&lt;font-face-name&gt;"><strong>4.3</strong></a>
jdaggett@4624 6290
jdaggett@4624 6291 <li><var>&lt;font-variant-css21&gt;</var>, <a
jdaggett@8225 6292 href="#font-variant-css21-values"
jdaggett@4624 6293 title="&lt;font-variant-css21&gt;"><strong>3.7</strong></a>
jdaggett@4624 6294
jdaggett@8225 6295 <li><var>&lt;generic-family&gt;</var>, <a href="#generic-family-value"
jdaggett@8225 6296 title="&lt;generic-family&gt;"><strong>3.1</strong></a>
jdaggett@8225 6297
jdaggett@8225 6298 <li><var>&lt;historical-lig-values&gt;</var>, <a
jdaggett@8225 6299 href="#historical-lig-values"
jdaggett@8225 6300 title="&lt;historical-lig-values&gt;"><strong>6.4</strong></a>
jdaggett@8225 6301
jdaggett@8225 6302 <li><var>&lt;length&gt;</var>, <a href="#length-size-value"
jdaggett@8225 6303 title="&lt;length&gt;"><strong>3.5</strong></a>
jdaggett@8225 6304
jdaggett@8225 6305 <li><var>&lt;number&gt;</var>, <a href="#aspect-ratio-value"
jdaggett@8225 6306 title="&lt;number&gt;"><strong>3.6</strong></a>
jdaggett@4624 6307
jdaggett@4624 6308 <li><var>&lt;numeric-figure-values&gt;</var>, <a
jdaggett@8225 6309 href="#numeric-figure-values"
jdaggett@4624 6310 title="&lt;numeric-figure-values&gt;"><strong>6.7</strong></a>
jdaggett@4624 6311
jdaggett@4624 6312 <li><var>&lt;numeric-fraction-values&gt;</var>, <a
jdaggett@8225 6313 href="#numeric-fraction-values"
jdaggett@4624 6314 title="&lt;numeric-fraction-values&gt;"><strong>6.7</strong></a>
jdaggett@4624 6315
jdaggett@4624 6316 <li><var>&lt;numeric-spacing-values&gt;</var>, <a
jdaggett@8225 6317 href="#numeric-spacing-values"
jdaggett@4624 6318 title="&lt;numeric-spacing-values&gt;"><strong>6.7</strong></a>
jdaggett@4624 6319
jdaggett@8225 6320 <li><var>&lt;percentage&gt;</var>, <a href="#percentage-size-value"
jdaggett@8225 6321 title="&lt;percentage&gt;"><strong>3.5</strong></a>
jdaggett@8225 6322
jdaggett@8225 6323 <li><var>&lt;relative-size&gt;</var>, <a href="#relative-size-value"
jdaggett@7060 6324 title="&lt;relative-size&gt;"><strong>3.5</strong></a>
jdaggett@7060 6325
jdaggett@8278 6326 <li><var>&lt;string&gt;</var>, <a
jdaggett@8278 6327 href="#font-language-override-string-value"
jdaggett@8278 6328 title="&lt;string&gt;"><strong>6.13</strong></a>
jdaggett@8278 6329
jdaggett@8225 6330 <li><var>&lt;urange&gt;</var>, <a href="#urange-value"
jdaggett@8225 6331 title="&lt;urange&gt;"><strong>4.5</strong></a>
jdaggett@2479 6332
jdaggett@8311 6333 <li><code>@font-face</code>, <a href="#at-font-face-rule"
jdaggett@8311 6334 title="@font-face"><strong>4.1</strong></a>
jdaggett@8311 6335
jdaggett@8311 6336 <li><code>@font-feature-values</code>, <a
jdaggett@8311 6337 href="#at-font-feature-values-rule"
jdaggett@8311 6338 title="@font-feature-values"><strong>6.9</strong></a>
jdaggett@2479 6339
jdaggett@4624 6340 <li>all-petite-caps, <a href="#all-petite-caps"
jdaggett@4624 6341 title=all-petite-caps><strong>6.6</strong></a>
jdaggett@4624 6342
jdaggett@4624 6343 <li>all-small-caps, <a href="#all-small-caps"
jdaggett@4624 6344 title=all-small-caps><strong>6.6</strong></a>
jdaggett@4624 6345
jdaggett@8225 6346 <li>annotation, <a href="#annotation"
jdaggett@7060 6347 title=annotation><strong>6.8</strong></a>
jdaggett@4624 6348
jdaggett@4624 6349 <li>aspect value, <a href="#aspect-value0" title="aspect
jdaggett@4624 6350 value"><strong>3.6</strong></a>
jdaggett@4624 6351
jdaggett@7103 6352 <li>authoring tool, <a href="#authoring-tool" title="authoring
jdaggett@7243 6353 tool"><strong>#</strong></a>
jdaggett@7103 6354
jdaggett@8278 6355 <li>auto
jdaggett@8278 6356 <ul>
jdaggett@8278 6357 <li>font-kerning, <a href="#font-kerning-auto-value" title="auto,
jdaggett@8278 6358 font-kerning"><strong>6.3</strong></a>
jdaggett@8278 6359
jdaggett@8278 6360 <li>font-size-adjust, <a href="#font-size-adjust-auto-value"
jdaggett@8278 6361 title="auto, font-size-adjust"><strong>3.6</strong></a>
jdaggett@8278 6362 </ul>
jdaggett@8278 6363
jdaggett@8278 6364 <li>bold, <a href="#bold" title=bold><strong>3.2</strong></a>
jdaggett@8278 6365
jdaggett@8278 6366 <li>bolder, <a href="#bolder" title=bolder><strong>3.2</strong></a>
jdaggett@8278 6367
jdaggett@7311 6368 <li>character map, <a href="#character-map" title="character
jdaggett@7311 6369 map"><strong>5.2</strong></a>
jdaggett@7311 6370
jdaggett@8225 6371 <li>character-variant, <a href="#character-variant"
jdaggett@7060 6372 title=character-variant><strong>6.8</strong></a>
jdaggett@4624 6373
jdaggett@4624 6374 <li>common-ligatures, <a href="#common-ligatures"
jdaggett@6176 6375 title=common-ligatures><strong>6.4</strong></a>
jdaggett@4624 6376
jdaggett@8278 6377 <li>condensed, <a href="#condensed"
jdaggett@8278 6378 title=condensed><strong>3.3</strong></a>
jdaggett@8278 6379
jdaggett@4624 6380 <li>contextual, <a href="#contextual"
jdaggett@6176 6381 title=contextual><strong>6.4</strong></a>
jdaggett@4624 6382
jdaggett@7021 6383 <li>CSSFontFaceRule, <a href="#cssfontfacerule"
jdaggett@7021 6384 title=CSSFontFaceRule><strong>8.1</strong></a>
jdaggett@7021 6385
jdaggett@7021 6386 <li>CSSFontFeatureValuesRule, <a href="#cssfontfeaturevaluesrule"
jdaggett@7021 6387 title=CSSFontFeatureValuesRule><strong>8.2</strong></a>
jdaggett@7021 6388
jdaggett@4624 6389 <li>cursive, definition of, <a href="#cursive0" title="cursive, definition
jdaggett@4624 6390 of"><strong>#</strong></a>
jdaggett@4624 6391
jdaggett@7232 6392 <li>default face, <a href="#default-face" title="default
jdaggett@7309 6393 face"><strong>5.2</strong></a>
jdaggett@7232 6394
jdaggett@8031 6395 <li>descriptor_declaration, <a href="#descriptordeclaration"
jdaggett@8031 6396 title="descriptor_declaration"><strong>4.1</strong></a>
jdaggett@8031 6397
jdaggett@4624 6398 <li>diagonal-fractions, <a href="#diagonal-fractions"
jdaggett@4624 6399 title=diagonal-fractions><strong>6.7</strong></a>
jdaggett@4624 6400
jdaggett@4624 6401 <li>discretionary-ligatures, <a href="#discretionary-ligatures"
jdaggett@6176 6402 title=discretionary-ligatures><strong>6.4</strong></a>
jdaggett@4624 6403
jdaggett@8278 6404 <li>expanded, <a href="#expanded" title=expanded><strong>3.3</strong></a>
jdaggett@8278 6405
jdaggett@8278 6406 <li>extra-condensed, <a href="#extra-condensed"
jdaggett@8278 6407 title=extra-condensed><strong>3.3</strong></a>
jdaggett@8278 6408
jdaggett@8278 6409 <li>extra-expanded, <a href="#extra-expanded"
jdaggett@8278 6410 title=extra-expanded><strong>3.3</strong></a>
jdaggett@8278 6411
jdaggett@4624 6412 <li>fantasy, definition of, <a href="#fantasy0" title="fantasy, definition
jdaggett@4624 6413 of"><strong>#</strong></a>
jdaggett@4624 6414
jdaggett@8031 6415 <li>feature_type, <a href="#featuretype"
jdaggett@8356 6416 title="feature_type"><strong>6.9.1</strong></a>
jdaggett@8031 6417
jdaggett@8031 6418 <li>feature_value_block, <a href="#featurevalueblock"
jdaggett@8356 6419 title="feature_value_block"><strong>6.9.1</strong></a>
jdaggett@8031 6420
jdaggett@8031 6421 <li>feature_value_definition, <a href="#featurevaluedefinition"
jdaggett@8356 6422 title="feature_value_definition"><strong>6.9.1</strong></a>
jdaggett@7679 6423
jdaggett@4624 6424 <li>font, <a href="#propdef-font" title=font><strong>3.7</strong></a>
jdaggett@2472 6425
jdaggett@8356 6426 <li>font specific, <a href="#font-specific" title="font
jdaggett@8356 6427 specific"><strong>6.8</strong></a>
jdaggett@8356 6428
jdaggett@8278 6429 <li>font-family
jdaggett@8278 6430 <ul>
jdaggett@8278 6431 <li>descriptor, <a href="#descdef-font-family" title="font-family,
jdaggett@8278 6432 descriptor"><strong>4.2</strong></a>
jdaggett@8278 6433
jdaggett@8278 6434 <li>property, <a href="#propdef-font-family" title="font-family,
jdaggett@8278 6435 property"><strong>3.1</strong></a>
jdaggett@8278 6436 </ul>
jdaggett@1662 6437
jdaggett@8279 6438 <li>font-feature-settings
jdaggett@8278 6439 <ul>
jdaggett@8278 6440 <li>descriptor, <a href="#descdef-font-feature-settings"
jdaggett@8278 6441 title="font-feature-settings, descriptor"><strong>4.7</strong></a>
jdaggett@8279 6442
jdaggett@8279 6443 <li>property, <a href="#propdef-font-feature-settings"
jdaggett@8279 6444 title="font-feature-settings, property"><strong>6.12</strong></a>
jdaggett@8278 6445 </ul>
jdaggett@7060 6446
jdaggett@1662 6447 <li>font-kerning, <a href="#propdef-font-kerning"
jdaggett@1856 6448 title=font-kerning><strong>6.3</strong></a>
jdaggett@1662 6449
jdaggett@1732 6450 <li>font-language-override, <a href="#propdef-font-language-override"
jdaggett@2118 6451 title=font-language-override><strong>6.13</strong></a>
jdaggett@1662 6452
jdaggett@1662 6453 <li>font-size, <a href="#propdef-font-size"
jdaggett@1662 6454 title=font-size><strong>3.5</strong></a>
jdaggett@1662 6455
jdaggett@1662 6456 <li>font-size-adjust, <a href="#propdef-font-size-adjust"
jdaggett@1662 6457 title=font-size-adjust><strong>3.6</strong></a>
jdaggett@1662 6458
jdaggett@8278 6459 <li>font-stretch
jdaggett@8278 6460 <ul>
jdaggett@8278 6461 <li>descriptor, <a href="#descdef-font-stretch" title="font-stretch,
jdaggett@8278 6462 descriptor"><strong>4.4</strong></a>
jdaggett@8278 6463
jdaggett@8278 6464 <li>property, <a href="#propdef-font-stretch" title="font-stretch,
jdaggett@8278 6465 property"><strong>3.3</strong></a>
jdaggett@8278 6466 </ul>
jdaggett@8278 6467
jdaggett@8278 6468 <li>font-style
jdaggett@8278 6469 <ul>
jdaggett@8278 6470 <li>descriptor, <a href="#descdef-font-style" title="font-style,
jdaggett@8278 6471 descriptor"><strong>4.4</strong></a>
jdaggett@8278 6472
jdaggett@8278 6473 <li>property, <a href="#propdef-font-style" title="font-style,
jdaggett@8278 6474 property"><strong>3.4</strong></a>
jdaggett@8278 6475 </ul>
jdaggett@7060 6476
jdaggett@2487 6477 <li>font-synthesis, <a href="#propdef-font-synthesis"
jdaggett@2487 6478 title=font-synthesis><strong>3.8</strong></a>
jdaggett@2457 6479
jdaggett@8278 6480 <li>font-variant
jdaggett@8278 6481 <ul>
jdaggett@8278 6482 <li>descriptor, <a href="#descdef-font-variant" title="font-variant,
jdaggett@8278 6483 descriptor"><strong>4.7</strong></a>
jdaggett@8278 6484
jdaggett@8278 6485 <li>property, <a href="#propdef-font-variant" title="font-variant,
jdaggett@8278 6486 property"><strong>6.11</strong></a>
jdaggett@8278 6487 </ul>
jdaggett@1662 6488
jdaggett@1662 6489 <li>font-variant-alternates, <a href="#propdef-font-variant-alternates"
jdaggett@2118 6490 title=font-variant-alternates><strong>6.8</strong></a>
jdaggett@1662 6491
jdaggett@1662 6492 <li>font-variant-caps, <a href="#propdef-font-variant-caps"
jdaggett@2118 6493 title=font-variant-caps><strong>6.6</strong></a>
jdaggett@1732 6494
jdaggett@1662 6495 <li>font-variant-east-asian, <a href="#propdef-font-variant-east-asian"
jdaggett@2118 6496 title=font-variant-east-asian><strong>6.10</strong></a>
jdaggett@1662 6497
jdaggett@1662 6498 <li>font-variant-ligatures, <a href="#propdef-font-variant-ligatures"
jdaggett@6176 6499 title=font-variant-ligatures><strong>6.4</strong></a>
jdaggett@1662 6500
jdaggett@1662 6501 <li>font-variant-numeric, <a href="#propdef-font-variant-numeric"
jdaggett@2118 6502 title=font-variant-numeric><strong>6.7</strong></a>
jdaggett@2118 6503
jdaggett@3460 6504 <li>font-variant-position, <a href="#propdef-font-variant-position"
jdaggett@6176 6505 title=font-variant-position><strong>6.5</strong></a>
jdaggett@3460 6506
jdaggett@8278 6507 <li>font-weight
jdaggett@8278 6508 <ul>
jdaggett@8278 6509 <li>descriptor, <a href="#descdef-font-weight" title="font-weight,
jdaggett@8278 6510 descriptor"><strong>4.4</strong></a>
jdaggett@8278 6511
jdaggett@8278 6512 <li>property, <a href="#propdef-font-weight" title="font-weight,
jdaggett@8278 6513 property"><strong>3.2</strong></a>
jdaggett@8278 6514 </ul>
jdaggett@1662 6515
jdaggett@8031 6516 <li>font_face_rule, <a href="#fontfacerule"
jdaggett@8031 6517 title="font_face_rule"><strong>4.1</strong></a>
jdaggett@8031 6518
jdaggett@8225 6519 <li>FONT_FACE_SYM, <a href="#fontfacesym"
jdaggett@8225 6520 title="FONT_FACE_SYM"><strong>4.1</strong></a>
jdaggett@8225 6521
jdaggett@8031 6522 <li>font_family_name, <a href="#fontfamilyname"
jdaggett@8356 6523 title="font_family_name"><strong>6.9.1</strong></a>
jdaggett@8031 6524
jdaggett@8031 6525 <li>font_family_name_list, <a href="#fontfamilynamelist"
jdaggett@8356 6526 title="font_family_name_list"><strong>6.9.1</strong></a>
jdaggett@8031 6527
jdaggett@8031 6528 <li>font_feature_values_rule, <a href="#fontfeaturevaluesrule"
jdaggett@8356 6529 title="font_feature_values_rule"><strong>6.9.1</strong></a>
jdaggett@8031 6530
jdaggett@8225 6531 <li>FONT_FEATURE_VALUES_SYM, <a href="#fontfeaturevaluessym"
jdaggett@8356 6532 title="FONT_FEATURE_VALUES_SYM"><strong>6.9.1</strong></a>
jdaggett@8225 6533
jdaggett@1662 6534 <li>full-width, <a href="#full-width"
jdaggett@2118 6535 title=full-width><strong>6.10</strong></a>
jdaggett@1662 6536
jdaggett@1662 6537 <li>historical-forms, <a href="#historical-forms"
jdaggett@2118 6538 title=historical-forms><strong>6.8</strong></a>
jdaggett@1662 6539
jdaggett@1662 6540 <li>historical-ligatures, <a href="#historical-ligatures"
jdaggett@6176 6541 title=historical-ligatures><strong>6.4</strong></a>
jdaggett@1732 6542
jdaggett@8278 6543 <li>italic, <a href="#italic" title=italic><strong>3.4</strong></a>
jdaggett@8278 6544
jdaggett@2118 6545 <li>jis04, <a href="#jis04" title=jis04><strong>6.10</strong></a>
jdaggett@2118 6546
jdaggett@2118 6547 <li>jis78, <a href="#jis78" title=jis78><strong>6.10</strong></a>
jdaggett@2118 6548
jdaggett@2118 6549 <li>jis83, <a href="#jis83" title=jis83><strong>6.10</strong></a>
jdaggett@2118 6550
jdaggett@2118 6551 <li>jis90, <a href="#jis90" title=jis90><strong>6.10</strong></a>
jdaggett@1662 6552
jdaggett@8278 6553 <li>lighter, <a href="#lighter" title=lighter><strong>3.2</strong></a>
jdaggett@8278 6554
jdaggett@1662 6555 <li>lining-nums, <a href="#lining-nums"
jdaggett@2118 6556 title=lining-nums><strong>6.7</strong></a>
jdaggett@890 6557
jdaggett@890 6558 <li>monospace, definition of, <a href="#monospace0" title="monospace,
jdaggett@890 6559 definition of"><strong>#</strong></a>
jdaggett@890 6560
jdaggett@1662 6561 <li>no-common-ligatures, <a href="#no-common-ligatures"
jdaggett@6176 6562 title=no-common-ligatures><strong>6.4</strong></a>
jdaggett@1662 6563
jdaggett@1662 6564 <li>no-contextual, <a href="#no-contextual"
jdaggett@6176 6565 title=no-contextual><strong>6.4</strong></a>
jdaggett@1662 6566
jdaggett@3460 6567 <li>no-discretionary-ligatures, <a href="#no-discretionary-ligatures"
jdaggett@6176 6568 title=no-discretionary-ligatures><strong>6.4</strong></a>
jdaggett@3460 6569
jdaggett@1662 6570 <li>no-historical-ligatures, <a href="#no-historical-ligatures"
jdaggett@6176 6571 title=no-historical-ligatures><strong>6.4</strong></a>
jdaggett@1662 6572
jdaggett@8278 6573 <li>none
jdaggett@8278 6574 <ul>
jdaggett@8278 6575 <li>font-kerning, <a href="#font-kerning-none-value" title="none,
jdaggett@8278 6576 font-kerning"><strong>6.3</strong></a>
jdaggett@8278 6577
jdaggett@8278 6578 <li>font-size-adjust, <a href="#font-size-adjust-none-value"
jdaggett@8278 6579 title="none, font-size-adjust"><strong>3.6</strong></a>
jdaggett@8278 6580
jdaggett@8278 6581 <li>font-variant, <a href="#font-variant-none-value" title="none,
jdaggett@8278 6582 font-variant"><strong>6.11</strong></a>
jdaggett@8278 6583
jdaggett@8278 6584 <li>font-variant-ligatures, <a href="#font-variant-ligatures-none-value"
jdaggett@8278 6585 title="none, font-variant-ligatures"><strong>6.4</strong></a>
jdaggett@8278 6586 </ul>
jdaggett@8278 6587
jdaggett@8368 6588 <li>normal
jdaggett@8278 6589 <ul>
jdaggett@8278 6590 <li>font-feature-settings, <a href="#font-feature-settings-normal-value"
jdaggett@8278 6591 title="normal, font-feature-settings"><strong>6.12</strong></a>
jdaggett@8278 6592
jdaggett@8278 6593 <li>font-kerning, <a href="#font-kerning-normal-value" title="normal,
jdaggett@8278 6594 font-kerning"><strong>6.3</strong></a>
jdaggett@8278 6595
jdaggett@8278 6596 <li>font-language-override, <a
jdaggett@8278 6597 href="#font-language-override-normal-value" title="normal,
jdaggett@8278 6598 font-language-override"><strong>6.13</strong></a>
jdaggett@8278 6599
jdaggett@8278 6600 <li>font-stretch, <a href="#font-stretch-normal-value" title="normal,
jdaggett@8278 6601 font-stretch"><strong>3.3</strong></a>
jdaggett@8278 6602
jdaggett@8278 6603 <li>font-style, <a href="#font-style-normal-value" title="normal,
jdaggett@8278 6604 font-style"><strong>3.4</strong></a>
jdaggett@8278 6605
jdaggett@8278 6606 <li>font-variant, <a href="#font-variant-normal-value" title="normal,
jdaggett@8278 6607 font-variant"><strong>6.11</strong></a>
jdaggett@8278 6608
jdaggett@8278 6609 <li>font-variant-alternates, <a
jdaggett@8278 6610 href="#font-variant-alternates-normal-value" title="normal,
jdaggett@8278 6611 font-variant-alternates"><strong>6.8</strong></a>
jdaggett@8278 6612
jdaggett@8278 6613 <li>font-variant-caps, <a href="#font-variant-caps-normal-value"
jdaggett@8278 6614 title="normal, font-variant-caps"><strong>6.6</strong></a>
jdaggett@8278 6615
jdaggett@8278 6616 <li>font-variant-east-asian, <a
jdaggett@8278 6617 href="#font-variant-east-asian-normal-value" title="normal,
jdaggett@8278 6618 font-variant-east-asian"><strong>6.10</strong></a>
jdaggett@8278 6619
jdaggett@8278 6620 <li>font-variant-ligatures, <a
jdaggett@8278 6621 href="#font-variant-ligatures-normal-value" title="normal,
jdaggett@8278 6622 font-variant-ligatures"><strong>6.4</strong></a>
jdaggett@8278 6623
jdaggett@8278 6624 <li>font-variant-numeric, <a href="#font-variant-numeric-normal-value"
jdaggett@8278 6625 title="normal, font-variant-numeric"><strong>6.7</strong></a>
jdaggett@8278 6626
jdaggett@8368 6627 <li>font-variant-position, <a href="#font-variant-position-normal-value"
jdaggett@8368 6628 title="normal, font-variant-position"><strong>6.5</strong></a>
jdaggett@8368 6629
jdaggett@8278 6630 <li>font-weight, <a href="#font-weight-normal-value" title="normal,
jdaggett@8278 6631 font-weight"><strong>3.2</strong></a>
jdaggett@8278 6632 </ul>
jdaggett@8278 6633
jdaggett@8278 6634 <li>oblique, <a href="#oblique" title=oblique><strong>3.4</strong></a>
jdaggett@5809 6635
jdaggett@1662 6636 <li>oldstyle-nums, <a href="#oldstyle-nums"
jdaggett@2118 6637 title=oldstyle-nums><strong>6.7</strong></a>
jdaggett@2118 6638
jdaggett@3638 6639 <li>ordinal, <a href="#ordinal" title=ordinal><strong>6.7</strong></a>
jdaggett@3638 6640
jdaggett@8225 6641 <li>ornaments, <a href="#ornaments"
jdaggett@7060 6642 title=ornaments><strong>6.8</strong></a>
jdaggett@2118 6643
jdaggett@1662 6644 <li>petite-caps, <a href="#petite-caps"
jdaggett@2118 6645 title=petite-caps><strong>6.6</strong></a>
jdaggett@1662 6646
jdaggett@1662 6647 <li>proportional-nums, <a href="#proportional-nums"
jdaggett@2118 6648 title=proportional-nums><strong>6.7</strong></a>
jdaggett@1662 6649
jdaggett@1662 6650 <li>proportional-width, <a href="#proportional-width"
jdaggett@2118 6651 title=proportional-width><strong>6.10</strong></a>
jdaggett@512 6652
jdaggett@7243 6653 <li>renderer, <a href="#renderer" title=renderer><strong>#</strong></a>
jdaggett@7103 6654
jdaggett@3638 6655 <li>ruby, <a href="#ruby" title=ruby><strong>6.10</strong></a>
jdaggett@1662 6656
jdaggett@890 6657 <li>sans-serif, definition of, <a href="#sans-serif0" title="sans-serif,
jdaggett@890 6658 definition of"><strong>#</strong></a>
jdaggett@890 6659
jdaggett@8278 6660 <li>semi-condensed, <a href="#semi-condensed-"
jdaggett@8278 6661 title=semi-condensed><strong>3.3</strong></a>
jdaggett@8278 6662
jdaggett@8278 6663 <li>semi-expanded, <a href="#semi-expanded"
jdaggett@8278 6664 title=semi-expanded><strong>3.3</strong></a>
jdaggett@8278 6665
jdaggett@890 6666 <li>serif, definition of, <a href="#serif0" title="serif, definition
jdaggett@890 6667 of"><strong>#</strong></a>
jdaggett@890 6668
jdaggett@2504 6669 <li>simplified, <a href="#simplified"
jdaggett@2504 6670 title=simplified><strong>6.10</strong></a>
jdaggett@1662 6671
jdaggett@1662 6672 <li>slashed-zero, <a href="#slashed-zero"
jdaggett@2118 6673 title=slashed-zero><strong>6.7</strong></a>
jdaggett@1662 6674
jdaggett@1662 6675 <li>small-caps, <a href="#small-caps"
jdaggett@2118 6676 title=small-caps><strong>6.6</strong></a>
jdaggett@1662 6677
jdaggett@1662 6678 <li>src, <a href="#descdef-src" title=src><strong>4.3</strong></a>
jdaggett@1662 6679
jdaggett@1662 6680 <li>stacked-fractions, <a href="#stacked-fractions"
jdaggett@2118 6681 title=stacked-fractions><strong>6.7</strong></a>
jdaggett@2118 6682
jdaggett@7103 6683 <li>style sheet
jdaggett@7103 6684 <ul>
jdaggett@7103 6685 <li>as conformance class, <a href="#style-sheet" title="style sheet, as
jdaggett@7243 6686 conformance class"><strong>#</strong></a>
jdaggett@7103 6687 </ul>
jdaggett@7103 6688
jdaggett@8225 6689 <li>styleset, <a href="#styleset" title=styleset><strong>6.8</strong></a>
jdaggett@8225 6690
jdaggett@8225 6691 <li>stylistic, <a href="#stylistic"
jdaggett@7060 6692 title=stylistic><strong>6.8</strong></a>
jdaggett@7060 6693
jdaggett@8279 6694 <li>sub, <a href="#sub" title=sub><strong>6.5</strong></a>
jdaggett@8279 6695
jdaggett@8279 6696 <li>super, <a href="#super" title=super><strong>6.5</strong></a>
jdaggett@8279 6697
jdaggett@8225 6698 <li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
jdaggett@1662 6699
jdaggett@8363 6700 <li>system font fallback, <a href="#system-font-fallback" title="system
jdaggett@8363 6701 font fallback"><strong>5.2</strong></a>
jdaggett@8363 6702
jdaggett@1662 6703 <li>tabular-nums, <a href="#tabular-nums"
jdaggett@2118 6704 title=tabular-nums><strong>6.7</strong></a>
jdaggett@1662 6705
jdaggett@1662 6706 <li>titling-caps, <a href="#titling-caps"
jdaggett@2118 6707 title=titling-caps><strong>6.6</strong></a>
jdaggett@1856 6708
jdaggett@2504 6709 <li>traditional, <a href="#traditional"
jdaggett@2504 6710 title=traditional><strong>6.10</strong></a>
jdaggett@2118 6711
jdaggett@8278 6712 <li>ultra-condensed, <a href="#ultra-condensed"
jdaggett@8278 6713 title=ultra-condensed><strong>3.3</strong></a>
jdaggett@8278 6714
jdaggett@8278 6715 <li>ultra-expanded, <a href="#ultra-expanded"
jdaggett@8278 6716 title=ultra-expanded><strong>3.3</strong></a>
jdaggett@8278 6717
jdaggett@2118 6718 <li>unicase, <a href="#unicase" title=unicase><strong>6.6</strong></a>
jdaggett@1662 6719
jdaggett@1662 6720 <li>unicode-range, <a href="#descdef-unicode-range"
jdaggett@890 6721 title=unicode-range><strong>4.5</strong></a>
jdaggett@7311 6722
jdaggett@7311 6723 <li>weight, <a href="#weight" title=weight><strong>2</strong></a>
jdaggett@7311 6724
jdaggett@7311 6725 <li>width, <a href="#width" title=width><strong>2</strong></a>
jdaggett@484 6726 </ul>
jdaggett@484 6727 <!--end-index-->
jdaggett@484 6728
jdaggett@484 6729 <h2 class=no-num id=property-index>Property index</h2>
jdaggett@890 6730 <!--begin-properties-->
jdaggett@484 6731
jdaggett@484 6732 <table class=proptable>
jdaggett@484 6733 <thead>
jdaggett@484 6734 <tr>
jdaggett@484 6735 <th>Property
jdaggett@484 6736
jdaggett@484 6737 <th>Values
jdaggett@484 6738
jdaggett@484 6739 <th>Initial
jdaggett@484 6740
jdaggett@1148 6741 <th>Applies to
jdaggett@484 6742
jdaggett@484 6743 <th>Inh.
jdaggett@484 6744
jdaggett@484 6745 <th>Percentages
jdaggett@484 6746
jdaggett@484 6747 <th>Media
jdaggett@484 6748
jdaggett@484 6749 <tbody>
jdaggett@3460 6750 <tr>
jdaggett@3460 6751 <th><a class=property href="#propdef-font">font</a>
jdaggett@484 6752
jdaggett@8225 6753 <td>[ [ &lt;‘font-style’&gt; || &lt;font-variant-css21&gt; ||
jdaggett@8225 6754 &lt;‘font-weight’&gt; || &lt;‘font-stretch’ ]?
jdaggett@8225 6755 &lt;‘font-size’&gt; [ / &lt;‘line-height’&gt; ]?
jdaggett@8225 6756 &lt;‘font-family’&gt; ] | caption | icon | menu | message-box |
jdaggett@7020 6757 small-caption | status-bar
jdaggett@484 6758
jdaggett@484 6759 <td>see individual properties
jdaggett@484 6760
jdaggett@484 6761 <td>all elements
jdaggett@484 6762
jdaggett@484 6763 <td>yes
jdaggett@484 6764
jdaggett@484 6765 <td>see individual properties
jdaggett@484 6766
jdaggett@484 6767 <td>visual
jdaggett@484 6768
jdaggett@3460 6769 <tr>
jdaggett@8278 6770 <th><span class=property>font-family</span>
jdaggett@484 6771
jdaggett@8225 6772 <td>[ &lt;family-name&gt; | &lt;generic-family&gt; ] #
jdaggett@484 6773
jdaggett@484 6774 <td>depends on user agent
jdaggett@484 6775
jdaggett@484 6776 <td>all elements
jdaggett@484 6777
jdaggett@484 6778 <td>yes
jdaggett@484 6779
jdaggett@484 6780 <td>N/A
jdaggett@484 6781
jdaggett@484 6782 <td>visual
jdaggett@484 6783
jdaggett@3460 6784 <tr>
jdaggett@8279 6785 <th><span class=property>font-feature-settings</span>
jdaggett@1662 6786
jdaggett@8225 6787 <td>normal | &lt;feature-tag-value&gt; #
jdaggett@1662 6788
jdaggett@1662 6789 <td>normal
jdaggett@1662 6790
jdaggett@1662 6791 <td>all elements
jdaggett@1662 6792
jdaggett@1662 6793 <td>yes
jdaggett@1662 6794
jdaggett@1662 6795 <td>N/A
jdaggett@1662 6796
jdaggett@1662 6797 <td>visual
jdaggett@1662 6798
jdaggett@3460 6799 <tr>
jdaggett@3460 6800 <th><a class=property href="#propdef-font-kerning">font-kerning</a>
jdaggett@1662 6801
jdaggett@1856 6802 <td>auto | normal | none
jdaggett@1856 6803
jdaggett@1856 6804 <td>auto
jdaggett@1662 6805
jdaggett@1662 6806 <td>all elements
jdaggett@1662 6807
jdaggett@1662 6808 <td>yes
jdaggett@1662 6809
jdaggett@1662 6810 <td>N/A
jdaggett@1662 6811
jdaggett@1662 6812 <td>visual
jdaggett@1662 6813
jdaggett@3460 6814 <tr>
jdaggett@3460 6815 <th><a class=property
jdaggett@1732 6816 href="#propdef-font-language-override">font-language-override</a>
jdaggett@1662 6817
jdaggett@5809 6818 <td>normal | &lt;string&gt;
jdaggett@1662 6819
jdaggett@1662 6820 <td>normal
jdaggett@1662 6821
jdaggett@1662 6822 <td>all elements
jdaggett@1662 6823
jdaggett@1662 6824 <td>yes
jdaggett@1662 6825
jdaggett@1662 6826 <td>N/A
jdaggett@1662 6827
jdaggett@1662 6828 <td>visual
jdaggett@1662 6829
jdaggett@3460 6830 <tr>
jdaggett@3460 6831 <th><a class=property href="#propdef-font-size">font-size</a>
jdaggett@484 6832
jdaggett@8225 6833 <td>&lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; |
jdaggett@8225 6834 &lt;percentage&gt;
jdaggett@484 6835
jdaggett@484 6836 <td>medium
jdaggett@484 6837
jdaggett@484 6838 <td>all elements
jdaggett@484 6839
jdaggett@484 6840 <td>yes
jdaggett@484 6841
jdaggett@484 6842 <td>refer to parent element's font size
jdaggett@484 6843
jdaggett@484 6844 <td>visual
jdaggett@484 6845
jdaggett@3460 6846 <tr>
jdaggett@3460 6847 <th><a class=property
jdaggett@1662 6848 href="#propdef-font-size-adjust">font-size-adjust</a>
jdaggett@484 6849
jdaggett@8225 6850 <td>none | auto | &lt;number&gt;
jdaggett@484 6851
jdaggett@484 6852 <td>none
jdaggett@484 6853
jdaggett@484 6854 <td>all elements
jdaggett@484 6855
jdaggett@484 6856 <td>yes
jdaggett@484 6857
jdaggett@554 6858 <td>N/A
jdaggett@484 6859
jdaggett@484 6860 <td>visual
jdaggett@484 6861
jdaggett@3460 6862 <tr>
jdaggett@8278 6863 <th><span class=property>font-stretch</span>
jdaggett@1662 6864
jdaggett@1662 6865 <td>normal | ultra-condensed | extra-condensed | condensed |
jdaggett@1662 6866 semi-condensed | semi-expanded | expanded | extra-expanded |
jdaggett@5809 6867 ultra-expanded
jdaggett@484 6868
jdaggett@484 6869 <td>normal
jdaggett@484 6870
jdaggett@484 6871 <td>all elements
jdaggett@484 6872
jdaggett@484 6873 <td>yes
jdaggett@484 6874
jdaggett@484 6875 <td>N/A
jdaggett@484 6876
jdaggett@484 6877 <td>visual
jdaggett@484 6878
jdaggett@3460 6879 <tr>
jdaggett@8278 6880 <th><span class=property>font-style</span>
jdaggett@484 6881
jdaggett@5809 6882 <td>normal | italic | oblique
jdaggett@484 6883
jdaggett@484 6884 <td>normal
jdaggett@484 6885
jdaggett@484 6886 <td>all elements
jdaggett@484 6887
jdaggett@484 6888 <td>yes
jdaggett@484 6889
jdaggett@484 6890 <td>N/A
jdaggett@484 6891
jdaggett@484 6892 <td>visual
jdaggett@484 6893
jdaggett@3460 6894 <tr>
jdaggett@3460 6895 <th><a class=property href="#propdef-font-synthesis">font-synthesis</a>
jdaggett@2487 6896
jdaggett@2487 6897 <td>none | [ weight || style ]
jdaggett@2487 6898
jdaggett@2487 6899 <td>weight style
jdaggett@2457 6900
jdaggett@2457 6901 <td>all elements
jdaggett@2457 6902
jdaggett@2457 6903 <td>yes
jdaggett@2457 6904
jdaggett@2457 6905 <td>N/A
jdaggett@2457 6906
jdaggett@2457 6907 <td>visual
jdaggett@2457 6908
jdaggett@3460 6909 <tr>
jdaggett@8278 6910 <th><span class=property>font-variant</span>
jdaggett@1662 6911
jdaggett@6436 6912 <td>normal | none | [ &lt;common-lig-values&gt; ||
jdaggett@3460 6913 &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
jdaggett@3041 6914 &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
jdaggett@8225 6915 || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
jdaggett@8225 6916 character-variant(&lt;feature-value-name&gt; #) ||
jdaggett@5833 6917 swash(&lt;feature-value-name&gt;) ||
jdaggett@3041 6918 ornaments(&lt;feature-value-name&gt;) ||
jdaggett@4545 6919 annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
jdaggett@6648 6920 | petite-caps | all-petite-caps | unicase | titling-caps ] ||
jdaggett@2509 6921 &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
jdaggett@3638 6922 &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
jdaggett@3638 6923 &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
jdaggett@3638 6924 ruby ]
jdaggett@484 6925
jdaggett@484 6926 <td>normal
jdaggett@484 6927
jdaggett@484 6928 <td>all elements
jdaggett@484 6929
jdaggett@484 6930 <td>yes
jdaggett@484 6931
jdaggett@7377 6932 <td>see individual properties
jdaggett@484 6933
jdaggett@484 6934 <td>visual
jdaggett@484 6935
jdaggett@3460 6936 <tr>
jdaggett@3460 6937 <th><a class=property
jdaggett@1662 6938 href="#propdef-font-variant-alternates">font-variant-alternates</a>
jdaggett@1662 6939
jdaggett@6176 6940 <td>normal | [ stylistic(&lt;feature-value-name&gt;) || historical-forms
jdaggett@8225 6941 || styleset(&lt;feature-value-name&gt; #) ||
jdaggett@8225 6942 character-variant(&lt;feature-value-name&gt; #) ||
jdaggett@5833 6943 swash(&lt;feature-value-name&gt;) ||
jdaggett@3638 6944 ornaments(&lt;feature-value-name&gt;) ||
jdaggett@3638 6945 annotation(&lt;feature-value-name&gt;) ]
jdaggett@1662 6946
jdaggett@1662 6947 <td>normal
jdaggett@1662 6948
jdaggett@1662 6949 <td>all elements
jdaggett@1662 6950
jdaggett@1662 6951 <td>yes
jdaggett@1662 6952
jdaggett@1662 6953 <td>N/A
jdaggett@1662 6954
jdaggett@1662 6955 <td>visual
jdaggett@1662 6956
jdaggett@3460 6957 <tr>
jdaggett@3460 6958 <th><a class=property
jdaggett@1662 6959 href="#propdef-font-variant-caps">font-variant-caps</a>
jdaggett@1662 6960
jdaggett@5809 6961 <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps
jdaggett@6648 6962 | unicase | titling-caps
jdaggett@1662 6963
jdaggett@1662 6964 <td>normal
jdaggett@1662 6965
jdaggett@1662 6966 <td>all elements
jdaggett@1662 6967
jdaggett@1662 6968 <td>yes
jdaggett@1662 6969
jdaggett@1662 6970 <td>N/A
jdaggett@1662 6971
jdaggett@1662 6972 <td>visual
jdaggett@1662 6973
jdaggett@3460 6974 <tr>
jdaggett@3460 6975 <th><a class=property
jdaggett@1662 6976 href="#propdef-font-variant-east-asian">font-variant-east-asian</a>
jdaggett@1662 6977
jdaggett@5809 6978 <td>normal | [ &lt;east-asian-variant-values&gt; ||
jdaggett@3638 6979 &lt;east-asian-width-values&gt; || ruby ]
jdaggett@1662 6980
jdaggett@1662 6981 <td>normal
jdaggett@1662 6982
jdaggett@1662 6983 <td>all elements
jdaggett@1662 6984
jdaggett@1662 6985 <td>yes
jdaggett@1662 6986
jdaggett@1662 6987 <td>N/A
jdaggett@1662 6988
jdaggett@1662 6989 <td>visual
jdaggett@1662 6990
jdaggett@3460 6991 <tr>
jdaggett@3460 6992 <th><a class=property
jdaggett@1662 6993 href="#propdef-font-variant-ligatures">font-variant-ligatures</a>
jdaggett@1662 6994
jdaggett@8225 6995 <td>normal | none | [ &lt;common-lig-values&gt; ||
jdaggett@8225 6996 &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
jdaggett@8225 6997 &lt;contextual-alt-values&gt; ]
jdaggett@1662 6998
jdaggett@1662 6999 <td>normal
jdaggett@1662 7000
jdaggett@1662 7001 <td>all elements
jdaggett@1662 7002
jdaggett@1662 7003 <td>yes
jdaggett@1662 7004
jdaggett@1662 7005 <td>N/A
jdaggett@1662 7006
jdaggett@1662 7007 <td>visual
jdaggett@1662 7008
jdaggett@3460 7009 <tr>
jdaggett@3460 7010 <th><a class=property
jdaggett@1662 7011 href="#propdef-font-variant-numeric">font-variant-numeric</a>
jdaggett@1662 7012
jdaggett@5809 7013 <td>normal | [ &lt;numeric-figure-values&gt; ||
jdaggett@1732 7014 &lt;numeric-spacing-values&gt; || &lt;numeric-fraction-values&gt; ||
jdaggett@3638 7015 ordinal || slashed-zero ]
jdaggett@1662 7016
jdaggett@1662 7017 <td>normal
jdaggett@1662 7018
jdaggett@1662 7019 <td>all elements
jdaggett@1662 7020
jdaggett@1662 7021 <td>yes
jdaggett@1662 7022
jdaggett@1662 7023 <td>N/A
jdaggett@1662 7024
jdaggett@1662 7025 <td>visual
jdaggett@1662 7026
jdaggett@3460 7027 <tr>
jdaggett@3460 7028 <th><a class=property
jdaggett@3460 7029 href="#propdef-font-variant-position">font-variant-position</a>
jdaggett@3460 7030
jdaggett@3638 7031 <td>normal | sub | super
jdaggett@3460 7032
jdaggett@3460 7033 <td>normal
jdaggett@3460 7034
jdaggett@3460 7035 <td>all elements
jdaggett@3460 7036
jdaggett@3460 7037 <td>yes
jdaggett@3460 7038
jdaggett@3460 7039 <td>N/A
jdaggett@3460 7040
jdaggett@3460 7041 <td>visual
jdaggett@3460 7042
jdaggett@3460 7043 <tr>
jdaggett@8278 7044 <th><span class=property>font-weight</span>
jdaggett@484 7045
jdaggett@484 7046 <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600
jdaggett@5809 7047 | 700 | 800 | 900
jdaggett@484 7048
jdaggett@484 7049 <td>normal
jdaggett@484 7050
jdaggett@484 7051 <td>all elements
jdaggett@484 7052
jdaggett@484 7053 <td>yes
jdaggett@484 7054
jdaggett@484 7055 <td>N/A
jdaggett@484 7056
jdaggett@484 7057 <td>visual
jdaggett@484 7058 </table>
jdaggett@890 7059 <!--end-properties-->
jdaggett@5596 7060 <!--begin-descriptors-->
jdaggett@5596 7061
jdaggett@5596 7062 <table class=proptable>
jdaggett@5596 7063 <thead>
jdaggett@5596 7064 <tr>
jdaggett@5596 7065 <th>Descriptor
jdaggett@5596 7066
jdaggett@5596 7067 <th>Value
jdaggett@5596 7068
jdaggett@5596 7069 <th>Initial
jdaggett@5596 7070
jdaggett@5596 7071 <th>Percentages
jdaggett@5596 7072
jdaggett@5596 7073 <th>Media
jdaggett@5596 7074
jdaggett@5596 7075 <tbody>
jdaggett@5596 7076 <tr>
jdaggett@8278 7077 <th><span class=property>font-family</span>
jdaggett@5596 7078
jdaggett@8225 7079 <td>&lt;family-name&gt;
jdaggett@5596 7080
jdaggett@5596 7081 <td>N/A
jdaggett@5596 7082
jdaggett@5596 7083 <tr>
jdaggett@8279 7084 <th><span class=property>font-feature-settings</span>
jdaggett@5596 7085
jdaggett@8225 7086 <td>normal | &lt;feature-tag-value&gt; #
jdaggett@5596 7087
jdaggett@5596 7088 <td>normal
jdaggett@5596 7089
jdaggett@5596 7090 <tr>
jdaggett@8278 7091 <th><span class=property>font-stretch</span>
jdaggett@5596 7092
jdaggett@5596 7093 <td>normal | ultra-condensed | extra-condensed | condensed |
jdaggett@5596 7094 semi-condensed | semi-expanded | expanded | extra-expanded |
jdaggett@5596 7095 ultra-expanded
jdaggett@5596 7096
jdaggett@5596 7097 <td>normal
jdaggett@5596 7098
jdaggett@5596 7099 <tr>
jdaggett@8278 7100 <th><span class=property>font-style</span>
jdaggett@5596 7101
jdaggett@5596 7102 <td>normal | italic | oblique
jdaggett@5596 7103
jdaggett@5596 7104 <td>normal
jdaggett@5596 7105
jdaggett@5596 7106 <tr>
jdaggett@8278 7107 <th><span class=property>font-variant</span>
jdaggett@5596 7108
jdaggett@8225 7109 <td>normal | none | [ &lt;common-lig-values&gt; ||
jdaggett@5596 7110 &lt;discretionary-lig-values&gt; || &lt;historical-lig-values&gt; ||
jdaggett@5596 7111 &lt;contextual-alt-values&gt; || stylistic(&lt;feature-value-name&gt;)
jdaggett@8225 7112 || historical-forms || styleset(&lt;feature-value-name&gt; #) ||
jdaggett@8225 7113 character-variant(&lt;feature-value-name&gt; #) ||
jdaggett@5833 7114 swash(&lt;feature-value-name&gt;) ||
jdaggett@5596 7115 ornaments(&lt;feature-value-name&gt;) ||
jdaggett@5596 7116 annotation(&lt;feature-value-name&gt;) || [ small-caps | all-small-caps
jdaggett@6648 7117 | petite-caps | all-petite-caps | unicase | titling-caps ] ||
jdaggett@5596 7118 &lt;numeric-figure-values&gt; || &lt;numeric-spacing-values&gt; ||
jdaggett@5596 7119 &lt;numeric-fraction-values&gt; || ordinal || slashed-zero ||
jdaggett@5596 7120 &lt;east-asian-variant-values&gt; || &lt;east-asian-width-values&gt; ||
jdaggett@5596 7121 ruby ]
jdaggett@5596 7122
jdaggett@5596 7123 <td>normal
jdaggett@5596 7124
jdaggett@5596 7125 <tr>
jdaggett@8278 7126 <th><span class=property>font-weight</span>
jdaggett@5596 7127
jdaggett@5596 7128 <td>normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
jdaggett@5596 7129
jdaggett@5596 7130 <td>normal
jdaggett@5596 7131
jdaggett@5596 7132 <tr>
jdaggett@5596 7133 <th><a class=property href="#descdef-src">src</a>
jdaggett@5596 7134
jdaggett@8225 7135 <td>[ &lt;url> [format(&lt;string> #)]? | &lt;font-face-name&gt; ] #
jdaggett@5596 7136
jdaggett@5596 7137 <td>N/A
jdaggett@5596 7138
jdaggett@5596 7139 <tr>
jdaggett@5596 7140 <th><a class=property href="#descdef-unicode-range">unicode-range</a>
jdaggett@5596 7141
jdaggett@8225 7142 <td>&lt;urange&gt; #
jdaggett@5596 7143
jdaggett@5596 7144 <td>U+0-10FFFF
jdaggett@5596 7145 </table>
jdaggett@5596 7146 <!--end-descriptors-->
jdaggett@6648 7147 <script type="text/javascript">
jdaggett@6648 7148 window.onload = function () {
jdaggett@6648 7149 if (!("devicePixelRatio" in window && window.devicePixelRatio > 1)) return;
jdaggett@6648 7150 var i, hiresElements = document.getElementsByClassName("hires");
jdaggett@6648 7151 for (i = 0; i < hiresElements.length; i++) {
jdaggett@6648 7152 var h = hiresElements[i];
jdaggett@6648 7153 if (h.tagName != "IMG") continue;
jdaggett@6648 7154 var src = h.getAttribute("src");
jdaggett@6648 7155 var src2x = src.replace(/\.\w+$/, function(m) { return "@2x" + m; });
jdaggett@6648 7156 h.src = src2x;
jdaggett@6648 7157 }
jdaggett@6648 7158 }
jdaggett@6648 7159 </script>
jdaggett@484 7160 </html>
jdaggett@484 7161 <!-- Keep this comment at the end of the file
jdaggett@484 7162 Local variables:
jdaggett@484 7163 mode: sgml
jdaggett@484 7164 sgml-declaration:"~/SGML/HTML4.decl"
jdaggett@484 7165 sgml-default-doctype-name:"html"
jdaggett@484 7166 sgml-minimize-attributes:t
jdaggett@484 7167 sgml-nofill-elements:("pre" "style" "br")
jdaggett@484 7168 sgml-live-element-indicator:t
jdaggett@484 7169 sgml-omittag:nil
jdaggett@484 7170 sgml-shorttag:nil
jdaggett@484 7171 sgml-namecase-general:t
jdaggett@484 7172 sgml-general-insert-case:lower
jdaggett@484 7173 sgml-always-quote-attributes:t
jdaggett@484 7174 sgml-indent-step:nil
jdaggett@484 7175 sgml-indent-data:t
jdaggett@484 7176 sgml-parent-document:nil
jdaggett@484 7177 sgml-exposed-tags:nil
jdaggett@484 7178 sgml-local-catalogs:nil
jdaggett@484 7179 sgml-local-ecat-files:nil
jdaggett@484 7180 End:
jdaggett@484 7181 -->
jdaggett@8277 7182 <!--
jdaggett@1856 7183
jdaggett@1856 7184 to do:
jdaggett@1856 7185
jdaggett@1856 7186 - wording of OpenType family name handling
jdaggett@1856 7187 - handling combining sequences in the font matching algorithm
jdaggett@1856 7188 - fix-up fi ligature example
jdaggett@1856 7189
jdaggett@1856 7190 -->

mercurial