CINXE.COM

CSS Fonts Module Level 4

<!doctype html><html lang="en"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> <title>CSS Fonts Module Level 4</title> <meta content="ED" name="w3c-status"> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet"> <meta content="Bikeshed version 742f3d674, updated Mon Nov 4 14:56:54 2024 -0800" name="generator"> <link href="https://www.w3.org/TR/css-fonts-4/" rel="canonical"> <link href="https://drafts.csswg.org/csslogo.ico" rel="icon"> <meta content="634ecfb8988b4f0dfab0ada6947af660bd6cbe33" name="revision"> <meta content="dark light" name="color-scheme"> <link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css"> <style> /* work-around for https://github.com/tabatkins/bikeshed/issues/1799 */ div.example { overflow: visible; } div.example>a.self-link::before { content: "¶"; } </style> <style>/* Boilerplate: style-autolinks */ .css.css, .property.property, .descriptor.descriptor { color: var(--a-normal-text); font-size: inherit; font-family: inherit; } .css::before, .property::before, .descriptor::before { content: "‘"; } .css::after, .property::after, .descriptor::after { content: "’"; } .property, .descriptor { /* Don't wrap property and descriptor names */ white-space: nowrap; } .type { /* CSS value <type> */ font-style: italic; } pre .property::before, pre .property::after { content: ""; } [data-link-type="property"]::before, [data-link-type="propdesc"]::before, [data-link-type="descriptor"]::before, [data-link-type="value"]::before, [data-link-type="function"]::before, [data-link-type="at-rule"]::before, [data-link-type="selector"]::before, [data-link-type="maybe"]::before { content: "‘"; } [data-link-type="property"]::after, [data-link-type="propdesc"]::after, [data-link-type="descriptor"]::after, [data-link-type="value"]::after, [data-link-type="function"]::after, [data-link-type="at-rule"]::after, [data-link-type="selector"]::after, [data-link-type="maybe"]::after { content: "’"; } [data-link-type].production::before, [data-link-type].production::after, .prod [data-link-type]::before, .prod [data-link-type]::after { content: ""; } [data-link-type=element], [data-link-type=element-attr] { font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: .9em; } [data-link-type=element]::before { content: "<" } [data-link-type=element]::after { content: ">" } [data-link-type=biblio] { white-space: pre; } @media (prefers-color-scheme: dark) { :root { --selflink-text: black; --selflink-bg: silver; --selflink-hover-text: white; } } </style> <style>/* Boilerplate: style-colors */ /* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */ :root { color-scheme: light dark; --text: black; --bg: white; --unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #707070; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #f8f8f8; --tocnav-active-text: #c00; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #f7f8f9; --tocsidebar-shadow: rgba(0,0,0,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #3980b5; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #005a9c; --hr-text: var(--text); --algo-border: #def; --del-text: red; --del-bg: transparent; --ins-text: #080; --ins-bg: transparent; --a-normal-text: #034575; --a-normal-underline: #bbb; --a-visited-text: var(--a-normal-text); --a-visited-underline: #707070; --a-hover-bg: rgba(75%, 75%, 75%, .25); --a-active-text: #c00; --a-active-underline: #c00; --blockquote-border: silver; --blockquote-bg: transparent; --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: #fbe9e9; --issue-text: var(--text); --issueheading-text: #831616; --example-border: #e0cb52; --example-bg: #fcfaee; --example-text: var(--text); --exampleheading-text: #574b0f; --note-border: #52e052; --note-bg: #e9fbe9; --note-text: var(--text); --noteheading-text: hsl(120, 70%, 30%); --notesummary-underline: silver; --assertion-border: #aaa; --assertion-bg: #eee; --assertion-text: black; --advisement-border: orange; --advisement-bg: #fec; --advisement-text: var(--text); --advisementheading-text: #b35f00; --warning-border: red; --warning-bg: hsla(40,100%,50%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #F5F0FF; --amendment-text: var(--text); --amendmentheading-text: #220066; --def-border: #8ccbf2; --def-bg: #def; --def-text: var(--text); --defrow-border: #bbd7e9; --datacell-border: silver; --indexinfo-text: #707070; --indextable-hover-text: black; --indextable-hover-bg: #f7f8f9; --outdatedspec-bg: rgba(0, 0, 0, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } @media (prefers-color-scheme: dark) { :root { --text: #ddd; --bg: black; --unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E"); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #999; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #080808; --tocnav-active-text: #f44; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #080808; --tocsidebar-shadow: rgba(255,255,255,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #6af; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #8af; --hr-text: var(--text); --algo-border: #456; --del-text: #f44; --del-bg: transparent; --ins-text: #4a4; --ins-bg: transparent; --a-normal-text: #6af; --a-normal-underline: #555; --a-visited-text: var(--a-normal-text); --a-visited-underline: var(--a-normal-underline); --a-hover-bg: rgba(25%, 25%, 25%, .2); --a-active-text: #f44; --a-active-underline: var(--a-active-text); --borderedblock-bg: rgba(255, 255, 255, .05); --blockquote-border: silver; --blockquote-bg: var(--borderedblock-bg); --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: var(--borderedblock-bg); --issue-text: var(--text); --issueheading-text: hsl(0deg, 70%, 70%); --example-border: hsl(50deg, 90%, 60%); --example-bg: var(--borderedblock-bg); --example-text: var(--text); --exampleheading-text: hsl(50deg, 70%, 70%); --note-border: hsl(120deg, 100%, 35%); --note-bg: var(--borderedblock-bg); --note-text: var(--text); --noteheading-text: hsl(120, 70%, 70%); --notesummary-underline: silver; --assertion-border: #444; --assertion-bg: var(--borderedblock-bg); --assertion-text: var(--text); --advisement-border: orange; --advisement-bg: #222218; --advisement-text: var(--text); --advisementheading-text: #f84; --warning-border: red; --warning-bg: hsla(40,100%,20%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #080010; --amendment-text: var(--text); --amendmentheading-text: #cc00ff; --def-border: #8ccbf2; --def-bg: #080818; --def-text: var(--text); --defrow-border: #136; --datacell-border: silver; --indexinfo-text: #aaa; --indextable-hover-text: var(--text); --indextable-hover-bg: #181818; --outdatedspec-bg: rgba(255, 255, 255, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } /* In case a transparent-bg image doesn't expect to be on a dark bg, which is quite common in practice... */ img { background: white; } } </style> <style>/* Boilerplate: style-counters */ body { counter-reset: example figure issue; } .issue { counter-increment: issue; } .issue:not(.no-marker)::before { content: "Issue " counter(issue); } .example { counter-increment: example; } .example:not(.no-marker)::before { content: "Example " counter(example); } .invalid.example:not(.no-marker)::before, .illegal.example:not(.no-marker)::before { content: "Invalid Example" counter(example); } figcaption { counter-increment: figure; } figcaption:not(.no-marker)::before { content: "Figure " counter(figure) " "; } </style> <style>/* Boilerplate: style-dfn-panel */ :root { --dfnpanel-bg: #ddd; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #ffc; --dfnpanel-target-outline: orange; } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #333; --dfnpanel-target-outline: silver; } } .dfn-panel { position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.75em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--dfnpanel-bg); color: var(--dfnpanel-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .dfn-panel:not(.on) { display: none; } .dfn-panel * { margin: 0; padding: 0; text-indent: 0; } .dfn-panel > b { display: block; } .dfn-panel a { color: var(--dfnpanel-text); } .dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; } .dfn-panel a:focus { outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: 8px; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; transition: left 1s ease-out, bottom 1s ease-out; } .dfn-panel .link-item:hover { text-decoration: underline; } .dfn-panel .link-item .copy-icon { opacity: 0; } .dfn-panel .link-item:hover .copy-icon, .dfn-panel .link-item .copy-icon:focus { opacity: 1; } .dfn-panel .copy-icon { display: inline-block; margin-right: 0.5em; width: 0.85em; height: 1em; border-radius: 3px; background-color: #ccc; cursor: pointer; } .dfn-panel .copy-icon .icon { width: 100%; height: 100%; background-color: #fff; display: flex; justify-content: center; align-items: center; position: relative; } .dfn-panel .copy-icon .icon::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid black; background-color: #ccc; opacity: 0.25; transform: translate(3px, -3px); } .dfn-panel .copy-icon:active .icon::before { opacity: 1; } .dfn-paneled[role="button"] { cursor: help; } .highlighted { animation: target-fade 3s; } @keyframes target-fade { from { background-color: var(--dfnpanel-target-bg); outline: 5px solid var(--dfnpanel-target-outline); } to { color: var(--a-normal-text); background-color: transparent; outline: transparent; } } </style> <style>/* Boilerplate: style-idl-highlighting */ pre.idl.highlight { background: var(--borderedblock-bg, var(--def-bg)); } </style> <style>/* Boilerplate: style-issues */ a[href].issue-return { float: right; float: inline-end; color: var(--issueheading-text); font-weight: bold; text-decoration: none; } </style> <style>/* Boilerplate: style-md-lists */ /* This is a weird hack for me not yet following the commonmark spec regarding paragraph and lists. */ [data-md] > :first-child { margin-top: 0; } [data-md] > :last-child { margin-bottom: 0; } </style> <style>/* Boilerplate: style-mdn-anno */ :root { --mdn-bg: #EEE; --mdn-shadow: #999; --mdn-nosupport-text: #ccc; --mdn-pass: green; --mdn-fail: red; } @media (prefers-color-scheme: dark) { :root { --mdn-bg: #222; --mdn-shadow: #444; --mdn-nosupport-text: #666; --mdn-pass: #690; --mdn-fail: #d22; } } .mdn-anno { background: var(--mdn-bg, #EEE); border-radius: .25em; box-shadow: 0 0 3px var(--mdn-shadow, #999); color: var(--text, black); font: 1em sans-serif; hyphens: none; max-width: min-content; overflow: hidden; padding: 0.2em; position: absolute; right: 0.3em; top: auto; white-space: nowrap; word-wrap: normal; z-index: 8; } .mdn-anno.unpositioned { display: none; } .mdn-anno.overlapping-main { opacity: .2; transition: opacity .1s; } .mdn-anno[open] { opacity: 1; z-index: 9; min-width: 9em; } .mdn-anno:hover { opacity: 1; outline: var(--text, black) 1px solid; } .mdn-anno > summary { font-weight: normal; text-align: right; cursor: pointer; display: block; } .mdn-anno > summary > .less-than-two-engines-flag { color: var(--mdn-fail); padding-right: 2px; } .mdn-anno > summary > .all-engines-flag { color: var(--mdn-pass); padding-right: 2px; } .mdn-anno > summary > span { color: #fff; background-color: #000; font-weight: normal; font-family: zillaslab, Palatino, "Palatino Linotype", serif; padding: 2px 3px 0px 3px; line-height: 1.3em; vertical-align: top; } .mdn-anno > .feature { margin-top: 20px; } .mdn-anno > .feature:not(:first-of-type) { border-top: 1px solid #999; margin-top: 6px; padding-top: 2px; } .mdn-anno > .feature > .less-than-two-engines-text { color: var(--mdn-fail); } .mdn-anno > .feature > .all-engines-text { color: var(--mdn-pass); } .mdn-anno > .feature > p { font-size: .75em; margin-top: 6px; margin-bottom: 0; } .mdn-anno > .feature > p + p { margin-top: 3px; } .mdn-anno > .feature > .support { display: block; font-size: 0.6em; margin: 0; padding: 0; margin-top: 2px; } .mdn-anno > .feature > .support + div { padding-top: 0.5em; } .mdn-anno > .feature > .support > hr { display: block; border: none; border-top: 1px dotted #999; padding: 3px 0px 0px 0px; margin: 2px 3px 0px 3px; } .mdn-anno > .feature > .support > hr::before { content: ""; } .mdn-anno > .feature > .support > span { padding: 0.2em 0; display: block; display: table; } .mdn-anno > .feature > .support > span.no { color: var(--mdn-nosupport-text); filter: grayscale(100%); } .mdn-anno > .feature > .support > span.no::before { opacity: 0.5; } .mdn-anno > .feature > .support > span:first-of-type { padding-top: 0.5em; } .mdn-anno > .feature > .support > span > span { padding: 0 0.5em; display: table-cell; } .mdn-anno > .feature > .support > span > span:first-child { width: 100%; } .mdn-anno > .feature > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; } .mdn-anno > .feature > .support > span::before { content: ' '; display: table-cell; min-width: 1.5em; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; } .mdn-anno > .feature > .support > .chrome_android::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .mdn-anno > .feature > .support > .firefox_android::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .mdn-anno > .feature > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .mdn-anno > .feature > .support > .edge_blink::before { background-image: url(https://resources.whatwg.org/browser-logos/edge.svg); } .mdn-anno > .feature > .support > .edge::before { background-image: url(https://resources.whatwg.org/browser-logos/edge_legacy.svg); } .mdn-anno > .feature > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .mdn-anno > .feature > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); } .mdn-anno > .feature > .support > .safari_ios::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); } .mdn-anno > .feature > .support > .nodejs::before { background-image: url(https://nodejs.org/static/images/favicons/favicon.ico); } .mdn-anno > .feature > .support > .opera_android::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .mdn-anno > .feature > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .mdn-anno > .feature > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); } .mdn-anno > .feature > .support > .samsunginternet_android::before { background-image: url(https://resources.whatwg.org/browser-logos/samsung.svg); } .mdn-anno > .feature > .support > .webview_android::before { background-image: url(https://resources.whatwg.org/browser-logos/android-webview.png); } .name-slug-mismatch { color: red; } .caniuse-status:hover { z-index: 9; } /* dt, li, .issue, .note, and .example are "position: relative", so to put annotation at right margin, must move to right of containing block */; .h-entry:not(.status-LS) dt > .mdn-anno, .h-entry:not(.status-LS) li > .mdn-anno, .h-entry:not(.status-LS) .issue > .mdn-anno, .h-entry:not(.status-LS) .note > .mdn-anno, .h-entry:not(.status-LS) .example > .mdn-anno { right: -6.7em; } .h-entry p + .mdn-anno { margin-top: 0; } h2 + .mdn-anno.after { margin: -48px 0 0 0; } h3 + .mdn-anno.after { margin: -46px 0 0 0; } h4 + .mdn-anno.after { margin: -42px 0 0 0; } h5 + .mdn-anno.after { margin: -40px 0 0 0; } h6 + .mdn-anno.after { margin: -40px 0 0 0; } </style> <style>/* Boilerplate: style-ref-hints */ :root { --ref-hint-bg: #ddd; --ref-hint-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --ref-hint-bg: #222; --ref-hint-text: var(--text); } } .ref-hint { display: inline-block; position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.5em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--ref-hint-bg); color: var(--ref-hint-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .ref-hint * { margin: 0; padding: 0; text-indent: 0; } .ref-hint ul { padding: 0 0 0 1em; list-style: none; } </style> <style>/* Boilerplate: style-selflinks */ :root { --selflink-text: white; --selflink-bg: gray; --selflink-hover-text: black; } .heading, .issue, .note, .example, li, dt { position: relative; } a.self-link { position: absolute; top: 0; left: calc(-1 * (3.5rem - 26px)); width: calc(3.5rem - 26px); height: 2em; text-align: center; border: none; transition: opacity .2s; opacity: .5; } a.self-link:hover { opacity: 1; } .heading > a.self-link { font-size: 83%; } .example > a.self-link, .note > a.self-link, .issue > a.self-link { /* These blocks are overflow:auto, so positioning outside doesn't work. */ left: auto; right: 0; } li > a.self-link { left: calc(-1 * (3.5rem - 26px) - 2em); } dfn > a.self-link { top: auto; left: auto; opacity: 0; width: 1.5em; height: 1.5em; background: var(--selflink-bg); color: var(--selflink-text); font-style: normal; transition: opacity .2s, background-color .2s, color .2s; } dfn:hover > a.self-link { opacity: 1; } dfn > a.self-link:hover { color: var(--selflink-hover-text); } a.self-link::before { content: "¶"; } .heading > a.self-link::before { content: "§"; } dfn > a.self-link::before { content: "#"; } </style> <style>/* Boilerplate: style-syntax-highlighting */ code.highlight { padding: .1em; border-radius: .3em; } pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; } .highlight:not(.idl) { background: rgba(0, 0, 0, .03); } c-[a] { color: #990055 } /* Keyword.Declaration */ c-[b] { color: #990055 } /* Keyword.Type */ c-[c] { color: #708090 } /* Comment */ c-[d] { color: #708090 } /* Comment.Multiline */ c-[e] { color: #0077aa } /* Name.Attribute */ c-[f] { color: #669900 } /* Name.Tag */ c-[g] { color: #222222 } /* Name.Variable */ c-[k] { color: #990055 } /* Keyword */ c-[l] { color: #000000 } /* Literal */ c-[m] { color: #000000 } /* Literal.Number */ c-[n] { color: #0077aa } /* Name */ c-[o] { color: #999999 } /* Operator */ c-[p] { color: #999999 } /* Punctuation */ c-[s] { color: #a67f59 } /* Literal.String */ c-[t] { color: #a67f59 } /* Literal.String.Single */ c-[u] { color: #a67f59 } /* Literal.String.Double */ c-[cp] { color: #708090 } /* Comment.Preproc */ c-[c1] { color: #708090 } /* Comment.Single */ c-[cs] { color: #708090 } /* Comment.Special */ c-[kc] { color: #990055 } /* Keyword.Constant */ c-[kn] { color: #990055 } /* Keyword.Namespace */ c-[kp] { color: #990055 } /* Keyword.Pseudo */ c-[kr] { color: #990055 } /* Keyword.Reserved */ c-[ld] { color: #000000 } /* Literal.Date */ c-[nc] { color: #0077aa } /* Name.Class */ c-[no] { color: #0077aa } /* Name.Constant */ c-[nd] { color: #0077aa } /* Name.Decorator */ c-[ni] { color: #0077aa } /* Name.Entity */ c-[ne] { color: #0077aa } /* Name.Exception */ c-[nf] { color: #0077aa } /* Name.Function */ c-[nl] { color: #0077aa } /* Name.Label */ c-[nn] { color: #0077aa } /* Name.Namespace */ c-[py] { color: #0077aa } /* Name.Property */ c-[ow] { color: #999999 } /* Operator.Word */ c-[mb] { color: #000000 } /* Literal.Number.Bin */ c-[mf] { color: #000000 } /* Literal.Number.Float */ c-[mh] { color: #000000 } /* Literal.Number.Hex */ c-[mi] { color: #000000 } /* Literal.Number.Integer */ c-[mo] { color: #000000 } /* Literal.Number.Oct */ c-[sb] { color: #a67f59 } /* Literal.String.Backtick */ c-[sc] { color: #a67f59 } /* Literal.String.Char */ c-[sd] { color: #a67f59 } /* Literal.String.Doc */ c-[se] { color: #a67f59 } /* Literal.String.Escape */ c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */ c-[si] { color: #a67f59 } /* Literal.String.Interpol */ c-[sx] { color: #a67f59 } /* Literal.String.Other */ c-[sr] { color: #a67f59 } /* Literal.String.Regex */ c-[ss] { color: #a67f59 } /* Literal.String.Symbol */ c-[vc] { color: #0077aa } /* Name.Variable.Class */ c-[vg] { color: #0077aa } /* Name.Variable.Global */ c-[vi] { color: #0077aa } /* Name.Variable.Instance */ c-[il] { color: #000000 } /* Literal.Number.Integer.Long */ @media (prefers-color-scheme: dark) { .highlight:not(.idl) { background: rgba(255, 255, 255, .05); } c-[a] { color: #d33682 } /* Keyword.Declaration */ c-[b] { color: #d33682 } /* Keyword.Type */ c-[c] { color: #2aa198 } /* Comment */ c-[d] { color: #2aa198 } /* Comment.Multiline */ c-[e] { color: #268bd2 } /* Name.Attribute */ c-[f] { color: #b58900 } /* Name.Tag */ c-[g] { color: #cb4b16 } /* Name.Variable */ c-[k] { color: #d33682 } /* Keyword */ c-[l] { color: #657b83 } /* Literal */ c-[m] { color: #657b83 } /* Literal.Number */ c-[n] { color: #268bd2 } /* Name */ c-[o] { color: #657b83 } /* Operator */ c-[p] { color: #657b83 } /* Punctuation */ c-[s] { color: #6c71c4 } /* Literal.String */ c-[t] { color: #6c71c4 } /* Literal.String.Single */ c-[u] { color: #6c71c4 } /* Literal.String.Double */ c-[ch] { color: #2aa198 } /* Comment.Hashbang */ c-[cp] { color: #2aa198 } /* Comment.Preproc */ c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */ c-[c1] { color: #2aa198 } /* Comment.Single */ c-[cs] { color: #2aa198 } /* Comment.Special */ c-[kc] { color: #d33682 } /* Keyword.Constant */ c-[kn] { color: #d33682 } /* Keyword.Namespace */ c-[kp] { color: #d33682 } /* Keyword.Pseudo */ c-[kr] { color: #d33682 } /* Keyword.Reserved */ c-[ld] { color: #657b83 } /* Literal.Date */ c-[nc] { color: #268bd2 } /* Name.Class */ c-[no] { color: #268bd2 } /* Name.Constant */ c-[nd] { color: #268bd2 } /* Name.Decorator */ c-[ni] { color: #268bd2 } /* Name.Entity */ c-[ne] { color: #268bd2 } /* Name.Exception */ c-[nf] { color: #268bd2 } /* Name.Function */ c-[nl] { color: #268bd2 } /* Name.Label */ c-[nn] { color: #268bd2 } /* Name.Namespace */ c-[py] { color: #268bd2 } /* Name.Property */ c-[ow] { color: #657b83 } /* Operator.Word */ c-[mb] { color: #657b83 } /* Literal.Number.Bin */ c-[mf] { color: #657b83 } /* Literal.Number.Float */ c-[mh] { color: #657b83 } /* Literal.Number.Hex */ c-[mi] { color: #657b83 } /* Literal.Number.Integer */ c-[mo] { color: #657b83 } /* Literal.Number.Oct */ c-[sa] { color: #6c71c4 } /* Literal.String.Affix */ c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */ c-[sc] { color: #6c71c4 } /* Literal.String.Char */ c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */ c-[sd] { color: #6c71c4 } /* Literal.String.Doc */ c-[se] { color: #6c71c4 } /* Literal.String.Escape */ c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */ c-[si] { color: #6c71c4 } /* Literal.String.Interpol */ c-[sx] { color: #6c71c4 } /* Literal.String.Other */ c-[sr] { color: #6c71c4 } /* Literal.String.Regex */ c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */ c-[fm] { color: #268bd2 } /* Name.Function.Magic */ c-[vc] { color: #cb4b16 } /* Name.Variable.Class */ c-[vg] { color: #cb4b16 } /* Name.Variable.Global */ c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */ c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */ c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */ } </style> <style>/* Boilerplate: style-var-click-highlighting */ /* Colors were chosen in Lab using https://nixsensor.com/free-color-converter/ D50 2deg illuminant, L in [0,100], a and b in [-128, 128] 0 = lab(85,0,85) 1 = lab(85,80,30) 2 = lab(85,-40,40) 3 = lab(85,-50,0) 4 = lab(85,5,15) 5 = lab(85,-10,-50) 6 = lab(85,35,-15) For darkmode: 0 = oklab(50% 0% 108%) 1 = oklab(50% -51% 51%) 2 = oklab(50% -64% -20%) 3 = oklab(50% 6% 19%) 4 = oklab(50% -12% -64%) 5 = oklab(50% 44% -19%) 6 = oklab(50% 102% 38%) */ [data-algorithm] var { cursor: pointer; } var[data-var-color] { background-color: var(--var-bg); box-shadow: 0 0 0 2px var(--var-bg); } var[data-var-color] { --var-bg: #F4D200; } var[data-var-color="1"] { --var-bg: #FF87A2; } var[data-var-color="2"] { --var-bg: #96E885; } var[data-var-color="3"] { --var-bg: #3EEED2; } var[data-var-color="4"] { --var-bg: #EACFB6; } var[data-var-color="5"] { --var-bg: #82DDFF; } var[data-var-color="6"] { --var-vg: #FFBCF2; } @media (prefers-color-scheme: dark) { var[data-var-color] { --var-bg: #bc1a00; } var[data-var-color="1"] { --var-bg: #007f00; } var[data-var-color="2"] { --var-bg: #008698; } var[data-var-color="3"] { --var-bg: #7f5b2b; } var[data-var-color="4"] { --var-bg: #004df3; } var[data-var-color="5"] { --var-bg: #a1248a; } var[data-var-color="6"] { --var-vg: #ff0000; } } </style> <style>/* Boilerplate: style-wpt */ :root { --wpt-border: hsl(0, 0%, 60%); --wpt-bg: hsl(0, 0%, 95%); --wpt-text: var(--text); --wptheading-text: hsl(0, 0%, 30%); } @media (prefers-color-scheme: dark) { :root { --wpt-border: hsl(0, 0%, 30%); --wpt-bg: var(--borderedblock-bg); --wpt-text: var(--text); --wptheading-text: hsl(0, 0%, 60%); } } .wpt-tests-block { list-style: none; border-left: .5em solid var(--wpt-border); background: var(--wpt-bg); color: var(--wpt-text); margin: 1em auto; padding: .5em; } .wpt-tests-block summary { color: var(--wptheading-text); font-weight: normal; text-transform: uppercase; } .wpt-tests-block summary::marker{ color: var(--wpt-border); } .wpt-tests-block summary:hover::marker{ color: var(--wpt-text); } /* The only content of a wpt test block in its closed state is the <summary>, which contains the word TESTS, and that is absolutely positioned. In that closed state, wpt test blocks are styled to have a top margin whose height is exactly equal to the height of the absolutely positioned <summary>, and no other background/padding/margin/border. The wpt test block elements will therefore allow the maring of the previous/next block elements to collapse through them; if this combined margin would be larger than its own top margin, it stays as is, and therefore the pre-existing vertical rhythm of the document is undisturbed. If that combined margin would be smaller, it is grown to that size. This means that the wpt test block ensures that there's always enough vertical space to insert the summary, without adding more than is needed. */ .wpt-tests-block:not([open]){ padding: 0; border: none; background: none; font-size: 0.75em; line-height: 1; position: relative; margin: 1em 0 0; } .wpt-tests-block:not([open]) summary { position: absolute; right: 0; bottom: 0; } /* It is possible that both the last child of a block element and the block element itself would be annotated with a <wpt> block each. If the block element has a padding or a border, that's fine, but otherwise the bottom margin of the block and of its last child would collapse and both <wpt> elements would overlap, being both placed there. To avoid that, add 1px of padding to the <wpt> element annotating the last child to prevent the bottom margin of the block and of its last child from collapsing (and as much negative margin, as wel only want to prevent margin collapsing, but are not trying to actually take more space). */ .wpt-tests-block:not([open]):last-child { padding-bottom: 1px; margin-bottom: -1px; } /* Exception to the previous rule: don't do that in non-last list items, because it's not necessary, and would therefore consume more space than strictly needed. Lists must have list items as children, not <wpt> elements, so a <wpt> element cannot be a sibling of a list item, and the collision that the previous rule avoids cannot happen. */ li:not(:last-child) > .wpt-tests-block:not([open]):last-child, dd:not(:last-child) > .wpt-tests-block:not([open]):last-child { padding-bottom: 0; margin-bottom: 0; } .wpt-tests-block:not([open]):not(:hover){ opacity: 0.5; } .wpt-tests-list { list-style: none; display: grid; margin: 0; padding: 0; grid-template-columns: 1fr max-content auto auto; grid-column-gap: .5em; } .wpt-tests-block hr:last-child { display: none; } .wpt-test { display: contents; } .wpt-test > a { text-decoration: underline; border: none; } .wpt-test > .wpt-name { grid-column: 1; } .wpt-test > .wpt-results { grid-column: 2; } .wpt-test > .wpt-live { grid-column: 3; } .wpt-test > .wpt-source { grid-column: 4; } .wpt-test > .wpt-results { display: flex; gap: .1em; } .wpt-test .wpt-result { display: inline-block; height: 1em; width: 1em; border-radius: 50%; position: relative; } </style> <body class="h-entry"> <div class="head"> <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p> <h1 class="p-name no-ref" id="title">CSS Fonts Module Level 4</h1> <p id="w3c-state"><a href="https://www.w3.org/standards/types/#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-11-20">20 November 2024</time></p> <details open> <summary>More details about this document</summary> <div data-fill-with="spec-metadata"> <dl> <dt>This version: <dd><a class="u-url" href="https://drafts.csswg.org/css-fonts-4/">https://drafts.csswg.org/css-fonts-4/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/css-fonts-4/">https://www.w3.org/TR/css-fonts-4/</a> <dt>Previous Versions: <dd><a href="https://www.w3.org/TR/2024/WD-css-fonts-4-20240201/" rel="prev">https://www.w3.org/TR/2024/WD-css-fonts-4-20240201/</a> <dt>Feedback: <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-fonts-4">CSSWG Issues Repository</a> <dd><a href="#issues-index">Inline In Spec</a> <dt class="editor">Editor: <dd class="editor p-author h-card vcard" data-editor-id="1438"><a class="p-name fn u-url url" href="http://svgees.us">Chris Lilley</a> (<span class="p-org org">W3C</span>) <dt class="editor">Former Editors: <dd class="editor p-author h-card vcard" data-editor-id="41498"><a class="p-name fn u-url url" href="https://twitter.com/nattokirai">John Daggett</a> (<span class="p-org org">Invited Expert</span>) <dd class="editor p-author h-card vcard" data-editor-id="77180"><a class="p-name fn u-email email" href="mailto:mmaxfield@apple.com">Myles C. Maxfield</a> (<span class="p-org org">Formerly of Apple Inc.</span>) <dt>Suggest an Edit for this Spec: <dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-fonts-4/Overview.bs">GitHub Editor</a> <dt>Test Suite: <dd class="wpt-overview"><a href="https://wpt.fyi/results/css/css-fonts/">https://wpt.fyi/results/css/css-fonts/</a> </dl> </div> </details> <div data-fill-with="warning"></div> <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/policies/#copyright">Copyright</a> © 2024 <a href="https://www.w3.org/">World Wide Web Consortium</a>. <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> <a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/copyright/software-license/" rel="license" title="W3C Software and Document License">permissive document license</a> rules apply. </p> <hr title="Separator for header"> </div> <div class="p-summary" data-fill-with="abstract"> <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2> <p>This specification defines modifications to the existing <a href="https://drafts.csswg.org/css-fonts-3/">CSS Fonts 3</a> specification along with additional features.</p> <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, etc. <script> const githubPrefix = "https://w3c.github.io/csswg-drafts/"; if(location.href.slice(0, githubPrefix.length) == githubPrefix) { const suffix = location.href.slice(githubPrefix.length); const draftUrl = "https://drafts.csswg.org/" + suffix; window.location.replace(draftUrl); } </script> </div> <h2 class="no-num no-toc no-ref heading settled" id="sotd"><span class="content">Status of this document</span></h2> <div data-fill-with="status"> <p> This is a public copy of the editors’ draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don’t cite this document other than as work in progress. </p> <p>Please send feedback by <a href="https://github.com/w3c/csswg-drafts/issues">filing issues in GitHub</a> (preferred), including the spec code “css-fonts” in the title, like this: “[css-fonts] <i>…summary of comment…</i>”. All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>. Alternately, feedback can be sent to the (<a href="https://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list <a href="mailto:www-style@w3.org?Subject=%5Bcss-fonts%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>. </p> <p>This document is governed by the <a href="https://www.w3.org/policies/process/20231103/" id="w3c_process_revision">03 November 2023 W3C Process Document</a>. </p> <p></p> </div> <div data-fill-with="at-risk"> <p>The following features are at-risk, and may be dropped during the CR period: </p> <ul> <li>Synthesis of the <a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position">font-variant-position</a> property <li>The <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override">font-language-override</a> property <li>The <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-language-override" id="ref-for-descdef-font-face-font-language-override">font-language-override</a> descriptor </ul> <p>“At-risk” is a W3C Process term-of-art, and does not necessarily imply that the feature is in danger of being dropped or delayed. It means that the WG believes the feature may have difficulty being interoperably implemented in a timely manner, and marking it as such allows the WG to drop the feature if necessary when transitioning to the Proposed Rec stage, without having to publish a new Candidate Rec without the feature first.</p> </div> <nav data-fill-with="table-of-contents" id="toc"> <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2> <ol class="toc" role="directory"> <li> <a href="#introduction"><span class="secno">1</span> <span class="content"> Introduction</span></a> <ol class="toc"> <li><a href="#values"><span class="secno">1.1</span> <span class="content"> Value Definitions</span></a> </ol> <li> <a href="#basic-font-props"><span class="secno">2</span> <span class="content"> Basic Font Properties</span></a> <ol class="toc"> <li> <a href="#font-family-prop"><span class="secno">2.1</span> <span class="content"> Font family: the <span class="property">font-family</span> property</span></a> <ol class="toc"> <li><a href="#family-name-syntax"><span class="secno">2.1.1</span> <span class="content"> Syntax of <span class="production">&lt;family-name></span> </span></a> <li><a href="#generic-family-name-syntax"><span class="secno">2.1.2</span> <span class="content"> Syntax of <span class="production">&lt;generic-family></span> </span></a> <li><a href="#system"><span class="secno">2.1.3</span> <span class="content"> Syntax of <span class="production">&lt;system-family-name></span> </span></a> <li><a href="#font-families"><span class="secno">2.1.4</span> <span class="content"> Relationship Between Faces and Families </span></a> <li><a href="#generic-font-families"><span class="secno">2.1.5</span> <span class="content"> Generic font families</span></a> </ol> <li> <a href="#font-weight-prop"><span class="secno">2.2</span> <span class="content">Font weight: the <span class="property">font-weight</span> property</span></a> <ol class="toc"> <li><a href="#relative-weights"><span class="secno">2.2.1</span> <span class="content"> Relative Weights</span></a> <li><a href="#missing-weights"><span class="secno">2.2.2</span> <span class="content"> Missing weights</span></a> </ol> <li> <a href="#font-width-prop"><span class="secno">2.3</span> <span class="content"> Font width: the <span class="property">font-width</span> property</span></a> <ol class="toc"> <li><a href="#font-stretch-prop"><span class="secno">2.3.1</span> <span class="content"> Font width: the <span class="property">font-stretch</span> legacy name alias</span></a> </ol> <li><a href="#font-style-prop"><span class="secno">2.4</span> <span class="content"> Font style: the <span class="property">font-style</span> property</span></a> <li> <a href="#font-size-prop"><span class="secno">2.5</span> <span class="content"> Font size: the <span class="property">font-size</span> property</span></a> <ol class="toc"> <li><a href="#absolute-size-mapping"><span class="secno">2.5.1</span> <span class="content"> Absolute Size Keyword Mapping Table</span></a> </ol> <li><a href="#font-size-adjust-prop"><span class="secno">2.6</span> <span class="content"> Relative sizing: the <span class="property">font-size-adjust</span> property</span></a> <li><a href="#font-prop"><span class="secno">2.7</span> <span class="content"> Shorthand font property: the <span class="property">font</span> property</span></a> <li> <a href="#font-synthesis-intro"><span class="secno">2.8</span> <span class="content"> Controlling synthetic faces</span></a> <ol class="toc"> <li><a href="#font-synthesis-weight"><span class="secno">2.8.1</span> <span class="content"> Controlling synthesized bold: The <span class="property">font-synthesis-weight</span> property</span></a> <li><a href="#font-synthesis-style"><span class="secno">2.8.2</span> <span class="content"> Controlling synthesized oblique: The <span class="property">font-synthesis-style</span> property</span></a> <li><a href="#font-synthesis-small-caps"><span class="secno">2.8.3</span> <span class="content"> Controlling synthesized small caps: The <span class="property">font-synthesis-small-caps</span> property</span></a> <li><a href="#font-synthesis-position"><span class="secno">2.8.4</span> <span class="content"> Controlling synthesized super- and subscripts: The <span class="property">font-synthesis-position</span> property</span></a> <li><a href="#font-synthesis"><span class="secno">2.8.5</span> <span class="content"> Controlling synthetic faces: the <span class="property">font-synthesis</span> shorthand</span></a> </ol> </ol> <li> <a href="#font-rendering-controls"><span class="secno">3</span> <span class="content"> Font Rendering Controls</span></a> <ol class="toc"> <li><a href="#font-rendering-controls-introduction"><span class="secno">3.1</span> <span class="content"> Introduction to Font Rendering Controls</span></a> <li><a href="#font-display-timeline"><span class="secno">3.2</span> <span class="content"> The Font Display Timeline</span></a> </ol> <li> <a href="#font-resources"><span class="secno">4</span> <span class="content"> Font Resources</span></a> <ol class="toc"> <li><a href="#font-face-rule"><span class="secno">4.1</span> <span class="content"> The <span><span class="css">@font-face</span></span> rule</span></a> <li><a href="#font-family-desc"><span class="secno">4.2</span> <span class="content">Font family: the <span class="property">font-family</span> descriptor</span></a> <li> <a href="#src-desc"><span class="secno">4.3</span> <span class="content">Font reference: the <span class="property">src</span> descriptor</span></a> <ol class="toc"> <li><a href="#font-face-src-parsing"><span class="secno">4.3.1</span> <span class="content">Parsing the <span class="property">src</span> descriptor</span></a> <li><a href="#font-face-src-loading"><span class="secno">4.3.2</span> <span class="content">Loading an individual item in the <span class="property">src</span> descriptor</span></a> <li> <a href="#font-face-src-formats"><span class="secno">4.3.3</span> <span class="content">Selecting items in the <span class="property">src</span></span></a> <ol class="toc"> <li><a href="#local-font-fallback"><span class="secno">4.3.3.1</span> <span class="content">Local font fallback</span></a> </ol> </ol> <li> <a href="#font-prop-desc"><span class="secno">4.4</span> <span class="content"> Font property descriptors: the <span class="property">font-style</span>, <span class="property">font-weight</span>, and <span class="property">font-width</span> descriptors</span></a> <ol class="toc"> <li><a href="#font-stretch-desc"><span class="secno">4.4.1</span> <span class="content"> Font width: the <span class="property">font-stretch</span> legacy name alias</span></a> </ol> <li> <a href="#unicode-range-desc"><span class="secno">4.5</span> <span class="content"> Character range: the <span class="property">unicode-range</span> descriptor</span></a> <ol class="toc"> <li><a href="#composite-fonts"><span class="secno">4.5.1</span> <span class="content">Using character ranges to define composite fonts</span></a> </ol> <li><a href="#font-rend-desc"><span class="secno">4.6</span> <span class="content"> Font features and variations: the <span class="property">font-feature-settings</span> and <span class="property">font-variation-settings</span> descriptors</span></a> <li><a href="#font-named-instance"><span class="secno">4.7</span> <span class="content">Using named instances from variable fonts: the <span class="property">font-named-instance</span> descriptor</span></a> <li> <a href="#font-requests"><span class="secno">4.8</span> <span class="content">Font request guidelines</span></a> <ol class="toc"> <li><a href="#font-face-loading"><span class="secno">4.8.1</span> <span class="content">Font loading guidelines</span></a> <li><a href="#font-fetching-requirements"><span class="secno">4.8.2</span> <span class="content"> Font fetching requirements</span></a> </ol> <li> <a href="#font-display-desc"><span class="secno">4.9</span> <span class="content"> Controlling Font Display Per Font-Face: the <span class="property">font-display</span> descriptor</span></a> <ol class="toc"> <li><a href="#font-display-font-feature-values"><span class="secno">4.9.1</span> <span class="content"> Controlling Font Display Per Font-Family via <span class="css">@font-feature-values</span></span></a> </ol> <li><a href="#font-language-override-desc"><span class="secno">4.10</span> <span class="content"> Default font language overriding: the <span class="property">font-language-override</span> descriptor</span></a> <li><a href="#font-metrics-override-desc"><span class="secno">4.11</span> <span class="content"> Default font metrics overriding: the <span class="property">ascent-override</span>, <span class="property">descent-override</span> and <span class="property">line-gap-override</span> descriptors</span></a> </ol> <li> <a href="#font-matching-algorithm"><span class="secno">5</span> <span class="content">Font Matching Algorithm</span></a> <ol class="toc"> <li><a href="#localized-name-matching"><span class="secno">5.1</span> <span class="content">Localized name matching</span></a> <li><a href="#font-style-matching"><span class="secno">5.2</span> <span class="content">Matching font styles</span></a> <li><a href="#cluster-matching"><span class="secno">5.3</span> <span class="content"> Cluster matching</span></a> <li><a href="#char-handling-issues"><span class="secno">5.4</span> <span class="content"> Character handling issues</span></a> </ol> <li> <a href="#font-rend-props"><span class="secno">6</span> <span class="content"> Font Feature Properties</span></a> <ol class="toc"> <li><a href="#glyph-selection-positioning"><span class="secno">6.1</span> <span class="content"> Glyph selection and positioning</span></a> <li><a href="#language-specific-support"><span class="secno">6.2</span> <span class="content"> Language-specific display</span></a> <li><a href="#font-kerning-prop"><span class="secno">6.3</span> <span class="content"> Kerning: the <span class="property">font-kerning</span> property</span></a> <li><a href="#font-variant-ligatures-prop"><span class="secno">6.4</span> <span class="content"> Ligatures: the <span class="property">font-variant-ligatures</span> property</span></a> <li><a href="#font-variant-position-prop"><span class="secno">6.5</span> <span class="content"> Subscript and superscript forms: the <span class="property">font-variant-position</span> property</span></a> <li><a href="#font-variant-caps-prop"><span class="secno">6.6</span> <span class="content"> Capitalization: the <span class="property">font-variant-caps</span> property</span></a> <li><a href="#font-variant-numeric-prop"><span class="secno">6.7</span> <span class="content"> Numerical formatting: the <span class="property">font-variant-numeric</span> property</span></a> <li><a href="#font-variant-alternates-prop"><span class="secno">6.8</span> <span class="content"> Alternates and swashes: the <span class="property">font-variant-alternates</span> property</span></a> <li> <a href="#font-feature-values"><span class="secno">6.9</span> <span class="content"> Defining font specific alternates: the <span>@font-feature-values</span> rule</span></a> <ol class="toc"> <li><a href="#font-feature-values-syntax"><span class="secno">6.9.1</span> <span class="content">Basic syntax</span></a> <li><a href="#multi-value-features"><span class="secno">6.9.2</span> <span class="content"> Multi-valued feature value definitions</span></a> </ol> <li><a href="#font-variant-east-asian-prop"><span class="secno">6.10</span> <span class="content"> East Asian text rendering: the <span class="property">font-variant-east-asian</span> property</span></a> <li><a href="#font-variant-prop"><span class="secno">6.11</span> <span class="content"> Overall shorthand for font rendering: the <span class="property">font-variant</span> property</span></a> <li><a href="#font-feature-settings-prop"><span class="secno">6.12</span> <span class="content"> Low-level font feature settings control: the <span class="property">font-feature-settings</span> property</span></a> <li><a href="#font-language-override-prop"><span class="secno">6.13</span> <span class="content">Font language override: the <span class="property">font-language-override</span> property</span></a> </ol> <li> <a href="#font-feature-variation-resolution"><span class="secno">7</span> <span class="content"> Font Feature and Variation Resolution</span></a> <ol class="toc"> <li><a href="#default-features"><span class="secno">7.1</span> <span class="content"> Default features</span></a> <li><a href="#feature-variation-precedence"><span class="secno">7.2</span> <span class="content"> Feature and variation precedence</span></a> <li><a href="#feature-precedence-examples"><span class="secno">7.3</span> <span class="content"> Feature precedence examples</span></a> </ol> <li> <a href="#font-variation-props"><span class="secno">8</span> <span class="content"> Font Variation Properties</span></a> <ol class="toc"> <li><a href="#font-optical-sizing-def"><span class="secno">8.1</span> <span class="content"> Optical sizing control: the <span class="property">font-optical-sizing</span> property</span></a> <li><a href="#font-variation-settings-def"><span class="secno">8.2</span> <span class="content"> Low-level font variation settings control: the <span class="property">font-variation-settings</span> property</span></a> </ol> <li> <a href="#color-font-support"><span class="secno">9</span> <span class="content"> Color Font Support</span></a> <ol class="toc"> <li><a href="#font-palette-prop"><span class="secno">9.1</span> <span class="content"> Controlling Color Font Palettes: The <span class="property">font-palette</span> property</span></a> <li> <a href="#font-palette-values"><span class="secno">9.2</span> <span class="content"> User-defined font color palettes: The <span class="css">@font-palette-values</span> rule</span></a> <ol class="toc"> <li><a href="#font-family-2-desc"><span class="secno">9.2.1</span> <span class="content"> Font family: the <span class="property">font-family</span> descriptor</span></a> <li><a href="#base-palette-desc"><span class="secno">9.2.2</span> <span class="content"> Specifying the base palette: the <span class="property">base-palette</span> descriptor</span></a> <li><a href="#override-color"><span class="secno">9.2.3</span> <span class="content"> Overriding a colors from a palette: The <span class="property">override-colors</span> descriptor</span></a> </ol> <li><a href="#font-variant-emoji-prop"><span class="secno">9.3</span> <span class="content"> Selecting the text presentation style: The <span class="property">font-variant-emoji</span> property</span></a> </ol> <li> <a href="#font-taxonomy"><span class="secno">10</span> <span class="content"> Font Taxonomy</span></a> <ol class="toc"> <li><a href="#installed-fonts"><span class="secno">10.1</span> <span class="content"> Installed Fonts</span></a> <li><a href="#web-fonts"><span class="secno">10.2</span> <span class="content"> Web Fonts</span></a> <li><a href="#preinstalled-and-user-installed-fonts"><span class="secno">10.3</span> <span class="content"> Preinstalled Fonts and User-Installed Fonts</span></a> <li><a href="#system-font"><span class="secno">10.4</span> <span class="content"> System Font</span></a> </ol> <li> <a href="#font-technologies-formats"><span class="secno">11</span> <span class="content"> Font Technologies and Formats </span></a> <ol class="toc"> <li><a href="#font-tech-definitions"><span class="secno">11.1</span> <span class="content">Font tech</span></a> <li><a href="#font-format-definitions"><span class="secno">11.2</span> <span class="content">Font formats</span></a> </ol> <li> <a href="#object-model"><span class="secno">12</span> <span class="content"> Object Model</span></a> <ol class="toc"> <li><a href="#om-fontface"><span class="secno">12.1</span> <span class="content"> The <code class="highlight">CSSFontFaceRule</code> interface</span></a> <li><a href="#om-fontfeaturevalues"><span class="secno">12.2</span> <span class="content"> The <code class="highlight">CSSFontFeatureValuesRule</code> interface</span></a> <li><a href="#om-fontpalettevalues"><span class="secno">12.3</span> <span class="content"> The <code class="highlight">CSSFontPaletteValuesRule</code> interface</span></a> </ol> <li> <a href="#serializing"><span class="secno">13</span> <span class="content"> Serializing </span></a> <ol class="toc"> <li><a href="#serializing-properties"><span class="secno">13.1</span> <span class="content"> Serializing font-related properties </span></a> <li><a href="#serializing-at-rules"><span class="secno">13.2</span> <span class="content"> Serializing font-related at-rules </span></a> </ol> <li><a href="#platform-props-to-css"><span class="secno"></span> <span class="content"> Appendix A: Mapping platform font properties to CSS properties</span></a> <li><a href="#security"><span class="secno">14</span> <span class="content"> Security Considerations </span></a> <li> <a href="#privacy"><span class="secno">15</span> <span class="content"> Privacy Considerations </span></a> <ol class="toc"> <li><a href="#sp201"><span class="secno">15.1</span> <span class="content"> What information might this feature expose to Web sites or other parties, and for what purposes is that exposure necessary?</span></a> <li><a href="#sp202"><span class="secno">15.2</span> <span class="content">Is this specification exposing the minimum amount of information necessary to power the feature? </span></a> <li><a href="#sp203"><span class="secno">15.3</span> <span class="content"> How does this specification deal with personal information or personally-identifiable information or information derived thereof? </span></a> <li><a href="#sp204"><span class="secno">15.4</span> <span class="content">How does this specification deal with sensitive information?</span></a> <li><a href="#sp205"><span class="secno">15.5</span> <span class="content"> Does this specification introduce new state for an origin that persists across browsing sessions?</span></a> <li><a href="#sp206"><span class="secno">15.6</span> <span class="content">What information from the underlying platform, e.g. configuration data, is exposed by this specification to an origin? </span></a> <li><a href="#sp207"><span class="secno">15.7</span> <span class="content">Does this specification allow an origin access to sensors on a user’s device</span></a> <li><a href="#sp208"><span class="secno">15.8</span> <span class="content">What data does this specification expose to an origin? Please also document what data is identical to data exposed by other features, in the same or different contexts. </span></a> <li><a href="#sp209"><span class="secno">15.9</span> <span class="content">Does this specification enable new script execution/loading mechanisms? </span></a> <li><a href="#sp210"><span class="secno">15.10</span> <span class="content">Does this specification allow an origin to access other devices? </span></a> <li><a href="#sp211"><span class="secno">15.11</span> <span class="content">Does this specification allow an origin some measure of control over a user agent’s native UI?</span></a> <li><a href="#sp212"><span class="secno">15.12</span> <span class="content">What temporary identifiers might this specification create or expose to the web? </span></a> <li><a href="#sp213"><span class="secno">15.13</span> <span class="content">How does this specification distinguish between behavior in first-party and third-party contexts?</span></a> <li><a href="#sp214"><span class="secno">15.14</span> <span class="content">How does this specification work in the context of a user agent’s Private Browsing or "incognito" mode? </span></a> <li><a href="#sp215"><span class="secno">15.15</span> <span class="content"> Does this specification have a "Security Considerations" and "Privacy Considerations" section?</span></a> <li><a href="#sp216"><span class="secno">15.16</span> <span class="content"> Does this specification allow downgrading default security characteristics?</span></a> <li><a href="#sp217"><span class="secno">15.17</span> <span class="content">What should this questionnaire have asked? </span></a> </ol> <li><a href="#a11y"><span class="secno">16</span> <span class="content"> Accessibility Considerations </span></a> <li><a href="#acknowledgments"><span class="secno">17</span> <span class="content"> Acknowledgments</span></a> <li> <a href="#changes"><span class="secno">18</span> <span class="content"> Changes </span></a> <ol class="toc"> <li><a href="#changes-2021-12-21"><span class="secno">18.1</span> <span class="content">Changes from the <span>21 December 2021 Working Draft</span> </span></a> <li><a href="#changes-2021-07-29"><span class="secno">18.2</span> <span class="content">Changes from the <span>29 July 2021 Working Draft</span> </span></a> <li><a href="#changes-2020-11-17"><span class="secno">18.3</span> <span class="content">Changes from the <span>17 November 2020 Working Draft</span> </span></a> <li><a href="#changes-2019-11-13"><span class="secno">18.4</span> <span class="content">Changes from the <span>13 November 2019 Working Draft</span></span></a> <li><a href="#changes-2018-09-20"><span class="secno">18.5</span> <span class="content">Changes from the <span>20 September 2018 Working Draft</span></span></a> <li><a href="#changes-2018-04-10"><span class="secno">18.6</span> <span class="content"> Changes from the <span>10 April 2018 Working Draft</span> </span></a> <li><a href="#changes-fonts-3"><span class="secno">18.7</span> <span class="content"> Changes from the 20 September 2018 <span>CSS Fonts 3 Recommendation</span> </span></a> </ol> <li> <a href="#w3c-conformance"><span class="secno"></span> <span class="content"> Conformance</span></a> <ol class="toc"> <li><a href="#w3c-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a> <li><a href="#w3c-conformance-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a> <li> <a href="#w3c-partial"><span class="secno"></span> <span class="content"> Partial implementations</span></a> <ol class="toc"> <li><a href="#w3c-conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a> </ol> <li><a href="#w3c-testing"><span class="secno"></span> <span class="content"> Non-experimental implementations</span></a> </ol> <li> <a href="#index"><span class="secno"></span> <span class="content">Index</span></a> <ol class="toc"> <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a> <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a> </ol> <li> <a href="#references"><span class="secno"></span> <span class="content">References</span></a> <ol class="toc"> <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a> <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a> </ol> <li> <a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a> <ol class="toc"> <li><a href="#font-face-descriptor-table"><span class="secno"></span> <span class="content"><span>@font-face</span> Descriptors</span></a> <li><a href="#font-feature-values-descriptor-table"><span class="secno"></span> <span class="content"><span>@font-feature-values</span> Descriptors</span></a> <li><a href="#font-palette-values-descriptor-table"><span class="secno"></span> <span class="content"><span>@font-palette-values</span> Descriptors</span></a> </ol> <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a> <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a> </ol> </nav> <main> <h2 class="heading settled" data-level="1" id="introduction"><span class="secno">1. </span><span class="content"> Introduction</span><a class="self-link" href="#introduction"></a></h2> <p>This specification includes and expands on the basic font features described in the CSS3 Fonts specification (<a data-link-type="biblio" href="#biblio-css-fonts-3" title="CSS Fonts Module Level 3">[CSS-FONTS-3]</a>).</p> <h3 class="heading settled" data-level="1.1" id="values"><span class="secno">1.1. </span><span class="content"> Value Definitions</span><a class="self-link" href="#values"></a></h3> <p>This specification follows the <a href="https://www.w3.org/TR/CSS2/about.html#property-defs">CSS property definition conventions</a> from <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> using the <a href="https://www.w3.org/TR/css-values-3/#value-defs">value definition syntax</a> from <a data-link-type="biblio" href="#biblio-css-values-3" title="CSS Values and Units Module Level 3">[CSS-VALUES-3]</a>. Value types not defined in this specification are defined in CSS Values &amp; Units <span title="CSS Values and Units Module Level 3">[CSS-VALUES-3]</span>. Combination with other CSS modules may expand the definitions of these value types.</p> <p>In addition to the property-specific values listed in their definitions, all properties defined in this specification also accept the <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords">CSS-wide keywords</a> as their property value. For readability they have not been repeated explicitly.</p> <h2 class="heading settled" data-level="2" id="basic-font-props"><span class="secno">2. </span><span class="content"> Basic Font Properties</span><a class="self-link" href="#basic-font-props"></a></h2> <p>The particular font face used to render a character is determined by the font family and other font properties that apply to a given element. This structure allows settings to be varied independent of each other.</p> <h3 class="heading settled" data-level="2.1" id="font-family-prop"><span class="secno">2.1. </span><span class="content"> Font family: the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family">font-family</a> property</span><a class="self-link" href="#font-family-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-family"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-family">font-family</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">[ <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value">&lt;family-name></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family">&lt;generic-family></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma">#</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>depends on user agent <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>list, each item a string and/or <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family①">&lt;generic-family></a> keywords <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><span class="wpt-name">font-family-name-000.xht (visual test) </span><a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-000.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-001.xht" title="css/css-fonts/font-family-name-001.xht">font-family-name-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-002.xht" title="css/css-fonts/font-family-name-002.xht">font-family-name-002.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-002.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-002.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-003.xht" title="css/css-fonts/font-family-name-003.xht">font-family-name-003.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-003.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-003.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-004.xht" title="css/css-fonts/font-family-name-004.xht">font-family-name-004.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-004.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-004.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-005.xht" title="css/css-fonts/font-family-name-005.xht">font-family-name-005.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-005.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-005.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-006.xht" title="css/css-fonts/font-family-name-006.xht">font-family-name-006.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-006.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-006.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-007.xht" title="css/css-fonts/font-family-name-007.xht">font-family-name-007.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-007.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-007.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-008.xht" title="css/css-fonts/font-family-name-008.xht">font-family-name-008.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-008.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-008.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-009.xht" title="css/css-fonts/font-family-name-009.xht">font-family-name-009.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-009.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-009.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-010.xht" title="css/css-fonts/font-family-name-010.xht">font-family-name-010.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-010.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-010.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-011.xht" title="css/css-fonts/font-family-name-011.xht">font-family-name-011.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-011.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-011.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-012.xht" title="css/css-fonts/font-family-name-012.xht">font-family-name-012.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-012.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-012.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-013.xht" title="css/css-fonts/font-family-name-013.xht">font-family-name-013.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-013.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-013.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-014.xht" title="css/css-fonts/font-family-name-014.xht">font-family-name-014.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-014.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-014.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-015.xht" title="css/css-fonts/font-family-name-015.xht">font-family-name-015.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-015.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-015.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-016.xht" title="css/css-fonts/font-family-name-016.xht">font-family-name-016.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-016.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-016.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-017.xht" title="css/css-fonts/font-family-name-017.xht">font-family-name-017.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-017.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-017.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-018.xht" title="css/css-fonts/font-family-name-018.xht">font-family-name-018.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-018.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-018.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-019.xht" title="css/css-fonts/font-family-name-019.xht">font-family-name-019.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-019.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-019.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-020.xht" title="css/css-fonts/font-family-name-020.xht">font-family-name-020.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-020.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-020.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-021.xht" title="css/css-fonts/font-family-name-021.xht">font-family-name-021.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-021.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-021.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-022.xht" title="css/css-fonts/font-family-name-022.xht">font-family-name-022.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-022.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-022.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-023.xht" title="css/css-fonts/font-family-name-023.xht">font-family-name-023.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-023.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-023.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-024.xht" title="css/css-fonts/font-family-name-024.xht">font-family-name-024.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-024.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-024.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-name-025.html" title="css/css-fonts/font-family-name-025.html">font-family-name-025.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-name-025.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-name-025.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/generic-family-keywords-003.html" title="css/css-fonts/generic-family-keywords-003.html">generic-family-keywords-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/generic-family-keywords-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/generic-family-keywords-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-10.html" title="css/css-fonts/standard-font-family-10.html">standard-font-family-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-11.html" title="css/css-fonts/standard-font-family-11.html">standard-font-family-11.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-11.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-11.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-12.html" title="css/css-fonts/standard-font-family-12.html">standard-font-family-12.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-12.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-12.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-13.html" title="css/css-fonts/standard-font-family-13.html">standard-font-family-13.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-13.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-13.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-14.html" title="css/css-fonts/standard-font-family-14.html">standard-font-family-14.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-14.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-14.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-15.html" title="css/css-fonts/standard-font-family-15.html">standard-font-family-15.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-15.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-15.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-16.html" title="css/css-fonts/standard-font-family-16.html">standard-font-family-16.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-16.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-16.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-17.html" title="css/css-fonts/standard-font-family-17.html">standard-font-family-17.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-17.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-17.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-18.html" title="css/css-fonts/standard-font-family-18.html">standard-font-family-18.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-18.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-18.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-19.html" title="css/css-fonts/standard-font-family-19.html">standard-font-family-19.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-19.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-19.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-2.html" title="css/css-fonts/standard-font-family-2.html">standard-font-family-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-20.html" title="css/css-fonts/standard-font-family-20.html">standard-font-family-20.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-20.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-20.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-3.html" title="css/css-fonts/standard-font-family-3.html">standard-font-family-3.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-3.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-3.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-4.html" title="css/css-fonts/standard-font-family-4.html">standard-font-family-4.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-4.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-4.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-5.html" title="css/css-fonts/standard-font-family-5.html">standard-font-family-5.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-5.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-5.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-6.html" title="css/css-fonts/standard-font-family-6.html">standard-font-family-6.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-6.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-6.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-7.html" title="css/css-fonts/standard-font-family-7.html">standard-font-family-7.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-7.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-7.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-8.html" title="css/css-fonts/standard-font-family-8.html">standard-font-family-8.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-8.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-8.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family-9.html" title="css/css-fonts/standard-font-family-9.html">standard-font-family-9.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family-9.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family-9.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/standard-font-family.html" title="css/css-fonts/standard-font-family.html">standard-font-family.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/standard-font-family.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/standard-font-family.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/test_font_family_parsing.html" title="css/css-fonts/test_font_family_parsing.html">test_font_family_parsing.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/test_font_family_parsing.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test_font_family_parsing.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/system-fonts.html" title="css/css-fonts/animations/system-fonts.html">system-fonts.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/system-fonts.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/system-fonts.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-family-computed.html" title="css/css-fonts/parsing/font-family-computed.html">font-family-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-family-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-family-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-family-invalid.html" title="css/css-fonts/parsing/font-family-invalid.html">font-family-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-family-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-family-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-family-valid.html" title="css/css-fonts/parsing/font-family-valid.html">font-family-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-family-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-family-valid.html"><small>(source)</small></a> </ul> </details> <p>This property specifies a prioritized list of font family names or generic family names. A font family defines a set of faces that vary in weight, width or slope. CSS uses the combination of a family name with other font properties to select an individual face. Using this selection mechanism, rather than selecting a face via the style name as is often done in design applications, allows some degree of regularity in textual display when fallback occurs.</p> <p>Component values are a comma-separated list indicating alternatives. A user agent iterates through the list of family names until it matches an available font that contains a glyph for the character to be rendered. (See <a href="#cluster-matching">§ 5.3 Cluster matching</a>.) This allows for differences in available fonts across platforms and for differences in the range of characters supported by individual fonts.</p> <div class="example" id="ex-font-list"> <a class="self-link" href="#ex-font-list"></a> <pre class="highlight">body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Helvetica<c- p>,</c-> Verdana<c- p>,</c-> sans-serif<c- p>;</c-> <c- p>}</c-> </pre> <p>If Helvetica is available, it will be used when rendering. If neither Helvetica nor Verdana is present, then the generic font-family <a class="css" data-link-type="maybe" href="#valdef-font-family-sans-serif" id="ref-for-valdef-font-family-sans-serif">sans-serif</a> font will be used.</p> </div> <p>There are three types of font family names, two of which may be used with this property:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="family-name-value"><a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value①">&lt;family-name></a></dfn> <dd> The name of a font family, such as Helvetica or Verdana in the previous example. <p>This might be a locally-instaled font, or might be a web font.</p> <dt><a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family②">&lt;generic-family></a> <dd> Each <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family③">&lt;generic-family></a> keyword represents a generic font choice, and behaves as a potential alias for one or more locally-installed fonts belonging to the specified generic font category. A <span class="production" id="ref-for-typedef-generic-family④">&lt;generic-family></span> can thus be used as a fallback for when an author’s more specific font choices are not available. <p>There are three types of generic family:</p> <ol> <li data-md> <p>Generics which apply to all Unicode characters and will <em>always</em> match a locally installed font. For example, <span class="css">monospaced</span>.</p> <li data-md> <p>Generics which apply to all Unicode characters but may not match to a locally installed font on some systems. For example, <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-rounded" id="ref-for-valdef-font-family-ui-rounded">ui-rounded</a>.</p> <li data-md> <p>Generics which are writing-system specific, only apply to a subset of Unicode characters, and may not match to a locally installed font on some systems. For example, <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-fangsong" id="ref-for-valdef-font-family-generic-fangsong">generic(fangsong)</a>.</p> </ol> <p>Authors are encouraged to append a generic font family as a last alternative for improved robustness, and to use a more specific generic font family, if applicable, to prefer a specific style even if the individual named font family is not available.</p> <p>Note that <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family⑤">&lt;generic-family></a> keywords cannot be quoted (otherwise they are interpreted as a <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value②">&lt;family-name></a>).</p> <p>The set of generic family keywords is defined in <a href="#generic-font-families">§ 2.1.5 Generic font families</a>.</p> <dt><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="system-family-name-value"><a class="production css" data-link-type="type" href="#system-family-name-value" id="ref-for-system-family-name-value">&lt;system-family-name></a></dfn> <dd> A locally installed system font, whose use is subject to certain constraints. In particular, it may not be used with the <span class="css">font-family</span> property, but can be used with the <span class="css">font</span> shorthand. <p>The following values refer to system fonts:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font" data-dfn-type="value" data-export id="valdef-font-caption">caption</dfn> <dd>The font used for captioned controls (e.g., buttons, drop-downs, etc.). <dt><dfn class="dfn-paneled css" data-dfn-for="font" data-dfn-type="value" data-export id="valdef-font-icon">icon</dfn> <dd>The font used to label icons. <dt><dfn class="dfn-paneled css" data-dfn-for="font" data-dfn-type="value" data-export id="valdef-font-menu">menu</dfn> <dd>The font used in menus (e.g., dropdown menus and menu lists). <dt><dfn class="dfn-paneled css" data-dfn-for="font" data-dfn-type="value" data-export id="valdef-font-message-box">message-box</dfn> <dd>The font used in dialog boxes. <dt><dfn class="dfn-paneled css" data-dfn-for="font" data-dfn-type="value" data-export id="valdef-font-small-caption">small-caption</dfn> <dd>The font used for labeling small controls. <dt><dfn class="dfn-paneled css" data-dfn-for="font" data-dfn-type="value" data-export id="valdef-font-status-bar">status-bar</dfn> <dd>The font used in window status bars. </dl> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-fonts-serialization.tentative.html" title="css/css-fonts/system-fonts-serialization.tentative.html">system-fonts-serialization.tentative.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-fonts-serialization.tentative.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-fonts-serialization.tentative.html"><small>(source)</small></a> </ul> </details> </dl> <h4 class="heading settled" data-level="2.1.1" id="family-name-syntax"><span class="secno">2.1.1. </span><span class="content"> Syntax of <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value③">&lt;family-name></a> </span><a class="self-link" href="#family-name-syntax"></a></h4> <pre class="prod highlight"><a class="production" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value④">&lt;family-name></a> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value">&lt;string></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①">|</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#identifier-value" id="ref-for-identifier-value">&lt;custom-ident></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-one-plus" id="ref-for-mult-one-plus">+</a></pre> <p>Font family names other than generic families or system font families must either be given quoted as <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value①">&lt;string></a>s, or unquoted as a sequence of one or more <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#identifier-value" id="ref-for-identifier-value①">&lt;custom-ident></a>.</p> <p class="note" role="note"><span class="marker">Note:</span> This means most punctuation characters and digits at the start of each token must be escaped in unquoted font family names.</p> <div class="example invalid" id="ex-no-unquoted-punctuation"> <a class="self-link" href="#ex-no-unquoted-punctuation"></a> To illustrate this, the following declarations are invalid: <pre class="highlight"><c- k>font-family</c-><c- p>:</c-> Red/Black<c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"Lucida"</c-> Grande<c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> Ahem!<c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> test<c- n>@foo</c-><c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> #POUND<c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> Hawaii <c- m>5</c-><c- k>-</c-><c- m>0</c-><c- p>,</c-> sans-serif<c- p>;</c-> </pre> </div> <p>Any identifier which could be misinterpreted as a pre-defined keyword in the font-family value definition, or the <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords①">CSS-wide keywords</a>, is not allowed.</p> <p class="note" role="note"><span class="marker">Note:</span> this means that if you really have a font whose name is the same as one of the <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family⑥">&lt;generic-family></a> names, or the system font names, or the <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords②">CSS-wide keywords</a>, it <em>must</em> be quoted.</p> <div class="example" id="ex-valid-unusual-generic-like"> <a class="self-link" href="#ex-valid-unusual-generic-like"></a> To illustrate this, the following unusual font family names are valid because they are quoted: <pre class="highlight"><c- k>font-family</c-><c- p>:</c-> <c- s>"sans-serif"</c-><c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"default"</c-><c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"initial"</c-><c- p>,</c-> sans-serif<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"inherit"</c-><c- p>,</c-> sans-serif<c- p>;</c-> </pre> </div> <p>If a sequence of identifiers is given as a <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value⑤">&lt;family-name></a>, the computed value is the name converted to a string by joining all the identifiers in the sequence by single spaces.</p> <p>To avoid mistakes in escaping, it is recommended to quote font family names that contain white space, digits, or punctuation characters other than hyphens:</p> <div class="example" id="ex-best-quote"> <a class="self-link" href="#ex-best-quote"></a> Quoting font families prevents escaping mistakes. <pre class="highlight">body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"New Century Schoolbook"</c-><c- p>,</c-> serif <c- p>}</c-> &lt;body style=<c- s>"font-family: '21st Century', fantasy"</c->> </pre> </div> <p>Font family <em>names</em> that happen to be the same as a <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①">font-family</a> keyword value (e.g. <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords③">CSS-wide keywords</a> such as <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit" id="ref-for-valdef-all-inherit">inherit</a>, or <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family⑦">&lt;generic-family></a> keywords such as <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif">serif</a>) must be quoted to prevent confusion with the keywords of the same names. UAs must not consider these keywords as matching the <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value⑥">&lt;family-name></a> type.</p> <h4 class="heading settled" data-level="2.1.2" id="generic-family-name-syntax"><span class="secno">2.1.2. </span><span class="content"> Syntax of <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family⑧">&lt;generic-family></a> </span><a class="self-link" href="#generic-family-name-syntax"></a></h4> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-generic-family"><a class="production" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family⑨">&lt;generic-family></a></dfn> = <a class="production" data-link-type="type" href="#typedef-generic-script-specific" id="ref-for-typedef-generic-script-specific">&lt;generic-script-specific></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②">|</a> <a class="production" data-link-type="type" href="#typedef-generic-complete" id="ref-for-typedef-generic-complete">&lt;generic-complete></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③">|</a> <a class="production" data-link-type="type" href="#typedef-generic-incomplete" id="ref-for-typedef-generic-incomplete">&lt;generic-incomplete></a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-generic-script-specific"><a class="production" data-link-type="type" href="#typedef-generic-script-specific" id="ref-for-typedef-generic-script-specific①">&lt;generic-script-specific></a></dfn> = <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-kai" id="ref-for-valdef-font-family-generic-kai"><c- nf>generic</c-><c- p>(</c->kai<c- p>)</c-></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-fangsong" id="ref-for-valdef-font-family-generic-fangsong①"><c- nf>generic</c-><c- p>(</c->fangsong<c- p>)</c-></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-nastaliq" id="ref-for-valdef-font-family-generic-nastaliq"><c- nf>generic</c-><c- p>(</c->nastaliq<c- p>)</c-></a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-generic-complete"><a class="production" data-link-type="type" href="#typedef-generic-complete" id="ref-for-typedef-generic-complete①">&lt;generic-complete></a></dfn> = <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif①">serif</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-sans-serif" id="ref-for-valdef-font-family-sans-serif①">sans-serif</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-system-ui" id="ref-for-valdef-font-family-system-ui">system-ui</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-cursive" id="ref-for-valdef-font-family-cursive">cursive</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-fantasy" id="ref-for-valdef-font-family-fantasy">fantasy</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-size-math" id="ref-for-valdef-font-size-math">math</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-monospace" id="ref-for-valdef-font-family-monospace">monospace</a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-generic-incomplete"><a class="production" data-link-type="type" href="#typedef-generic-incomplete" id="ref-for-typedef-generic-incomplete①">&lt;generic-incomplete></a></dfn> = <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-serif" id="ref-for-valdef-font-family-ui-serif">ui-serif</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-sans-serif" id="ref-for-valdef-font-family-ui-sans-serif">ui-sans-serif</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-monospace" id="ref-for-valdef-font-family-ui-monospace">ui-monospace</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-rounded" id="ref-for-valdef-font-family-ui-rounded①">ui-rounded</a> </pre> <p>To make the syntax less succeptible to clashes, more recently defined generic font families are identified using a functional syntax.</p> <div class="example" id="ex-generic-functional"> <a class="self-link" href="#ex-generic-functional"></a> <pre class="highlight">body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"Adobe Fangsong Std R"</c-><c- p>,</c-> <c- nf>generic</c-><c- p>(</c->fangsong<c- p>),</c-> serif<c- p>}</c-> </pre> <p>The first choice in this example is a specific, named font, in Fang Song (仿宋) style. The family name is enclosed in quotes as it contains space characters. The second is a recently added script-specific generic font; it is unicode-range specific and so may not match to an actual installed font on some systems; but if it exists it will be an example of the requested style. The third is a universal generic font, which is guaranteed to match on all systems.</p> </div> <h4 class="heading settled" data-level="2.1.3" id="system"><span class="secno">2.1.3. </span><span class="content"> Syntax of <a class="production css" data-link-type="type" href="#system-family-name-value" id="ref-for-system-family-name-value①">&lt;system-family-name></a> </span><a class="self-link" href="#system"></a></h4> <pre class="prod highlight"><a class="production" data-link-type="type" href="#system-family-name-value" id="ref-for-system-family-name-value②">&lt;system-family-name></a> = <a class="css" data-link-type="maybe" href="#valdef-font-caption" id="ref-for-valdef-font-caption">caption</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-icon" id="ref-for-valdef-font-icon">icon</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑥">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-menu" id="ref-for-valdef-font-menu">menu</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑦">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-message-box" id="ref-for-valdef-font-message-box">message-box</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑧">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-small-caption" id="ref-for-valdef-font-small-caption">small-caption</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑨">|</a> <a class="css" data-link-type="maybe" href="#valdef-font-status-bar" id="ref-for-valdef-font-status-bar">status-bar</a> </pre> <h4 class="heading settled" data-level="2.1.4" id="font-families"><span class="secno">2.1.4. </span><span class="content"> Relationship Between Faces and Families </span><a class="self-link" href="#font-families"></a></h4> <p>A font family name only specifies a name given to a set of font faces; it does not specify an individual face.</p> <div class="example" id="ex-futura-matches"> <a class="self-link" href="#ex-futura-matches"></a> For example, given the availability of the fonts below, Futura would match but Futura Medium would not: <figure> <img alt="family and face names" height="151" src="images/familyvsfacename.png" width="597"> <figcaption>Family and individual face names</figcaption> </figure> </div> <p class="note" role="note"><span class="marker">Note:</span> The CSS definition of font attributes used for selection are explicitly not intended to define a font taxonomy. A type designer’s idea of a family can often extend to a set of faces that vary along axes other than just the standard axes of weight (<a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight">font-weight</a>), width (<a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width">font-width</a>), and slant (<a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style">font-style</a>). A family can vary along axes that are unique to that family. The CSS font selection mechanism merely provides a way to determine the “closest” match when substitution is necessary.</p> <p class="note" role="note"><span class="marker">Note:</span> The precise way a set of fonts are grouped into font families varies depending upon the platform font management APIs. For example, the Windows GDI API only allows four faces to be grouped into a family, while the DirectWrite API, Core Text API, and other platforms support font families with a variety of weights, widths, and slopes (see <a href="#platform-props-to-css">Appendix A: Mapping platform font properties to CSS properties</a> for more details).</p> <p>See <a href="#localized-name-matching">§ 5.1 Localized name matching</a> below for information on how font-family names are matched.</p> <h4 class="heading settled" data-level="2.1.5" id="generic-font-families"><span class="secno">2.1.5. </span><span class="content"> Generic font families</span><a class="self-link" href="#generic-font-families"></a></h4> <p>A generic font family is a font family which has a standard name (as defined by CSS), but which is an alias for an existing installed font family present on the system. However, a single generic font family may be a composite face combining different typefaces based on such things as the Unicode range of the character, the <a data-link-type="dfn" href="https://drafts.csswg.org/css-text-4/#content-language" id="ref-for-content-language">content language</a> of the containing element, user preferences, system settings, etc. Different generic font families may map to the same used font.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/generic-family-keywords-001.html" title="css/css-fonts/generic-family-keywords-001.html">generic-family-keywords-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/generic-family-keywords-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/generic-family-keywords-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/generic-family-keywords-002.html" title="css/css-fonts/generic-family-keywords-002.html">generic-family-keywords-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/generic-family-keywords-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/generic-family-keywords-002.html"><small>(source)</small></a> </ul> </details> <p class="note" role="note"><span class="marker">Note:</span> Generic font families are intended to be widely implemented on many platforms, unlike arbitrary <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value⑦">&lt;family-name></a>s which are usually platform-specific names. They are expected to map to different fonts on different platforms. Authors may specify these generic family names if they desire their text to follow a particular design on many platforms, and are not particular about which specific font is chosen on those platforms.</p> <p>User agents should provide reasonable default choices for the generic font families, that express the characteristics of each family as well as possible, within the limits allowed by the underlying technology. User agents are encouraged to allow users to select alternative faces for the generic font families.</p> <dl> <dt id="serif-def"><a class="self-link" href="#serif-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-serif">serif</dfn> <dd> Serif fonts represent glyphs that have finishing strokes, flared or tapering ends, or have actual serifed endings (including slab serifs). Serif fonts are typically proportionately-spaced. They often display a greater variation between thick and thin strokes than fonts from the <a class="css" data-link-type="maybe" href="#valdef-font-family-sans-serif" id="ref-for-valdef-font-family-sans-serif②">sans-serif</a> generic font family. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif②">serif</a> and <a class="css" data-link-type="maybe" href="#valdef-font-family-sans-serif" id="ref-for-valdef-font-family-sans-serif③">sans-serif</a> only apply to a small handful of writing scripts. Their use as generic font families in CSS is historical, and reflects the Latin-centric nature of early Web development. Better and more widely applicable names would have been, for example, "modulated" and "monoline". However, for reasons of Web compatibility, these names cannot be changed.</p> <p>CSS uses the term "serif" to apply to a font for any script, although other names might be more familiar for particular scripts, such as Mincho (Japanese), Sung or Song (Chinese), Batang (Korean). For Arabic, the Naskh style would correspond to <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif③">serif</a>.</p> <p><a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif④">serif</a> must always map to at least one matched font face.</p> <p class="note" role="note"><span class="marker">Note:</span> No guarantee is placed on the character coverage of that font face. Therefore, the font <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif⑤">serif</a> is mapped to may not end up being used for all content.</p> <figure> <img alt="sample serif fonts" height="110" src="images/serifexamples.png" width="586"> <figcaption>Sample serif fonts</figcaption> </figure> <dt id="sans-serif-def"><a class="self-link" href="#sans-serif-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-sans-serif">sans-serif</dfn> <dd> Glyphs in sans-serif fonts, as the term is used in CSS, are generally low contrast (vertical and horizontal stems have the close to the same thickness) and have stroke endings that are plain (without any flaring, cross stroke, or other ornamentation). Sans-serif fonts are typically proportionately-spaced. They often have little variation between thick and thin strokes, compared to fonts from the <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif⑥">serif</a> family. CSS uses the term "sans-serif" to apply to a font for any script, although other names might be more familiar for particular scripts, such as Gothic (Japanese), Hei (Chinese), or Gulim (Korean). <p><a class="css" data-link-type="maybe" href="#valdef-font-family-sans-serif" id="ref-for-valdef-font-family-sans-serif④">sans-serif</a> must always map to at least one matched font face.</p> <p class="note" role="note"><span class="marker">Note:</span> No guarantee is placed on the character coverage of that font face. Therefore, the font <a class="css" data-link-type="maybe" href="#valdef-font-family-sans-serif" id="ref-for-valdef-font-family-sans-serif⑤">sans-serif</a> is mapped to may not end up being used for all content.</p> <figure> <img alt="sample sans-serif fonts" height="117" src="images/sansserifexamples.png" width="621"> <figcaption>Sample sans-serif fonts</figcaption> </figure> <dt id="cursive-def"><a class="self-link" href="#cursive-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-cursive">cursive</dfn> <dd> Glyphs in cursive fonts generally use a script style, and the result looks more like handwritten pen or brush writing than printed letterwork. CSS uses the term "cursive" to apply to a font for any script, although other names such as Chancery, Brush, Swing and Script are also used in font names. <figure> <img alt="sample cursive fonts" height="150" src="images/cursiveexamples.png" width="493"> <figcaption>Sample cursive fonts</figcaption> </figure> <dt id="fantasy-def"><a class="self-link" href="#fantasy-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-fantasy">fantasy</dfn> <dd> Fantasy fonts are primarily decorative or expressive fonts that contain decorative or expressive representations of characters. These do not include Pi or Picture fonts which do not represent actual characters. <figure> <img alt="sample fantasy fonts" height="114" src="images/fantasyexamples.png" width="763"> <figcaption>Sample fantasy fonts</figcaption> </figure> <dt id="monospace-def"><a class="self-link" href="#monospace-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-monospace">monospace</dfn> <dd> The sole criterion of a monospace font is that all glyphs have the same fixed width. This is often used to render samples of computer code. <p><a class="css" data-link-type="maybe" href="#valdef-font-family-monospace" id="ref-for-valdef-font-family-monospace①">monospace</a> must always map to at least one matched font face.</p> <p class="note" role="note"><span class="marker">Note:</span> No guarantee is placed on the character coverage of that font face. Therefore, the font <a class="css" data-link-type="maybe" href="#valdef-font-family-monospace" id="ref-for-valdef-font-family-monospace②">monospace</a> is mapped to may not end up being used for all content.</p> <figure> <img alt="sample monospace fonts" height="102" src="images/monospaceexamples.png" width="608"> <figcaption>Sample monospace fonts</figcaption> </figure> <dt id="system-ui-def"><a class="self-link" href="#system-ui-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-system-ui">system-ui</dfn> <dd> This generic font family lets text render with the default user interface font (which, as with all <a href="#generic-font-families">§ 2.1.5 Generic font families</a> may be a composite font) on the platform on which the UA is running. A cross-platform UA should use different fonts on its different supported platforms. The purpose of <a class="css" data-link-type="maybe" href="#valdef-font-family-system-ui" id="ref-for-valdef-font-family-system-ui①">system-ui</a> is to allow web content to integrate with the look and feel of the native OS. <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ar.html" title="css/css-fonts/system-ui-ar.html">system-ui-ar.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ar.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ar.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ja-vs-zh.html" title="css/css-fonts/system-ui-ja-vs-zh.html">system-ui-ja-vs-zh.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ja-vs-zh.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ja-vs-zh.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ja.html" title="css/css-fonts/system-ui-ja.html">system-ui-ja.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ja.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ja.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-mixed.html" title="css/css-fonts/system-ui-mixed.html">system-ui-mixed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-mixed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-mixed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ur-vs-ar.html" title="css/css-fonts/system-ui-ur-vs-ar.html">system-ui-ur-vs-ar.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ur-vs-ar.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ur-vs-ar.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ur.html" title="css/css-fonts/system-ui-ur.html">system-ui-ur.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ur.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ur.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-zh.html" title="css/css-fonts/system-ui-zh.html">system-ui-zh.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-zh.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-zh.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui.html" title="css/css-fonts/system-ui.html">system-ui.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui.html"><small>(source)</small></a> </ul> </details> <p>The precise font used will depend on factors such as Unicode coverage and the content language.</p> <div class="example" id="ex-system-ui-opaque"> <a class="self-link" href="#ex-system-ui-opaque"></a> As with other generic font families, the substitution of specific installed fonts for <a class="css" data-link-type="maybe" href="#valdef-font-family-system-ui" id="ref-for-valdef-font-family-system-ui②">system-ui</a> does not affect the computed style. <pre class="highlight">&lt;div id=<c- s>"system-text"</c-> style=<c- s>"font-family: system-ui"</c->>&lt;/div> ... window.<c- nf>getComputedStyle</c-><c- p>(</c->document.<c- nf>getElementById</c-><c- p>(</c-><c- s>"system-text"</c-><c- p>))</c->.<c- nf>getPropertyValue</c-><c- p>(</c-><c- s>"font-family"</c-><c- p>);</c-> </pre> <p>The script above should not have any knowledge of how <a class="css" data-link-type="maybe" href="#valdef-font-family-system-ui" id="ref-for-valdef-font-family-system-ui③">system-ui</a> is expanded to include a collection of system user interface fonts. In particular, the above script should yield a result of "system-ui" on every platform.</p> </div> <dt id="math-def"><a class="self-link" href="#math-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-math">math</dfn> <dd> This font family is intended for use with mathematical expressions. <p>Such fonts may include additional data (for example, the OpenType MATH table) to help with the hierarchical process of equation layout. In particular, they may contain stylistic and stretching glyph variants useful in setting mathematical equations.</p> <dt id="generic(fangsong)-def"><a class="self-link" href="#generic(fangsong)-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-generic-fangsong">generic(fangsong)</dfn> <dd> This font family is used for Fang Song (仿宋) typefaces in Chinese. Fang Song is a relaxed, intermediate form between Song (<a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif⑦">serif</a>) and Kai (<a class="css" data-link-type="maybe" href="#valdef-font-family-generic-kai" id="ref-for-valdef-font-family-generic-kai①">generic(kai)</a>). Typically, the horizontal lines are tilted, the endpoint flourishes are smaller, and there is less variation in stroke width, compared to a Song style. Fang Song is often used for official Chinese Government documents. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-fangsong" id="ref-for-valdef-font-family-generic-fangsong②">generic(fangsong)</a> might not map to any locally installed font, but if it does, that font will be in Fang Song style.</p> <figure> <img alt src="images/fangsong.svg" style="width:75vw"> <figcaption>Chinese text displayed with sample fang song fonts</figcaption> </figure> <dt id="generic(kai)-def"><a class="self-link" href="#generic(kai)-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-generic-kai">generic(kai)</dfn> <dd> This font family is used in Simplified &amp; Traditional Chinese. A major typeface, which provides calligraphic styles for Chinese text. It shows notable handwriting features. Kai is commonly used in official documents and textbooks. Most official documents in Taiwan use Kai in full text. Kai can also be combined with other typefaces to be used in text that needs to be differentiated from the rest of the content, for example, headlines, references, quotations, and dialogs. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-kai" id="ref-for-valdef-font-family-generic-kai②">generic(kai)</a> might not map to any locally installed font, but if it does, that font will be in Kai style.</p> <figure> <img alt src="images/kaiti.svg" style="width:75vw"> <figcaption>Chinese text displayed with sample kai fonts</figcaption> </figure> <dt id="generic(nastaliq)-def"><a class="self-link" href="#generic(nastaliq)-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-generic-nastaliq">generic(nastaliq)</dfn> <dd> This font family is the standard way of writing Urdu and Kashmiri, and is also often a preferred style for Persian and other language text, especially in literary genres such as poetry. Key features include a sloping baseline for joined letters, and overall complex shaping and positioning for base letters and diacritics alike. There are also distinctive shapes for many glyphs and ligatures. It is important not to fall back to a naskh style for languages such as Urdu and Kashmiri. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-generic-nastaliq" id="ref-for-valdef-font-family-generic-nastaliq①">generic(nastaliq)</a> might not map to any locally installed font, but if it does, that font will be in Nastaliq style.</p> <figure> <img alt="السلام علیکم" src="images/urdu-nastaliq.svg" style="width:25vw"> <figcaption>Urdu text displayed with a sample nastaliq font (Noto Nastaliq Urdu)</figcaption> </figure> <figure> <img alt="السلام علیکم" src="images/urdu-naskh.svg" style="width:25vw"> <figcaption>Urdu text displayed with a fallback naskh font (Scheherazade New)</figcaption> </figure> <dt id="ui-serif-def"><a class="self-link" href="#ui-serif-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-ui-serif">ui-serif</dfn> <dd> This font family is used for the serif variant of the system’s user interface. The purpose of <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-serif" id="ref-for-valdef-font-family-ui-serif①">ui-serif</a> is to allow web content to integrate with the look and feel of the native OS. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-serif" id="ref-for-valdef-font-family-ui-serif②">ui-serif</a> is not expected to map to any font on platforms without an appropriate system font.</p> <div class="example" id="ex-sample-ui-serif"> <a class="self-link" href="#ex-sample-ui-serif"></a> <figure> <img alt="sample ui-serif font" height="191" src="images/ui-serif.png" width="768"> <figcaption>Sample ui-serif font on macOS Catalina and iOS 13: New York</figcaption> </figure> </div> <dt id="ui-sans-serif-def"><a class="self-link" href="#ui-sans-serif-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-ui-sans-serif">ui-sans-serif</dfn> <dd> This font family is used for the sans-serif variant of the system’s user interface. The purpose of <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-sans-serif" id="ref-for-valdef-font-family-ui-sans-serif①">ui-sans-serif</a> is to allow web content to integrate with the look and feel of the native OS. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-sans-serif" id="ref-for-valdef-font-family-ui-sans-serif②">ui-sans-serif</a> is not expected to map to any font on platforms without an appropriate system font.</p> <div class="example" id="ex-sample-ui-sans"> <a class="self-link" href="#ex-sample-ui-sans"></a> <figure> <img alt="sample ui-sans-serif font" height="306" src="images/ui-sans-serif.png" width="1522"> <figcaption>Sample ui-sans-serif font on macOS Catalina and iOS 13: San Francisco</figcaption> </figure> </div> <dt id="ui-monospace-def"><a class="self-link" href="#ui-monospace-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-ui-monospace">ui-monospace</dfn> <dd> This font family is used for the monospaced variant of the system’s user interface. The purpose of <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-monospace" id="ref-for-valdef-font-family-ui-monospace①">ui-monospace</a> is to allow web content to integrate with the look and feel of the native OS. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-monospace" id="ref-for-valdef-font-family-ui-monospace②">ui-monospace</a> is not expected to map to any font on platforms without an appropriate system font.</p> <div class="example" id="ex-sample-ui-mono"> <a class="self-link" href="#ex-sample-ui-mono"></a> <figure> <img alt="sample ui-monospace font" height="189" src="images/ui-monospace.png" width="964"> <figcaption>Sample ui-monospace font on macOS Catalina and iOS 13: SF Mono</figcaption> </figure> </div> <dt id="ui-rounded-def"><a class="self-link" href="#ui-rounded-def"></a><dfn class="dfn-paneled css" data-dfn-for="font-family,<generic-family>" data-dfn-type="value" data-export id="valdef-font-family-ui-rounded">ui-rounded</dfn> <dd> This font family is used for the rounded variant of the system’s user interface. The purpose of <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-rounded" id="ref-for-valdef-font-family-ui-rounded②">ui-rounded</a> is to allow web content to integrate with the look and feel of the native OS. <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="maybe" href="#valdef-font-family-ui-rounded" id="ref-for-valdef-font-family-ui-rounded③">ui-rounded</a> is not expected to map to any font on platforms without an appropriate system font.</p> <div class="example" id="ex-sample-ui-rounded"> <a class="self-link" href="#ex-sample-ui-rounded"></a> <figure> <img alt="sample ui-rounded font" height="185" src="images/ui-rounded.png" width="762"> <figcaption>Sample ui-rounded font on macOS Catalina and iOS 13: SF Rounded</figcaption> </figure> </div> </dl> <h3 class="heading settled" data-level="2.2" id="font-weight-prop"><span class="secno">2.2. </span><span class="content">Font weight: the <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①">font-weight</a> property</span><a class="self-link" href="#font-weight-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-weight"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-weight">font-weight</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod"><a class="production css" data-link-type="type" href="#font-weight-absolute-values" id="ref-for-font-weight-absolute-values">&lt;font-weight-absolute></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②⓪">|</a> bolder <span id="ref-for-comb-one②①">|</span> lighter <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>a number, see below <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-weight-bolder-001.xht" title="css/css-fonts/font-weight-bolder-001.xht">font-weight-bolder-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-weight-bolder-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-weight-bolder-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-weight-lighter-001.xht" title="css/css-fonts/font-weight-lighter-001.xht">font-weight-lighter-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-weight-lighter-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-weight-lighter-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-weight-normal-001.xht" title="css/css-fonts/font-weight-normal-001.xht">font-weight-normal-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-weight-normal-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-weight-normal-001.xht"><small>(source)</small></a> <li class="wpt-test"><span class="wpt-name">test-synthetic-bold.xht (visual test) </span><a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test-synthetic-bold.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-weight-computed.html" title="css/css-fonts/parsing/font-weight-computed.html">font-weight-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-weight-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-weight-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-weight-invalid.html" title="css/css-fonts/parsing/font-weight-invalid.html">font-weight-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-weight-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-weight-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-weight-valid.html" title="css/css-fonts/parsing/font-weight-valid.html">font-weight-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-weight-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-weight-valid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html" title="css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html">font-parse-numeric-stretch-style-weight.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-weight-interpolation.html" title="css/css-fonts/variations/font-weight-interpolation.html">font-weight-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-weight-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-weight-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-weight-lighter-bolder.html" title="css/css-fonts/variations/font-weight-lighter-bolder.html">font-weight-lighter-bolder.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-weight-lighter-bolder.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-weight-lighter-bolder.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-weight-matching-installed-fonts.html" title="css/css-fonts/variations/font-weight-matching-installed-fonts.html">font-weight-matching-installed-fonts.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-weight-matching-installed-fonts.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-weight-matching-installed-fonts.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-weight-matching.html" title="css/css-fonts/variations/font-weight-matching.html">font-weight-matching.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-weight-matching.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-weight-matching.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-weight-metrics.html" title="css/css-fonts/variations/font-weight-metrics.html">font-weight-metrics.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-weight-metrics.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-weight-metrics.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-weight-parsing.html" title="css/css-fonts/variations/font-weight-parsing.html">font-weight-parsing.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-weight-parsing.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-weight-parsing.html"><small>(source)</small></a> </ul> </details> <p>The <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②">font-weight</a> property specifies the weight of glyphs in the font, their degree of blackness, or stroke thickness.</p> <p>This property accepts values of the following:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="font-weight-absolute-values">&lt;font-weight-absolute></dfn> = <c- p>[</c->normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②②">|</a> bold <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②③">|</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value">&lt;number <c- p>[</c-><c- m>1</c-><c- p>,</c-><c- m>1000</c-><c- p>]</c->></a><c- p>]</c-></pre> <p>Values have the following meanings:</p> <dl> <dt id="font-weight-numeric-values"><a class="self-link" href="#font-weight-numeric-values"></a><dfn class="dfn-paneled css" data-dfn-for="font-weight" data-dfn-type="value" data-export id="valdef-font-weight-number-1-1000"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value①">&lt;number [1,1000]></a></dfn> <dd> Each number indicates a weight that is at least as dark as its predecessor. Only values greater than or equal to 1, and less than or equal to 1000, are valid, and all other values are <a data-link-type="dfn" href="https://drafts.csswg.org/css-syntax-3/#css-invalid" id="ref-for-css-invalid">invalid</a>. Numeric values typically correspond to the commonly used weight names below. <ul> <li>100 - Thin <li>200 - Extra Light (Ultra Light) <li>300 - Light <li>400 - Normal <li>500 - Medium <li>600 - Semi Bold (Demi Bold) <li>700 - Bold <li>800 - Extra Bold (Ultra Bold) <li>900 - Black (Heavy) </ul> <p class="note" role="note"><span class="marker">Note:</span> A font might internally provide its own weight name mappings, but those mappings within the font are disregarded in CSS.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="font-weight" data-dfn-type="value" data-export id="valdef-font-weight-normal">normal</dfn> <dd> Same as <span class="css">400</span>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-weight" data-dfn-type="value" data-export id="valdef-font-weight-bold">bold</dfn> <dd> Same as <span class="css">700</span>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-weight" data-dfn-type="value" data-export id="valdef-font-weight-bolder">bolder</dfn> <dd> Specifies a bolder weight than the inherited value. See <a href="#relative-weights">§ 2.2.1 Relative Weights</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-weight" data-dfn-type="value" data-export id="valdef-font-weight-lighter">lighter</dfn> <dd> Specifies a lighter weight than the inherited value. See <a href="#relative-weights">§ 2.2.1 Relative Weights</a>. </dl> <p>Font formats that use a scale other than a nine-step scale should map their scale onto the CSS scale so that 400 roughly corresponds with a face that would be labeled as Regular, Book, Roman and 700 roughly matches a face that would be labeled as Bold. Alternately, weights may be inferred from style names that correspond roughly with the scale above. The scale is relative, so a face with a larger weight value must never appear lighter. If style names are used to infer weights, care should be taken to handle variations in style names across locales.</p> <h4 class="heading settled" data-level="2.2.1" id="relative-weights"><span class="secno">2.2.1. </span><span class="content"> Relative Weights</span><a class="self-link" href="#relative-weights"></a></h4> <p>Specified values of <a class="css" data-link-type="maybe" href="#valdef-font-weight-bolder" id="ref-for-valdef-font-weight-bolder">bolder</a> and <a class="css" data-link-type="maybe" href="#valdef-font-weight-lighter" id="ref-for-valdef-font-weight-lighter">lighter</a> indicate weights relative to the weight of the parent element. The computed weight is calculated based on the inherited <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight③">font-weight</a> value using the chart below.</p> <table class="data" id="bolderlighter"> <thead> <tr> <th>Inherited value (<var>w</var>) <th>bolder <th>lighter <tbody> <tr> <th><var>w</var> &lt; 100 <td>400 <td>No change <tr> <th>100 ≤ <var>w</var> &lt; 350 <td>400 <td>100 <tr> <th>350 ≤ <var>w</var> &lt; 550 <td>700 <td>100 <tr> <th>550 ≤ <var>w</var> &lt; 750 <td>900 <td>400 <tr> <th>750 ≤ <var>w</var> &lt; 900 <td>900 <td>700 <tr> <th>900 ≤ <var>w</var> <td>No change <td>700 </table> <p class="note" role="note"><span class="marker">Note:</span> The table above is equivalent to selecting the next relative bolder or lighter face, given a font family containing normal and bold faces along with a thin and a heavy face. Authors who desire finer control over the exact weight values used for a given element can use numerical values instead of relative weights.</p> <h4 class="heading settled" data-level="2.2.2" id="missing-weights"><span class="secno">2.2.2. </span><span class="content"> Missing weights</span><a class="self-link" href="#missing-weights"></a></h4> <p>Quite often there are only a few weights available for a particular font family. When a weight is specified for which no face exists, a face with a nearby weight is used. In general, bold weights map to faces with heavier weights and light weights map to faces with lighter weights. (See the <a href="#font-matching-algorithm">§ 5 Font Matching Algorithm</a> for a precise definition.)</p> <div class="example" id="ex-nearby-weights"> <a class="self-link" href="#ex-nearby-weights"></a> The examples here illustrate which face is used for different weights. Grey indicates that a face for the desired weight does not exist, so a face with a nearby weight is used. <figure> <img alt="weight mappings for a family with 400, 700 and 900 weights" height="127" src="images/optimaweights.png" width="697"> <figcaption>Weight mappings for a font family with 400, 700 and 900 weight faces</figcaption> </figure> <figure> <img alt="weight mappings for a family with 300, 600 weights" height="123" src="images/hiraginoweights.png" width="692"> <figcaption>Weight mappings for a font family with 300 and 600 weight faces</figcaption> </figure> </div> <p>Most user agents model a font as having a particular weight which often corresponds to one of the numbers in the nine-step scale described <a href="#font-weight-numeric-values">above</a>. While this is true of most fonts, some fonts might be configurable so as to support a range of weights. In this situation, the user agent uses a face with a weight as close as possible to the weight requested (see <a href="#font-matching-algorithm">§ 5 Font Matching Algorithm</a> for the precise algorithm). In particular, a user agent using a font which supports a range of weights should behave the same as if a font is present at each individual weight in the range. For TrueType / OpenType fonts that use variations, the <code class="highlight">wght</code> variation is used to implement varying weights. Fractional weights are valid.</p> <p>Although the practice is not well-loved by typographers, bold faces are often synthesized by user agents for families that lack actual bold faces. For the purposes of font matching, these faces must be treated as if they exist within the family. Authors can explicitly avoid this behavior by using the <a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis">font-synthesis</a> property.</p> <h3 class="heading settled" data-level="2.3" id="font-width-prop"><span class="secno">2.3. </span><span class="content"> Font width: the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①">font-width</a> property</span><a class="self-link" href="#font-width-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-width"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-width">font-width</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②④">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value">&lt;percentage [0,∞]></a> <span id="ref-for-comb-one②⑤">|</span> ultra-condensed <span id="ref-for-comb-one②⑥">|</span> extra-condensed <span id="ref-for-comb-one②⑦">|</span> condensed <span id="ref-for-comb-one②⑧">|</span> semi-condensed <span id="ref-for-comb-one②⑨">|</span> semi-expanded <span id="ref-for-comb-one③⓪">|</span> expanded <span id="ref-for-comb-one③①">|</span> extra-expanded <span id="ref-for-comb-one③②">|</span> ultra-expanded <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>Not resolved <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>a percentage, see below <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-01.html" title="css/css-fonts/font-stretch-01.html">font-stretch-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-02.html" title="css/css-fonts/font-stretch-02.html">font-stretch-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-03.html" title="css/css-fonts/font-stretch-03.html">font-stretch-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-04.html" title="css/css-fonts/font-stretch-04.html">font-stretch-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-05.html" title="css/css-fonts/font-stretch-05.html">font-stretch-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-06.html" title="css/css-fonts/font-stretch-06.html">font-stretch-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-07.html" title="css/css-fonts/font-stretch-07.html">font-stretch-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-08.html" title="css/css-fonts/font-stretch-08.html">font-stretch-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-09.html" title="css/css-fonts/font-stretch-09.html">font-stretch-09.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-09.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-09.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-10.html" title="css/css-fonts/font-stretch-10.html">font-stretch-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-11.html" title="css/css-fonts/font-stretch-11.html">font-stretch-11.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-11.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-11.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-12.html" title="css/css-fonts/font-stretch-12.html">font-stretch-12.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-12.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-12.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-13.html" title="css/css-fonts/font-stretch-13.html">font-stretch-13.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-13.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-13.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-14.html" title="css/css-fonts/font-stretch-14.html">font-stretch-14.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-14.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-14.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-15.html" title="css/css-fonts/font-stretch-15.html">font-stretch-15.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-15.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-15.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-16.html" title="css/css-fonts/font-stretch-16.html">font-stretch-16.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-16.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-16.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-17.html" title="css/css-fonts/font-stretch-17.html">font-stretch-17.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-17.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-17.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-18.html" title="css/css-fonts/font-stretch-18.html">font-stretch-18.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-18.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-18.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-stretch-interpolation.html" title="css/css-fonts/animations/font-stretch-interpolation.html">font-stretch-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-stretch-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-stretch-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-stretch-computed.html" title="css/css-fonts/parsing/font-stretch-computed.html">font-stretch-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-stretch-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-stretch-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-stretch-invalid.html" title="css/css-fonts/parsing/font-stretch-invalid.html">font-stretch-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-stretch-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-stretch-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-stretch-valid.html" title="css/css-fonts/parsing/font-stretch-valid.html">font-stretch-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-stretch-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-stretch-valid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html" title="css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html">font-parse-numeric-stretch-style-weight.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-stretch.html" title="css/css-fonts/variations/font-stretch.html">font-stretch.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-stretch.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-stretch.html"><small>(source)</small></a> </ul> </details> <p>The <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②">font-width</a> property selects a normal, condensed, or expanded face from a font family. Values are specified either as percentages or as keywords which map to a percentage as defined in the following table:</p> <table class="data" id="widthmappings"> <thead> <tr> <th>Absolute keyword value <th>Numeric value <tbody> <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-ultra-condensed">ultra-condensed</dfn> <td>50% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-extra-condensed">extra-condensed</dfn> <td>62.5% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-condensed">condensed</dfn> <td>75% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-semi-condensed">semi-condensed</dfn> <td>87.5% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-normal">normal</dfn> <td>100% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-semi-expanded">semi-expanded</dfn> <td>112.5% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-expanded">expanded</dfn> <td>125% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-extra-expanded">extra-expanded</dfn> <td>150% <tr> <th><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-ultra-expanded">ultra-expanded</dfn> <td>200% </table> <p><dfn class="dfn-paneled css" data-dfn-for="font-width" data-dfn-type="value" data-export id="valdef-font-width-percentage-0"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value①">&lt;percentage [0,∞]></a></dfn> values represent the fractional width of the glyphs, with 100% representing “normal” glyph widths (as defined by the font designer). Values less than 0% are <a data-link-type="dfn" href="https://drafts.csswg.org/css-syntax-3/#css-invalid" id="ref-for-css-invalid①">invalid</a>.</p> <p>When a face does not exist for a given width, values less than 100% map to a narrower face if one exists, otherwise a wider face. Conversely, values greater than or equal to 100% map to a wider face if one exists, otherwise a narrower face. Some fonts might support a range of width values; if the requested width value is not available in the font, the closest supported value is used, using the same mapping rules (see the <a href="#font-matching-algorithm">§ 5 Font Matching Algorithm</a> for the precise algorithm). For TrueType / OpenType fonts that support variations, the <code class="highlight">wdth</code> variation is used to implement varying widths.</p> <div class="example" id="ex-font-width-matching"> <a class="self-link" href="#ex-font-width-matching"></a> The figure below shows how nine font-width property settings affect font matching for a font family containing a variety of discrete widths. Grey indicates a width for which no face exists and a different width is substituted: <figure> <img alt="width mappings for a family with condensed, normal and expanded faces" height="128" src="images/universwidths.png" width="722"> <figcaption>Width mappings for a font family with condensed, normal and expanded width faces</figcaption> </figure> </div> <p><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-1/#dom-window-getcomputedstyle" id="ref-for-dom-window-getcomputedstyle">getComputedStyle()</a></code> always serializes its value as a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value②">&lt;percentage></a>, regardless of how the value was specified by the author, or whether or not a keyword happens to map to the value.</p> <h4 class="heading settled" data-level="2.3.1" id="font-stretch-prop"><span class="secno">2.3.1. </span><span class="content"> Font width: the <a class="property css" data-link-type="property" href="#propdef-font-stretch" id="ref-for-propdef-font-stretch">font-stretch</a> legacy name alias</span><a class="self-link" href="#font-stretch-prop"></a></h4> <p>For historical reasons, a <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-stretch">font-stretch</dfn> property exists which is a <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#legacy-name-alias" id="ref-for-legacy-name-alias">legacy name alias</a> and functions in the identical way to the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width③">font-width</a>.</p> <div class="example" id="ex-font-stretch-set"> <a class="self-link" href="#ex-font-stretch-set"></a> For example, here the legacy <a class="property css" data-link-type="property" href="#propdef-font-stretch" id="ref-for-propdef-font-stretch①">font-stretch</a> is used on level one headings. <pre class="highlight">h1 <c- p>{</c-><c- k>font-stretch</c-><c- p>:</c-> condensed<c- p>;</c-> <c- p>}</c-> </pre> <p>The specified value of the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width④">font-width</a> on those headings becomes set to <a class="css" data-link-type="maybe" href="#valdef-font-width-condensed" id="ref-for-valdef-font-width-condensed">condensed</a>'.</p> </div> <div class="example" id="ex-font-width-set"> <a class="self-link" href="#ex-font-width-set"></a> For example, here the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width⑤">font-width</a> is used on level one headings. <pre class="highlight">h1 <c- p>{</c-><c- k>font-width</c-><c- p>:</c-> condensed<c- p>;</c-> <c- p>}</c-> </pre> <p>The specified value of the <a class="property css" data-link-type="property" href="#propdef-font-stretch" id="ref-for-propdef-font-stretch②">font-stretch</a> on those headings becomes set to <a class="css" data-link-type="maybe" href="#valdef-font-width-condensed" id="ref-for-valdef-font-width-condensed①">condensed</a>.</p> </div> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-01.html" title="css/css-fonts/font-stretch-01.html">font-stretch-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-02.html" title="css/css-fonts/font-stretch-02.html">font-stretch-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-03.html" title="css/css-fonts/font-stretch-03.html">font-stretch-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-04.html" title="css/css-fonts/font-stretch-04.html">font-stretch-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-05.html" title="css/css-fonts/font-stretch-05.html">font-stretch-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-06.html" title="css/css-fonts/font-stretch-06.html">font-stretch-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-07.html" title="css/css-fonts/font-stretch-07.html">font-stretch-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-08.html" title="css/css-fonts/font-stretch-08.html">font-stretch-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-09.html" title="css/css-fonts/font-stretch-09.html">font-stretch-09.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-09.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-09.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-10.html" title="css/css-fonts/font-stretch-10.html">font-stretch-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-11.html" title="css/css-fonts/font-stretch-11.html">font-stretch-11.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-11.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-11.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-12.html" title="css/css-fonts/font-stretch-12.html">font-stretch-12.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-12.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-12.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-13.html" title="css/css-fonts/font-stretch-13.html">font-stretch-13.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-13.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-13.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-14.html" title="css/css-fonts/font-stretch-14.html">font-stretch-14.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-14.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-14.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-15.html" title="css/css-fonts/font-stretch-15.html">font-stretch-15.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-15.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-15.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-16.html" title="css/css-fonts/font-stretch-16.html">font-stretch-16.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-16.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-16.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-17.html" title="css/css-fonts/font-stretch-17.html">font-stretch-17.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-17.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-17.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-18.html" title="css/css-fonts/font-stretch-18.html">font-stretch-18.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-18.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-18.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-stretch-interpolation-math-functions.html" title="css/css-fonts/font-stretch-interpolation-math-functions.html">font-stretch-interpolation-math-functions.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-stretch-interpolation-math-functions.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-stretch-interpolation-math-functions.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-stretch-interpolation.html" title="css/css-fonts/animations/font-stretch-interpolation.html">font-stretch-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-stretch-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-stretch-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-stretch-computed.html" title="css/css-fonts/parsing/font-stretch-computed.html">font-stretch-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-stretch-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-stretch-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-stretch-invalid.html" title="css/css-fonts/parsing/font-stretch-invalid.html">font-stretch-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-stretch-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-stretch-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-stretch-valid.html" title="css/css-fonts/parsing/font-stretch-valid.html">font-stretch-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-stretch-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-stretch-valid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html" title="css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html">font-parse-numeric-stretch-style-weight.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-stretch.html" title="css/css-fonts/variations/font-stretch.html">font-stretch.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-stretch.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-stretch.html"><small>(source)</small></a> </ul> </details> <p>User agents must not synthesize condensed or expanded faces for font families which lack such faces and which do not have a width variation axis. In particular, user agents must not geometrically stretch such faces.</p> <h3 class="heading settled" data-level="2.4" id="font-style-prop"><span class="secno">2.4. </span><span class="content"> Font style: the <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①">font-style</a> property</span><a class="self-link" href="#font-style-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-style"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-style">font-style</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③③">|</a> italic <span id="ref-for-comb-one③④">|</span> oblique <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#angle-value" id="ref-for-angle-value">&lt;angle [-90deg,90deg]></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>the keyword specified, plus angle in degrees if specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type;<a class="css" data-link-type="maybe" href="#valdef-font-style-normal" id="ref-for-valdef-font-style-normal">normal</a> animates as <span class="css">oblique 0deg</span> </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-style-angle.html" title="css/css-fonts/font-style-angle.html">font-style-angle.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-style-angle.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-style-angle.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/test-synthetic-italic-2.html" title="css/css-fonts/test-synthetic-italic-2.html">test-synthetic-italic-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/test-synthetic-italic-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test-synthetic-italic-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/test-synthetic-italic-3.html" title="css/css-fonts/test-synthetic-italic-3.html">test-synthetic-italic-3.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/test-synthetic-italic-3.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test-synthetic-italic-3.html"><small>(source)</small></a> <li class="wpt-test"><span class="wpt-name">test-synthetic-italic.xht (visual test) </span><a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test-synthetic-italic.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-style-interpolation.html" title="css/css-fonts/animations/font-style-interpolation.html">font-style-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-style-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-style-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-style-computed.html" title="css/css-fonts/parsing/font-style-computed.html">font-style-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-style-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-style-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-style-invalid.html" title="css/css-fonts/parsing/font-style-invalid.html">font-style-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-style-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-style-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-style-valid.html" title="css/css-fonts/parsing/font-style-valid.html">font-style-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-style-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-style-valid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html" title="css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html">font-parse-numeric-stretch-style-weight.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-slant-1.html" title="css/css-fonts/variations/font-slant-1.html">font-slant-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-slant-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-slant-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-slant-2a.html" title="css/css-fonts/variations/font-slant-2a.html">font-slant-2a.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-slant-2a.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-slant-2a.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-slant-2b.html" title="css/css-fonts/variations/font-slant-2b.html">font-slant-2b.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-slant-2b.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-slant-2b.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-slant-2c.html" title="css/css-fonts/variations/font-slant-2c.html">font-slant-2c.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-slant-2c.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-slant-2c.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-slant-3.html" title="css/css-fonts/variations/font-slant-3.html">font-slant-3.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-slant-3.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-slant-3.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-style-interpolation.html" title="css/css-fonts/variations/font-style-interpolation.html">font-style-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-style-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-style-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-style-parsing.html" title="css/css-fonts/variations/font-style-parsing.html">font-style-parsing.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-style-parsing.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-style-parsing.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/slnt-backslant-variable.html" title="css/css-fonts/variations/slnt-backslant-variable.html">slnt-backslant-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/slnt-backslant-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/slnt-backslant-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/slnt-variable.html" title="css/css-fonts/variations/slnt-variable.html">slnt-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/slnt-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/slnt-variable.html"><small>(source)</small></a> </ul> </details> <p>The <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②">font-style</a> property allows italic or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.</p> <div class="example" id="ex-faux-vs-italic"> <a class="self-link" href="#ex-faux-vs-italic"></a> Compare the artificially sloped renderings of Palatino "a" and Baskerville "N" in grey with the actual italic versions: <figure> <img alt="artificial sloping vs. real italics" height="126" src="images/realvsfakeitalics.png" width="599"> <figcaption>Artificial sloping versus real italics</figcaption> </figure> </div> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-style" data-dfn-type="value" data-export id="valdef-font-style-normal">normal</dfn> <dd> Matches against a face that is classified as a normal face, one that is neither italic or obliqued. This represents an oblique value of "0". <dt><dfn class="dfn-paneled css" data-dfn-for="font-style" data-dfn-type="value" data-export id="valdef-font-style-italic">italic</dfn> <dd> Matches against a font that is labeled as an italic face, or an oblique face if one does not exist. <dt><dfn class="dfn-paneled css" data-dfn-for="font-style" data-dfn-type="value" data-export id="valdef-font-style-oblique-angle--90deg-90deg">oblique <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#angle-value" id="ref-for-angle-value①">&lt;angle [-90deg,90deg]></a>?</dfn> <dd> Controls matching against an oblique face. Positive angles represent a clockwise slant; negative angles represent a counter-clockwise slant. The lack of an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#angle-value" id="ref-for-angle-value②">&lt;angle></a> represents <span class="css">14deg</span>. (Note that a font might internally provide its own mapping for "oblique", but the mapping within the font is disregarded.) Fractional and negative values are accepted; however, values less than -90deg or values greater than 90deg are <a data-link-type="dfn" href="https://drafts.csswg.org/css-syntax-3/#css-invalid" id="ref-for-css-invalid②">invalid</a>. If no oblique faces exist, and <a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style">font-synthesis-style</a> has the value auto, a synthetic oblique face will be generated. </dl> <p>A font family might contain no italic or oblique faces, only an italic face and no oblique, only an oblique face and no italic, both an oblique and an italic, multiple oblique faces at various angles, or various combinations thereof. The font matching routine will select a font to use which is of the correct sign as the requested angle, and (if there are multiple such faces) closest to the requested angle. In general, for a requested angle greater or equal to 11deg, larger angles are preferred; otherwise, smaller angles are preferred. (See <a href="#font-matching-algorithm">§ 5 Font Matching Algorithm</a>.) For TrueType / OpenType fonts that use variations, the <code class="highlight">slnt</code> variation is used to implement oblique values, and the <code class="highlight">ital</code> variation with a value of 1 is used to implement the italic values.</p> <p class="note" role="note"><span class="marker">Note:</span> the OpenType <code class="highlight">slnt</code> axis is defined with a positive angle meaning a counter-clockwise slant, the opposite direction to CSS. The CSS implementation will take this into account when using variations to produce oblique faces.</p> <p class="issue" id="issue-d46def88"><a class="self-link" href="#issue-d46def88"></a> What direction should positive and negative obliques skew in vertical writing mode? How do we achieve skews in the opposite dimension (needed for vertical writing)?</p> <p>If no italic or oblique face is available, oblique faces may be synthesized by rendering non-obliqued faces with an artificial obliquing operation. The use of these artificially obliqued faces can be disabled using the <a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis①">font-synthesis</a> property.</p> <p class="note" role="note"><span class="marker">Note:</span> While oblique faces can be simulated by artificially sloping the glyphs of the regular face, this is not equivalent to a true oblique, in which optical stroke thicknesses are properly preserved despite the slant. It is always better to use an actual oblique font rather than rely on a synthetic version.</p> <p>For the purposes of font matching, User agents may treat <a class="css" data-link-type="maybe" href="#valdef-font-style-italic" id="ref-for-valdef-font-style-italic">italic</a> as a synonym for <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-style-oblique" id="ref-for-valdef-font-style-oblique">oblique</a>. For user agents that treat these values distinctly, synthesis must not be performed for <span class="css" id="ref-for-valdef-font-style-italic①">italic</span>.</p> <p class="note" role="note"><span class="marker">Note:</span> Authors should also be aware that synthesized approaches might not be suitable for scripts like Cyrillic, where italic forms are very different in shape. It is always better to use an actual italic font rather than rely on a synthetic version.</p> <p class="note" role="note"><span class="marker">Note:</span> Many scripts lack the tradition of mixing a cursive form within text rendered with a normal face. Chinese, Japanese and Korean fonts almost always lack italic or oblique faces. Fonts that support a mixture of scripts will sometimes omit specific scripts, such as Arabic, from the set of glyphs supported in the italic face. User agents should be careful about making <a data-link-type="dfn" href="#character-map" id="ref-for-character-map">character map</a> assumptions across faces when implementing synthesis across fonts, as italic faces in a family can have different <span id="ref-for-character-map①">character maps</span> than Roman faces.</p> <h3 class="heading settled" data-level="2.5" id="font-size-prop"><span class="secno">2.5. </span><span class="content"> Font size: the <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size">font-size</a> property</span><a class="self-link" href="#font-size-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-size"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-size">font-size</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-absolute-size" id="ref-for-value-def-absolute-size">&lt;absolute-size></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③⑤">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-relative-size" id="ref-for-value-def-relative-size">&lt;relative-size></a> <span id="ref-for-comb-one③⑥">|</span> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage">&lt;length-percentage [0,∞]></a> <span id="ref-for-comb-one③⑦">|</span> math <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>medium <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>refer to parent element’s font size <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>an absolute length <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-relative-across-calc-ff-bug-001.html" title="css/css-fonts/font-size-relative-across-calc-ff-bug-001.html">font-size-relative-across-calc-ff-bug-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-relative-across-calc-ff-bug-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-relative-across-calc-ff-bug-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-zero-1-ref.html" title="css/css-fonts/font-size-zero-1-ref.html">font-size-zero-1-ref.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-zero-1-ref.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-zero-1-ref.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-zero-1.html" title="css/css-fonts/font-size-zero-1.html">font-size-zero-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-zero-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-zero-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-zero-2.html" title="css/css-fonts/font-size-zero-2.html">font-size-zero-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-zero-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-zero-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-xxx-large.html" title="css/css-fonts/font-size-xxx-large.html">font-size-xxx-large.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-xxx-large.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-xxx-large.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/rem-in-monospace.html" title="css/css-fonts/rem-in-monospace.html">rem-in-monospace.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/rem-in-monospace.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/rem-in-monospace.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-size-interpolation-001.html" title="css/css-fonts/animations/font-size-interpolation-001.html">font-size-interpolation-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-size-interpolation-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-size-interpolation-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-size-interpolation-002.html" title="css/css-fonts/animations/font-size-interpolation-002.html">font-size-interpolation-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-size-interpolation-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-size-interpolation-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-size-interpolation-003.html" title="css/css-fonts/animations/font-size-interpolation-003.html">font-size-interpolation-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-size-interpolation-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-size-interpolation-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-size-computed.html" title="css/css-fonts/parsing/font-size-computed.html">font-size-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-size-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-size-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-size-invalid.html" title="css/css-fonts/parsing/font-size-invalid.html">font-size-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-size-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-size-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-size-valid.html" title="css/css-fonts/parsing/font-size-valid.html">font-size-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-size-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-size-valid.html"><small>(source)</small></a> </ul> </details> <p>This property indicates the desired height of glyphs from the font. For scalable fonts, the font-size is a scale factor applied to the EM unit of the font. For non-scalable fonts, the font-size is converted into absolute units and matched against the declared font-size of the font, using the same absolute coordinate space for both of the matched values.</p> <p class="note" role="note"><span class="marker">Note:</span> There is no requirement on how closely a glyph should fit its EM box. Individual fonts can have a different apparent visual size when rendered at the same <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①">font-size</a>. Additionally, glyphs might render arbitrarily far outside their EM box; and if they overflow their <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#containing-block" id="ref-for-containing-block">containing block</a> can induce <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#ink-overflow" id="ref-for-ink-overflow">ink overflow</a>.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-size" data-dfn-type="value" data-export id="valdef-font-size-absolute-size"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-absolute-size" id="ref-for-value-def-absolute-size①">&lt;absolute-size></a></dfn> <dd> An <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-absolute-size" id="ref-for-value-def-absolute-size②">&lt;absolute-size></a> keyword refers to an entry in a table of font sizes computed and kept by the user agent. See <a href="#absolute-size-mapping">§ 2.5.1 Absolute Size Keyword Mapping Table</a>. <p>Possible values are:</p> <pre class="prod highlight"><c- p>[</c-> xx-small <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③⑧">|</a> x-small <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③⑨">|</a> small <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④⓪">|</a> medium <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④①">|</a> large <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④②">|</a> x-large <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④③">|</a> xx-large <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④④">|</a> xxx-large <c- p>]</c-></pre> <dt><dfn class="dfn-paneled css" data-dfn-for="font-size" data-dfn-type="value" data-export id="valdef-font-size-relative-size"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-relative-size" id="ref-for-value-def-relative-size①">&lt;relative-size></a></dfn> <dd> A <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-relative-size" id="ref-for-value-def-relative-size②">&lt;relative-size></a> keyword is interpreted relative to the computed <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size②">font-size</a> of the parent element and possibly the table of font sizes. Possible values are: <pre class="prod highlight"><c- p>[</c-> larger <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④⑤">|</a> smaller <c- p>]</c-></pre> <p>If the parent element has a keyword font size in the absolute size keyword mapping table, <span class="css">larger</span> may compute the font size to the next entry in the table, and <span class="css">smaller</span> may compute the font size to the previous entry in the table. For example, if the parent element has a font size of <span class="css">font-size:medium</span>, specifying a value of <span class="css">larger</span> may make the font size of the child element <span class="css">font-size:large</span>.</p> <p>Instead of using next and previous items in the previous keyword table, User agents may instead use a simple ratio to increase or decrease the font size relative to the parent element. The specific ratio is unspecified, but should be around 1.2–1.5. This ratio may vary across different elements.</p> <p class="note" role="note"><span class="marker">Note:</span> A sight-impaired user may request a user agent use a higher ratio than default, in order to aid readability. In addition, a user agent may choose to use different ratios when it detects paragraph text as opposed to title text.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="font-size" data-dfn-type="value" data-export id="valdef-font-size-length-percentage-0"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage①">&lt;length-percentage [0,∞]></a></dfn> <dd> A length value specifies an absolute font size (independent of the user agent’s font table). Negative lengths are invalid. <p>A percentage value specifies an absolute font size relative to the parent element’s computed <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size③">font-size</a>. Negative percentages are invalid.</p> <p class="note" role="note"><span class="marker">Note:</span> Use of percentage values or <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#font-relative-length" id="ref-for-font-relative-length">font-relative lengths</a> such as <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#em" id="ref-for-em">em</a>s and <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#rem" id="ref-for-rem">rem</a>s leads to more robust and cascadable style sheets.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="font-size" data-dfn-type="value" data-export id="valdef-font-size-math">math</dfn> <dd> Special <a href="https://w3c.github.io/mathml-core/#the-math-script-level-property"> mathematical scaling rules</a> must be applied when determining the computed value of the <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size④">font-size</a> property. </dl> <div class="example" id="ex-specify-size"> <a class="self-link" href="#ex-specify-size"></a> The following style sheet demonstrates various ways of specifying the font size. <pre class="highlight">p <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>12</c-><c- k>pt</c-><c- p>;</c-> <c- p>}</c-> blockquote <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> larger <c- p>}</c-> em <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>150</c-><c- k>%</c-> <c- p>}</c-> em <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>1.5</c-><c- k>em</c-> <c- p>}</c-> </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> The used value of this property can differ from its computed value due to <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust">font-size-adjust</a>. However, child elements inherit the computed <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size⑤">font-size</a> value, which is not affected by <span class="property" id="ref-for-propdef-font-size-adjust①">font-size-adjust</span> (otherwise, the effect of <span class="property" id="ref-for-propdef-font-size-adjust②">font-size-adjust</span> would compound).</p> <p>The actual value of this property can differ from the used value due to the unavailability of certain font sizes.</p> <div class="example" id="ex-clamp-size"> <a class="self-link" href="#ex-clamp-size"></a> font-size can be clamped, for responsive typography. <pre class="highlight"><c- k>font-size</c-><c- p>:</c-> <c- nf>clamp</c-><c- p>(</c-><c- m>10</c-><c- k>px</c-><c- p>,</c-> ...<c- p>,</c-> <c- m>36</c-><c- k>px</c-><c- p>);</c-> </pre> </div> <h4 class="heading settled" data-level="2.5.1" id="absolute-size-mapping"><span class="secno">2.5.1. </span><span class="content"> Absolute Size Keyword Mapping Table</span><a class="self-link" href="#absolute-size-mapping"></a></h4> <p>The following table provides user agent guidelines for the absolute-size scaling factor and their mapping to HTML heading and absolute font-sizes. The <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-size-medium" id="ref-for-valdef-font-size-medium">medium</a> value is used as the reference middle value. The user agent may fine-tune these values for different fonts or different types of display devices.</p> <table class="data"> <thead> <tr> <th>CSS absolute-size values <th>xx-small <th>x-small <th>small <th>medium <th>large <th>x-large <th>xx-large <th>xxx-large <tbody> <tr> <th>scaling factor <td>3/5 <td>3/4 <td>8/9 <td>1 <td>6/5 <td>3/2 <td>2/1 <td>3/1 <tr> <th>HTML headings <td>h6 <td> <td>h5 <td>h4 <td>h3 <td>h2 <td>h1 <td> <tr> <th>HTML <code class="highlight"><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/obsolete.html#font" id="ref-for-font">font</a></code> sizes <td>1 <td> <td>2 <td>3 <td>4 <td>5 <td>6 <td>7 </table> <p class="note" role="note"><span class="marker">Note:</span> In CSS1, the suggested scaling factor between adjacent indexes was 1.5, which user experience proved to be too large. In CSS2, the suggested scaling factor for computer screen between adjacent indexes was 1.2 which still created issues for the small sizes. The new scaling factor varies between each index to provide a better readability.</p> <p>To preserve readability, an UA applying these guidelines should nevertheless avoid creating font sizes of less than 9 device pixels per EM unit.</p> <h3 class="heading settled" data-level="2.6" id="font-size-adjust-prop"><span class="secno">2.6. </span><span class="content"> Relative sizing: the <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust③">font-size-adjust</a> property</span><a class="self-link" href="#font-size-adjust-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-size-adjust"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-size-adjust">font-size-adjust</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④⑥">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value②">&lt;number [0,∞]></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>a number or the keyword <a class="css" data-link-type="maybe" href="#font-size-adjust-none-value" id="ref-for-font-size-adjust-none-value">none</a> <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-001.html" title="css/css-fonts/font-size-adjust-001.html">font-size-adjust-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-002.html" title="css/css-fonts/font-size-adjust-002.html">font-size-adjust-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-002.html"><small>(source)</small></a> <li class="wpt-test"><span class="wpt-name">font-size-adjust-003.xht (visual test) </span><a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-003.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-005.xht" title="css/css-fonts/font-size-adjust-005.xht">font-size-adjust-005.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-005.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-005.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-006.xht" title="css/css-fonts/font-size-adjust-006.xht">font-size-adjust-006.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-006.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-006.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-007.xht" title="css/css-fonts/font-size-adjust-007.xht">font-size-adjust-007.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-007.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-007.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-008.xht" title="css/css-fonts/font-size-adjust-008.xht">font-size-adjust-008.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-008.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-008.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-009.html" title="css/css-fonts/font-size-adjust-009.html">font-size-adjust-009.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-009.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-009.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-010.html" title="css/css-fonts/font-size-adjust-010.html">font-size-adjust-010.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-010.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-010.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-011.html" title="css/css-fonts/font-size-adjust-011.html">font-size-adjust-011.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-011.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-011.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-012.html" title="css/css-fonts/font-size-adjust-012.html">font-size-adjust-012.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-012.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-012.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-013.html" title="css/css-fonts/font-size-adjust-013.html">font-size-adjust-013.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-013.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-013.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-014.html" title="css/css-fonts/font-size-adjust-014.html">font-size-adjust-014.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-014.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-014.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-interpolation-math-functions.html" title="css/css-fonts/font-size-adjust-interpolation-math-functions.html">font-size-adjust-interpolation-math-functions.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-interpolation-math-functions.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-interpolation-math-functions.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-metrics-override.html" title="css/css-fonts/font-size-adjust-metrics-override.html">font-size-adjust-metrics-override.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-metrics-override.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-metrics-override.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-order-001.html" title="css/css-fonts/font-size-adjust-order-001.html">font-size-adjust-order-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-order-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-order-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-reload.html" title="css/css-fonts/font-size-adjust-reload.html">font-size-adjust-reload.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-reload.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-reload.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-units-001.html" title="css/css-fonts/font-size-adjust-units-001.html">font-size-adjust-units-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-units-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-units-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-zero-1.html" title="css/css-fonts/font-size-adjust-zero-1.html">font-size-adjust-zero-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-zero-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-zero-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-size-adjust-zero-2.html" title="css/css-fonts/font-size-adjust-zero-2.html">font-size-adjust-zero-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-size-adjust-zero-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-size-adjust-zero-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/size-adjust-03.html" title="css/css-fonts/size-adjust-03.html">size-adjust-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/size-adjust-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/size-adjust-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-size-adjust-composition.html" title="css/css-fonts/animations/font-size-adjust-composition.html">font-size-adjust-composition.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-size-adjust-composition.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-size-adjust-composition.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-size-adjust-interpolation.html" title="css/css-fonts/animations/font-size-adjust-interpolation.html">font-size-adjust-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-size-adjust-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-size-adjust-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-size-adjust-computed.html" title="css/css-fonts/parsing/font-size-adjust-computed.html">font-size-adjust-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-size-adjust-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-size-adjust-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-size-adjust-invalid.html" title="css/css-fonts/parsing/font-size-adjust-invalid.html">font-size-adjust-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-size-adjust-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-size-adjust-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-size-adjust-valid.html" title="css/css-fonts/parsing/font-size-adjust-valid.html">font-size-adjust-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-size-adjust-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-size-adjust-valid.html"><small>(source)</small></a> </ul> </details> <p>For any given font size, the apparent size and effective legibility of text varies across fonts. For bicameral scripts such as Latin or Cyrillic that distinguish between upper and lowercase letters, the relative height of lowercase letters compared to their uppercase counterparts is a determining factor of legibility. This is commonly referred to as the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="aspect-value">aspect value</dfn> and is equal to the x-height of a font divided by the font size.</p> <p class="note" role="note"><span class="marker">Note:</span> For text which uses diacritics, too large an x-height will actually decrease legibility as the diacritics become cramped.</p> <p>In situations where font fallback occurs, fallback fonts might not share the same aspect value as the desired font family and will thus be less readable. The <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust④">font-size-adjust</a> property is a way to preserve the readability of text when font fallback occurs. It does this by adjusting the font-size so that the x-height is the same regardless of the font used.</p> <div class="example" id="ex-verdana-futura"> <a class="self-link" href="#ex-verdana-futura"></a> The style defined below defines Verdana as the desired font family, but if Verdana is not available Futura or Times will be used. One paragraph also has font-size-adjust specified. <pre class="highlight">p <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Verdana<c- p>,</c-> Futura<c- p>,</c-> Times<c- p>;</c-> <c- p>}</c-> p.adj <c- p>{</c-> <c- k>font-size-adjust</c-><c- p>:</c-> <c- m>0.545</c-><c- p>;</c-> <c- p>}</c-> &lt;p>Lorem ipsum dolor sit amet<c- p>,</c-> ...&lt;/p> &lt;p class=<c- s>"adj"</c->>Lorem ipsum dolor sit amet<c- p>,</c-> ...&lt;/p> </pre> <p>Verdana has a relatively high aspect value of 0.545, meaning lowercase letters are relatively tall compared to uppercase letters, so at small sizes text appears legible. Times has a lower aspect value of 0.447, and so if fallback occurs, the text will be less legible at small sizes than Verdana unless font-size-adjust is also specified.</p> </div> <p>How text rendered in each of these fonts compares is shown below, the columns show text rendered in Verdana, Futura and Times. The same font-size value is used across cells within each row and red lines are included to show the differences in x-height. In the upper half, each row is rendered in the same font-size value. The same is true for the lower half, but in this half the <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust⑤">font-size-adjust</a> property is also set to 0.545, so that the actual font size is adjusted to preserve the x-height of Verdana across each row. Note how small text remains relatively legible across each row in the lower half.</p> <figure> <img alt="text with and without &apos;font-size-adjust&apos;" height="667" src="images/fontsizeadjust.png" width="544"> <figcaption>Text with and without the use of <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust⑥">font-size-adjust</a></figcaption> </figure> <p>This property allows authors to specify an <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value">aspect value</a> for an element that will effectively preserve the x-height of the first choice font, whether it is substituted or not. Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-size-adjust" data-dfn-type="value" data-export id="font-size-adjust-none-value">none</dfn> <dd> Do not preserve the font’s x-height. <dt><dfn class="dfn-paneled css" data-dfn-for="font-size-adjust" data-dfn-type="value" data-export id="aspect-ratio-value"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value③">&lt;number [0,∞]></a></dfn> <dd> Specifies the <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value①">aspect value</a> used in the calculation below to calculate the adjusted font size: <pre class="highlight">c = <c- p>(</c-> a / a' <c- p>)</c-> s</pre> <p>where:</p> <pre class="highlight">s = font-size value a = <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value②">aspect value</a> as specified by the <c- s>'font-size-adjust'</c-> property a' = <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value③">aspect value</a> of actual font c = adjusted font-size to use </pre> <p>Negative values are invalid.</p> <p>This value applies to any font that is selected but in typical usage it should be based on the <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value④">aspect value</a> of the first font in the font-family list. If this is specified accurately, the <code class="highlight"><c- p>(</c->a/a'<c- p>)</c-></code> term in the formula above is effectively 1 for the first font and no adjustment occurs. If the value is specified inaccurately, text rendered using the first font in the family list will display differently in older user agents that don’t support <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust⑦">font-size-adjust</a>.</p> </dl> <p>The value of <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust⑧">font-size-adjust</a> affects the used value of <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size⑥">font-size</a> but does not affect the computed value. It affects the size of relative units that are based on font metrics such as <code class="highlight">ex</code> and <code class="highlight">ch</code> but does not affect the size of <code class="highlight">em</code> units. Since numeric values of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height">line-height</a> refer to the computed size of <span class="property" id="ref-for-propdef-font-size⑦">font-size</span>, <span class="property" id="ref-for-propdef-font-size-adjust⑨">font-size-adjust</span> does not affect the used value of <span class="property" id="ref-for-propdef-line-height①">line-height</span>.</p> <p class="note" role="note"><span class="marker">Note:</span> In CSS, authors often specify <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height②">line-height</a> as a multiple of the <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size⑧">font-size</a>. Since the <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①⓪">font-size-adjust</a> property affects the used value of <span class="property" id="ref-for-propdef-font-size⑨">font-size</span>, authors should take care setting the line height when <span class="property" id="ref-for-propdef-font-size-adjust①①">font-size-adjust</span> is used. Setting the line height too tightly can result in overlapping lines of text in this situation.</p> <div class="example" id="ex-calc-aspect"> <a class="self-link" href="#ex-calc-aspect"></a> Authors can calculate the <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value⑤">aspect value</a> for a given font by comparing spans with the same content but different <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①②">font-size-adjust</a> properties. If the same font-size is used, the spans will match when the <span class="property" id="ref-for-propdef-font-size-adjust①③">font-size-adjust</span> value is accurate for the given font. <p>Two spans with borders are used to determine the <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value⑥">aspect value</a> of a font. The <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①⓪">font-size</a> is the same for both spans but the <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①④">font-size-adjust</a> property is specified only for the right span. Starting with a value of 0.5, the aspect value can be adjusted until the borders around the two letters line up.</p> <pre class="highlight">p <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Futura<c- p>;</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>500</c-><c- k>px</c-><c- p>;</c-> <c- p>}</c-> span <c- p>{</c-> <c- k>border</c-><c- p>:</c-> solid <c- m>1</c-><c- k>px</c-> red<c- p>;</c-> <c- p>}</c-> .adjust <c- p>{</c-> <c- k>font-size-adjust</c-><c- p>:</c-> <c- m>0.5</c-><c- p>;</c-> <c- p>}</c-> &lt;p>&lt;span>b&lt;/span>&lt;span class=<c- s>"adjust"</c->>b&lt;/span>&lt;/p> </pre> <figure> <img alt="Futura with an aspect value of 0.5" height="306" src="images/beforefontsizeadjust.png" width="281"> <figcaption>Futura with an <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value⑦">aspect value</a> of 0.5</figcaption> </figure> <p>The box on the right is a bit bigger than the one on the left, so the <a data-link-type="dfn" href="#aspect-value" id="ref-for-aspect-value⑧">aspect value</a> of this font is something less than 0.5. Adjust the value until the boxes align.</p> </div> <h3 class="heading settled" data-level="2.7" id="font-prop"><span class="secno">2.7. </span><span class="content"> Shorthand font property: the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font">font</a> property</span><a class="self-link" href="#font-prop"></a></h3> <table class="def propdef" data-link-for-hint="font"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font">font</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">[ [ <a class="production css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style③">&lt;'font-style'></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any">||</a> <a class="production css" data-link-type="type" href="#font-variant-css21-values" id="ref-for-font-variant-css21-values">&lt;font-variant-css2></a> <span id="ref-for-comb-any①">||</span> <a class="production css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight④">&lt;'font-weight'></a> <span id="ref-for-comb-any②">||</span> <a class="production css" data-link-type="type" href="#font-width-css3-values" id="ref-for-font-width-css3-values">&lt;font-width-css3></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt①">?</a> <a class="production css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①①">&lt;'font-size'></a> [ / <a class="production css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height③">&lt;'line-height'></a> ]<span id="ref-for-mult-opt②">?</span> <a class="production css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family②">&lt;'font-family'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①">#</a> ] <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④⑦">|</a> <a class="production css" data-link-type="type" href="#system-family-name-value" id="ref-for-system-family-name-value③">&lt;system-family-name></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>see individual properties <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>see individual properties <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>see individual properties <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>see individual properties </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/inheritance.html" title="css/css-fonts/inheritance.html">inheritance.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/inheritance.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/inheritance.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-shorthand-serialization-001.html" title="css/css-fonts/font-shorthand-serialization-001.html">font-shorthand-serialization-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-shorthand-serialization-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-shorthand-serialization-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-shorthand-serialization-font-stretch.html" title="css/css-fonts/font-shorthand-serialization-font-stretch.html">font-shorthand-serialization-font-stretch.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-shorthand-serialization-font-stretch.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-shorthand-serialization-font-stretch.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-shorthand-serialization-prevention.html" title="css/css-fonts/font-shorthand-serialization-prevention.html">font-shorthand-serialization-prevention.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-shorthand-serialization-prevention.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-shorthand-serialization-prevention.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-shorthand-subproperties-reset.html" title="css/css-fonts/font-shorthand-subproperties-reset.html">font-shorthand-subproperties-reset.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-shorthand-subproperties-reset.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-shorthand-subproperties-reset.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/quoted-generic-ignored.html" title="css/css-fonts/quoted-generic-ignored.html">quoted-generic-ignored.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/quoted-generic-ignored.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/quoted-generic-ignored.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-computed.html" title="css/css-fonts/parsing/font-computed.html">font-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-invalid.html" title="css/css-fonts/parsing/font-invalid.html">font-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-valid.html" title="css/css-fonts/parsing/font-valid.html">font-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-valid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-shorthand.html" title="css/css-fonts/variations/font-shorthand.html">font-shorthand.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-shorthand.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-shorthand.html"><small>(source)</small></a> </ul> </details> <p>The syntax of this property is based on a traditional typographical shorthand notation to set multiple properties related to fonts. For historical and backwards-compatibility reasons, it is <em>almost</em> a shorthand property.</p> <p>The <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font①">font</a> property is, except as described below, a shorthand property for setting <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style④">font-style</a>, <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant">font-variant</a>, <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight⑤">font-weight</a>, <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width⑥">font-width</a>, <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①②">font-size</a>, <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height④">line-height</a>, <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family③">font-family</a> at the same place in the stylesheet.</p> <p>Values for the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①">font-variant</a> property can also be included but only those supported in CSS 2.1; none of the <span class="property" id="ref-for-propdef-font-variant②">font-variant</span> values added in CSS Fonts Levels 3 or 4 can be used in the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font②">font</a> shorthand:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="font-variant-css21-values"><a class="production" data-link-type="type" href="#font-variant-css21-values" id="ref-for-font-variant-css21-values①">&lt;font-variant-css2></a></dfn>= normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④⑧">|</a> small-caps</pre> <p>Values for the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width⑦">font-width</a> property can also be included but only those supported in CSS Fonts level 3, none of the <span class="property" id="ref-for-propdef-font-width⑧">font-width</span> values added in this specification can be used in the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font③">font</a> shorthand:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="font-width-css3-values"><a class="production" data-link-type="type" href="#font-width-css3-values" id="ref-for-font-width-css3-values①">&lt;font-width-css3></a></dfn>= normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④⑨">|</a> ultra-condensed <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤⓪">|</a> extra-condensed <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤①">|</a> condensed <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤②">|</a> semi-condensed <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤③">|</a> semi-expanded <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤④">|</a> expanded <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤⑤">|</a> extra-expanded <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤⑥">|</a> ultra-expanded</pre> <p>Therefore we have the following classification of font-related properties and their interaction with the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font④">font</a> property:</p> <dl> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="set-explicitly">Set Explicitly</dfn> <dd> <p>These properties may be set using the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font⑤">font</a> property:</p> <ul> <li><a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family④">font-family</a> <li><a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①③">font-size</a> <li><a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width⑨">font-width</a> <li><a class="property css" data-link-type="property" href="#propdef-font-stretch" id="ref-for-propdef-font-stretch③">font-stretch</a> (css3) <li><a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style⑤">font-style</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps">font-variant-caps</a> (css2) <li><a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight⑥">font-weight</a> <li><a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height⑤">line-height</a> </ul> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="reset-implicitly">Reset Implicitly</dfn> <dd> <p>These may not be set, but are reset to their initial values:</p> <ul> <li><a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings">font-feature-settings</a> <li><a class="property css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning">font-kerning</a> <li><a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override①">font-language-override</a> <li><a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing">font-optical-sizing</a> <li><a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①⑤">font-size-adjust</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates">font-variant-alternates</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps①">font-variant-caps</a> (css3 and above) <li><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian">font-variant-east-asian</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji">font-variant-emoji</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures">font-variant-ligatures</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric">font-variant-numeric</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position①">font-variant-position</a> <li><a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings">font-variation-settings</a> </ul> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="cascaded-independently">Cascaded Independently</dfn> <dd> <p>There are neither set nor reset by the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font⑥">font</a> property:</p> <ul> <li><a class="property css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette">font-palette</a> <li><a class="property css" data-link-type="property" href="#propdef-font-synthesis-weight" id="ref-for-propdef-font-synthesis-weight">font-synthesis-weight</a> <li><a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style①">font-synthesis-style</a> <li><a class="property css" data-link-type="property" href="#propdef-font-synthesis-small-caps" id="ref-for-propdef-font-synthesis-small-caps">font-synthesis-small-caps</a> </ul> </dl> <p>All subproperties of the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font⑦">font</a> property in the <a data-link-type="dfn" href="#set-explicitly" id="ref-for-set-explicitly">Set Explicitly</a> and <a data-link-type="dfn" href="#reset-implicitly" id="ref-for-reset-implicitly">Reset Implicitly</a> groups are first reset to their initial values.</p> <p>Then, those properties the <a data-link-type="dfn" href="#set-explicitly" id="ref-for-set-explicitly①">Set Explicitly</a> group that are given explicit values in the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font⑧">font</a> shorthand are set to those values. For a definition of allowed and initial values, see the individual longhand property definitions.</p> <div class="example" id="ex-font-shorthand"> <a class="self-link" href="#ex-font-shorthand"></a> <pre class="highlight">p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> <c- m>12</c-><c- k>pt</c->/<c- m>14</c-><c- k>pt</c-> sans-serif <c- p>}</c-> p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> <c- m>80</c-><c- k>%</c-> sans-serif <c- p>}</c-> p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> x-large/<c- m>110</c-><c- k>%</c-> <c- s>"new century schoolbook"</c-><c- p>,</c-> serif <c- p>}</c-> p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> bold italic large Palatino<c- p>,</c-> serif <c- p>}</c-> p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> normal small-caps <c- m>120</c-><c- k>%</c->/<c- m>120</c-><c- k>%</c-> fantasy <c- p>}</c-> p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> condensed oblique <c- m>12</c-><c- k>pt</c-> <c- s>"Helvetica Neue"</c-><c- p>,</c-> serif<c- p>;</c-> <c- p>}</c-> p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> condensed oblique <c- m>25</c-><c- k>deg</c-> <c- m>753</c-> <c- m>12</c-><c- k>pt</c-> <c- s>"Helvetica Neue"</c-><c- p>,</c-> serif<c- p>;</c-> <c- p>}</c-> </pre> <p>In the second rule, the font size percentage value ("80%") refers to the computed <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①④">font-size</a> of the parent element. In the third rule, the line height percentage ("110%") refers to the font size of the element itself.</p> <p>The first three rules do not specify the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant③">font-variant</a> and <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight⑦">font-weight</a> explicitly, so these properties receive their initial values (<a class="css" data-link-type="maybe" href="#font-variant-normal-value" id="ref-for-font-variant-normal-value">normal</a>). Notice that the font family name <span class="css">"new century schoolbook"</span>, which contains spaces, is enclosed in quotes. The fourth rule sets the <span class="property" id="ref-for-propdef-font-weight⑧">font-weight</span> to <a class="css" data-link-type="maybe" href="#valdef-font-weight-bold" id="ref-for-valdef-font-weight-bold">bold</a>, the <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style⑥">font-style</a> to <a class="css" data-link-type="maybe" href="#valdef-font-style-italic" id="ref-for-valdef-font-style-italic②">italic</a>, and implicitly sets <span class="property" id="ref-for-propdef-font-variant④">font-variant</span> to <span class="css" id="ref-for-font-variant-normal-value①">normal</span>.</p> <p>The fifth rule sets the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant⑤">font-variant</a> (<a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-small-caps" id="ref-for-valdef-font-variant-caps-small-caps">small-caps</a>), the <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①⑤">font-size</a> (120% of the parent’s font size), the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height⑥">line-height</a> (120% of the font size) and the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family⑤">font-family</a> (<a class="css" data-link-type="maybe" href="#valdef-font-family-fantasy" id="ref-for-valdef-font-family-fantasy①">fantasy</a>). It follows that the keyword <span class="css">normal</span> applies to the two remaining properties: <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style⑦">font-style</a> and <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight⑨">font-weight</a>.</p> <p>The sixth rule sets the <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style⑧">font-style</a>, <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①⓪">font-width</a>, <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①⑥">font-size</a>, and <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family⑥">font-family</a>, the other font properties being set to their initial values.</p> <p>The seventh rule sets <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style⑨">font-style</a> to <span class="css">oblique 25deg</span>, <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①⓪">font-weight</a> to <span class="css">753</span>, and <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①①">font-width</a> to <a class="css" data-link-type="maybe" href="#valdef-font-width-condensed" id="ref-for-valdef-font-width-condensed②">condensed</a>. Note that the <span class="css">25deg</span> in this rule must be immediately following the "oblique" keyword.</p> </div> <p>Since the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①②">font-width</a> property was not defined in CSS 2.1, when using <span class="property" id="ref-for-propdef-font-width①③">font-width</span> values within <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font⑨">font</a> rules, authors should include a extra version compatible with older user agents:</p> <pre class="highlight">p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> <c- m>80</c-><c- k>%</c-> sans-serif<c- p>;</c-> <c- c>/* for older user agents */</c-> font: condensed <c- m>80</c-><c- k>%</c-> sans-serif<c- p>;</c-> <c- p>}</c-> </pre> <p>System fonts can only be set as a whole; that is, the font family, size, weight, style, etc. are all set at the same time. These values can then be altered individually if desired. If no font with the indicated characteristics exists on a given platform, the user agent should either intelligently substitute (e.g., a smaller version of the <a class="css" data-link-type="maybe" href="#valdef-font-caption" id="ref-for-valdef-font-caption①">caption</a> font might be used for the <a class="css" data-link-type="maybe" href="#valdef-font-small-caption" id="ref-for-valdef-font-small-caption①">small-caption</a> font), or substitute a user agent default font. As for regular fonts, if, for a system font, any of the individual properties are not part of the operating system’s available user preferences, those properties should be set to their initial values.</p> <p>That is why this property is "almost" a shorthand property: system fonts can only be specified with this property, not with <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family⑦">font-family</a> itself, so <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font①⓪">font</a> allows authors to do more than the sum of its subproperties. However, the individual properties such as <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①①">font-weight</a> are still given values taken from the system font, which can be independently varied.</p> <p>Note that the keywords used for the system fonts listed above are only treated as keywords when they occur in the initial position, in other positions the same string is treated as part of the font family name:</p> <pre class="highlight"><c- k>font</c-><c- p>:</c-> menu<c- p>;</c-> <c- c>/* use the font settings for system menus */</c-> font: large menu<c- p>;</c-> <c- c>/* use a font family named "menu" */</c-> </pre> <div class="example" id="ex-menu-font"> <a class="self-link" href="#ex-menu-font"></a> <pre class="highlight">button <c- p>{</c-> <c- k>font</c-><c- p>:</c-> <c- m>300</c-> italic <c- m>1.3</c-><c- k>em</c->/<c- m>1.7</c-><c- k>em</c-> <c- s>"FB Armada"</c-><c- p>,</c-> sans-serif <c- p>}</c-> button p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> menu <c- p>}</c-> button p em <c- p>{</c-> <c- k>font-weight</c-><c- p>:</c-> bolder <c- p>}</c-> </pre> <p>If the font used for dropdown menus on a particular system happened to be, for example, 9-point Charcoal, with a weight of 600, then P elements that were descendants of BUTTON would be displayed as if this rule were in effect:</p> <pre class="highlight">button p <c- p>{</c-> <c- k>font</c-><c- p>:</c-> <c- m>600</c-> <c- m>9</c-><c- k>pt</c-> Charcoal <c- p>}</c-></pre> <p>Because the <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font①①">font</a> shorthand resets to its initial value any property not explicitly given a value, this has the same effect as this declaration:</p> <pre class="highlight">button p <c- p>{</c-> <c- k>font-style</c-><c- p>:</c-> normal<c- p>;</c-> <c- k>font-variant</c-><c- p>:</c-> normal<c- p>;</c-> <c- k>font-weight</c-><c- p>:</c-> <c- m>600</c-><c- p>;</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>9</c-><c- k>pt</c-><c- p>;</c-> <c- k>line-height</c-><c- p>:</c-> normal<c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> Charcoal <c- p>}</c-> </pre> </div> <h3 class="heading settled" data-level="2.8" id="font-synthesis-intro"><span class="secno">2.8. </span><span class="content"> Controlling synthetic faces</span><a class="self-link" href="#font-synthesis-intro"></a></h3> <p>Synthetic font faces are a fallback strategy to provide an approximation to the requested font when a font family lacks a suitable face.</p> <div class="example" id="ex-synthesis-types"> <a class="self-link" href="#ex-synthesis-types"></a> For example, a user agent might: <ul> <li data-md> <p>synthesize a bold face by drawing a thin stroke around each glyph</p> <li data-md> <p>synthesize small-caps, superscripts, or subscripts by rendering regular glyphs at a smaller size and positioning them appropriately</p> <li data-md> <p>synthesize an oblique face by geometrical shearing of each glyph</p> </ul> </div> <p>Synthesis is a fallback strategy because the end result, while perhaps better than nothing at all, does not meet the level of quality of a face designed for the purpose.</p> <p>Variable fonts, where the font designer has provided one or more axes of variation do <em>not</em> count as font synthesis and their use is not affected by the <a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis②">font-synthesis</a> property.</p> <h4 class="heading settled" data-level="2.8.1" id="font-synthesis-weight"><span class="secno">2.8.1. </span><span class="content"> Controlling synthesized bold: The <a class="property css" data-link-type="property" href="#propdef-font-synthesis-weight" id="ref-for-propdef-font-synthesis-weight①">font-synthesis-weight</a> property</span><a class="self-link" href="#font-synthesis-weight"></a></h4> <table class="def propdef" data-link-for-hint="font-synthesis-weight"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-synthesis-weight">font-synthesis-weight</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤⑦">|</a> none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete <tr> <th>Media: <td>visual </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-weight-binary.html" title="css/css-fonts/font-synthesis-weight-binary.html">font-synthesis-weight-binary.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-weight-binary.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-weight-binary.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-weight-first-letter.html" title="css/css-fonts/font-synthesis-weight-first-letter.html">font-synthesis-weight-first-letter.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-weight-first-letter.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-weight-first-letter.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-weight-first-line.html" title="css/css-fonts/font-synthesis-weight-first-line.html">font-synthesis-weight-first-line.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-weight-first-line.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-weight-first-line.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-weight.html" title="css/css-fonts/font-synthesis-weight.html">font-synthesis-weight.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-weight.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-weight.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-weight-invalid.html" title="css/css-fonts/parsing/font-synthesis-weight-invalid.html">font-synthesis-weight-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-weight-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-weight-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-weight-valid.html" title="css/css-fonts/parsing/font-synthesis-weight-valid.html">font-synthesis-weight-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-weight-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-weight-valid.html"><small>(source)</small></a> </ul> </details> <p>This property controls whether user agents are allowed to synthesize bold font faces when a font family lacks bold faces.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-weight" data-dfn-type="value" data-export id="valdef-font-synthesis-weight-auto">auto</dfn> <dd> Synthesis of bold faces is allowed <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-weight" data-dfn-type="value" data-export id="valdef-font-synthesis-weight-none">none</dfn> <dd> Synthesis of bold faces is not allowed </dl> <h4 class="heading settled" data-level="2.8.2" id="font-synthesis-style"><span class="secno">2.8.2. </span><span class="content"> Controlling synthesized oblique: The <a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style②">font-synthesis-style</a> property</span><a class="self-link" href="#font-synthesis-style"></a></h4> <table class="def propdef" data-link-for-hint="font-synthesis-style"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-synthesis-style">font-synthesis-style</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤⑧">|</a> none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete <tr> <th>Media: <td>visual </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-style-binary.html" title="css/css-fonts/font-synthesis-style-binary.html">font-synthesis-style-binary.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-style-binary.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-style-binary.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-style-first-letter.html" title="css/css-fonts/font-synthesis-style-first-letter.html">font-synthesis-style-first-letter.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-style-first-letter.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-style-first-letter.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-style-first-line.html" title="css/css-fonts/font-synthesis-style-first-line.html">font-synthesis-style-first-line.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-style-first-line.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-style-first-line.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-style.html" title="css/css-fonts/font-synthesis-style.html">font-synthesis-style.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-style.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-style.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-style-invalid.html" title="css/css-fonts/parsing/font-synthesis-style-invalid.html">font-synthesis-style-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-style-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-style-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-style-valid.html" title="css/css-fonts/parsing/font-synthesis-style-valid.html">font-synthesis-style-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-style-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-style-valid.html"><small>(source)</small></a> </ul> </details> <p>This property controls whether user agents are allowed to synthesize oblique font faces when a font family lacks oblique faces.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-style" data-dfn-type="value" data-export id="valdef-font-synthesis-style-auto">auto</dfn> <dd> Synthesis of oblique faces is allowed <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-style" data-dfn-type="value" data-export id="valdef-font-synthesis-style-none">none</dfn> <dd> Synthesis of oblique faces is not allowed </dl> <p id="vertical-oblique-synthesis"> In vertical text, for positive oblique angles, the glyph is skewed such that the line-over edge shifts towards the line-right side while the line-under edge shifts towards the line-left side. For negative oblique angles, the glyph is skewed such that the line-over edge shifts towards the line-left side while the line-under edge shifts towards the line-right side. Skewing is about the center of the glyph. </p> <figure> <img alt="synthetic oblique in vertical text" src="images/italics-vertical.png" width="78"> <figcaption>Synthetic oblique in vertical text, positive oblique angle</figcaption> </figure> <h4 class="heading settled" data-level="2.8.3" id="font-synthesis-small-caps"><span class="secno">2.8.3. </span><span class="content"> Controlling synthesized small caps: The <a class="property css" data-link-type="property" href="#propdef-font-synthesis-small-caps" id="ref-for-propdef-font-synthesis-small-caps①">font-synthesis-small-caps</a> property</span><a class="self-link" href="#font-synthesis-small-caps"></a></h4> <table class="def propdef" data-link-for-hint="font-synthesis-small-caps"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-synthesis-small-caps">font-synthesis-small-caps</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤⑨">|</a> none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-small-caps-first-letter.html" title="css/css-fonts/font-synthesis-small-caps-first-letter.html">font-synthesis-small-caps-first-letter.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-small-caps-first-letter.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-small-caps-first-letter.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-small-caps-first-line.html" title="css/css-fonts/font-synthesis-small-caps-first-line.html">font-synthesis-small-caps-first-line.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-small-caps-first-line.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-small-caps-first-line.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-small-caps-not-applied.html" title="css/css-fonts/font-synthesis-small-caps-not-applied.html">font-synthesis-small-caps-not-applied.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-small-caps-not-applied.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-small-caps-not-applied.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-small-caps.html" title="css/css-fonts/font-synthesis-small-caps.html">font-synthesis-small-caps.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-small-caps.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-small-caps.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-small-caps-invalid.html" title="css/css-fonts/parsing/font-synthesis-small-caps-invalid.html">font-synthesis-small-caps-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-small-caps-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-small-caps-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-small-caps-valid.html" title="css/css-fonts/parsing/font-synthesis-small-caps-valid.html">font-synthesis-small-caps-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-small-caps-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-small-caps-valid.html"><small>(source)</small></a> </ul> </details> <p>This property controls whether user agents are allowed to synthesize small caps font faces when a font family lacks small caps faces.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-small-caps" data-dfn-type="value" data-export id="valdef-font-synthesis-small-caps-auto">auto</dfn> <dd> Synthesis of small caps faces is allowed <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-small-caps" data-dfn-type="value" data-export id="valdef-font-synthesis-small-caps-none">none</dfn> <dd> Synthesis of small caps faces is not allowed </dl> <h4 class="heading settled" data-level="2.8.4" id="font-synthesis-position"><span class="secno">2.8.4. </span><span class="content"> Controlling synthesized super- and subscripts: The <a class="property css" data-link-type="property" href="#propdef-font-synthesis-position" id="ref-for-propdef-font-synthesis-position">font-synthesis-position</a> property</span><a class="self-link" href="#font-synthesis-position"></a></h4> <table class="def propdef" data-link-for-hint="font-synthesis-position"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-synthesis-position">font-synthesis-position</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥⓪">|</a> none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-position-001.html" title="css/css-fonts/font-synthesis-position-001.html">font-synthesis-position-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-position-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-position-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-position-invalid.html" title="css/css-fonts/parsing/font-synthesis-position-invalid.html">font-synthesis-position-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-position-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-position-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-position-valid.html" title="css/css-fonts/parsing/font-synthesis-position-valid.html">font-synthesis-position-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-position-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-position-valid.html"><small>(source)</small></a> </ul> </details> <p>This property controls whether user agents are required to synthesize superscript and subscript glyphs for <a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position②">font-variant-position</a> when a font lacks them.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-position" data-dfn-type="value" data-export id="valdef-font-synthesis-position-auto">auto</dfn> <dd> Synthesis of superscript and subscript forms is required <dt><dfn class="dfn-paneled css" data-dfn-for="font-synthesis-position" data-dfn-type="value" data-export id="valdef-font-synthesis-position-none">none</dfn> <dd> Synthesis of superscript and subscript forms is not allowed </dl> <h4 class="heading settled" data-level="2.8.5" id="font-synthesis"><span class="secno">2.8.5. </span><span class="content"> Controlling synthetic faces: the <a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis③">font-synthesis</a> shorthand</span><a class="self-link" href="#font-synthesis"></a></h4> <table class="def propdef" data-link-for-hint="font-synthesis"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-synthesis">font-synthesis</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥①">|</a> [ weight <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any③">||</a> style <span id="ref-for-comb-any④">||</span> small-caps <span id="ref-for-comb-any⑤">||</span> position] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>weight style small-caps position <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword(s) <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-01.html" title="css/css-fonts/font-synthesis-01.html">font-synthesis-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-02.html" title="css/css-fonts/font-synthesis-02.html">font-synthesis-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-03.html" title="css/css-fonts/font-synthesis-03.html">font-synthesis-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-04.html" title="css/css-fonts/font-synthesis-04.html">font-synthesis-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-05.html" title="css/css-fonts/font-synthesis-05.html">font-synthesis-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-06.html" title="css/css-fonts/font-synthesis-06.html">font-synthesis-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-07.html" title="css/css-fonts/font-synthesis-07.html">font-synthesis-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-synthesis-08.html" title="css/css-fonts/font-synthesis-08.html">font-synthesis-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-synthesis-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-synthesis-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-computed.html" title="css/css-fonts/parsing/font-synthesis-computed.html">font-synthesis-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-invalid.html" title="css/css-fonts/parsing/font-synthesis-invalid.html">font-synthesis-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-synthesis-valid.html" title="css/css-fonts/parsing/font-synthesis-valid.html">font-synthesis-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-synthesis-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-synthesis-valid.html"><small>(source)</small></a> </ul> </details> <p>This property is a shorthand for the <a class="property css" data-link-type="property" href="#propdef-font-synthesis-weight" id="ref-for-propdef-font-synthesis-weight②">font-synthesis-weight</a>, <a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style③">font-synthesis-style</a>, <a class="property css" data-link-type="property" href="#propdef-font-synthesis-small-caps" id="ref-for-propdef-font-synthesis-small-caps②">font-synthesis-small-caps</a>, and <a class="property css" data-link-type="property" href="#propdef-font-synthesis-position" id="ref-for-propdef-font-synthesis-position①">font-synthesis-position</a> properties. Values are mapped as following:</p> <table class="data"> <thead> <tr> <th><a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis④">font-synthesis</a> value <th><a class="property css" data-link-type="property" href="#propdef-font-synthesis-weight" id="ref-for-propdef-font-synthesis-weight③">font-synthesis-weight</a> value <th><a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style④">font-synthesis-style</a> value <th><a class="property css" data-link-type="property" href="#propdef-font-synthesis-small-caps" id="ref-for-propdef-font-synthesis-small-caps③">font-synthesis-small-caps</a> value <th><a class="property css" data-link-type="property" href="#propdef-font-synthesis-position" id="ref-for-propdef-font-synthesis-position②">font-synthesis-position</a> value <tbody> <tr> <th>none <td>none <td>none <td>none <td>none <tr> <th>weight <td>auto <td>none <td>none <td>none <tr> <th>style <td>none <td>auto <td>none <td>none <tr> <th>small-caps <td>none <td>none <td>auto <td>none <tr> <th>position <td>none <td>none <td>none <td>auto <tr> <th>weight style <td>auto <td>auto <td>none <td>none <tr> <th>weight small-caps <td>auto <td>none <td>auto <td>none <tr> <th>weight position <td>auto <td>none <td>none <td>auto <tr> <th>style small-caps <td>none <td>auto <td>auto <td>none <tr> <th>style position <td>none <td>auto <td>none <td>auto <tr> <th>small-caps position <td>none <td>none <td>auto <td>auto <tr> <th>weight style small-caps <td>auto <td>auto <td>auto <td>none <tr> <th>weight style position <td>auto <td>auto <td>none <td>auto <tr> <th>weight small-caps position <td>auto <td>none <td>auto <td>auto <tr> <th>style small-caps position <td>none <td>auto <td>auto <td>auto <tr> <th>weight style small-caps position <td>auto <td>auto <td>auto <td>auto </table> <div class="example" id="ex-no-obliqued-arabic"> <a class="self-link" href="#ex-no-obliqued-arabic"></a> The style rule below disables the use of synthetically obliqued Arabic: <pre class="highlight">*<c- nf>:lang</c-><c- p>(</c->ar<c- p>)</c-> <c- p>{</c-> <c- k>font-synthesis</c-><c- p>:</c-> none<c- p>;</c-> <c- p>}</c-></pre> </div> <h2 class="heading settled" data-level="3" id="font-rendering-controls"><span class="secno">3. </span><span class="content"> Font Rendering Controls</span><a class="self-link" href="#font-rendering-controls"></a></h2> <h3 class="heading settled" data-level="3.1" id="font-rendering-controls-introduction"><span class="secno">3.1. </span><span class="content"> Introduction to Font Rendering Controls</span><a class="self-link" href="#font-rendering-controls-introduction"></a></h3> <p>When using downloadable Web Fonts via <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule">@font-face</a>, the user agent needs to know what to do while the font is actively loading. Most web browsers have adopted some form of timeout:</p> <table class="data"> <thead> <tr> <th>Browser <th>Timeout <th>Fallback <th>Swap <tbody> <tr> <th>Chrome 35+ <td>3 seconds <td>yes <td>yes <tr> <th>Opera <td>3 seconds <td>yes <td>yes <tr> <th>Firefox <td>3 seconds <td>yes <td>yes <tr> <th>Internet Explorer <td>0 seconds <td>yes <td>yes <tr> <th>Safari <td>3 seconds <td>yes <td>yes </table> <ul> <li data-md> <p>Chrome and Firefox have a 3 second timeout after which the text is shown with the fallback font. Eventually, a swap occurs: the text is re-rendered with the intended font once it becomes available.</p> <li data-md> <p>Internet Explorer has a 0 second timeout which results in immediate text rendering: if the requested font is not yet available, fallback is used, and text is rerendered later once the requested font becomes available.</p> </ul> <p>While these default behaviors are reasonable, they’re unfortunately inconsistent across browsers. Worse, no single approach is sufficient to cover the range of use-cases required by modern user-experience– and performance–conscious applications.</p> <p>The Font Loading API <a data-link-type="biblio" href="#biblio-css-font-loading-3" title="CSS Font Loading Module Level 3">[CSS-FONT-LOADING-3]</a> allows a developer to override some of the above behaviors, but that requires scripting, a non-trivial amount of effort, and ultimately doesn’t provide sufficient hooks to cover <em>all</em> reasonable cases. Additionally, the developer needs to either inline the loading script into their page or load an external library, introducing additional network latency before the fonts can be loaded and delaying text rendering.</p> <p>Design/performance-conscious web developers have a good sense for the relative importance of a given Web Font for the intended user experience. This specification provides them the ability to control font timeout and rendering behavior. Specifically, it lets developers:</p> <ul> <li data-md> <p>Define the font display policy when text is ready to be painted: block, or paint with fallback.</p> <li data-md> <p>Define the font display policy once the desired font is available: rerender text with the new font, or leave it with the fallback.</p> <li data-md> <p>Define custom timeout values for each font.</p> <li data-md> <p>Define custom display and timeout policies per element.</p> </ul> <h3 class="heading settled" data-level="3.2" id="font-display-timeline"><span class="secno">3.2. </span><span class="content"> The Font Display Timeline</span><a class="self-link" href="#font-display-timeline"></a></h3> <p>At the moment the user agent first attempts to use a given downloaded font face on a page, the font face’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="timer" id="font-download-timer">font download timer</dfn> is started. This timer advances through three periods of time associated with the font face—​the <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period">block period</a>, the <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period">swap period</a>, and the <a data-link-type="dfn" href="#font-failure-period" id="ref-for-font-failure-period">failure period</a>—​which dictate the rendering behavior of any elements using the font face:</p> <ul> <li data-md> <p>The first period is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="block period" id="font-block-period">font block period</dfn>. During this period, if the font face is not loaded, any element attempting to use it must instead <a data-link-type="dfn" href="#render-with-an-invisible-fallback-font-face" id="ref-for-render-with-an-invisible-fallback-font-face">render with an invisible fallback font face</a>. If the font face successfully loads during the <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period①">block period</a>, the font face is then used normally.</p> <li data-md> <p>The second period, occurring immediately after the <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period②">block period</a>, is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="swap period" id="font-swap-period">font swap period</dfn>. During this period, if the font face is not loaded, any element attempting to use it must instead <a data-link-type="dfn" href="#render-with-a-fallback-font-face" id="ref-for-render-with-a-fallback-font-face">render with a fallback font face</a>. If the font face successfully loads during the <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period①">swap period</a>, the font face is then used normally.</p> <li data-md> <p>The third period, occurring immediately after the <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period②">swap period</a>, is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="failure period" id="font-failure-period">font failure period</dfn>. If the font face is not yet loaded when this period starts, it’s marked as a failed load, causing normal font fallback. Otherwise, the font face is used normally.</p> </ul> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="render-with-a-fallback-font-face">render with a fallback font face</dfn> for a given element, the user agent must find the first font face specified in the element’s <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family⑧">font-family</a> list which is already loaded, and use that for rendering text. Doing this must not trigger loads of any of the fallback fonts.</p> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="render-with-an-invisible-fallback-font-face">render with an invisible fallback font face</dfn> for a given element, find a font face as per "<a data-link-type="dfn" href="#render-with-a-fallback-font-face" id="ref-for-render-with-a-fallback-font-face①">render with a fallback font face</a>". Create an anonymous font face with the same metrics as the selected font face but with all glyphs "invisible" (containing no "ink"), and use that for rendering text. Doing this must not trigger loads of any of the fallback fonts.</p> <p class="issue" id="issue-160eca9c"><a class="self-link" href="#issue-160eca9c"></a> <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-fallback" id="ref-for-valdef-font-face-font-display-fallback">fallback</a> and <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional">optional</a> can result in some faces in a family being used while others are required to fallback, giving a "ransom note" look. Perhaps require that all fonts in a family have the same behavior (all swapped in, or all fallback)? See also the @font-feature-values for controlling the behavior on a font family basis.</p> <h2 class="heading settled" data-level="4" id="font-resources"><span class="secno">4. </span><span class="content"> Font Resources</span><a class="self-link" href="#font-resources"></a></h2> <h3 class="heading settled" data-level="4.1" id="font-face-rule"><span class="secno">4.1. </span><span class="content"> The <dfn class="dfn-paneled css" data-dfn-type="at-rule" data-export id="at-font-face-rule"><a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule①">@font-face</a></dfn> rule</span><a class="self-link" href="#font-face-rule"></a></h3> <p>The <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②">@font-face</a> rule allows for linking to fonts that are automatically fetched and activated when needed. This allows authors to select a font that closely matches the design goals for a given page rather than limiting the font choice to a set of fonts available on a given platform. A set of font descriptors define the location of a font resource, either locally or externally, along with the style characteristics of an individual face. Multiple <span class="css" id="ref-for-at-font-face-rule③">@font-face</span> rules can be used to construct font families with a variety of faces. Using CSS font matching rules, a user agent can selectively download only those faces that are needed for a given piece of text.</p> <p>Its syntax is:</p> <pre class="prod highlight"><c- n>@font-face</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list">&lt;declaration-list></a> <c- p>}</c-> </pre> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/downloadable-font-in-iframe-print.html" title="css/css-fonts/downloadable-font-in-iframe-print.html">downloadable-font-in-iframe-print.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/downloadable-font-in-iframe-print.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/downloadable-font-in-iframe-print.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/downloadable-font-print.html" title="css/css-fonts/downloadable-font-print.html">downloadable-font-print.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/downloadable-font-print.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/downloadable-font-print.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/at-font-face-descriptors.html" title="css/css-fonts/variations/at-font-face-descriptors.html">at-font-face-descriptors.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/at-font-face-descriptors.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/at-font-face-descriptors.html"><small>(source)</small></a> </ul> </details> <p>The <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④">@font-face</a> rule accepts the descriptors defined in this specification.</p> <p>Each <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤">@font-face</a>rule specifies a value for every font descriptor, either implicitly or explicitly. Those not given explicit values in the rule take the initial value listed with each descriptor in this specification. These descriptors apply solely within the context of the <span class="css" id="ref-for-at-font-face-rule⑥">@font-face</span> rule in which they are defined, and do not apply to document language elements. There is no notion of which elements the descriptors apply to or whether the values are inherited by child elements. When a given descriptor occurs multiple times in a given <span class="css" id="ref-for-at-font-face-rule⑦">@font-face</span> rule, only the last descriptor declaration is used and all prior declarations for that descriptor are ignored.</p> <div class="example" id="ex-gentium"> <a class="self-link" href="#ex-gentium"></a> To use a downloadable font called Gentium: <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Gentium<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>http://example.com/fonts/Gentium.woff</c-><c- p>);</c-> <c- p>}</c-> p <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Gentium<c- p>,</c-> serif<c- p>;</c-> <c- p>}</c-> </pre> <p>The user agent will download Gentium and use it when rendering text within paragraph elements. If for some reason the site serving the font is unavailable, the default serif font will be used.</p> </div> <p>A given set of <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑧">@font-face</a> rules define a set of fonts available for use within the documents that contain these rules. When font matching is done, fonts defined using these rules are considered before other available fonts on a system.</p> <p>Downloaded fonts are only available to documents that reference them. The process of activating these fonts must not make them available to other applications or to documents that don’t directly link to the same font. User agent implementers might consider it convenient to use downloaded fonts when rendering characters in other documents for which no other available font exists as part of the <em>installed font fallback</em> procedure. However, this would cause a security leak since the contents of one page would be able to affect other pages, something an attacker could use as an attack vector. These restrictions do not affect caching behavior, fonts are cached the same way other web resources are cached.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/downloadable-font-scoped-to-document.html" title="css/css-fonts/downloadable-font-scoped-to-document.html">downloadable-font-scoped-to-document.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/downloadable-font-scoped-to-document.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/downloadable-font-scoped-to-document.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/web-font-no-longer-accessible-when-stylesheet-removed.html" title="css/css-fonts/web-font-no-longer-accessible-when-stylesheet-removed.html">web-font-no-longer-accessible-when-stylesheet-removed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/web-font-no-longer-accessible-when-stylesheet-removed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/web-font-no-longer-accessible-when-stylesheet-removed.html"><small>(source)</small></a> </ul> </details> <p>This at-rule follows the forward-compatible parsing rules of CSS. Like properties in a declaration block, declarations of any descriptors that are not supported by the user agent must be ignored. <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑨">@font-face</a> rules require a font-family and src descriptor; if either of these are missing, the <span class="css" id="ref-for-at-font-face-rule①⓪">@font-face</span> rule must not be considered when performing the <a href="#font-matching-algorithm">font matching algorithm</a>.</p> <p>In cases where user agents have limited platform resources or implement the ability to disable downloadable font resources, <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule①①">@font-face</a> rules must simply be ignored; the behavior of individual descriptors as defined in this specification should not be altered.</p> <h3 class="heading settled" data-level="4.2" id="font-family-desc"><span class="secno">4.2. </span><span class="content">Font family: the <a class="property" data-link-type="propdesc" href="#descdef-font-face-font-family" id="ref-for-descdef-font-face-font-family">font-family</a> descriptor</span><a class="self-link" href="#font-family-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-family">font-family</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule①②">@font-face</a> <tr> <th>Value: <td class="prod"><a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value⑧">&lt;family-name></a> <tr> <th>Initial: <td>N/A </table> <p>This descriptor defines the font family name that will be used in all CSS font family name matching. It overrides the font family names contained in the underlying font data. If the font family name is the same as a font family available in a given user’s environment, it effectively hides the underlying font for documents that use the stylesheet. This permits a web author to freely choose font-family names without worrying about conflicts with font family names present in a given user’s environment. Likewise, platform substitutions for a given font family name must not be used.</p> <h3 class="heading settled" data-level="4.3" id="src-desc"><span class="secno">4.3. </span><span class="content">Font reference: the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src">src</a> descriptor</span><a class="self-link" href="#src-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-src">src</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule①③">@font-face</a> <tr> <th>Value: <td class="prod"><a class="production css" data-link-type="type" href="#typedef-font-src-list" id="ref-for-typedef-font-src-list">&lt;font-src-list></a> <tr> <th>Initial: <td>N/A </table> <p>This descriptor specifies the resource containing font data. Its value is a prioritized, comma-separated list of external references or locally-installed font face names. When a font is needed the user agent iterates over the set of references listed, using the first one it can successfully parse and activate. Parsing this descriptor is more complicated than parsing other descriptors; see <a href="#font-face-src-parsing">§ 4.3.1 Parsing the src descriptor</a> for the parsing rules. Activation of a font involves downloading the file or reading it from disk, parsing it, and perhaps additional user-agent-dependent steps. Fonts containing invalid data or local font faces that are not found are ignored and the user agent loads the next font in the list.</p> <h4 class="heading settled" data-level="4.3.1" id="font-face-src-parsing"><span class="secno">4.3.1. </span><span class="content">Parsing the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src①">src</a> descriptor</span><a class="self-link" href="#font-face-src-parsing"></a></h4> <p>To parse a <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-font-src-list"><a class="production css" data-link-type="type" href="#typedef-font-src-list" id="ref-for-typedef-font-src-list①">&lt;font-src-list></a></dfn> production, <a data-link-type="dfn" href="https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar" id="ref-for-css-parse-a-comma-separated-list-according-to-a-css-grammar">parse a list</a> of <a class="production css" data-link-type="type" href="#typedef-font-src" id="ref-for-typedef-font-src">&lt;font-src></a>s.</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-font-src">&lt;font-src></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#url-value" id="ref-for-url-value">&lt;url></a> <c- p>[</c-> <c- nf>format</c-><c- p>(</c-><a class="production" data-link-type="type" href="#font-format-values" id="ref-for-font-format-values">&lt;font-format></a><c- p>)]</c-><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt③">?</a> <c- p>[</c-> <c- nf>tech</c-><c- p>(</c-> <a class="production" data-link-type="type" href="#font-tech-values" id="ref-for-font-tech-values">&lt;font-tech></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma②">#</a><c- p>)]</c-><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt④">?</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥②">|</a> <c- nf>local</c-><c- p>(</c-><a class="production" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value⑨">&lt;family-name></a><c- p>)</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="font-format-values">&lt;font-format></dfn>= <c- p>[</c-><a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value②">&lt;string></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥③">|</a> collection <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥④">|</a> embedded-opentype <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥⑤">|</a> opentype <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥⑥">|</a> svg <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥⑦">|</a> truetype <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥⑧">|</a> woff <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥⑨">|</a> woff2 <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="font-tech-values">&lt;font-tech></dfn>= <c- p>[</c-><a class="production" data-link-type="type" href="#font-features-tech-values" id="ref-for-font-features-tech-values">&lt;font-features-tech></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦⓪">|</a> <a class="production" data-link-type="type" href="#color-font-tech-values" id="ref-for-color-font-tech-values">&lt;color-font-tech></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦①">|</a> variations <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦②">|</a> palettes <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦③">|</a> incremental <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="font-features-tech-values">&lt;font-features-tech></dfn>= <c- p>[</c->features-opentype <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦④">|</a> features-aat <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦⑤">|</a> features-graphite<c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="color-font-tech-values">&lt;color-font-tech></dfn>= <c- p>[</c->color-COLRv0 <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦⑥">|</a> color-COLRv1 <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦⑦">|</a> color-SVG <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦⑧">|</a> color-sbix <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦⑨">|</a> color-CBDT <c- p>]</c-></pre> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-family-src-quoted.html" title="css/css-fonts/font-family-src-quoted.html">font-family-src-quoted.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-family-src-quoted.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-family-src-quoted.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-face-src-format.html" title="css/css-fonts/parsing/font-face-src-format.html">font-face-src-format.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-face-src-format.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-face-src-format.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-face-src-list.html" title="css/css-fonts/parsing/font-face-src-list.html">font-face-src-list.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-face-src-list.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-face-src-list.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-face-src-local.html" title="css/css-fonts/parsing/font-face-src-local.html">font-face-src-local.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-face-src-local.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-face-src-local.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-face-src-tech.html" title="css/css-fonts/parsing/font-face-src-tech.html">font-face-src-tech.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-face-src-tech.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-face-src-tech.html"><small>(source)</small></a> </ul> </details> <p>While keywords are preferred to identify font formats, for reasons of backwards compatibility the following strings are also accepted, and have the same effect as if the equivalent modern syntax had been used.</p> <table> <tbody> <tr> <th>String form <th>Equivalent syntax <tr> <td>format("woff2") <td>format(woff2) <tr> <td>format("woff") <td>format(woff) <tr> <td>format("truetype") <td>format(truetype) <tr> <td>format("opentype") <td>format(opentype) <tr> <td>format("collection") <td>format(collection) <tr> <td>format("woff2-variations") <td>format(woff2) tech(variations) <tr> <td>format("woff-variations") <td>format(woff) tech(variations) <tr> <td>format("truetype-variations") <td>format(truetype) tech(variations) <tr> <td>format("opentype-variations") <td>format(opentype) tech(variations) </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/format-specifiers-variations.html" title="css/css-fonts/format-specifiers-variations.html">format-specifiers-variations.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/format-specifiers-variations.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/format-specifiers-variations.html"><small>(source)</small></a> </ul> </details> <p class="note" role="note"><span class="marker">Note:</span> The CSS WG does not anticipate extending this list of format strings in the future.</p> <p>If a component value is parsed correctly and is of a <a href="#font-format-definitions">font format</a> or <a href="#font-tech-definitions">font tech</a> that the UA supports, add it to the list of supported sources. If parsing a component value results in a parsing error or its format or tech are unsupported, do not add it to the list of supported sources.</p> <p>If there are no supported entries at the end of this process, the value for the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src②">src</a> descriptor is a parse error.</p> <p>These parsing rules allow for graceful fallback of fonts for user agents which don’t support a particular font tech or font format.</p> <div class="example" id="ex-incremental"> <a class="self-link" href="#ex-incremental"></a> For example, when incremental transfer is not supported, a woff2 compressed version of the font is supplied, for optimal performance. Then, for <a href="https://w3c.github.io/IFT/Overview.html">incremental transfer</a>, the raw uncompressed OpenType font is provided, portions of which will be loaded on demand. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"MyIncrementallyLoadedWebFont"</c-><c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"FallbackURLForBrowsersWhichDontSupportIncrementalLoading.woff2"</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"woff2"</c-><c- p>);</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"MyIncrementallyLoadedWebFont.otf"</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c->opentype<c- p>)</c-> <c- nf>tech</c-><c- p>(</c->incremental<c- p>);</c-> <c- p>}</c-> </pre> </div> <h4 class="heading settled" data-level="4.3.2" id="font-face-src-loading"><span class="secno">4.3.2. </span><span class="content">Loading an individual item in the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src③">src</a> descriptor</span><a class="self-link" href="#font-face-src-loading"></a></h4> <p>As with other URLs in CSS, the URL can be relative, in which case it is resolved relative to the location of the style sheet containing the <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule①④">@font-face</a> rule. In the case of SVG fonts, the URL points to an element within a document containing SVG font definitions. If the element reference is omitted, a reference to the first defined font is implied. Similarly, font container formats that can contain more than one font must load one and only one of the fonts for a given <span class="css" id="ref-for-at-font-face-rule①⑤">@font-face</span> rule. Fragment identifiers are used to indicate which font to load; these use the PostScript name of the font as defined in <a data-link-type="biblio" href="#biblio-rfc8081" title="The &quot;font&quot; Top-Level Media Type">[RFC8081]</a>.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-opentype-collections.html" title="css/css-fonts/variations/font-opentype-collections.html">font-opentype-collections.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-opentype-collections.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-opentype-collections.html"><small>(source)</small></a> </ul> </details> <p>Conformant user agents must not use a face from the resource unless its PostScript name exactly matches the fragment identifier, and must skip downloading the resource if the given fragment identifier cannot be a valid PostScript name.</p> <div class="example" id="ex-load-font-fragment"> <a class="self-link" href="#ex-load-font-fragment"></a> <pre class="highlight"><c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>fonts/simple.woff</c-><c- p>);</c-> <c- c>/* load simple.woff relative to stylesheet location */</c-> src: <c- nf>url</c-><c- p>(</c-><c- s>/fonts/simple.woff</c-><c- p>);</c-> <c- c>/* load simple.woff from absolute location */</c-> src: <c- nf>url</c-><c- p>(</c-><c- s>fonts/coll.otc#foo</c-><c- p>);</c-> <c- c>/* load font foo from collection coll.otc</c-> <c- c>src: url(fonts/coll.woff2#foo); /* load font foo from woff2 collection coll.woff2</c-> <c- c>src: url(fonts.svg#simple); /* load SVG font with id 'simple' */</c-> </pre> </div> <h4 class="heading settled" data-level="4.3.3" id="font-face-src-formats"><span class="secno">4.3.3. </span><span class="content">Selecting items in the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src④">src</a></span><a class="self-link" href="#font-face-src-formats"></a></h4> <p>External references consist of a URL, followed by an optional hint describing the format of the font resource referenced by that URL. Conformant user agents must skip downloading a font resource if the format hint indicates an unsupported or unknown font format, or if any of the font technologies are unsupported by the user agent. If no format hint is supplied, the user agent should download the font resource.</p> <div class="example" id="ex-woff2-woff1"> <a class="self-link" href="#ex-woff2-woff1"></a> For example, the following shows how to load a WOFF 2 font if possible, otherwise a WOFF 1, otherwise use an OpenType font <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> bodytext<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>ideal-sans-serif.woff2</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"woff2"</c-><c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>ideal-sans-serif.woff</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"woff"</c-><c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>basic-sans-serif.ttf</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"opentype"</c-><c- p>);</c-> <c- p>}</c-> </pre> </div> <div class="example" id="ex-fictitious-zebra"> <a class="self-link" href="#ex-fictitious-zebra"></a> In this example, if woff2 is not supported, an unsupported and fictitious "zebra" format is skipped and the opentype font is downloaded: <pre class="highlight"><c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>ideal.woff2</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"woff2"</c-><c- p>),</c-><c- nf>url</c-><c- p>(</c-><c- s>unsupported.zeb</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"zebra"</c-><c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>basic.ttf</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"opentype"</c-><c- p>);</c-></pre> </div> <div class="example" id="ex-instance-in-collection"> <a class="self-link" href="#ex-instance-in-collection"></a>Here an individual instance in a collection is loaded, or if collections are not supported, download an individual font instead. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> 源ノ角ゴシック Code JP<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>SourceHanCodeJP.otc#Regular</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"collection"</c-><c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>SourceHanCodeJP-Regular.ttf</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"opentype"</c-><c- p>);</c-> <c- p>}</c-> </pre> </div> <h5 class="heading settled" data-level="4.3.3.1" id="local-font-fallback"><span class="secno">4.3.3.1. </span><span class="content">Local font fallback</span><a class="self-link" href="#local-font-fallback"></a></h5> <p>When authors would prefer to use a locally available copy of a given font and download it if it’s not, <code class="highlight"><c- nf>local</c-><c- p>()</c-></code> can be used. The locally-installed <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value①⓪">&lt;family-name></a> argument to <code class="highlight"><c- nf>local</c-><c- p>()</c-></code> is a format-specific string that uniquely identifies a single font face within a larger family. The name can optionally be enclosed in quotes. If unquoted, the <a href="#family-name-syntax">unquoted font family name processing conventions</a> apply; in other words, the name must be a sequence of identifiers separated by <a href="https://www.w3.org/TR/css3-syntax/#whitespace">whitespace</a> which is converted to a string by joining the identifiers together separated by a single space; and thus, <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords④">CSS-wide keywords</a> such as <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit" id="ref-for-valdef-all-inherit①">inherit</a>, and <a class="production css" data-link-type="type" href="#typedef-generic-family" id="ref-for-typedef-generic-family①⓪">&lt;generic-family></a> keywords such as <a class="css" data-link-type="maybe" href="#valdef-font-family-serif" id="ref-for-valdef-font-family-serif⑧">serif</a> are not allowed inside <code class="highlight"><c- nf>local</c-><c- p>()</c-></code>.</p> <pre class="lang-css highlight"><c- c>/* regular face of Gentium */</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> MyGentium<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->Gentium<c- p>),</c-> <c- c>/* prefer locally available Gentium */</c-> <c- nf>url</c-><c- p>(</c-><c- s>Gentium.woff</c-><c- p>);</c-> <c- c>/* otherwise, download it */</c-> <c- p>}</c-> </pre> <div class="invalid example" id="ex-local-no-keywords"> <a class="self-link" href="#ex-local-no-keywords"></a> For example, this use of <code class="highlight"><c- nf>local</c-><c- p>()</c-></code> would be an error: <pre class="lang-css highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> foo<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->inherit<c- p>);</c-> <c- p>}</c-> </pre> </div> <p>For OpenType and TrueType fonts, this string is used to match only the Postscript name or the full font name in the name table of locally available fonts. Which type of name is used varies by platform and font, so authors should include both of these names to assure proper matching across platforms. Platform substitutions for a given font name must not be used.</p> <pre class="highlight"><c- c>/* bold face of Gentium */</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> MyGentium<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->Gentium Bold<c- p>),</c-> <c- c>/* full font name */</c-> <c- nf>local</c-><c- p>(</c->Gentium-Bold<c- p>),</c-> <c- c>/* Postscript name */</c-> <c- nf>url</c-><c- p>(</c-><c- s>GentiumBold.woff</c-><c- p>);</c-> <c- c>/* otherwise, download it */</c-> font-weight: bold<c- p>;</c-> <c- p>}</c-> </pre> <p>Just as an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule①⑥">@font-face</a> rule specifies the characteristics of a single font within a family, the unique name used with <code class="highlight"><c- nf>local</c-><c- p>()</c-></code> specifies a single font, not an entire font family. Defined in terms of OpenType font data, the Postscript name is found in the font’s <a href="https://www.microsoft.com/typography/otspec/name.htm">name table</a>, in the name record with nameID = 6 (see <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> for more details). The Postscript name is the commonly used key for all fonts on OSX and for Postscript CFF fonts under Windows. The full font name (nameID = 4) is used as a unique key for fonts with TrueType glyphs on Windows.</p> <p>For OpenType fonts with multiple localizations of the full font name, the US English version must be used (language ID = 0x409 for Windows and language ID = 0 for Macintosh) or the first localization when a US English full font name is not available (the OpenType specification recommends that <a href="https://www.microsoft.com/typography/otspec/recom.htm">all fonts minimally include US English names</a>). User agents that also match other full font names, e.g. matching the Dutch name when the current system locale is set to Dutch, are considered non-conformant.</p> <p class="note" role="note"><span class="marker">Note:</span> This is done, not to prefer English, but to avoid matching inconsistencies across font versions and OS localizations, since font style names (e.g. "Bold") are frequently localized into many languages and the set of localizations available varies widely across platform and font version.</p> <p>User agents that match a concatenation of family name (nameID = 1) with style name (nameID = 2) are considered non-conformant.</p> <p class="note" role="note"><span class="marker">Note:</span> This also allows for referencing faces that belong to larger families that cannot otherwise be referenced.</p> <div class="example" id="ex-local-font"> <a class="self-link" href="#ex-local-font"></a> Use a local font or reference an SVG font in another document: <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Headline<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->Futura-Medium<c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>images/fonts.svg#MyGeometricModern</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"svg"</c-><c- p>);</c-> <c- p>}</c-> </pre> <p>Create an alias for local Japanese fonts on different platforms:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> jpgothic<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->HiraKakuPro-W3<c- p>),</c-> <c- nf>local</c-><c- p>(</c->Meiryo<c- p>),</c-> <c- nf>local</c-><c- p>(</c->IPAPGothic<c- p>);</c-> <c- p>}</c-> </pre> <p>Reference a font face that cannot be matched within a larger family:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Hoefler Text Ornaments<c- p>;</c-> <c- c>/* has the same font properties as Hoefler Text Regular */</c-> src: <c- nf>local</c-><c- p>(</c->HoeflerText-Ornaments<c- p>);</c-> <c- p>}</c-> </pre> <p>Since localized fullnames never match, a document with the header style rules below would always render using the default serif font, regardless whether a particular system locale parameter is set to Finnish or not:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> SectionHeader<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c-><c- s>"Arial Lihavoitu"</c-><c- p>);</c-> <c- c>/* Finnish fullname for Arial Bold, should fail */</c-> font-weight: bold<c- p>;</c-> <c- p>}</c-> h2 <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> SectionHeader<c- p>,</c-> serif<c- p>;</c-> <c- p>}</c-> </pre> <p>A conformant user agent would never load the font 'gentium.eot' in the example below, since it is included in the first definition of the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src⑤">src</a> descriptor which is overridden by the second definition in the same <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule①⑦">@font-face</a> rule:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> MainText<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>gentium.eot</c-><c- p>);</c-> <c- c>/* for use with older user agents */</c-> src: <c- nf>local</c-><c- p>(</c-><c- s>"Gentium"</c-><c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>gentium.woff</c-><c- p>);</c-> <c- c>/* Overrides src definition */</c-> <c- p>}</c-> </pre> </div> <h3 class="heading settled" data-level="4.4" id="font-prop-desc"><span class="secno">4.4. </span><span class="content"> Font property descriptors: the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-style" id="ref-for-descdef-font-face-font-style">font-style</a>, <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-weight" id="ref-for-descdef-font-face-font-weight">font-weight</a>, and <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-width" id="ref-for-descdef-font-face-font-width">font-width</a> descriptors</span><a class="self-link" href="#font-prop-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-style">font-style</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule①⑧">@font-face</a> <tr> <th>Value: <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧⓪">|</a> normal <span id="ref-for-comb-one⑧①">|</span> italic <span id="ref-for-comb-one⑧②">|</span> oblique [ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#angle-value" id="ref-for-angle-value③">&lt;angle [-90deg,90deg]></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range">{1,2}</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑤">?</a> <tr> <th>Initial: <td>auto </table> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-weight">font-weight</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule①⑨">@font-face</a> <tr> <th>Value: <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧③">|</a> <a class="production css" data-link-type="type" href="#font-weight-absolute-values" id="ref-for-font-weight-absolute-values①">&lt;font-weight-absolute></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range①">{1,2}</a> <tr> <th>Initial: <td>auto </table> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-width">font-width</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule②⓪">@font-face</a> <tr> <th>Value: <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧④">|</a> <a class="production css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①④">&lt;'font-width'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range②">{1,2}</a> <tr> <th>Initial: <td>auto </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-range-order.html" title="css/css-fonts/font-face-range-order.html">font-face-range-order.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-range-order.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-range-order.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-stretch-auto-static.html" title="css/css-fonts/font-face-stretch-auto-static.html">font-face-stretch-auto-static.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-stretch-auto-static.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-stretch-auto-static.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-stretch-auto-variable.html" title="css/css-fonts/font-face-stretch-auto-variable.html">font-face-stretch-auto-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-stretch-auto-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-stretch-auto-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-stretch-default-variable.html" title="css/css-fonts/font-face-stretch-default-variable.html">font-face-stretch-default-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-stretch-default-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-stretch-default-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-style-auto-static.html" title="css/css-fonts/font-face-style-auto-static.html">font-face-style-auto-static.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-style-auto-static.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-style-auto-static.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-style-auto-variable.html" title="css/css-fonts/font-face-style-auto-variable.html">font-face-style-auto-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-style-auto-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-style-auto-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-style-default-variable.html" title="css/css-fonts/font-face-style-default-variable.html">font-face-style-default-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-style-default-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-style-default-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-weight-auto-static.html" title="css/css-fonts/font-face-weight-auto-static.html">font-face-weight-auto-static.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-weight-auto-static.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-weight-auto-static.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-weight-auto-variable.html" title="css/css-fonts/font-face-weight-auto-variable.html">font-face-weight-auto-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-weight-auto-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-weight-auto-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-weight-default-variable.html" title="css/css-fonts/font-face-weight-default-variable.html">font-face-weight-default-variable.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-weight-default-variable.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-weight-default-variable.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-descriptor-range-reversed.html" title="css/css-fonts/variations/font-descriptor-range-reversed.html">font-descriptor-range-reversed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-descriptor-range-reversed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-descriptor-range-reversed.html"><small>(source)</small></a> </ul> </details> <p>These descriptors define the characteristics of a font face and are used in the process of matching styles to specific faces. For a font family defined with several <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②①">@font-face</a> rules, user agents can either download all faces in the family or use these descriptors to selectively download font faces that match actual styles used in document. The meaning of the values for these descriptors are the same as those for the corresponding font properties except that relative keywords are not allowed, <a class="css" data-link-type="maybe" href="#valdef-font-weight-bolder" id="ref-for-valdef-font-weight-bolder①">bolder</a> and <a class="css" data-link-type="maybe" href="#valdef-font-weight-lighter" id="ref-for-valdef-font-weight-lighter①">lighter</a>. If these descriptors are omitted, initial values are assumed. If specified values are out of range of the accepted values of the property of the same name, the descriptor is treated as a parse error.</p> <p>Ranges are accepted in these three descriptors in place of a single value. Where a single value is specified, it has the same meaning as a range with identical startpoint and endpoint. User agents must swap the computed value of the startpoint and endpoint of the range in order to forbid decreasing ranges. Both endpoints are inclusive. The ranges are used in the <a href="#font-matching-algorithm">Font Matching Algorithm</a> below.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-range-order.html" title="css/css-fonts/font-face-range-order.html">font-face-range-order.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-range-order.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-range-order.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/matching/range-descriptor-reversed.html" title="css/css-fonts/matching/range-descriptor-reversed.html">range-descriptor-reversed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/matching/range-descriptor-reversed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/matching/range-descriptor-reversed.html"><small>(source)</small></a> </ul> </details> <p>The auto values for these three descriptors have the following effects:</p> <ul> <li data-md> <p>For font selection purposes, the font is selected as if the appropriate normal value (<a class="css" data-link-type="maybe" href="#valdef-font-style-normal" id="ref-for-valdef-font-style-normal①">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-font-weight-normal" id="ref-for-valdef-font-weight-normal">normal</a> or <a class="css" data-link-type="maybe" href="#valdef-font-width-normal" id="ref-for-valdef-font-width-normal">normal</a>) is chosen</p> <li data-md> <p>For variation axis clamping, clamping does not occur</p> </ul> <p>The value for these font face style attributes is used in place of the style implied by the underlying font data. This allows authors to combine faces in flexible combinations, even in situations where the original font data was arranged differently. User agents that implement synthetic bolding and obliquing must only apply synthetic styling in cases where the font descriptors imply this is needed, rather than based on the style attributes implied by the font data. However, variation values applied to fonts defined with '@font-face' will be clamped to both the values specified in these descriptors as well as the values supported by the font file itself.</p> <div class="example" id="ex-descriptors-matching"> <a class="self-link" href="#ex-descriptors-matching"></a> The font descriptors defined in this section are used for selecting a font from within the set of fonts defined by <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②②">@font-face</a> rules for a given family. <p>Consider a family containing a single, regular face:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> BaskervilleSimple<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>baskerville-regular.woff2</c-><c- p>);</c-> <c- p>}</c-> </pre> <p>Unstyled text would display using the regular face defined in the <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②③">@font-face</a> rule:</p> <figure><img alt="regular face display" src="images/fiddlesticks-regular.png" width="373"></figure> <p>However, italic text would display in most user agents using synthetically obliqued glyphs from the regular face, since a separate italic face is not defined:</p> <figure><img alt="synthetic italics display" src="images/fiddlesticks-synitalics.png" width="373"></figure> <p>Now consider a family for which an actual italic face is defined:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> BaskervilleFull<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>baskerville-regular.woff2</c-><c- p>);</c-> <c- p>}</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> BaskervilleFull<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>baskerville-italic.woff2</c-><c- p>);</c-> <c- k>font-style</c-><c- p>:</c-> italic<c- p>;</c-> <c- p>}</c-> </pre> <p>The second <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②④">@font-face</a> rule defines the font resource <code class="highlight">baskerville-italic.woff</code> to have style attributes of normal weight, normal stretch and italic style. When displaying italic text, the user agent will use this font, since it’s the closest match for italic text. Thus, the text will display using glyphs designed by a type designer rather than using synthetically obliqued glyphs from the regular face:</p> <figure><img alt="real italics display" src="images/fiddlesticks-italics.png" width="373"></figure> <p>See the section on <a href="#font-style-matching">font matching</a> for more complete details of the process used to select a particular face within a font family.</p> </div> <div class="example" id="ex-descriptors-range"> <a class="self-link" href="#ex-descriptors-range"></a> Fonts may advertise the range of <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①②">font-weight</a>, <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①⑤">font-width</a>, and <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①⓪">font-style</a> they are compatible with. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Lastima<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>lastima-varfont.woff2</c-><c- p>);</c-> <c- k>font-weight</c-><c- p>:</c-> <c- m>100</c-> <c- m>399</c-><c- p>;</c-> <c- p>}</c-> </pre> <p>The above <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②⑤">@font-face</a> rule indicates that <code class="highlight">lastima-varfont.woff</code> should be used when <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①③">font-weight</a> is between 100 and 399. Depending on if there are any other <span class="css" id="ref-for-at-font-face-rule②⑥">@font-face</span> rules which specify <code class="highlight"><c- k>font-family</c-><c- p>:</c-> Lastima</code>, <code class="highlight">lastima-varfont.woff</code> might be used for values of <span class="property" id="ref-for-propdef-font-weight①④">font-weight</span> outside of the 100 - 399 range. For more details, see the <a href="#font-matching-algorithm">§ 5 Font Matching Algorithm</a>.</p> <p>As <a href="#ex-descriptors-matching">above</a>, multiple <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②⑦">@font-face</a> rules may be joined together into a single family, spanning multiple ranges of <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①⑤">font-weight</a>, <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①⑥">font-width</a>, and/or <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①①">font-style</a>:</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Lastima<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>lastima-varfont-lightrange.woff2</c-><c- p>);</c-> <c- k>font-weight</c-><c- p>:</c-> <c- m>100</c-> <c- m>399</c-><c- p>;</c-> <c- p>}</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Lastima<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>lastima-varfont-heavyrange.woff2</c-><c- p>);</c-> <c- k>font-weight</c-><c- p>:</c-> <c- m>400</c-> <c- m>700</c-><c- p>;</c-> <c- p>}</c-> </pre> <p>The above <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule②⑧">@font-face</a> rules indicate that <code class="highlight">lastima-varfont-lightrange.woff</code> should be used when <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①⑥">font-weight</a> is between 100 and 399, whereas lastima-varfont-heavyrange.woff should be used when <span class="property" id="ref-for-propdef-font-weight①⑦">font-weight</span> is between 400 and 700.</p> </div> <h4 class="heading settled" data-level="4.4.1" id="font-stretch-desc"><span class="secno">4.4.1. </span><span class="content"> Font width: the <a class="property css" data-link-type="descriptor">font-stretch</a> legacy name alias</span><a class="self-link" href="#font-stretch-desc"></a></h4> <p>For historical reasons, a <dfn class="dfn-paneled" data-dfn-for="@font-face" data-dfn-type="dfn" data-noexport id="font-face-font-stretch">font-stretch</dfn> descriptor exists which is a <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#legacy-name-alias" id="ref-for-legacy-name-alias①">legacy name alias</a> and functions in the identical way to the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-width" id="ref-for-descdef-font-face-font-width①">font-width</a>.</p> <h3 class="heading settled" data-level="4.5" id="unicode-range-desc"><span class="secno">4.5. </span><span class="content"> Character range: the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range">unicode-range</a> descriptor</span><a class="self-link" href="#unicode-range-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-unicode-range">unicode-range</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule②⑨">@font-face</a> <tr> <th>Value: <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-unicode-range-token" id="ref-for-typedef-unicode-range-token">&lt;unicode-range-token></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma③">#</a> <tr> <th>Initial: <td>U+0-10FFFF </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-unicode-range-2.html" title="css/css-fonts/font-face-unicode-range-2.html">font-face-unicode-range-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-unicode-range-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-unicode-range-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-face-unicode-range-nbsp.html" title="css/css-fonts/font-face-unicode-range-nbsp.html">font-face-unicode-range-nbsp.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-face-unicode-range-nbsp.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-unicode-range-nbsp.html"><small>(source)</small></a> <li class="wpt-test"><span class="wpt-name">font-face-unicode-range.html (visual test) </span><a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-face-unicode-range.html"><small>(source)</small></a> </ul> </details> <p>This descriptor defines the set of Unicode codepoints that may be supported by the font face for which it is declared. The descriptor value is a comma-delimited list of Unicode range token (<a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-unicode-range-token" id="ref-for-typedef-unicode-range-token①">&lt;unicode-range-token></a>) values. The union of these ranges defines the set of codepoints that serves as a hint for user agents when deciding whether or not to download a font resource for a given text run.</p> <p>Each <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-unicode-range-token" id="ref-for-typedef-unicode-range-token②">&lt;unicode-range-token></a> value is a token made up of a "U+" or "u+" prefix followed by a codepoint range in one of the three forms listed below. Ranges that do not fit one of these forms are invalid and cause the declaration to be ignored.</p> <dl> <dt>single codepoint (e.g. U+416) <dd>a Unicode codepoint, represented as one to six hexadecimal digits <dt>interval range (e.g. U+400-4ff) <dd>represented as two hyphen-separated Unicode codepoints indicating the inclusive start and end codepoints of a range <dt>wildcard range (e.g. U+4??) <dd>defined by the set of codepoints implied when trailing '?' characters signify any hexadecimal digit </dl> <p>Individual codepoints are written using hexadecimal values that correspond to <a href="https://www.unicode.org/charts/">Unicode character codepoints</a>. Unicode codepoint values must be between 0 and 10FFFF inclusive. Digit values of codepoints are <a href="https://infra.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a>. For interval ranges, the start and end codepoints must be within the range noted above and the end codepoint must be greater than or equal to the start codepoint.</p> <p>Wildcard ranges specified with ‘?’ that lack an initial digit (e.g. "U+???") are valid and equivalent to a wildcard range with an initial zero digit (e.g. "U+0???" = "U+0000-0FFF"). Wildcard ranges that extend beyond the range of Unicode codepoints are invalid. Because of this, the maximum number of trailing '?' wildcard characters is five, even though the <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization"><code class="highlight" title="UNICODE-RANGE token">UNICODE-RANGE</code></a> token accepts six.</p> <p>Within the comma-delimited list of Unicode ranges in a <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range①">unicode-range</a> descriptor declaration, ranges may overlap. The union of these ranges defines the set of codepoints for which the corresponding font may be used. User agents must not download or use the font for codepoints outside this set. User agents may normalize the list of ranges into a list that is different but represents the same set of codepoints.</p> <p>The associated font might not contain glyphs for the entire set of codepoints defined by the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range②">unicode-range</a> descriptor. When the font is used, the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="effective-character-map">effective character map</dfn> is the intersection of the codepoints defined by <span class="property" id="ref-for-descdef-font-face-unicode-range③">unicode-range</span> with the font’s <a data-link-type="dfn" href="#character-map" id="ref-for-character-map②">character map</a>. This allows authors to define supported ranges in terms of broad ranges without worrying about the precise codepoint ranges supported by the underlying font.</p> <h4 class="heading settled" data-level="4.5.1" id="composite-fonts"><span class="secno">4.5.1. </span><span class="content">Using character ranges to define composite fonts</span><a class="self-link" href="#composite-fonts"></a></h4> <p>Multiple <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③⓪">@font-face</a> rules with different unicode ranges for the same family and style descriptor values can be used to create composite fonts that mix the glyphs from different fonts for different scripts. This can be used to combine fonts that only contain glyphs for a single script (e.g. Latin, Greek, Cyrillic) or it can be used by authors as a way of segmenting a font into fonts for commonly used characters and less frequently used characters. Since the user agent will only pull down the fonts it needs this helps reduce page bandwidth.</p> <p>If the unicode ranges overlap for a set of <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③①">@font-face</a> rules with the same family and style descriptor values, the rules are ordered in the reverse order they were defined; the last rule defined is the first to be checked for a given character.</p> <p>Example ranges for specific languages or characters:</p> <dl> <dt>unicode-range: U+A5; <dd>a single code point, the yen/yuan symbol <dt>unicode-range: U+0-7F; <dd>code range for basic ASCII characters <dt>unicode-range: U+590-5ff; <dd>code range for Hebrew characters <dt>unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F; <dd>code range for Japanese kanji, hiragana and katakana characters plus yen/yuan symbol </dl> <div class="example" id="ex-urange-bengali"> <a class="self-link" href="#ex-urange-bengali"></a> The BBC provides news services in a wide variety of languages, many that are not well supported across all platforms. Using an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③②">@font-face</a> rule, the BBC could provide a font for any of these languages, as it already does via a manual font download. <p></p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> BBCBengali<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>fonts/BBCBengali.woff</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"woff"</c-><c- p>);</c-> <c- k>unicode-range</c-><c- p>:</c-> U<c- m>+00</c-><c- k>-FF</c-><c- p>,</c-> U<c- m>+980</c-><c- k>-</c-><c- m>9</c-><c- k>FF</c-><c- p>;</c-> <c- p>}</c-> </pre> </div> <div class="example" id="ex-stix"> <a class="self-link" href="#ex-stix"></a> Technical documents often require a wide range of symbols. The STIX Fonts project is one project aimed at providing fonts to support a wide range of technical typesetting in a standardized way. The example below shows the use of a font that provides glyphs for many of the mathematical and technical symbol ranges within Unicode: <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> STIXGeneral<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->STIXGeneral<c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>/stixfonts/STIXGeneral.otf</c-><c- p>);</c-> <c- k>unicode-range</c-><c- p>:</c-> U<c- m>+000</c-><c- k>-</c-><c- m>49</c-><c- k>F</c-><c- p>,</c-> U<c- m>+2000</c-><c- k>-</c-><c- m>27</c-><c- k>FF</c-><c- p>,</c-> U<c- m>+2900</c-><c- k>-</c-><c- m>2</c-><c- k>BFF</c-><c- p>,</c-> U<c- m>+1</c-><c- k>D</c-><c- m>400</c-><c- k>-</c-><c- m>1</c-><c- k>D</c-><c- m>7</c-><c- k>FF</c-><c- p>;</c-> <c- p>}</c-> </pre> </div> <div class="example" id="ex-better-latin"> <a class="self-link" href="#ex-better-latin"></a> This example shows how an author can override the glyphs used for Latin characters in a Japanese font with glyphs from a different font. The first rule specifies no range so it defaults to the entire range. The range specified in the second rule overlaps but takes precedence because it is defined later. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> JapaneseWithGentium<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->MSMincho<c- p>);</c-> <c- c>/* no range specified, defaults to entire range */</c-> <c- p>}</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> JapaneseWithGentium<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>../fonts/Gentium.woff</c-><c- p>);</c-> <c- k>unicode-range</c-><c- p>:</c-> U<c- m>+0</c-><c- k>-</c-><c- m>2</c-><c- k>FF</c-><c- p>;</c-> <c- p>}</c-> </pre> </div> <div class="example" id="ex-subset-ftw"> <a class="self-link" href="#ex-subset-ftw"></a> Consider a family constructed to optimize bandwidth by separating out Latin, Japanese and other characters into different font files: <pre class="highlight"><c- c>/* fallback font - size: 4.5MB */</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> DroidSans<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>DroidSansFallback.woff</c-><c- p>);</c-> <c- c>/* no range specified, defaults to entire range */</c-> <c- p>}</c-> <c- c>/* Japanese glyphs - size: 1.2MB */</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> DroidSans<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>DroidSansJapanese.woff</c-><c- p>);</c-> <c- k>unicode-range</c-><c- p>:</c-> U<c- m>+3000</c-><c- k>-</c-><c- m>9</c-><c- k>FFF</c-><c- p>,</c-> U+ff??<c- p>;</c-> <c- p>}</c-> <c- c>/* Latin, Greek, Cyrillic along with some</c-> <c- c> punctuation and symbols - size: 190KB */</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> DroidSans<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>DroidSans.woff</c-><c- p>);</c-> <c- k>unicode-range</c-><c- p>:</c-> U<c- m>+000</c-><c- k>-</c-><c- m>5</c-><c- k>FF</c-><c- p>,</c-> U<c- m>+1e00</c-><c- k>-</c-><c- m>1</c-><c- k>fff</c-><c- p>,</c-> U<c- m>+2000</c-><c- k>-</c-><c- m>2300</c-><c- p>;</c-> <c- p>}</c-> </pre> <p>For simple Latin text, only the font for Latin characters is downloaded:</p> <pre class="highlight">body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> DroidSans<c- p>;</c-> <c- p>}</c-> &lt;p>This is that&lt;/p> </pre> <p>In this case the user agent first checks the unicode-range for the font containing Latin characters (DroidSans.woff). Since all the characters above are in the range U+0-5FF, the user agent downloads the font and renders the text with that font.</p> <p>Next, consider text that makes use of an arrow character (⇨):</p> <pre class="highlight">&lt;p>This &amp;#x21e8<c- p>;</c-> that&lt;p> </pre> <p>The user agent again first checks the unicode-range of the font containing Latin characters. Since U+2000-2300 includes the arrow code point (U+21E8), the user agent downloads the font. For this character however the Latin font does not have a matching glyph, so the effective unicode-range used for font matching excludes this code point. Next, the user agent evaluates the Japanese font. The unicode-range for the Japanese font, U+3000-9FFF and U+ff??, does not include U+21E8, so the user agent does not download the Japanese font. Next the fallback font is considered. The <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③③">@font-face</a> rule for the fallback font does not define unicode-range so its value defaults to the range of all Unicode code points. The fallback font is downloaded and used to render the arrow character.</p> </div> <h3 class="heading settled" data-level="4.6" id="font-rend-desc"><span class="secno">4.6. </span><span class="content"> Font features and variations: the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-feature-settings" id="ref-for-descdef-font-face-font-feature-settings">font-feature-settings</a> and <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-variation-settings" id="ref-for-descdef-font-face-font-variation-settings">font-variation-settings</a> descriptors</span><a class="self-link" href="#font-rend-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-feature-settings">font-feature-settings</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule③④">@font-face</a> <tr> <th>Value: <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧⑤">|</a> <a class="production css" data-link-type="type">&lt;feature-tag-value></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma④">#</a> <tr> <th>Initial: <td>normal </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-resolution-001.html" title="css/css-fonts/font-feature-resolution-001.html">font-feature-resolution-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-resolution-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-resolution-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-resolution-002.html" title="css/css-fonts/font-feature-resolution-002.html">font-feature-resolution-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-resolution-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-resolution-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-settings-descriptor-01.html" title="css/css-fonts/font-feature-settings-descriptor-01.html">font-feature-settings-descriptor-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-settings-descriptor-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-settings-descriptor-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-settings-serialization-001.html" title="css/css-fonts/font-feature-settings-serialization-001.html">font-feature-settings-serialization-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-settings-serialization-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-settings-serialization-001.html"><small>(source)</small></a> </ul> </details> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-variation-settings">font-variation-settings</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule③⑤">@font-face</a> <tr> <th>Value: <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧⑥">|</a> [ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value③">&lt;string></a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value④">&lt;number></a>]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma⑤">#</a> <tr> <th>Initial: <td>normal </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/calc-in-font-variation-settings.html" title="css/css-fonts/calc-in-font-variation-settings.html">calc-in-font-variation-settings.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/calc-in-font-variation-settings.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/calc-in-font-variation-settings.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variation-settings-serialization-001.html" title="css/css-fonts/font-variation-settings-serialization-001.html">font-variation-settings-serialization-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variation-settings-serialization-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variation-settings-serialization-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-variation-settings-composition.html" title="css/css-fonts/animations/font-variation-settings-composition.html">font-variation-settings-composition.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-variation-settings-composition.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-variation-settings-composition.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-variation-settings-interpolation.html" title="css/css-fonts/animations/font-variation-settings-interpolation.html">font-variation-settings-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-variation-settings-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-variation-settings-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variation-settings-computed.html" title="css/css-fonts/parsing/font-variation-settings-computed.html">font-variation-settings-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variation-settings-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variation-settings-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variation-settings-invalid.html" title="css/css-fonts/parsing/font-variation-settings-invalid.html">font-variation-settings-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variation-settings-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variation-settings-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variation-settings-valid.html" title="css/css-fonts/parsing/font-variation-settings-valid.html">font-variation-settings-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variation-settings-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variation-settings-valid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/font-variation-settings-inherit.html" title="css/css-fonts/variations/font-variation-settings-inherit.html">font-variation-settings-inherit.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/font-variation-settings-inherit.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/font-variation-settings-inherit.html"><small>(source)</small></a> </ul> </details> <p>These descriptors define initial settings that apply when the font defined by an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③⑥">@font-face</a> rule is rendered. They do not affect font selection. Values are identical to those defined for the corresponding <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①">font-feature-settings</a> and <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings①">font-variation-settings</a> properties defined below except that the <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords⑤">CSS-wide keywords</a> are omitted. When multiple font feature descriptors, properties, or variations are used, optionally along with a named instance, the cumulative effect on text rendering is detailed in the section <a href="#font-feature-variation-resolution">§ 7 Font Feature and Variation Resolution</a> below.</p> <p>These descriptors set features and variation values on the font object which the <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③⑦">@font-face</a> rule represents, rather than on an entire element. Therefore, when using these descriptors, only some glyphs in an element may be rendered with that feature, due to <a href="#cluster-matching">§ 5.3 Cluster matching</a>.</p> <h3 class="heading settled" data-level="4.7" id="font-named-instance"><span class="secno">4.7. </span><span class="content">Using named instances from variable fonts: the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-named-instance" id="ref-for-descdef-font-face-font-named-instance">font-named-instance</a> descriptor</span><a class="self-link" href="#font-named-instance"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-named-instance">font-named-instance</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule③⑧">@font-face</a> <tr> <th>Value: <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧⑦">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value④">&lt;string></a> <tr> <th>Initial: <td>auto </table> <p>If the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-named-instance" id="ref-for-descdef-font-face-font-named-instance①">font-named-instance</a> descriptor is set to a value other than <span class="css">auto</span>, then the appropriate stage in the <a href="#font-feature-variation-resolution">§ 7 Font Feature and Variation Resolution</a> will inspect the font file to find the first named instance in the font which has a localized name equal to the given <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value⑤">&lt;string></a> according to the rules given in <a href="#localized-name-matching">§ 5.1 Localized name matching</a>. If no such named instance exists, this descriptor is treated as if it has a value of <a class="property" data-link-type="propdesc">auto</a>. Otherwise, this named instance’s variation axis values are applied to this position in the <a href="#font-feature-variation-resolution">§ 7 Font Feature and Variation Resolution</a>.</p> <div class="example" id="ex-grotesque-XHGT"> <a class="self-link" href="#ex-grotesque-XHGT"></a> For example, the following <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule③⑨">@font-face</a> block will apply the instance named "Grotesque" but will override the "XHGT" axis to have a value of 0.7. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"AccuroVar"</c-><c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"accurovar.otf"</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"opentype"</c-><c- p>);</c-> <c- k>font-named-instance</c-><c- p>:</c-> <c- s>"Grotesque"</c-><c- p>;</c-> <c- k>font-variation-settings</c-><c- p>:</c-> <c- s>"XHGT"</c-> <c- m>0.7</c-><c- p>;</c-> <c- p>}</c-> </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> Because the variation axis values supplied in the <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①⑧">font-weight</a>, <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①⑦">font-width</a>, and <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①②">font-style</a> properties are applied before the value in the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-named-instance" id="ref-for-descdef-font-face-font-named-instance②">font-named-instance</a> descriptor, there is no need to change the value of those properties when a named instance is desired.</p> <h3 class="heading settled" data-level="4.8" id="font-requests"><span class="secno">4.8. </span><span class="content">Font request guidelines</span><a class="self-link" href="#font-requests"></a></h3> <h4 class="heading settled" data-level="4.8.1" id="font-face-loading"><span class="secno">4.8.1. </span><span class="content">Font loading guidelines</span><a class="self-link" href="#font-face-loading"></a></h4> <p>The <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④⓪">@font-face</a> rule is designed to allow lazy loading of font resources that are only downloaded when used within a document. A stylesheet can include <span class="css" id="ref-for-at-font-face-rule④①">@font-face</span> rules for a library of fonts of which only a select set are used; user agents must only download those fonts that are referred to within the style rules applicable to a given page. User agents that download all fonts defined in <span class="css" id="ref-for-at-font-face-rule④②">@font-face</span> rules without considering whether those fonts are in fact used within a page are considered non-conformant. In cases where a font might be downloaded in character fallback cases, user agents may download a font if it’s contained within the computed value of <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family⑨">font-family</a> for a given text run.</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> GeometricModern<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>font.woff</c-><c- p>);</c-> <c- p>}</c-> p <c- p>{</c-> <c- c>/* font will be downloaded for pages with p elements */</c-> font-family: GeometricModern<c- p>,</c-> sans-serif<c- p>;</c-> <c- p>}</c-> h2 <c- p>{</c-> <c- c>/* font may be downloaded for pages with h2 elements, even if Futura is available locally */</c-> font-family: Futura<c- p>,</c-> GeometricModern<c- p>,</c-> sans-serif<c- p>;</c-> <c- p>}</c-> </pre> <p>In cases where textual content is loaded before downloadable fonts are available, user agents must render text according to the <a class="property" data-link-type="propdesc" href="#descdef-font-face-font-display" id="ref-for-descdef-font-face-font-display">font-display</a> descriptor of that <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④③">@font-face</a> block. In cases where the font download fails, user agents must display the text visibly. Authors are advised to use fallback fonts in their font lists that closely match the metrics of the downloadable fonts to avoid large page reflows where possible.</p> <h4 class="heading settled" data-level="4.8.2" id="font-fetching-requirements"><span class="secno">4.8.2. </span><span class="content"> Font fetching requirements</span><span id="same-origin-restriction"></span><span id="allowing-cross-origin-font-loading"></span><a class="self-link" href="#font-fetching-requirements"></a></h4> <div class="algorithm" data-algorithm="fetch a font"> To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="fetch-a-font">fetch a font</dfn> given a selected <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#url-value" id="ref-for-url-value①">&lt;url></a> <var>url</var> for <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④④">@font-face</a> <var>rule</var>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#fetch-a-style-resource" id="ref-for-fetch-a-style-resource">fetch</a> <var>url</var>, with stylesheet being <var>rule</var>’s <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-1/#concept-css-rule-parent-css-style-sheet" id="ref-for-concept-css-rule-parent-css-style-sheet">parent CSS style sheet</a>, destination "font", CORS mode "cors", and processResponse being the following steps given <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response" id="ref-for-concept-response">response</a> <var>res</var> and null, failure or a byte stream <var>stream</var>: <ol> <li data-md> <p>If <var>stream</var> is null, return.</p> <li data-md> <p class="issue" id="issue-518894d9"><a class="self-link" href="#issue-518894d9"></a> Load a font from <var>stream</var> according to its type.</p> </ol> </div> <p class="note" role="note"><span class="marker">Note:</span> The implications of this for authors are that fonts will typically not be loaded cross-origin unless authors specifically take steps to permit cross-origin loads. Sites can explicitly allow cross-site loading of font data using the <code class="highlight">Access-Control-Allow-Origin</code> HTTP header. For other schemes, no explicit mechanism to allow cross-origin loading, beyond what is permitted by the <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-fetch" id="ref-for-concept-fetch">fetch</a> algorithm, is defined or required.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/test_datafont_same_origin.html" title="css/css-fonts/test_datafont_same_origin.html">test_datafont_same_origin.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/test_datafont_same_origin.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test_datafont_same_origin.html"><small>(source)</small></a> </ul> </details> <div class="example" id="ex-cross-origin"> <a class="self-link" href="#ex-cross-origin"></a> For the examples given below, assume that a document is located at <code class="highlight"><c- k>https</c-><c- p>:</c->//example.com/page.html</code> and all URLs link to valid font resources supported by the user agent. <p>Fonts defined with the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src⑥">src</a> descriptor values below will be loaded:</p> <pre class="highlight"><c- c>/* same origin (i.e. domain, scheme, port match document) */</c->src: <c- nf>url</c-><c- p>(</c-><c- s>fonts/simple.woff</c-><c- p>);</c-> <c- c>/* data urls with no redirects are treated as same origin */</c-> src: <c- nf>url</c-><c- p>(</c-><c- s>"data:application/font-woff;base64,..."</c-><c- p>);</c-> <c- c>/* cross origin, different domain */</c-> <c- c>/* Access-Control-Allow-Origin response header set to '*' */</c-> src: <c- nf>url</c-><c- p>(</c-><c- s>http://another.example.com/fonts/simple.woff</c-><c- p>);</c-> </pre> <p>Fonts defined with the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src⑦">src</a> descriptor values below will fail to load:</p> <pre class="highlight"><c- c>/* cross origin, different scheme *//* no Access-Control-xxx headers in response */</c-> src: <c- nf>url</c-><c- p>(</c-><c- s>http://example.com/fonts/simple.woff</c-><c- p>);</c-> <c- c>/* cross origin, different domain */</c-> <c- c>/* no Access-Control-xxx headers in response */</c-> src: <c- nf>url</c-><c- p>(</c-><c- s>http://another.example.com/fonts/simple.woff</c-><c- p>);</c-> </pre> </div> <h3 class="heading settled" data-level="4.9" id="font-display-desc"><span class="secno">4.9. </span><span class="content"> Controlling Font Display Per Font-Face: the <a class="property css" data-link-type="descriptor" href="#descdef-font-feature-values-font-display" id="ref-for-descdef-font-feature-values-font-display">font-display</a> descriptor</span><a class="self-link" href="#font-display-desc"></a></h3> <p>The <a class="property" data-link-type="propdesc" href="#descdef-font-face-font-display" id="ref-for-descdef-font-face-font-display①">font-display</a> descriptor for <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④⑤">@font-face</a> determines how a font face is displayed, based on whether and when it is downloaded and ready to use.</p> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-display">font-display</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule④⑥">@font-face</a> <tr> <th>Value: <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧⑧">|</a> block <span id="ref-for-comb-one⑧⑨">|</span> swap <span id="ref-for-comb-one⑨⓪">|</span> fallback <span id="ref-for-comb-one⑨①">|</span> optional <tr> <th>Initial: <td>auto </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-display/font-display-change.html" title="css/css-fonts/font-display/font-display-change.html">font-display-change.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-display/font-display-change.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-display/font-display-change.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-display/font-display-failure-fallback.html" title="css/css-fonts/font-display/font-display-failure-fallback.html">font-display-failure-fallback.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-display/font-display-failure-fallback.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-display/font-display-failure-fallback.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-display/font-display-preload.html" title="css/css-fonts/font-display/font-display-preload.html">font-display-preload.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-display/font-display-preload.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-display/font-display-preload.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-display/font-display.html" title="css/css-fonts/font-display/font-display.html">font-display.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-display/font-display.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-display/font-display.html"><small>(source)</small></a> </ul> </details> <p class="note" role="note"><span class="marker">Note:</span> For all of these values, user agents may use slightly different durations, or more sophisticated behaviors that can’t be directly expressed in the <a class="property" data-link-type="propdesc" href="#descdef-font-face-font-display" id="ref-for-descdef-font-face-font-display②">font-display</a> syntax, in order to provide more useful behavior for their users. They may also provide the ability for users to override author-chosen behavior with something more desirable; for example, forcing all fonts to have a <span class="css">0s</span> <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period③">block period</a>.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="@font-face/font-display" data-dfn-type="value" data-export id="valdef-font-face-font-display-auto">auto</dfn> <dd> The font display policy is user-agent-defined. <p class="note" role="note"><span class="marker">Note:</span> Many browsers have a default policy similar to that specified by <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-display-4/#valdef-display-block" id="ref-for-valdef-display-block">block</a>.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="@font-face/font-display" data-dfn-type="value" data-export id="valdef-font-face-font-display-block">block</dfn> <dd> Gives the font face a short <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period④">block period</a> (<span class="css">3s</span> is recommended in most cases) and an infinite <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period③">swap period</a>. <p class="note" role="note"><span class="marker">Note:</span> In other words, the browser draws "invisible" text at first if it’s not loaded, but swaps the font face in as soon as it loads.</p> <p>This value must only be used when rendering text in a particular font is required for the page to be usable. It must only be used for small pieces of text.</p> <div class="example" id="ex-bad-icon-fonts"> <a class="self-link" href="#ex-bad-icon-fonts"></a> For example, badly designed "icon fonts" might associate a "⎙" (printer) icon with an unrelated character like "P", so if the text is displayed with a fallback font instead there will be confusing letters scattered around the page rather than the desired icon. In this case, temporary blank spots are better than using a fallback font. <p>(However, the fallback font is used <em>eventually</em>, as having confusing letters scattered around the page is better than having links and such never show up at all.)</p> <p>A better solution is described in the <a href="#a11y">Accessibility Considerations</a> section.</p> </div> <dt><dfn class="dfn-paneled css" data-dfn-for="@font-face/font-display" data-dfn-type="value" data-export id="valdef-font-face-font-display-swap">swap</dfn> <dd> Gives the font face an extremely small <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period⑤">block period</a> (<span class="css">100ms</span> or less is recommended in most cases) and an infinite <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period④">swap period</a>. <p class="note" role="note"><span class="marker">Note:</span> In other words, the browser draws the text immediately with a fallback if the font face isn’t loaded, but swaps the font face in as soon as it loads.</p> <p>This value should only be used when rendering text in a particular font is very important for the page, but rendering in any font will still get a correct message across. It should only be used for small pieces of text.</p> <div class="example" id="ex-logo-font"><a class="self-link" href="#ex-logo-font"></a> For example, if a website has a custom font for rendering their logo, rendering that logo correctly is fairly important for branding purposes, but displaying the logo in any font will at least get the point across without confusion. </div> <dt><dfn class="dfn-paneled css" data-dfn-for="@font-face/font-display" data-dfn-type="value" data-export id="valdef-font-face-font-display-fallback">fallback</dfn> <dd> Gives the font face an extremely small <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period⑥">block period</a> (<span class="css">100ms</span> or less is recommended in most cases) and a short <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period⑤">swap period</a> (<span class="css">3s</span> is recommended in most cases). <p class="note" role="note"><span class="marker">Note:</span> In other words, the font face is rendered with a fallback at first if it’s not loaded, but it’s swapped in as soon as it loads. However, if too much time passes, the fallback will be used for the rest of the page’s lifetime instead.</p> <p>This value should be used for body text, or any other text where the use of the chosen font is useful and desired, but it’s acceptable for the user to see the text in a fallback font. This value is appropriate to use for large pieces of text.</p> <div class="example" id="ex-avoid-shifting"><a class="self-link" href="#ex-avoid-shifting"></a> For example, in large pieces of body text, it’s most important just to get the text rendered quickly, so the user can begin to read as quickly as possible. Further, once the user has started reading, they shouldn’t be disturbed by the text suddenly "shifting" as a new font is swapped in, as that’s distracting and annoying to re-find where one was in the text. </div> <dt><dfn class="dfn-paneled css" data-dfn-for="@font-face/font-display" data-dfn-type="value" data-export id="valdef-font-face-font-display-optional">optional</dfn> <dd> If the font can be loaded "immediately" (such that it’s available to be used for the "first paint" of the text), the font is used. <p>Otherwise, the font is treated as if its <a data-link-type="dfn" href="#font-block-period" id="ref-for-font-block-period⑦">block period</a> and <a data-link-type="dfn" href="#font-swap-period" id="ref-for-font-swap-period⑥">swap period</a> both expired before it finished loading. If the font is not used due to this, the user agent may choose to abort the font download, or download it with a very low priority. If the user agent believes it would be useful for the user, it may avoid even starting the font download, and proceed immediately to using a fallback font.</p> <p>An <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional①">optional</a> font <strong>must never</strong> cause the layout of the page to "jump" as it loads in. A user agent <em>may</em> choose to slightly delay rendering an element using an optional font to give it time to load from a possibly-slow local cache, but once the text has been painted to the screen with a fallback font instead, it must not be rendered with the <span class="css" id="ref-for-valdef-font-face-font-display-optional②">optional</span> font for the rest of the page’s lifetime.</p> <p>This value should be used for body text, or any other text where the chosen font is purely a decorative "nice-to-have". It should be used anytime it is more important that the web page render quickly on first visit, than it is that the user wait a longer time to see everything perfect immediately.</p> <div class="example" id="ex-perfectly-readable"> <a class="self-link" href="#ex-perfectly-readable"></a> For example, body text is perfectly readable in one of the browser default fonts, though a downloadable font face might be more attractive and mesh with the site’s aesthetics better. First time visitors to a site generally care far more about the site being quickly usable than they do about the finer points of its display, and <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional③">optional</a> provides a good behavior for them. If they return later, the desired font faces might have finished downloading, giving them the "intended" experience without slowing down either their first or subsequent visits. <p>Users on very slow connections might not ever receive the "intended" experience, but <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional④">optional</a> ensures they can actually <em>use</em> the site, rather than quitting and going elsewhere because the site takes too long to load.</p> </div> <div class="note" role="note"> To increase the chance that an <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional⑤">optional</a> font will be available in time to use for rendering some text, it is recommended that the user agent employ heuristics to make it faster to access or to judge when it would be worthwhile to delay rendering some text, such as checking if the font is preloaded in HTML, or moving the file from slower to faster in-memory caches as soon as it is seen in a stylesheet (before it’s known whether it will be used on the page). <p>These heuristics cannot be relied upon by authors, however; it must be understood that the <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional⑥">optional</a> value can result in the font never being used. If a somewhat higher assurance of the font being used is needed, authors should consider using the <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-fallback" id="ref-for-valdef-font-face-font-display-fallback①">fallback</a> value.</p> </div> </dl> <h4 class="heading settled" data-level="4.9.1" id="font-display-font-feature-values"><span class="secno">4.9.1. </span><span class="content"> Controlling Font Display Per Font-Family via <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values">@font-feature-values</a></span><a class="self-link" href="#font-display-font-feature-values"></a></h4> <p>The <a class="property" data-link-type="propdesc" href="#descdef-font-feature-values-font-display" id="ref-for-descdef-font-feature-values-font-display①">font-display</a> descriptor for <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①">@font-feature-values</a> determines how a font family is displayed, by setting the "default" font-display value for <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④⑦">@font-face</a> rules targeting the same font family. When <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-display" id="ref-for-descdef-font-face-font-display③">font-display</a> is omitted in an <span class="css" id="ref-for-at-font-face-rule④⑧">@font-face</span> rule, the user agent uses the <span class="property" id="ref-for-descdef-font-feature-values-font-display②">font-display</span> value set via <span class="css" id="ref-for-at-ruledef-font-feature-values②">@font-feature-values</span> for the relevant font-family if one is set, and otherwise defaults to <span class="css" id="ref-for-descdef-font-face-font-display④">font-display: auto</span>.</p> <p>This mechanism can be used to set a default display policy for an entire font-family, and enables developers to set a display policy for <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule④⑨">@font-face</a> rules that are not directly under their control. For example, when a font is served by a third-party font foundry, the developer does not control the <span class="css" id="ref-for-at-font-face-rule⑤⓪">@font-face</span> rules but is still able to set a default font-display policy for the provided font-family. The ability to set a default policy for an entire font-family is also useful to avoid the ransom note effect (i.e. mismatched font faces) because the display policy is then applied to the entire font family.</p> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-feature-values" data-dfn-type="descriptor" data-export id="descdef-font-feature-values-font-display">font-display</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values③">@font-feature-values</a> <tr> <th>Value: <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨②">|</a> block <span id="ref-for-comb-one⑨③">|</span> swap <span id="ref-for-comb-one⑨④">|</span> fallback <span id="ref-for-comb-one⑨⑤">|</span> optional <tr> <th>Initial: <td>auto </table> <h3 class="heading settled" data-level="4.10" id="font-language-override-desc"><span class="secno">4.10. </span><span class="content"> Default font language overriding: the <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override②">font-language-override</a> descriptor</span><a class="self-link" href="#font-language-override-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-font-language-override">font-language-override</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤①">@font-face</a> <tr> <th>Value: <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨⑥">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value⑥">&lt;string></a> <tr> <th>Initial: <td>normal </table> <p>This descriptor defines initial settings that apply when the font defined by an @font-face rule is rendered. It does not affect font selection. Values are identical to those defined for the <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override③">font-language-override</a> property defined below except that the value inherit is omitted. When multiple font feature descriptors, properties, or variations are used, the cumulative effect on text rendering is detailed in the section <a href="#font-feature-variation-resolution">§ 7 Font Feature and Variation Resolution</a> below.</p> <h3 class="heading settled" data-level="4.11" id="font-metrics-override-desc"><span class="secno">4.11. </span><span class="content"> Default font metrics overriding: the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-ascent-override" id="ref-for-descdef-font-face-ascent-override">ascent-override</a>, <a class="property css" data-link-type="descriptor" href="#descdef-font-face-descent-override" id="ref-for-descdef-font-face-descent-override">descent-override</a> and <a class="property css" data-link-type="descriptor" href="#descdef-font-face-line-gap-override" id="ref-for-descdef-font-face-line-gap-override">line-gap-override</a> descriptors</span><a class="self-link" href="#font-metrics-override-desc"></a></h3> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-ascent-override">ascent-override</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤②">@font-face</a> <tr> <th>Value: <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨⑦">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value③">&lt;percentage [0,∞]></a> <tr> <th>Initial: <td>normal </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/ascent-descent-override.html" title="css/css-fonts/ascent-descent-override.html">ascent-descent-override.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/ascent-descent-override.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/ascent-descent-override.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/metrics-override-normal-keyword.html" title="css/css-fonts/metrics-override-normal-keyword.html">metrics-override-normal-keyword.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/metrics-override-normal-keyword.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/metrics-override-normal-keyword.html"><small>(source)</small></a> </ul> </details> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-descent-override">descent-override</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤③">@font-face</a> <tr> <th>Value: <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨⑧">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value④">&lt;percentage [0,∞]></a> <tr> <th>Initial: <td>normal </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/ascent-descent-override.html" title="css/css-fonts/ascent-descent-override.html">ascent-descent-override.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/ascent-descent-override.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/ascent-descent-override.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/metrics-override-normal-keyword.html" title="css/css-fonts/metrics-override-normal-keyword.html">metrics-override-normal-keyword.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/metrics-override-normal-keyword.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/metrics-override-normal-keyword.html"><small>(source)</small></a> </ul> </details> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-face" data-dfn-type="descriptor" data-export id="descdef-font-face-line-gap-override">line-gap-override</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤④">@font-face</a> <tr> <th>Value: <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨⑨">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value⑤">&lt;percentage [0,∞]></a> <tr> <th>Initial: <td>normal </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/line-gap-override.html" title="css/css-fonts/line-gap-override.html">line-gap-override.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/line-gap-override.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/line-gap-override.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/metrics-override-normal-keyword.html" title="css/css-fonts/metrics-override-normal-keyword.html">metrics-override-normal-keyword.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/metrics-override-normal-keyword.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/metrics-override-normal-keyword.html"><small>(source)</small></a> </ul> </details> <p>The <a class="property css" data-link-type="descriptor" href="#descdef-font-face-ascent-override" id="ref-for-descdef-font-face-ascent-override①">ascent-override</a>, <a class="property css" data-link-type="descriptor" href="#descdef-font-face-descent-override" id="ref-for-descdef-font-face-descent-override①">descent-override</a> and <a class="property css" data-link-type="descriptor" href="#descdef-font-face-line-gap-override" id="ref-for-descdef-font-face-line-gap-override①">line-gap-override</a> descriptors define the <a data-link-type="dfn" href="https://drafts.csswg.org/css-inline-3/#ascent-metric" id="ref-for-ascent-metric">ascent metric</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-inline-3/#descent-metric" id="ref-for-descent-metric">descent metric</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-inline-3/#line-gap-metric" id="ref-for-line-gap-metric">line gap metric</a> of the font, respectively.</p> <p>When the descriptor value is <a class="css" data-link-type="maybe" href="#font-variant-ligatures-normal-value" id="ref-for-font-variant-ligatures-normal-value">normal</a>, the corresponding metric value is obtained from the font file directly.</p> <p class="note" role="note"><span class="marker">Note:</span> User agents may draw data from different places from the font file as the metric values, which results in different text layouts.</p> <p>When the descriptor value is a percentage, the corresponding metric value is resolved as the given percentage multiplied by the used font size. Negative values are invalid at parse time.</p> <div class="example" id="ex-percent-resolve"> <a class="self-link" href="#ex-percent-resolve"></a> The percentage is resolved against different font sizes for different elements. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> overridden-font<c- p>;</c-> <c- k>ascent-override</c-><c- p>:</c-> <c- m>50</c-><c- k>%</c-><c- p>;</c-> ... <c- p>}</c-> &lt;span style=<c- s>"font-family: overridden-font; font-size: 20px;"</c->> Outer span content &lt;span style=<c- s>"font-size: 150%;"</c->>Inner span content&lt;/span> &lt;/span> </pre> <p>The outer span uses an <a data-link-type="dfn" href="https://drafts.csswg.org/css-inline-3/#ascent-metric" id="ref-for-ascent-metric①">ascent</a> value of 10px, whereas the inner span uses 15px.</p> </div> <div class="example" id="ex-override-local-metrics"> <a class="self-link" href="#ex-override-local-metrics"></a> We may override the metrics of a local fallback font to match the primary font, which is a web font. This reduces layout shifting when switching from fallback to the primary font. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> cool-web-font<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"https://example.com/font.woff"</c-><c- p>);</c-> <c- p>}</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> fallback-to-local<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c->Some Local Font<c- p>);</c-> <c- c>/* Override metric values to match cool-web-font */</c-> ascent-override: <c- m>125</c-><c- k>%</c-><c- p>;</c-> <c- k>descent-override</c-><c- p>:</c-> <c- m>25</c-><c- k>%</c-><c- p>;</c-> <c- k>line-gap-override</c-><c- p>:</c-> <c- m>0</c-><c- k>%</c-><c- p>;</c-> <c- p>}</c-> &lt;div style=<c- s>"font-family: cool-web-font, fallback-to-local"</c->>Title goes here&lt;/div> &lt;img src=<c- s>"https://example.com/largeimage"</c-> alt=<c- s>"A large image that you don’t want to shift"</c->> </pre> <p>The image will not be vertically shifted when the user agent finishes loading and switches to use the web font.</p> </div> <h2 class="heading settled" data-level="5" id="font-matching-algorithm"><span class="secno">5. </span><span class="content">Font Matching Algorithm</span><a class="self-link" href="#font-matching-algorithm"></a></h2> <p>The algorithm below describes how fonts are associated with individual runs of text. For each character in the run a font family is chosen and a particular font face is selected containing a glyph for that character.</p> <p>The set of <a href="#installed-fonts">installed fonts</a> available to the Font Matching Algorithm is explicitly undefined.</p> <p>The default set of installed fonts will vary by UA, platform, and locale; it is important that users be able to customise which installed fonts are available for rendering web pages and to which generic font families, if any, these fonts are mapped.</p> <p>UAs may choose to expose all installed fonts to the web, regardless of how that font was installed; doing so is likely to have good internationalization properties for users whose primary language is not supported by fonts shipping with their operating system.</p> <p>UAs may alternatively choose to not initially expose any user-installed fonts to aid privacy on the web; for the set of installed fonts a user has installed is often used as a tracking vector to track users across the web. Users should then be able to add to or remove fonts from that set, according to their needs.</p> <p>UAs may choose a hybrid approach, where some user-installed fonts are initially exposed for internationalization, but others aren’t. Again, users should be able to customise this starting set.</p> <p>UAs are expected to make informed decisions on which fonts they expose to the web by default, so as to balance between internationalization and privacy. UAs are expected to also provide a convenient means for users to add and subtract fonts to meet their particular needs.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/fallback-remote-to-data-url.html" title="css/css-fonts/fallback-remote-to-data-url.html">fallback-remote-to-data-url.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/fallback-remote-to-data-url.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/fallback-remote-to-data-url.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/fallback-url-to-local.html" title="css/css-fonts/fallback-url-to-local.html">fallback-url-to-local.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/fallback-url-to-local.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/fallback-url-to-local.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/at-font-face-font-matching.html" title="css/css-fonts/variations/at-font-face-font-matching.html">at-font-face-font-matching.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/at-font-face-font-matching.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/at-font-face-font-matching.html"><small>(source)</small></a> </ul> </details> <h3 class="heading settled" data-level="5.1" id="localized-name-matching"><span class="secno">5.1. </span><span class="content">Localized name matching</span><a class="self-link" href="#localized-name-matching"></a></h3> <p>Some font file formats allow font faces to carry multiple localizations of a particular string (e.g. family name or named instance). User agents must recognize and correctly match all of these names independent of the underlying platform localization, system API used, or document encoding.</p> <div class="example" id="ex-localized-name"> <a class="self-link" href="#ex-localized-name"></a> For example, for each of the fonts listed below, the author can use either the Latin name or the localized name in the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①⓪">font-family</a> property, and the results will be identical on all systems: <figure> <img alt="examples of localized family names" height="211" src="images/localizedfamilynames.png" width="523"> <figcaption>Localized family names</figcaption> </figure> </div> <p>User agents must match these names case insensitively, using the "Default Caseless Matching" algorithm outlined in the Unicode specification <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a>. This algorithm is detailed in section 3.13 entitled "Default Case Algorithms". Specifically, the algorithm must be applied without normalizing the strings involved and without applying any language-specific tailorings. The case folding method specified by this algorithm uses the case mappings with status field "C" or "F" in the CaseFolding.txt file of the Unicode Character Database.</p> <p class="note" role="note"><span class="marker">Note:</span> For authors this means that font family names are matched case insensitively, whether those names exist in a platform font or in the <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤⑤">@font-face</a> rules contained in a stylesheet. Authors should take care to ensure that names use a character sequence consistent with the actual font family name, particularly when using combining characters such as diacritical marks. For example, a family name that contains a lowercase a (U+0061) followed by a combining ring (U+030A) will <strong>not</strong> match a name that looks identical but which uses the precomposed lowercase a-ring character (U+00E5) instead of the combining sequence.</p> <p class="note" role="note"><span class="marker">Note:</span> Implementors should take care to verify that a given caseless string comparison implementation uses this precise algorithm and not assume that a given platform string matching routine follows it, as many of these have locale-specific behavior or use some level of string normalization.</p> <h3 class="heading settled" data-level="5.2" id="font-style-matching"><span class="secno">5.2. </span><span class="content">Matching font styles</span><a class="self-link" href="#font-style-matching"></a></h3> <p>The procedure for choosing a font for a given character in a run of text consists of iterating over the font families named by the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①①">font-family</a> property, selecting a font face with the appropriate style based on other font properties and then determining whether a glyph exists for the given character. This is done using the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="character-map">character map</dfn> of the font, data which maps characters to the default glyph for that character. A font is considered to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="support">support</dfn> a given character if (1) the character is contained in the font’s <a data-link-type="dfn" href="#character-map" id="ref-for-character-map③">character map</a> and (2) if required by the containing script, shaping information is available for that character.</p> <p>Some legacy fonts might include a given character in the <a data-link-type="dfn" href="#character-map" id="ref-for-character-map④">character map</a> but lack the shaping information (e.g. <a href="https://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType layout tables</a> or <a href="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite tables</a>) necessary for correctly rendering text runs containing that character.</p> <p>Codepoint sequences consisting of a base character followed by a sequence of combining characters are treated slightly differently, see the section on <a href="#cluster-matching">cluster matching</a> below.</p> <p>For this procedure, the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="default-face">default face</dfn> for a given font family is defined to be the face that would be selected if all font style properties were set to their initial value.</p> <ol id="fontmatchingalg"> <li data-md> <p>Using the computed font property values for a given element, the user agent starts with the first family name specified by the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①②">font-family</a> property.</p> <li data-md> <p>If the family name is a generic family keyword, the user agent looks up the appropriate font family name to be used. User agents may choose the generic font family to use based on the language of the containing element or the Unicode range of the character.</p> <li data-md> <p>For other family names, the user agent attempts to find the family name among fonts defined via <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤⑥">@font-face</a> rules and then among available installed fonts (this may include font aliases), matching names with a <a href="#localized-name-matching">§ 5.1 Localized name matching</a> as outlined in the section above. If the font resources defined for a given face in an <span class="css" id="ref-for-at-font-face-rule⑤⑦">@font-face</span> rule are either not available or contain invalid font data, then the face should be treated as not present in the family. If no faces are present for a family defined via <span class="css" id="ref-for-at-font-face-rule⑤⑧">@font-face</span> rules, the family should be treated as missing; matching a platform font with the same name must not occur in this case.</p> <li data-md> <p>If a font family match occurs, the user agent assembles the set of font faces in that family and then narrows the set to a single face using other font properties in the order given below. Fonts might be present in this group which can support a range of <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width①⑧">font-width</a>, <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①③">font-style</a>, or <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight①⑨">font-weight</a> properties. In this case, the algorithm proceeds as if each supported combination of values is a unique font in the set. If such a font is ultimately selected by this algorithm, particular values for <span class="property" id="ref-for-propdef-font-width①⑨">font-width</span>, <span class="property" id="ref-for-propdef-font-style①④">font-style</span>, and <span class="property" id="ref-for-propdef-font-weight②⓪">font-weight</span> must be applied before any layout or rendering occurs. The application of these values must be applied in the <a href="#apply-font-matching-variations">Apply font matching variations</a> step detailed in <a href="#font-feature-variation-resolution">§ 7 Font Feature and Variation Resolution</a>. A group of faces defined via <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑤⑨">@font-face</a> rules with identical font descriptor values but differing <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range④">unicode-range</a> values are considered to be a single <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="composite-face">composite face</dfn> for this step:</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/matching/fixed-stretch-style-over-weight.html" title="css/css-fonts/matching/fixed-stretch-style-over-weight.html">fixed-stretch-style-over-weight.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/matching/fixed-stretch-style-over-weight.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/matching/fixed-stretch-style-over-weight.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/matching/stretch-distance-over-weight-distance.html" title="css/css-fonts/matching/stretch-distance-over-weight-distance.html">stretch-distance-over-weight-distance.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/matching/stretch-distance-over-weight-distance.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/matching/stretch-distance-over-weight-distance.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/matching/style-ranges-over-weight-direction.html" title="css/css-fonts/matching/style-ranges-over-weight-direction.html">style-ranges-over-weight-direction.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/matching/style-ranges-over-weight-direction.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/matching/style-ranges-over-weight-direction.html"><small>(source)</small></a> </ul> </details> <ol id="fontstylematchingalg"> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②⓪">font-width</a> is tried first. If a font does not have any concept of varying strengths of width values, its width value is mapped according table in the <a href="#widthmappings">property definition</a>. If the matching set includes faces with width values containing the <span class="property" id="ref-for-propdef-font-width②①">font-width</span> desired value, faces with width values which do not include the desired width value are removed from the matching set. If there is no face which contains the desired value, a width value is chosen using the rules below:</p> <ul> <li data-md> <p>If the desired width value is less than or equal to 100%, width values below the desired width value are checked in descending order followed by width values above the desired width value in ascending order until a match is found.</p> <li data-md> <p>Otherwise, width values above the desired width value are checked in ascending order followed by width values below the desired width value in descending order until a match is found.</p> </ul> <p>Once the closest matching width has been determined by this process, faces with widths which do not include this determined width are removed from the matching set.</p> <div class="example" id="ex-ascending-stretch"> <a class="self-link" href="#ex-ascending-stretch"></a> This search algorithm can be thought of as a distance function, where the lowest-distance value present in the font family is selected, and all fonts not including that value are eliminated. <p>Consider a font family with three fonts, named A, B, and C, each with associated supported ranges for the <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②②">font-width</a> descriptor. If an element is styled with "font-width: 125%", the search algorithm can be visualized as follows:</p> <p><img alt="algorithm" src="images/stretchdistance.svg"></p> <p>The font width ranges supported by fonts A, B, and C are shown in the graph above. As you can see, because font B contains the minimum width value across the entire family, font B would be selected by this algorithm. However, if font B were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected.</p> </div> <div class="example" id="ex-ascending-stretch-2"> <a class="self-link" href="#ex-ascending-stretch-2"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-width: 75%": <p><img alt="distance graph" src="images/stretchdistance2.svg"></p> <p>As you can see, because font B contains the minimum width value across the entire family, font B would be selected by this algorithm. However, if font B were somehow eliminated from the family, font A would then contain the lowest distance in the family, so it would be selected.</p> </div> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①⑤">font-style</a> is tried next (see <a href="#font-style-matching">§ 5.2 Matching font styles</a>). If a font does not have any concept of varying strengths of italics or oblique angles, its style is mapped according to the description in the <span class="property" id="ref-for-propdef-font-style①⑥">font-style</span> property definition.</p> <p>If the value of <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①⑦">font-style</a> is <a class="css" data-link-type="maybe" href="#valdef-font-style-italic" id="ref-for-valdef-font-style-italic③">italic</a>:</p> <ol> <li data-md> <p>If the matching set includes faces with italic values containing the mapped value of <a class="css" data-link-type="maybe" href="#valdef-font-style-italic" id="ref-for-valdef-font-style-italic④">italic</a>, then faces with italic values which do not include the desired italic mapped value are removed from the matching set.</p> <li data-md> <p>Otherwise, italic values above the desired italic value are checked in ascending order followed by italic values below the desired italic value, until 0 is hit. Only positive values of italic values are checked in this stage.</p> <li data-md> <p>If no match is found, oblique values greater than or equal to 11deg are checked in ascending order followed by oblique values below 11deg in descending order, until 0 is hit. Only positive values of oblique values are checked in this stage.</p> <p class="issue" id="issue-c152d461"><a class="self-link" href="#issue-c152d461"></a> The threshold for preferring oblique over normal <a href="https://github.com/w3c/csswg-drafts/issues/2295">should be lower than the average angle</a>.</p> <li data-md> <p>If no match is found, italic values less than or equal to 0 are checked in descending order until a match is found.</p> <li data-md> <p>If no match is found, oblique values less than or equal to 0deg are checked in descending order until a match is found.</p> <div class="example" id="ex-ascending-italic"> <a class="self-link" href="#ex-ascending-italic"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-style: italic": <p><img alt="distance graph" src="images/styledistance.svg"></p> <p>As you can see, because font D contains the minimum italic value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font E would then contain the lowest distance in the family, so it would be selected. If E were eliminated, C would be selected. If C were eliminated, font B would not be chosen immediately; instead, oblique values would be consulted and an oblique value might be chosen. However, if no oblique value is chosen, font B would then be selected, followed by font A.</p> </div> </ol> <p>If the value of <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①⑧">font-style</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-style-oblique" id="ref-for-valdef-font-style-oblique①">oblique</a> and the requested angle is greater than or equal to 11deg,</p> <ol id="greater-oblique-steps"> <li data-md> <p>If the matching set includes faces with oblique values containing the value of <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-style-oblique" id="ref-for-valdef-font-style-oblique②">oblique</a>, faces with oblique values which do not include the desired oblique value are removed from the matching set.</p> <li data-md> <p>Otherwise, oblique values above the desired oblique value are checked in ascending order followed by oblique values below the desired oblique value, until 0 is hit. Only positive values of oblique values are checked in this stage.</p> <li data-md> <p>For variable fonts with a slnt axis, a match is created by setting the slnt value with the specified oblique value. Otherwise, if <a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style⑤">font-synthesis-style</a> has the value <a class="css" data-link-type="maybe" href="#valdef-font-synthesis-style-auto" id="ref-for-valdef-font-synthesis-style-auto">auto</a>, then a fallback match is produced by geometric shearing to the specified oblique value.</p> <li data-md> <p>If no match is found, italic values greater than or equal to 1 are checked in ascending order followed by italic values below 1 in descending order, until 0 is hit. Only positive values of italic values are checked in this stage.</p> <li data-md> <p>If no match is found, oblique values less than or equal to 0deg are checked in descending order until a match is found.</p> <li data-md> <p>If no match is found, italic values less than or equal to 0 are checked in descending order until a match is found.</p> <div class="example" id="ex-ascending-oblique-40"> <a class="self-link" href="#ex-ascending-oblique-40"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-style: oblique 40deg": <p><img alt="distance graph" src="images/styledistance2.svg"></p> <p>As you can see, because font D contains the minimum oblique value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font E would then contain the lowest distance in the family, so it would be selected. If E were eliminated, C would be selected. If C were eliminated, font B would not be chosen immediately; instead, italic values would be consulted and an italic value might be chosen. However, if no italic value is chosen, font B would then be selected, followed by font A.</p> </div> </ol> <p>If the value of <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style①⑨">font-style</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-style-oblique" id="ref-for-valdef-font-style-oblique③">oblique</a> and the requested angle is greater than or equal to 0deg and less than 11deg,</p> <ol id="lesser-oblique-steps"> <li data-md> <p>If the matching set includes faces with oblique values containing the value of <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-style-oblique" id="ref-for-valdef-font-style-oblique④">oblique</a>, faces with oblique values which do not include the desired oblique value are removed from the matching set.</p> <li data-md> <p>Otherwise, oblique values below the desired oblique value are checked in descending order until 0 is hit, followed by oblique values above the desired oblique value. Only positive values of oblique values are checked in this stage.</p> <li data-md> <p>For variable fonts with a slnt axis, a match is created by setting the slnt value with the specified oblique value. Otherwise, if <a class="property css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style⑥">font-synthesis-style</a> has the value <a class="css" data-link-type="maybe" href="#valdef-font-synthesis-style-auto" id="ref-for-valdef-font-synthesis-style-auto①">auto</a>, then a fallback match is produced by geometric shearing to the specified oblique value.</p> <li data-md> <p>If no match is found, italic values less than 1 are checked in descending order until 0 is hit, followed by italic values above 1 in ascending order. Only positive values of italic values are checked in this stage.</p> <li data-md> <p>If no match is found, oblique values less than or equal to 0deg are checked in descending order until a match is found.</p> <li data-md> <p>If no match is found, italic values less than or equal to 0 are checked in descending order until a match is found.</p> </ol> <div class="example" id="ex-ascending-oblique-13"> <a class="self-link" href="#ex-ascending-oblique-13"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-style: oblique 13deg": <p><img alt="distance graph" src="images/styledistance3.svg"></p> <p>As you can see, because font D contains the minimum oblique value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected. If C were eliminated, E would be selected. If E were eliminated, font B would not be chosen immediately; instead, italic values would be consulted and an italic value might be chosen. However, if no italic value is chosen, font B would then be selected, followed by font A.</p> </div> <p>If the value of <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②⓪">font-style</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css2/#valdef-font-style-oblique" id="ref-for-valdef-font-style-oblique⑤">oblique</a> and the requested angle is less than 0deg and greater than -11deg, follow the steps <a href="#lesser-oblique-steps">above</a>, except with the negated values and opposite directions. If the value of <span class="property" id="ref-for-propdef-font-style②①">font-style</span> is <span class="css" id="ref-for-valdef-font-style-oblique⑥">oblique</span> and the requested angle is less than or equal to -11deg, follow the steps <a href="#greater-oblique-steps">above</a>, except with the negated values and opposite directions.</p> <p>If the value of <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②②">font-style</a> is <a class="css" data-link-type="maybe" href="#valdef-font-style-normal" id="ref-for-valdef-font-style-normal②">normal</a>,</p> <ol> <li data-md> <p>Oblique values greater than or equal to 0 are checked in ascending order.</p> <li data-md> <p>If no match is found, italic values greater than or equal to 0 are checked in ascending</p> <li data-md> <p>If no match is found, oblique values less than 0deg are checked in descending order until a match is found.</p> <li data-md> <p>If no match is found, italic values less than 0 are checked in descending order until a match is found.</p> </ol> <div class="example" id="ex-ascending-normal"> <a class="self-link" href="#ex-ascending-normal"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-style: normal": <p><img alt="distance graph" src="images/styledistance4.svg"></p> <p>As you can see, because font C contains the minimum oblique value across the entire family, font C would be selected by this algorithm. However, if font C were somehow eliminated from the family, font B would not be chosen immediately; instead, italic values would be consulted and an italic value might be chosen. However, if no italic value is chosen, font B would then be selected, followed by font A.</p> </div> <p>If an oblique angle was found in the above search, all faces which don’t include that oblique angle are excluded from the matching set. Otherwise, if an italic value was found in the above search, all faces which don’t include that italic value are excluded from the matching set.</p> <p>User agents are not required to distinguish between italic and oblique fonts. In such user agents, the <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②③">font-style</a> matching steps above are performed by mapping both italic values and oblique angles onto a common scale. The exact nature of this mapping is undefined, however, an italic value of 1 must map to the same value that an oblique angle of 11deg maps to. Within font families defined via <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥⓪">@font-face</a> rules, italic and oblique faces must be distinguished using the value of the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-style" id="ref-for-descdef-font-face-font-style①">font-style</a> descriptor.</p> <p>For families that lack any italic or oblique faces, user agents may create artificial oblique faces, if this is permitted by the value of the <a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis⑤">font-synthesis</a> property.</p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②①">font-weight</a> is matched next. If a font does not have any concept of varying strengths of weights, its weight is mapped according list in the <a href="#font-weight-numeric-values">property definition</a>. If bolder/lighter relative weights are used, the effective weight is calculated based on the inherited weight value, as described in the definition of the <span class="property" id="ref-for-propdef-font-weight②②">font-weight</span> property. If the matching set after performing the steps above includes faces with weight values containing the font-weight desired value, faces with weight values which do not include the desired font-weight value are removed from the matching set. If there is no face which contains the desired value, a weight value is chosen using the rules below:</p> <ul> <li data-md> <p>If the desired weight is inclusively between 400 and 500, weights greater than or equal to the target weight are checked in ascending order until 500 is hit and checked, followed by weights less than the target weight in descending order, followed by weights greater than 500, until a match is found.</p> <li data-md> <p>If the desired weight is less than 400, weights less than or equal to the desired weight are checked in descending order followed by weights above the desired weight in ascending order until a match is found.</p> <li data-md> <p>If the desired weight is greater than 500, weights greater than or equal to the desired weight are checked in ascending order followed by weights below the desired weight in descending order until a match is found.</p> </ul> <div class="example" id="ex-weight-400"> <a class="self-link" href="#ex-weight-400"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-weight: 400": <p><img alt="distance graph" src="images/styleweight.svg"></p> <p>As you can see, because font B contains the minimum distance across the entire family, font B would be selected by this algorithm. However, if font B were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected. If C were eliminated, D would be selected, followed by fonts A and then E.</p> </div> <div class="example" id="ex-weight-450"> <a class="self-link" href="#ex-weight-450"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-weight: 450": <p><img alt="distance graph" src="images/styleweight450.svg"></p> <p>As you can see, because font C contains the minimum distance across the entire family, font C would be selected by this algorithm. However, if font C were somehow eliminated from the family, font D would then contain the lowest distance in the family, so it would be selected. If D were also eliminated, B would be selected, followed by fonts A and then E.</p> </div> <div class="example" id="ex-weight-500"> <a class="self-link" href="#ex-weight-500"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-weight: 500": <p><img alt="distance graph" src="images/weightmatching.svg"></p> <p>As you can see, because font D contains the minimum distance across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font B would then contain the lowest distance in the family, so it would be selected. If B were eliminated, C would be selected, followed by fonts B, A, and then E.</p> </div> <div class="example" id="ex-weight-300"> <a class="self-link" href="#ex-weight-300"></a> Similar to the <a href="#ex-ascending-stretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-weight: 300": <p><img alt="distance graph" src="images/weightmatching2.svg"></p> <p>As you can see, because font B contains the minimum distance across the entire family, font B would be selected by this algorithm. However, if font B were somehow eliminated from the family, font A would then contain the lowest distance in the family, so it would be selected. If A were eliminated, C would be selected.</p> </div> <p>Once the closest matching weight has been determined by this process, faces with weights which do not include this determined weight are removed from the matching set.</p> <p class="note" role="note"><span class="marker">Note:</span> There is a small behavior change between <a data-link-type="biblio" href="#biblio-css-fonts-3" title="CSS Fonts Module Level 3">[CSS-FONTS-3]</a> and this specification with the animation of the <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②③">font-weight</a> property. Previously, interpolated values of font-weight were rounded to their closest multiple of 100, and the font-matching algorithm was run on these rounded values. In this specification, the font-matching algorithm is able to accept any value, so no rounding occurs. The small behavior change is due to the discontinuous nature of the font-matching algorithm.</p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①⑦">font-size</a> must be matched within a UA-dependent margin of tolerance. (Typically, sizes for scalable fonts are rounded to the nearest whole pixel, while the tolerance for bitmapped fonts could be as large as 20%.) Further computations, e.g., by <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#em" id="ref-for-em①">em</a> values in other properties, are based on the <span class="property" id="ref-for-propdef-font-size①⑧">font-size</span> value that is used, not the one that is specified.</p> </ol> <p>Note that more than one font might be remaining in the matching set after performing the above steps. If so, the user agent must choose a single font from the matching set and continue these steps with it. The choice of which font to choose can differ between multiple user agents and multiple operating system platforms; however, it must not differ between two elements in the same document.</p> <li data-md> <p>If the matched face is defined via <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥①">@font-face</a> rules, user agents must use the procedure below to select a single font:</p> <ol> <li data-md> <p>If the font resource has not been loaded and the range of characters defined by the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range⑤">unicode-range</a> descriptor value includes the character in question, load the font.</p> <li data-md> <p>After downloading, if the <em>effective character map</em> supports the character in question, select that font.</p> </ol> <p>When the matched face is a <em>composite face</em>, user agents must use the procedure above on each of the faces in the <em>composite face</em> in reverse order of <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥②">@font-face</a> rule definition.</p> <p>While the download occurs, user agents must either wait until the font is downloaded or render once with substituted font metrics and render again once the font is downloaded.</p> <li data-md> <p>If no matching face exists or the matched face does not contain a glyph for the character to be rendered, the next family name is selected and the previous three steps repeated. Glyphs from other faces in the family are not considered. The only exception is that user agents may optionally substitute a synthetically obliqued version of the <em>default face</em> if that face supports a given glyph and synthesis of these faces is permitted by the value of the <a class="property css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis⑥">font-synthesis</a> property. For example, a synthetic italic version of the regular face might be used if the italic face doesn’t support glyphs for Arabic.</p> <li data-md> <p>If there are no more font families to be evaluated and no matching face has been found, then the user agent performs an <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="installed font fallback" data-noexport id="installed-font-fallback">installed font fallback</dfn> procedure to find the best match for the character to be rendered. The result of this procedure can vary across user agents.</p> <li data-md> <p>If a particular character cannot be displayed using any font, the user agent should indicate by some means that a character is not being displayed, displaying either a symbolic representation of the missing glyph (e.g. using a <a href="https://en.wikipedia.org/wiki/Last_resort_font">Last Resort Font</a>) or using the missing character glyph from a default font.</p> </ol> <p>Optimizations of this process are allowed provided that an implementation behaves as if the algorithm had been followed exactly. Matching occurs in a well-defined order to ensure that the results are as consistent as possible across user agents, given an identical set of available fonts and rendering tech.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="first-available-font">first available font</dfn>, used for example in the definition of <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#font-relative-length" id="ref-for-font-relative-length①">font-relative lengths</a> such as <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#ex" id="ref-for-ex">ex</a> or in the definition of the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height⑦">line-height</a> property, is defined to be the first font for which the character U+0020 (space) is not excluded by a <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range⑥">unicode-range</a>, given the font families in the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①③">font-family</a> list (or a user agent’s default font if none are available).</p> <p>Installed fonts referenced directly by family name, rather than via @font-face rules, are considered to have a <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range⑦">unicode-range</a> that covers the entire Unicode code space.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-001.html" title="css/css-fonts/first-available-font-001.html">first-available-font-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-002.html" title="css/css-fonts/first-available-font-002.html">first-available-font-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-003.html" title="css/css-fonts/first-available-font-003.html">first-available-font-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-004.html" title="css/css-fonts/first-available-font-004.html">first-available-font-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-005.html" title="css/css-fonts/first-available-font-005.html">first-available-font-005.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-005.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-005.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-006.html" title="css/css-fonts/first-available-font-006.html">first-available-font-006.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-006.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-006.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/first-available-font-007.html" title="css/css-fonts/first-available-font-007.html">first-available-font-007.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/first-available-font-007.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/first-available-font-007.html"><small>(source)</small></a> </ul> </details> <p class="note" role="note"><span class="marker">Note:</span> it does not matter whether that font actually has a glyph for the space character.</p> <h3 class="heading settled" data-level="5.3" id="cluster-matching"><span class="secno">5.3. </span><span class="content"> Cluster matching</span><a class="self-link" href="#cluster-matching"></a></h3> <p>When text contains characters such as combining marks, ideally the base character should be rendered using the same font as the mark, this assures proper placement of the mark. For this reason, the font matching algorithm for clusters is more specialized than the general case of matching a single character by itself. For sequences containing variation selectors, which indicate the precise glyph to be used for a given character, user agents always attempt <a data-link-type="dfn" href="#installed-font-fallback" id="ref-for-installed-font-fallback">installed font fallback</a> to find the appropriate glyph before using the default glyph of the base character.</p> <p>A sequence of codepoints containing combining mark or other modifiers is termed a grapheme cluster (see <a data-link-type="biblio" href="#biblio-css3text" title="CSS Text Module Level 3">[CSS3TEXT]</a> and <a data-link-type="biblio" href="#biblio-uax29" title="Unicode Text Segmentation">[UAX29]</a> for a more complete description). For a given cluster containing a base character, <em>b</em> and a sequence of combining characters <em>c1, c2…</em>, the entire cluster is matched using these steps:</p> <p></p> <ol> <li> For each family in the font list, a face is chosen using the style selection rules defined in the previous section. <ol> <li>If all characters in the sequence <em>b + c1 + c2 …</em> are completely supported by the font, select this font for the sequence. <li>If a sequence of multiple codepoints is canonically equivalent to a single character and the font <a data-link-type="dfn" href="#support" id="ref-for-support">supports</a> that character, select this font for the sequence and use the glyph associated with the canonically equivalent character for the entire cluster. </ol> <li> If no font was found in the font list in step 1: <ol> <li>If <em>c1</em> is a variation selector, system fallback must be used to find a font that <em title="support">supports</em> the full sequence of <em>b + c1</em>. If no font on the system <a data-link-type="dfn" href="#support" id="ref-for-support①">supports</a> the full sequence, match the single character <em>b</em> using the normal procedure for matching single characters and ignore the variation selector. Note: a sequence with more than one variation selector must be treated as an encoding error and the trailing selectors must be ignored. <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a> <li>Otherwise, the user agent may optionally use installed font fallback to match a font that <a data-link-type="dfn" href="#support" id="ref-for-support②">supports</a> the entire cluster. </ol> <li>If no font is found in step 2, use the matching sequence from step 1 to determine the longest sequence that is completely <a data-link-type="dfn" href="#support" id="ref-for-support③">supported</a> by a font in the font list and attempt to match the remaining combining characters separately using the rules for single characters. </ol> <h3 class="heading settled" data-level="5.4" id="char-handling-issues"><span class="secno">5.4. </span><span class="content"> Character handling issues</span><a class="self-link" href="#char-handling-issues"></a></h3> <p>CSS font matching is always performed on text runs containing Unicode characters <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a>, so documents using legacy encodings are assumed to have been transcoded before matching fonts. For fonts containing <a data-link-type="dfn" href="#character-map" id="ref-for-character-map⑤">character maps</a> for both legacy encodings and Unicode, the contents of the legacy encoding <span id="ref-for-character-map⑥">character map</span> must have no effect on the results of the font matching process.</p> <p>The font matching process does not assume that text runs are in either normalized or denormalized form (see <a data-link-type="biblio" href="#biblio-charmod-norm" title="Character Model for the World Wide Web: String Matching">[CHARMOD-NORM]</a> for more details). Fonts may only support precomposed forms and not the decomposed sequence of base character plus combining marks. Authors should always tailor their choice of fonts to their content, including whether that content contains normalized or denormalized character streams.</p> <p>If a given character is a Private-Use Area Unicode codepoint, user agents must only match font families named in the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①④">font-family</a> list that are not generic families. If none of the families named in the <span class="property" id="ref-for-propdef-font-family①⑤">font-family</span> list contain a glyph for that codepoint, user agents must display some form of missing glyph symbol for that character rather than attempting <a data-link-type="dfn" href="#installed-font-fallback" id="ref-for-installed-font-fallback①">installed font fallback</a> for that codepoint. When matching the replacement character U+FFFD, user agents may skip the font matching process and immediately display some form of missing glyph symbol, they are not required to display the glyph from the font that would be selected by the font matching process.</p> <p>In general, the fonts for a given family will all have the same or similar <a data-link-type="dfn" href="#character-map" id="ref-for-character-map⑦">character maps</a>. The process outlined here is designed to handle even font families containing faces with widely variant <span id="ref-for-character-map⑧">character maps</span>. However, authors are cautioned that the use of such families can lead to unexpected results.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/matching/font-unicode-PUA.html" title="css/css-fonts/matching/font-unicode-PUA.html">font-unicode-PUA.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/matching/font-unicode-PUA.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/matching/font-unicode-PUA.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/matching/font-unicode-PUA-primary-font.html" title="css/css-fonts/matching/font-unicode-PUA-primary-font.html">font-unicode-PUA-primary-font.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/matching/font-unicode-PUA-primary-font.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/matching/font-unicode-PUA-primary-font.html"><small>(source)</small></a> </ul> </details> <h2 class="heading settled" data-level="6" id="font-rend-props"><span class="secno">6. </span><span class="content"> Font Feature Properties</span><a class="self-link" href="#font-rend-props"></a></h2> <p>Modern font technologies support a variety of advanced typographic and language-specific font features. Using these features, a single font can provide glyphs for a wide range of ligatures, contextual and stylistic alternates, tabular and old-style figures, small capitals, automatic fractions, swashes, and alternates specific to a given language. To allow authors control over these font capabilities, the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant⑥">font-variant</a> property has been expanded. It now functions as a shorthand for a set of properties that provide control over stylistic font features.</p> <h3 class="heading settled" data-level="6.1" id="glyph-selection-positioning"><span class="secno">6.1. </span><span class="content"> Glyph selection and positioning</span><a class="self-link" href="#glyph-selection-positioning"></a></h3> <p>This section is non-normative</p> <p>Simple fonts used for displaying Latin text use a very basic processing model. Fonts contain a <a data-link-type="dfn" href="#character-map" id="ref-for-character-map⑨">character map</a> which maps each character to a glyph for that character. Glyphs for subsequent characters are simply placed one after the other along a run of text. Modern font formats such as OpenType and AAT (Apple Advanced Typography) use a richer processing model. The glyph for a given character can be chosen and positioned not just based on the codepoint of the character itself, but also on adjacent characters as well as the language, script, and features enabled for the text. Font features may be required for specific scripts, or recommended as enabled by default or they might be stylistic features meant to be used under author control. The point at which font selection and positioning happens in the overall order of text processing operations (such as text transformation, text orientation and text alignment) is described in <a href="https://drafts.csswg.org/css-text-3/#order"><cite>CSS Text 3</cite> § A Text Processing Order of Operations</a>.</p> <p>For a detailed description of glyph processing for OpenType fonts, see <a data-link-type="biblio" href="#biblio-windows-glyph-proc" title="Windows Glyph Processing">[WINDOWS-GLYPH-PROC]</a>.</p> <p>Stylistic font features can be classified into two broad categories: ones that affect the harmonization of glyph shapes with the surrounding context, such as kerning and ligature features, and ones such as the small-caps, subscript/superscript and alternate features that affect shape selection.</p> <p>The subproperties of <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant⑦">font-variant</a> listed below are used to control these stylistic font features. They do not control features that are required for displaying certain scripts, such as the OpenType features used when displaying Arabic or Indic language text. They affect glyph selection and positioning, but do not affect font selection as described in the font matching section (except in cases required for compatibility with CSS 2.1).</p> <p>To assure consistent behavior across user agents, the equivalent OpenType property settings are listed for individual properties and are normative. When using other font formats these should be used as a guideline to map CSS font feature property values to specific font features.</p> <h3 class="heading settled" data-level="6.2" id="language-specific-support"><span class="secno">6.2. </span><span class="content"> Language-specific display</span><a class="self-link" href="#language-specific-support"></a></h3> <p>OpenType also supports language-specific glyph selection and positioning, so that text can be displayed correctly in cases where the language dictates a specific display behavior. Many languages share a common script, but the shape of certain letters can vary across those languages. For example, certain Cyrillic letters have different shapes in Russian text than in Bulgarian. In Latin text, it’s common to render "fi" with an explicit fi-ligature that lacks a dot on the "i". However, in languages such as Turkish which uses both a dotted-i and a dotless-i, it’s important to not use this ligature or use a specialized version that contains a dot over the "i".</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><span class="wpt-name">language-specific-01.html (visual test) </span><a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/language-specific-01.html"><small>(source)</small></a> </ul> </details> <p>The example below shows language-specific variations based on stylistic traditions found in Spanish, Italian and French orthography:</p> <div class="featex"><img alt="language specific forms, spanish" height="62" src="images/locl-1.png" width="432"></div> <div class="featex"><img alt="language specific forms, italian" height="62" src="images/locl-2.png" width="396"></div> <div class="featex"><img alt="language specific forms, french" height="62" src="images/locl-3.png" width="288"></div> <p>If the content language of the element is known according to the rules of the <a href="https://www.w3.org/TR/CSS21/conform.html#doclanguage">document language</a>, user agents are required to infer the OpenType language system from the <a data-link-type="dfn" href="https://drafts.csswg.org/css-text-4/#content-language" id="ref-for-content-language①">content language</a> and use that when selecting and positioning glyphs using an OpenType font. If a <a data-link-type="dfn">writing system</a> has been explicitly specified, it must take precedence over the customary one implied by the <span id="ref-for-content-language②">content language</span>.</p> <p>For OpenType fonts, in some cases it may be necessary to explicitly declare the OpenType language to be used, for example when displaying text in a given language that uses the typographic conventions of another language or when the font does not explicitly support a given language but supports a language that shares common typographic conventions. The <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override④">font-language-override</a> property is used for this purpose.</p> <h3 class="heading settled" data-level="6.3" id="font-kerning-prop"><span class="secno">6.3. </span><span class="content"> Kerning: the <a class="property css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning①">font-kerning</a> property</span><a class="self-link" href="#font-kerning-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-kerning"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-kerning">font-kerning</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪⓪">|</a> normal <span id="ref-for-comb-one①⓪①">|</span> none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-kerning-01.html" title="css/css-fonts/font-kerning-01.html">font-kerning-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-kerning-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-kerning-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-kerning-02.html" title="css/css-fonts/font-kerning-02.html">font-kerning-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-kerning-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-kerning-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-kerning-03.html" title="css/css-fonts/font-kerning-03.html">font-kerning-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-kerning-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-kerning-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-kerning-04.html" title="css/css-fonts/font-kerning-04.html">font-kerning-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-kerning-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-kerning-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-kerning-05.html" title="css/css-fonts/font-kerning-05.html">font-kerning-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-kerning-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-kerning-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/cjk-kerning.html" title="css/css-fonts/cjk-kerning.html">cjk-kerning.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/cjk-kerning.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/cjk-kerning.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/hiragana-katakana-kerning.html" title="css/css-fonts/hiragana-katakana-kerning.html">hiragana-katakana-kerning.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/hiragana-katakana-kerning.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/hiragana-katakana-kerning.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-kerning-computed.html" title="css/css-fonts/parsing/font-kerning-computed.html">font-kerning-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-kerning-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-kerning-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-kerning-invalid.html" title="css/css-fonts/parsing/font-kerning-invalid.html">font-kerning-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-kerning-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-kerning-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-kerning-valid.html" title="css/css-fonts/parsing/font-kerning-valid.html">font-kerning-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-kerning-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-kerning-valid.html"><small>(source)</small></a> </ul> </details> <p>Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-kerning" data-dfn-type="value" data-export id="font-kerning-auto-value" title="auto!!font-kerning">auto</dfn> <dd>Specifies that kerning is applied at the discretion of the user agent <dt><dfn class="dfn-paneled css" data-dfn-for="font-kerning" data-dfn-type="value" data-export id="font-kerning-normal-value" title="normal!!font-kerning">normal</dfn> <dd>Specifies that kerning is applied <dt><dfn class="dfn-paneled css" data-dfn-for="font-kerning" data-dfn-type="value" data-export id="font-kerning-none-value" title="none!!font-kerning">none</dfn> <dd>Specifies that kerning is not applied </dl> <p>For fonts that do not include kerning data this property will have no visible effect. When rendering with OpenType fonts, the <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> specification suggests that kerning be enabled by default. When kerning is enabled, the relevant OpenType kerning features are enabled (for horizontal <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#typographic-mode" id="ref-for-typographic-mode">typographic modes</a> and for <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways" id="ref-for-typeset-sideways">sideways typesetting</a> in vertical <span id="ref-for-typographic-mode①">typographic modes</span>, the <span class="tag">kern</span> feature; for <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#typeset-upright" id="ref-for-typeset-upright">upright typesetting</a> in <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#vertical-typographic-mode" id="ref-for-vertical-typographic-mode">vertical typographic modes</a>, the <span class="tag">vkrn</span> feature. User agents must also support fonts that only support kerning via data contained in a <span class="tag">kern</span> font table, as detailed in the OpenType specification. If the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-text-4/#propdef-letter-spacing" id="ref-for-propdef-letter-spacing">letter-spacing</a> property is defined, kerning adjustments are considered part of the default spacing and letter spacing adjustments are made <em>after</em> kerning has been applied.</p> <p>When set to <span title="auto!!font-kerning"><a class="property css" data-link-type="property">auto</a></span>, user agents can determine whether to apply kerning or not based on a number of factors: text size, script, or other factors that influence text processing speed. Authors who want proper kerning should use <span title="normal!!font-kerning"><a class="property css" data-link-type="property">normal</a></span> to explicitly enable kerning. Likewise, some authors may prefer to disable kerning in situations where performance is more important than precise appearance. However, in well-designed modern implementations the use of kerning generally does not have a large impact on text rendering speed.</p> <h3 class="heading settled" data-level="6.4" id="font-variant-ligatures-prop"><span class="secno">6.4. </span><span class="content"> Ligatures: the <a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures①">font-variant-ligatures</a> property</span><a class="self-link" href="#font-variant-ligatures-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-ligatures"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-ligatures">font-variant-ligatures</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod"><span title="normal!!font-variant-ligatures">normal</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪②">|</a> <span title="none!!font-variant-ligatures">none</span> <span id="ref-for-comb-one①⓪③">|</span> [ <var>&lt;common-lig-values></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any⑥">||</a> <var>&lt;discretionary-lig-values></var> <span id="ref-for-comb-any⑦">||</span> <var>&lt;historical-lig-values></var> <span id="ref-for-comb-any⑧">||</span> <var>&lt;contextual-alt-values></var> ] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-01.html" title="css/css-fonts/font-variant-ligatures-01.html">font-variant-ligatures-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-02.html" title="css/css-fonts/font-variant-ligatures-02.html">font-variant-ligatures-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-03.html" title="css/css-fonts/font-variant-ligatures-03.html">font-variant-ligatures-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-04.html" title="css/css-fonts/font-variant-ligatures-04.html">font-variant-ligatures-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-05.html" title="css/css-fonts/font-variant-ligatures-05.html">font-variant-ligatures-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-06.html" title="css/css-fonts/font-variant-ligatures-06.html">font-variant-ligatures-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-07.html" title="css/css-fonts/font-variant-ligatures-07.html">font-variant-ligatures-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-08.html" title="css/css-fonts/font-variant-ligatures-08.html">font-variant-ligatures-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-09.html" title="css/css-fonts/font-variant-ligatures-09.html">font-variant-ligatures-09.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-09.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-09.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-10.html" title="css/css-fonts/font-variant-ligatures-10.html">font-variant-ligatures-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-11.optional.html" title="css/css-fonts/font-variant-ligatures-11.optional.html">font-variant-ligatures-11.optional.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-11.optional.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-11.optional.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures.html" title="css/css-fonts/font-variant-ligatures.html">font-variant-ligatures.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-features-across-space-1.html" title="css/css-fonts/font-features-across-space-1.html">font-features-across-space-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-features-across-space-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-features-across-space-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-features-across-space-2.html" title="css/css-fonts/font-features-across-space-2.html">font-features-across-space-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-features-across-space-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-features-across-space-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-features-across-space-3.html" title="css/css-fonts/font-features-across-space-3.html">font-features-across-space-3.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-features-across-space-3.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-features-across-space-3.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-ligatures-computed.html" title="css/css-fonts/parsing/font-variant-ligatures-computed.html">font-variant-ligatures-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-ligatures-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-ligatures-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-ligatures-invalid.html" title="css/css-fonts/parsing/font-variant-ligatures-invalid.html">font-variant-ligatures-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-ligatures-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-ligatures-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-ligatures-valid.html" title="css/css-fonts/parsing/font-variant-ligatures-valid.html">font-variant-ligatures-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-ligatures-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-ligatures-valid.html"><small>(source)</small></a> </ul> </details> <p>Ligatures and contextual forms are ways of combining glyphs to produce more harmonized forms.</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="common-lig-values"><var>&lt;common-lig-values></var></dfn> = <c- p>[</c-> <span>common-ligatures</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪④">|</a> <span>no-common-ligatures</span> <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="discretionary-lig-values"><var>&lt;discretionary-lig-values></var></dfn> = <c- p>[</c-> <span>discretionary-ligatures</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪⑤">|</a> <span>no-discretionary-ligatures</span> <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="historical-lig-values"><var>&lt;historical-lig-values></var></dfn> = <c- p>[</c-> <span>historical-ligatures</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪⑥">|</a> <span>no-historical-ligatures</span> <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="contextual-alt-values"><var>&lt;contextual-alt-values></var></dfn> = <c- p>[</c-> <span>contextual</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪⑦">|</a> <span>no-contextual</span> <c- p>]</c-></pre> <p>Individual values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="font-variant-ligatures-normal-value" title="normal!!font-variant-ligatures">normal</dfn> <dd>A value of <a class="css" data-link-type="maybe" href="#font-variant-ligatures-normal-value" id="ref-for-font-variant-ligatures-normal-value①">normal</a> specifies that common default features are enabled, <a href="#font-feature-variation-resolution">as described in detail in the next section</a>. For OpenType fonts, common ligatures and contextual forms are on by default, discretionary and historical ligatures are not. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="font-variant-ligatures-none-value"><a class="css" data-link-type="maybe" href="#font-variant-ligatures-none-value" id="ref-for-font-variant-ligatures-none-value">none</a></dfn> <dd>Specifies that all types of ligatures and contextual forms covered by this property are explicitly disabled. In situations where ligatures are not considered necessary, this <em>may</em> improve the speed of text rendering. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-common-ligatures">common-ligatures</dfn> <dd> Enables display of common ligatures (OpenType features: <span class="tag">liga, clig</span>). For OpenType fonts, common ligatures are enabled by default. <div class="featex"><img alt="common ligature example" height="69" src="images/liga.png" width="300"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-no-common-ligatures">no-common-ligatures</dfn> <dd>Disables display of common ligatures (OpenType features: <span class="tag">liga, clig</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-discretionary-ligatures">discretionary-ligatures</dfn> <dd> Enables display of discretionary ligatures (OpenType feature: <span class="tag">dlig</span>). Which ligatures are discretionary or optional is decided by the type designer, so authors will need to refer to the documentation of a given font to understand which ligatures are considered discretionary. <div class="featex"><img alt="discretionary ligature example" height="62" src="images/dlig.png" width="432"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-no-discretionary-ligatures">no-discretionary-ligatures</dfn> <dd>Disables display of discretionary ligatures (OpenType feature: <span class="tag">dlig</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-historical-ligatures">historical-ligatures</dfn> <dd> Enables display of historical ligatures (OpenType feature: <span class="tag">hlig</span>). <div class="featex"><img alt="historical ligature example" height="87" src="images/hlig.png" width="300"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-no-historical-ligatures">no-historical-ligatures</dfn> <dd>Disables display of historical ligatures (OpenType feature: <span class="tag">hlig</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-contextual">contextual</dfn> <dd> Enables display of contextual alternates (OpenType feature: <span class="tag">calt</span>). Although not strictly a ligature feature, like ligatures this feature is commonly used to harmonize the shapes of glyphs with the surrounding context. For OpenType fonts, this feature is on by default. <div class="featex"><img alt="contextual alternate example" height="66" src="images/calt.png" width="500"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-ligatures" data-dfn-type="value" data-export id="valdef-font-variant-ligatures-no-contextual">no-contextual</dfn> <dd>Disables display of contextual alternates (OpenType feature: <span class="tag">calt</span>). </dl> <p id="rlig-unaffected"><em>Required</em> ligatures, needed for correctly rendering complex scripts, are not affected by the settings above, including <span title="none!!font-variant-ligatures"><a class="css" data-link-type="maybe" href="#valdef-font-synthesis-position-none" id="ref-for-valdef-font-synthesis-position-none">none</a></span> (OpenType feature: <span class="tag">rlig</span>).</p> <h3 class="heading settled" data-level="6.5" id="font-variant-position-prop"><span class="secno">6.5. </span><span class="content"> Subscript and superscript forms: the <a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position③">font-variant-position</a> property</span><a class="self-link" href="#font-variant-position-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-position"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-position">font-variant-position</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪⑧">|</a> sub <span id="ref-for-comb-one①⓪⑨">|</span> super <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-position-01.html" title="css/css-fonts/font-variant-position-01.html">font-variant-position-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-position-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-position-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-position-02.html" title="css/css-fonts/font-variant-position-02.html">font-variant-position-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-position-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-position-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-position-03.html" title="css/css-fonts/font-variant-position-03.html">font-variant-position-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-position-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-position-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-position-04.html" title="css/css-fonts/font-variant-position-04.html">font-variant-position-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-position-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-position-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-position-05.html" title="css/css-fonts/font-variant-position-05.html">font-variant-position-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-position-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-position-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-position.html" title="css/css-fonts/font-variant-position.html">font-variant-position.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-position.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-position.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-position-computed.html" title="css/css-fonts/parsing/font-variant-position-computed.html">font-variant-position-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-position-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-position-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-position-invalid.html" title="css/css-fonts/parsing/font-variant-position-invalid.html">font-variant-position-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-position-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-position-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-position-valid.html" title="css/css-fonts/parsing/font-variant-position-valid.html">font-variant-position-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-position-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-position-valid.html"><small>(source)</small></a> </ul> </details> <p>This property is used to enable typographic subscript and superscript glyphs. These are alternate glyphs designed within the same em-box as default glyphs and are intended to be laid out on the same baseline as the default glyphs, with no resizing or repositioning of the baseline. They are explicitly designed to match the surrounding text and to be more readable without affecting the line height.</p> <div class="figure"> <img alt="comparison between real subscript glyphs and synthesized ones" height="250" src="images/realsubscripts.png" width="649"> <p class="caption">Subscript glyphs (top) vs. typical synthesized subscripts (bottom)</p> </div> <p>Individual values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-position" data-dfn-type="value" data-export id="font-variant-position-normal-value" title="normal!!font-variant-position">normal</dfn> <dd>None of the features listed below are enabled. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-position" data-dfn-type="value" data-export id="valdef-font-variant-position-sub">sub</dfn> <dd>Enables display of subscript variants (OpenType feature: <span class="tag">subs</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-position" data-dfn-type="value" data-export id="valdef-font-variant-position-super">super</dfn> <dd>Enables display of superscript variants (OpenType feature: <span class="tag">sups</span>). </dl> <p>Because of the semantic nature of subscripts and superscripts, when the value is either <a class="property css" data-link-type="property">sub</a> or <span class="property">super</span> for a given contiguous run of text, if a variant glyph is not available for all the characters in the run, simulated glyphs should be synthesized for all characters using reduced forms of the glyphs that would be used without this feature applied. This is done per run to avoid a mixture of variant glyphs and synthesized ones that would not align correctly. In the case of OpenType fonts that lack subscript or superscript glyphs for a given character, user agents <em>must</em> synthesize appropriate subscript and superscript glyphs.</p> <div class="figure"> <img alt="alternate superscripts vs. glyphs synthesized using superscript metrics" height="157" src="images/superscript-alt-synth.png" width="762"> <p class="caption">Superscript alternate glyph (left), synthesized superscript glyphs (middle), and incorrect mixture of the two (right)</p> </div> <p>In situations where text decorations are only applied to runs of text containing superscript or subscript glyphs, the synthesized glyphs may be used, to avoid problems with the placement of decorations.</p> <p>In the past, user agents have used font-size and vertical-align to simulate subscripts and superscripts for the <code class="highlight" title="HTML sub element">sub</code> and <code class="highlight" title="HTML sup element">sup</code> elements. To allow a backwards compatible way of defining subscripts and superscripts, it is recommended that authors use conditional rules <a data-link-type="biblio" href="#biblio-css3-conditional" title="CSS Conditional Rules Module Level 3">[CSS3-CONDITIONAL]</a> so that older user agents will still render subscripts and superscripts via the older mechanism.</p> <p>Because <code class="highlight"><c- k>font-size</c-><c- p>:</c-> smaller</code> is often used for these elements, the effective scaling factor applied to subscript and superscript text varies depending upon the size. For larger text, the font size is often reduced by a third but for smaller text sizes, the reduction can be much less. This allows subscripts and superscripts to remain readable even within elements using small text sizes. User agents should consider this when deciding how to synthesize subscript and superscript glyphs.</p> <p class="note" role="note">The OpenType font format defines subscript and superscript metrics in the <a href="https://docs.microsoft.com/en-us/typography/opentype/spec/os2">OS/2 table</a> <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> but these are not always accurate in practice and so cannot be relied upon when synthesizing subscript and superscript glyphs.</p> <p>Authors should note that fonts typically only provide subscript and superscript glyphs for a subset of all characters supported by the font. For example, while subscript and superscript glyphs are often available for Latin numbers, glyphs for punctuation and letter characters are less frequently provided. The synthetic fallback rules defined for this property try to ensure that subscripts and superscripts will always appear but the appearance may not match author expectations if the font used does not provide the appropriate alternate glyph for all characters contained in a subscript or superscript.</p> <p>This property is not cumulative. Applying it to elements within a subscript or superscript won’t nest the placement of a subscript or superscript glyph. Images contained within text runs where the value of this property is <a class="property css" data-link-type="property">sub</a> or <span class="property">super</span> will be drawn just as they would if the value was <span title="normal!!font-variant-position"><a class="property css" data-link-type="property">normal</a></span>.</p> <p>Because of these limitations, <a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position④">font-variant-position</a> is not recommended for use in user agent stylesheets. Authors should use it in cases where subscripts or superscripts will only contain the narrow range of characters supported by the fonts specified.</p> <p class="note" role="note">The variant glyphs use the same baseline as the default glyphs would use. There is no shift in the placement along the baseline, so the use of variant glyphs doesn’t affect the height of the inline box or alter the height of the linebox. This makes superscript and subscript variants ideal for situations where it’s important that leading remain constant, such as in multi-column layout.</p> <div class="example" id="ex-typical-ua-style"> <a class="self-link" href="#ex-typical-ua-style"></a> <p>A typical user agent default style for the <span class="tag">sub</span> element:</p> <pre class="highlight">sub <c- p>{</c-> <c- k>vertical-align</c-><c- p>:</c-> sub<c- p>;</c-> <c- k>font-size</c-><c- p>:</c-> smaller<c- p>;</c-> <c- k>line-height</c-><c- p>:</c-> normal<c- p>;</c-> <c- p>}</c-> </pre> <p>Using <a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position⑤">font-variant-position</a> to specify typographic subscripts in a way that will still show subscripts in older user agents:</p> <pre class="highlight"><c- n>@supports</c-> <c- p>(</c-> font-variant-position: sub <c- p>)</c-> <c- p>{</c-> sub <c- p>{</c-> <c- k>vertical-align</c-><c- p>:</c-> baseline<c- p>;</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>100</c-><c- k>%</c-><c- p>;</c-> <c- k>line-height</c-><c- p>:</c-> inherit<c- p>;</c-> <c- k>font-variant-position</c-><c- p>:</c-> sub<c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> <p>User agents that support the <a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position⑥">font-variant-position</a> property will select a subscript variant glyph and render this without adjusting the baseline or font-size. Older user agents will ignore the <span class="property" id="ref-for-propdef-font-variant-position⑦">font-variant-position</span> property definition and use the standard defaults for subscripts. </p> </div> <h3 class="heading settled" data-level="6.6" id="font-variant-caps-prop"><span class="secno">6.6. </span><span class="content"> Capitalization: the <a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps②">font-variant-caps</a> property</span><a class="self-link" href="#font-variant-caps-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-caps"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-caps">font-variant-caps</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①⓪">|</a> small-caps <span id="ref-for-comb-one①①①">|</span> all-small-caps <span id="ref-for-comb-one①①②">|</span> petite-caps <span id="ref-for-comb-one①①③">|</span> all-petite-caps <span id="ref-for-comb-one①①④">|</span> unicase <span id="ref-for-comb-one①①⑤">|</span> titling-caps <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-01.html" title="css/css-fonts/font-variant-caps-01.html">font-variant-caps-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-02.html" title="css/css-fonts/font-variant-caps-02.html">font-variant-caps-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-03.html" title="css/css-fonts/font-variant-caps-03.html">font-variant-caps-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-04.html" title="css/css-fonts/font-variant-caps-04.html">font-variant-caps-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-05.html" title="css/css-fonts/font-variant-caps-05.html">font-variant-caps-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-06.html" title="css/css-fonts/font-variant-caps-06.html">font-variant-caps-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps-07.html" title="css/css-fonts/font-variant-caps-07.html">font-variant-caps-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-caps.html" title="css/css-fonts/font-variant-caps.html">font-variant-caps.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-caps.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-caps.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-caps-computed.html" title="css/css-fonts/parsing/font-variant-caps-computed.html">font-variant-caps-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-caps-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-caps-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-caps-invalid.html" title="css/css-fonts/parsing/font-variant-caps-invalid.html">font-variant-caps-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-caps-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-caps-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-caps-valid.html" title="css/css-fonts/parsing/font-variant-caps-valid.html">font-variant-caps-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-caps-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-caps-valid.html"><small>(source)</small></a> </ul> </details> <p>This property allows the selection of alternate glyphs used for small or petite capitals or for titling. These glyphs are specifically designed to blend well with the surrounding normal glyphs, to maintain the weight and readability which suffers when text is simply resized to fit this purpose.</p> <p>Individual values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="font-variant-caps-normal-value" title="normal!!font-variant-caps">normal</dfn> <dd>None of the features listed below are enabled. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="valdef-font-variant-caps-small-caps">small-caps</dfn> <dd> Enables display of small capitals (OpenType feature: <span class="tag">smcp</span>). Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. <div class="featex"><img alt="small-caps example" height="65" src="images/smcp.png" width="300"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="valdef-font-variant-caps-all-small-caps">all-small-caps</dfn> <dd>Enables display of small capitals for both upper and lowercase letters (OpenType features: <span class="tag">c2sc, smcp</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="valdef-font-variant-caps-petite-caps">petite-caps</dfn> <dd>Enables display of petite capitals (OpenType feature: <span class="tag">pcap</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="valdef-font-variant-caps-all-petite-caps">all-petite-caps</dfn> <dd>Enables display of petite capitals for both upper and lowercase letters (OpenType features: <span class="tag">c2pc, pcap</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="valdef-font-variant-caps-unicase">unicase</dfn> <dd>Enables display of mixture of small capitals for uppercase letters with normal lowercase letters (OpenType feature: <span class="tag">unic</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-caps" data-dfn-type="value" data-export id="valdef-font-variant-caps-titling-caps">titling-caps</dfn> <dd>Enables display of titling capitals (OpenType feature: <span class="tag">titl</span>). Uppercase letter glyphs are often designed for use with lowercase letters. When used in all uppercase titling sequences they can appear too strong. Titling capitals are designed specifically for this situation. </dl> <p>The availability of these glyphs is based on whether a given feature is defined or not in the feature list of the font. User agents can optionally decide this on a per-script basis but should explicitly not decide this on a per-character basis.</p> <p>Some fonts may only support a subset or none of the features described for this property. For backwards compatibility with CSS 2.1, if <a class="property css" data-link-type="property">small-caps</a> or <span class="property">all-small-caps</span> is specified but small-caps glyphs are not available for a given font, user agents should simulate a small-caps font, for example by taking a normal font and replacing the glyphs for lowercase letters with scaled versions of the glyphs for uppercase characters (replacing the glyphs for both upper and lowercase letters in the case of <span class="property">all-small-caps</span>).</p> <div class="figure" style="padding: 0; margin: auto;"> <img alt="synthetic vs. real small-caps" class="hires" src="images/synthetic-vs-real-small-caps.png" width="512"> <p class="caption">Synthetic vs. real small-caps</p> </div> <p>The <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings②">font-feature-settings</a> property also affects the decision of whether or not to use a simulated small-caps font (unlike CSS Fonts 3).</p> <p></p> <div class="example" id="ex-small-caps"> <a class="self-link" href="#ex-small-caps"></a> <pre class="highlight">#example1 <c- p>{</c-> <c- k>font-variant-caps</c-><c- p>:</c-> small-caps<c- p>;</c-> <c- p>}</c->#example2 <c- p>{</c-> <c- k>font-variant-caps</c-><c- p>:</c-> small-caps<c- p>;</c-> <c- k>font-feature-settings</c-><c- p>:</c-> <c- s>'smcp'</c-> <c- m>0</c-><c- p>;</c-> <c- p>}</c-></pre> <p>For fonts which don’t support small caps, both #example1 and #example2 should be rendered with synthesized small caps. However, for fonts which do support small caps, #example1 should be rendered with native small caps, while #example2 should be rendered without any small-caps (native or synthesized).</p> </div> <p>To match the surrounding text, a font may provide alternate glyphs for caseless characters when these features are enabled but when a user agent simulates small capitals, it must not attempt to simulate alternates for codepoints which are considered caseless.</p> <div class="figure" style="padding: 0; margin: auto;"> <img alt="caseless characters with small-caps, all-small-caps enabled" class="hires" src="images/small-capitals-variations.png" width="418"> <p class="caption">Caseless characters with small-caps, all-small-caps enabled</p> </div> <p>If either <a class="property css" data-link-type="property">petite-caps</a> or <span class="property">all-petite-caps</span> is specified for a font that doesn’t support these features, the property behaves as if <span class="property">small-caps</span> or <span class="property">all-small-caps</span>, respectively, had been specified. If <span class="property">unicase</span> is specified for a font that doesn’t support that feature, the property behaves as if <span class="property">small-caps</span> was applied only to lowercased uppercase letters. If <span class="property">titling-caps</span> is specified with a font that does not support this feature, this property has no visible effect. When simulated small capital glyphs are used, for scripts that lack uppercase and lowercase letters, <span class="property">small-caps</span>, <span class="property">all-small-caps</span>, <span class="property">petite-caps</span>, <span class="property">all-petite-caps</span> and <span class="property">unicase</span> have no visible effect.</p> <p>When casing transforms are used to simulate small capitals, the casing transformations must match those used for the <span class="property"><a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-text-4/#propdef-text-transform" id="ref-for-propdef-text-transform">text-transform</a></span> property.</p> <p>As a last resort, unscaled uppercase letter glyphs in a normal font may replace glyphs in a small-caps font so that the text appears in all uppercase letters.</p> <div class="figure" style="padding: 0; margin: auto;"> <img alt="using all-small-caps in acronym-laden text" class="hires" src="images/acronym-laden-text.png" width="596"> <p class="caption">Using small capitals to improve readability in acronym-laden text</p> </div> <div class="example" id="ex-quote-italic-small-caps"> <a class="self-link" href="#ex-quote-italic-small-caps"></a> <p>Quotes rendered italicized, with small-caps on the first line:</p> <pre class="highlight">blockquote <c- p>{</c-> <c- k>font-style</c-><c- p>:</c-> italic<c- p>;</c-> <c- p>}</c->blockquote:first-line <c- p>{</c-> <c- k>font-variant</c-><c- p>:</c-> small-caps<c- p>;</c-> <c- p>}</c-> &lt;blockquote><a href="https://lists.w3.org/Archives/Public/www-style/2009Dec/0036.html" style="text-decoration: none; border: none;">I’ll be honor-bound to slap them like a haddock.</a>&lt;/blockquote> </pre> </div> <h3 class="heading settled" data-level="6.7" id="font-variant-numeric-prop"><span class="secno">6.7. </span><span class="content"> Numerical formatting: the <a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric①">font-variant-numeric</a> property</span><a class="self-link" href="#font-variant-numeric-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-numeric"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-numeric">font-variant-numeric</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①⑥">|</a> [ <a class="production css" data-link-type="type" href="#numeric-figure-values" id="ref-for-numeric-figure-values">&lt;numeric-figure-values></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any⑨">||</a> <a class="production css" data-link-type="type" href="#numeric-spacing-values" id="ref-for-numeric-spacing-values">&lt;numeric-spacing-values></a> <span id="ref-for-comb-any①⓪">||</span> <a class="production css" data-link-type="type" href="#numeric-fraction-values" id="ref-for-numeric-fraction-values">&lt;numeric-fraction-values></a> <span id="ref-for-comb-any①①">||</span> ordinal <span id="ref-for-comb-any①②">||</span> slashed-zero ] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-01.html" title="css/css-fonts/font-variant-numeric-01.html">font-variant-numeric-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-02.html" title="css/css-fonts/font-variant-numeric-02.html">font-variant-numeric-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-03.html" title="css/css-fonts/font-variant-numeric-03.html">font-variant-numeric-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-04.html" title="css/css-fonts/font-variant-numeric-04.html">font-variant-numeric-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-05.html" title="css/css-fonts/font-variant-numeric-05.html">font-variant-numeric-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-06.html" title="css/css-fonts/font-variant-numeric-06.html">font-variant-numeric-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-07.html" title="css/css-fonts/font-variant-numeric-07.html">font-variant-numeric-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-08.html" title="css/css-fonts/font-variant-numeric-08.html">font-variant-numeric-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric-09.html" title="css/css-fonts/font-variant-numeric-09.html">font-variant-numeric-09.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric-09.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric-09.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-numeric.html" title="css/css-fonts/font-variant-numeric.html">font-variant-numeric.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-numeric.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-numeric.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-numeric-computed.html" title="css/css-fonts/parsing/font-variant-numeric-computed.html">font-variant-numeric-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-numeric-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-numeric-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-numeric-invalid.html" title="css/css-fonts/parsing/font-variant-numeric-invalid.html">font-variant-numeric-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-numeric-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-numeric-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-numeric-valid.html" title="css/css-fonts/parsing/font-variant-numeric-valid.html">font-variant-numeric-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-numeric-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-numeric-valid.html"><small>(source)</small></a> </ul> </details> <p>Specifies control over numerical forms. The example below shows how some of these values can be combined to influence the rendering of tabular data with fonts that support these features. Within normal paragraph text, proportional numbers are used while tabular numbers are used so that columns of numbers line up properly:</p> <div class="figure" style="padding: 0; margin: auto;"> <img alt="combining number styles" height="374" src="images/numberstyles.png" width="453"> <p class="caption">Using number styles</p> </div> <p>Possible combinations:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="numeric-figure-values"><var>&lt;numeric-figure-values></var></dfn> = <c- p>[</c-> <span>lining-nums</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①⑦">|</a> <span>oldstyle-nums</span> <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="numeric-spacing-values"><var>&lt;numeric-spacing-values></var></dfn> = <c- p>[</c-> <span>proportional-nums</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①⑧">|</a> <span>tabular-nums</span> <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="numeric-fraction-values"><var>&lt;numeric-fraction-values></var></dfn> = <c- p>[</c-> <span>diagonal-fractions</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①⑨">|</a> <span>stacked-fractions</span> <c- p>]</c-></pre> <p>Individual values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="font-variant-numeric-normal-value" title="normal!!font-variant-numeric">normal</dfn> <dd>None of the features listed below are enabled. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-lining-nums">lining-nums</dfn> <dd>Enables display of lining numerals (OpenType feature: <span class="tag">lnum</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-oldstyle-nums">oldstyle-nums</dfn> <dd>Enables display of old-style numerals (OpenType feature: <span class="tag">onum</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-proportional-nums">proportional-nums</dfn> <dd>Enables display of proportional numerals (OpenType feature: <span class="tag">pnum</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-tabular-nums">tabular-nums</dfn> <dd>Enables display of tabular numerals (OpenType feature: <span class="tag">tnum</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-diagonal-fractions">diagonal-fractions</dfn> <dd> Enables display of lining diagonal fractions (OpenType feature: <span class="tag">frac</span>). <div class="featex"><img alt="diagonal fraction example" height="60" src="images/frac.png" width="350"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-stacked-fractions">stacked-fractions</dfn> <dd> Enables display of lining stacked fractions (OpenType feature: <span class="tag">afrc</span>). <div class="featex"><img alt="stacked fraction example" height="63" src="images/afrc.png" width="350"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-ordinal">ordinal</dfn> <dd> Enables display of letter forms used with ordinal numbers (OpenType feature: <span class="tag">ordn</span>). <div class="featex"><img alt="ordinals example" height="71" src="images/ordinals.png" width="635"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-numeric" data-dfn-type="value" data-export id="valdef-font-variant-numeric-slashed-zero">slashed-zero</dfn> <dd> Enables display of slashed zeros (OpenType feature: <span class="tag">zero</span>). <div class="featex"><img alt="slashed zero example" height="58" src="images/zero.png" width="300"></div> </dl> <div class="example" id="ex-ordinal-form"> <a class="self-link" href="#ex-ordinal-form"></a> <p>In the case of <a class="property css" data-link-type="property">ordinal</a>, although ordinal forms are often the same as superscript forms, they are marked up differently.</p> <p>For superscripts, the variant property is only applied to the sub-element containing the superscript:</p> <pre class="highlight">sup <c- p>{</c-> <c- k>font-variant-position</c-><c- p>:</c-> super<c- p>;</c-> <c- p>}</c-> x&lt;sup><c- m>2</c->&lt;/sup> </pre> <p>For ordinals, the variant property is applied to the entire ordinal number rather than just to the suffix (or to the containing paragraph):</p> <pre class="highlight">.ordinal <c- p>{</c-> <c- k>font-variant-numeric</c-><c- p>:</c-> ordinal<c- p>;</c-> <c- p>}</c-> &lt;span class=<c- s>"ordinal"</c->><c- m>17</c-><c- k>th</c->&lt;/span> </pre> <p>In this case only the "th" will appear in ordinal form, the digits will remain unchanged. Depending upon the typographic traditions used in a given language, ordinal forms may differ from superscript forms. In Italian, for example, ordinal forms sometimes include an underline in the ordinal design.</p> </div> <div class="example" id="ex-steak-marinade"> <a class="self-link" href="#ex-steak-marinade"></a> <p>A simple flank steak marinade recipe, rendered with automatic fractions and old-style numerals:</p> <pre class="highlight">.amount <c- p>{</c-> <c- k>font-variant-numeric</c-><c- p>:</c-> oldstyle-nums diagonal-fractions<c- p>;</c-> <c- p>}</c-> &lt;h4>Steak marinade:&lt;/h4> &lt;ul> &lt;li>&lt;span class=<c- s>"amount"</c->><c- m>2</c->&lt;/span> tbsp olive oil&lt;/li> &lt;li>&lt;span class=<c- s>"amount"</c->><c- m>1</c->&lt;/span> tbsp lemon juice&lt;/li> &lt;li>&lt;span class=<c- s>"amount"</c->><c- m>1</c->&lt;/span> tbsp soy sauce&lt;/li> &lt;li>&lt;span class=<c- s>"amount"</c->><c- m>1</c-> <c- m>1</c->/<c- m>2</c->&lt;/span> tbsp dry minced onion&lt;/li> &lt;li>&lt;span class=<c- s>"amount"</c->><c- m>2</c-> <c- m>1</c->/<c- m>2</c->&lt;/span> tsp italian seasoning&lt;/li> &lt;li>Salt &amp;amp<c- p>;</c-> pepper&lt;/li> &lt;/ul> &lt;p>Mix the meat with the marinade and let it sit covered in the refrigerator for a few hours or overnight.&lt;/p> </pre> <p>Note that the fraction feature is only applied to values not the entire paragraph. Fonts often implement this feature using contextual rules based on the use of the slash ('/') character. As such, it’s not suitable for use as a paragraph-level style.</p> </div> <h3 class="heading settled" data-level="6.8" id="font-variant-alternates-prop"><span class="secno">6.8. </span><span class="content"> Alternates and swashes: the <a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates①">font-variant-alternates</a> property</span><a class="self-link" href="#font-variant-alternates-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-alternates"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-alternates">font-variant-alternates</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②⓪">|</a> [ stylistic(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value">&lt;feature-value-name></a>) <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any①③">||</a> historical-forms <span id="ref-for-comb-any①④">||</span> styleset(<span class="production" id="ref-for-feature-value-name-value①">&lt;feature-value-name></span><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma⑥">#</a>) <span id="ref-for-comb-any①⑤">||</span> character-variant(<span class="production" id="ref-for-feature-value-name-value②">&lt;feature-value-name></span><span id="ref-for-mult-comma⑦">#</span>) <span id="ref-for-comb-any①⑥">||</span> swash(<span class="production" id="ref-for-feature-value-name-value③">&lt;feature-value-name></span>) <span id="ref-for-comb-any①⑦">||</span> ornaments(<span class="production" id="ref-for-feature-value-name-value④">&lt;feature-value-name></span>) <span id="ref-for-comb-any①⑧">||</span> annotation(<span class="production" id="ref-for-feature-value-name-value⑤">&lt;feature-value-name></span>) ] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/alternates-order.html" title="css/css-fonts/alternates-order.html">alternates-order.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/alternates-order.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/alternates-order.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-01.html" title="css/css-fonts/font-variant-alternates-01.html">font-variant-alternates-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-02.html" title="css/css-fonts/font-variant-alternates-02.html">font-variant-alternates-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-03.html" title="css/css-fonts/font-variant-alternates-03.html">font-variant-alternates-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-04.html" title="css/css-fonts/font-variant-alternates-04.html">font-variant-alternates-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-05.html" title="css/css-fonts/font-variant-alternates-05.html">font-variant-alternates-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-06.html" title="css/css-fonts/font-variant-alternates-06.html">font-variant-alternates-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-07.html" title="css/css-fonts/font-variant-alternates-07.html">font-variant-alternates-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-08.html" title="css/css-fonts/font-variant-alternates-08.html">font-variant-alternates-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-09.html" title="css/css-fonts/font-variant-alternates-09.html">font-variant-alternates-09.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-09.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-09.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-10.html" title="css/css-fonts/font-variant-alternates-10.html">font-variant-alternates-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-11.html" title="css/css-fonts/font-variant-alternates-11.html">font-variant-alternates-11.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-11.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-11.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-12.html" title="css/css-fonts/font-variant-alternates-12.html">font-variant-alternates-12.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-12.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-12.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-13.html" title="css/css-fonts/font-variant-alternates-13.html">font-variant-alternates-13.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-13.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-13.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-14.html" title="css/css-fonts/font-variant-alternates-14.html">font-variant-alternates-14.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-14.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-14.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-15.html" title="css/css-fonts/font-variant-alternates-15.html">font-variant-alternates-15.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-15.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-15.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-16.html" title="css/css-fonts/font-variant-alternates-16.html">font-variant-alternates-16.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-16.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-16.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-17.html" title="css/css-fonts/font-variant-alternates-17.html">font-variant-alternates-17.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-17.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-17.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-18.html" title="css/css-fonts/font-variant-alternates-18.html">font-variant-alternates-18.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-18.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-18.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-19.html" title="css/css-fonts/font-variant-alternates-19.html">font-variant-alternates-19.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-19.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-19.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-layers.html" title="css/css-fonts/font-variant-alternates-layers.html">font-variant-alternates-layers.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-layers.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-layers.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-alternates-parsing.html" title="css/css-fonts/font-variant-alternates-parsing.html">font-variant-alternates-parsing.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-alternates-parsing.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-alternates-parsing.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-alternates-invalid.html" title="css/css-fonts/parsing/font-variant-alternates-invalid.html">font-variant-alternates-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-alternates-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-alternates-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-alternates-valid.html" title="css/css-fonts/parsing/font-variant-alternates-valid.html">font-variant-alternates-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-alternates-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-alternates-valid.html"><small>(source)</small></a> </ul> </details> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="feature-value-name-value">&lt;feature-value-name></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-ident" id="ref-for-typedef-ident">&lt;ident></a></pre> <p>For any given character, fonts can provide a variety of alternate glyphs in addition to the default glyph for that character. This property provides control over the selection of these alternate glyphs.</p> <p>For many of the property values listed below, several different alternate glyphs are available. How many alternates are available and what they represent is font-specific, so these are each marked <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="font-specific">font specific</dfn> in the value definitions below. Because the nature of these alternates is font-specific, the <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values④">@font-feature-values</a> rule is used to define values for a specific font family or set of families that associate a font-specific numeric <a class="production css" data-link-type="type">&lt;feature-index></a> with a custom <a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value⑥">&lt;feature-value-name></a>, which is then used in this property to select specific alternates:</p> <pre class="example highlight" id="ex-noble-script"><a class="self-link" href="#ex-noble-script"></a><c- n>@font-feature-values</c-> Noble Script <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>swishy</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>flowing</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> p <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Noble Script<c- p>;</c-> <c- k>font-variant-alternates</c-><c- p>:</c-> <c- nf>swash</c-><c- p>(</c->flowing<c- p>);</c-> <c- c>/* use swash alternate #2 */</c-> <c- p>}</c-> </pre> <p>When a particular <a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value⑦">&lt;feature-value-name></a> has not been defined for a given family or for a particular feature type, the computed value must be the same as if it had been defined. However, property values that contain these undefined <span class="production" id="ref-for-feature-value-name-value⑧">&lt;feature-value-name></span> identifiers must be ignored when choosing glyphs.</p> <pre class="example highlight" id="ex-effectively-same"><a class="self-link" href="#ex-effectively-same"></a><c- c>/* these two style rules are effectively the same */</c-> p <c- p>{</c-> <c- k>font-variant-alternates</c-><c- p>:</c-> <c- nf>swash</c-><c- p>(</c->unknown-value<c- p>);</c-> <c- p>}</c-> <c- c>/* not a defined value, ignored */</c-> p <c- p>{</c-> <c- k>font-variant-alternates</c-><c- p>:</c-> normal<c- p>;</c-> <c- p>}</c-> </pre> <p>This allows values to be defined and used for a given set of font families but ignored if fallback occurs, since the font family name would be different. If a given value is outside the range supported by a given font, the value is ignored. These values never apply to generic font families.</p> <p>Individual values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="font-variant-alternates-normal-value" title="normal!!font-variant-alternates">normal</dfn> <dd>None of the features listed below are enabled. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="valdef-font-variant-alternates-historical-forms">historical-forms</dfn> <dd> Enables display of historical forms (OpenType feature: <span class="tag">hist</span>). <div class="featex"><img alt="historical form example" height="65" src="images/hist.png" width="380"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="stylistic" title="stylistic">stylistic(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value⑨">&lt;feature-value-name></a>)</dfn> <dd> Enables display of stylistic alternates (<em>font specific</em>, OpenType feature: <span class="tag">salt <a class="production css" data-link-type="type">&lt;feature-index></a></span>). <div class="featex"><img alt="stylistic alternate example" height="58" src="images/salt.png" width="300"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="styleset" title="styleset">styleset(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value①⓪">&lt;feature-value-name></a>#)</dfn> <dd> Enables display with stylistic sets (<em>font specific</em>, OpenType feature: <span class="tag">ss<a class="production css" data-link-type="type">&lt;feature-index></a></span> OpenType currently defines <span class="tag">ss01</span> through <span class="tag">ss20</span>). <div class="featex"><img alt="styleset example" height="76" src="images/ssnn.png" width="700"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="character-variant" title="character-variant">character-variant(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value①①">&lt;feature-value-name></a>#)</dfn> <dd>Enables display of specific character variants (<em>font specific</em>, OpenType feature: <span class="tag">cv<a class="production css" data-link-type="type">&lt;feature-index></a></span> OpenType currently defines <span class="tag">cv01</span> through <span class="tag">cv99</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="swash" title="swash">swash(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value①②">&lt;feature-value-name></a>)</dfn> <dd> Enables display of swash glyphs (<em>font specific</em>, OpenType feature: <span class="tag">swsh <a class="production css" data-link-type="type">&lt;feature-index></a>, cswh <span class="production">&lt;feature-index></span></span>). <div class="featex"><img alt="swash example" height="64" src="images/swsh.png" width="380"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="ornaments" title="ornaments">ornaments(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value①③">&lt;feature-value-name></a>)</dfn> <dd> Enables replacement of default glyphs with ornaments, if provided in the font (<em>font specific</em>, OpenType feature: <span class="tag">ornm <a class="production css" data-link-type="type">&lt;feature-index></a></span>). Some fonts may offer ornament glyphs as alternates for a wide collection of characters; however, displaying arbitrary characters (e.g., alphanumerics) as ornaments is poor practice as it distorts the semantics of the data. Font designers are encouraged to encode all ornaments (except those explicitly encoded in the Unicode Dingbats blocks, etc.) as alternates for the bullet character (U+2022) to allow authors to select the desired glyph using <a class="css" data-link-type="maybe" href="#ornaments" id="ref-for-ornaments">ornaments()</a>. <div class="featex"><img alt="ornaments example" height="45" src="images/ornm.png" width="350"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-alternates" data-dfn-type="value" data-export id="annotation" title="annotation">annotation(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value①④">&lt;feature-value-name></a>)</dfn> <dd> Enables display of alternate annotation forms (<em>font specific</em>, OpenType feature: <span class="tag">nalt <a class="production css" data-link-type="type">&lt;feature-index></a></span>). <div class="featex"><img alt="alternate annotation form example" height="62" src="images/nalt.png" width="350"></div> </dl> <h3 class="heading settled" data-level="6.9" id="font-feature-values"><span class="secno">6.9. </span><span class="content"> Defining font specific alternates: the <dfn class="dfn-paneled css" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values">@font-feature-values</dfn> rule</span><a class="self-link" href="#font-feature-values"></a></h3> <p>Several of the possible values of <a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates②">font-variant-alternates</a> listed above are labeled as <em>font specific</em>; a font can define not just a single glyph for the feature, but <em>multiple</em> possible glyph variants, and associate each one with a numeric index to let you choose which to turn on.</p> <p>These numeric indexes are idiosyncratic to each face; a <code class="highlight">swsh <c- m>1</c-></code> feature on one font face might turn on the swash version of capital Q, while on another font face it turns on the swash version of the &amp;. Thus, specifying the index in <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings③">font-feature-settings</a> requires that the author know <em>exactly</em> which font will be used on an element; if they get it wrong (due to font fallback selecting a different font) they might end up turning on an entirely different, and undesirable, feature to what they wanted! It also means that the author can’t easily turn on similar features for elements with different fonts; they have to individually set different <span class="property" id="ref-for-propdef-font-feature-settings④">font-feature-settings</span> values for each that uses the correct numeric indexes for the desired features.</p> <p>To fix this issue, the <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values⑤">@font-feature-values</a> rule lets an author assign, for each font face, a human-friendly name to specific feature indexes. Using these friendly names, an author can easily turn on similar features regardless of the font in use (if they’ve defined that name for all the fonts), and be sure they’re not accidentally turning on unrelated features (as fonts without those names defined for them simply won’t do anything).</p> <div class="example" id="ex-font-feature-values"> <a class="self-link" href="#ex-font-feature-values"></a> <p>Using a commonly named value allows authors to use a single style rule to cover a set of fonts for which the underlying selector is different for each font. If either font in the example below is found, a circled number glyph will be used: </p> <pre class="highlight"><c- n>@font-feature-values</c-> Otaru Kisa <c- p>{</c-> <c- n>@annotation</c-> <c- p>{</c-> <c- k>circled</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>black-boxed</c-><c- p>:</c-> <c- m>3</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> <c- n>@font-feature-values</c-> Taisho Gothic <c- p>{</c-> <c- n>@annotation</c-> <c- p>{</c-> <c- k>boxed</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>circled</c-><c- p>:</c-> <c- m>4</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> h3.title <c- p>{</c-> <c- c>/* circled form defined for both fonts */</c-> font-family: Otaru Kisa<c- p>,</c-> Taisho Gothic<c- p>;</c-> <c- k>font-variant</c-><c- p>:</c-> <c- nf>annotation</c-><c- p>(</c->circled<c- p>);</c-> <c- p>}</c-> </pre> <p>Trying to turn on the "circled" forms for either font explicitly, using <a class="property css" data-link-type="property">font-feature-values</a>, would require the author know <em>for certain</em> which font will be used; if they expected "Otaru Kisa" and wrote <span class="css">font-feature-values: nalt 1;</span>, it would turn on "circled" characters in Otara Kisa, but would instead turn on <strong>boxed</strong> characters if the system fell back to Taisho Gothic, as that’s what Taisho Gothic associates with <code class="highlight">nalt <c- m>1</c-></code>!</p> </div> <h4 class="heading settled" data-level="6.9.1" id="font-feature-values-syntax"><span class="secno">6.9.1. </span><span class="content">Basic syntax</span><a class="self-link" href="#font-feature-values-syntax"></a></h4> <p>An <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values⑥">@font-feature-values</a> rule’s prelude contains a list of font family names, followed by a block containing multiple <span class="css">feature-value-block</span>s, a special type of subsidiary at-rule. Each <span class="css">feature-value-block</span>' contains declarations mapping author-chosen human-friendly names (such as "flowing") to feature indexes for the associated feature.</p> <p>Each <a class="production css" data-link-type="type">&lt;font-feature-value></a> has the same meaning as the corresponding value of the <a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates③">font-variant-alternates</a> property.</p> <pre class="prod highlight"><c- n>@font-feature-values</c-> = <c- n>@font-feature-values</c-> <a class="production" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value①①">&lt;family-name></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma⑧">#</a> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-rule-list" id="ref-for-typedef-declaration-rule-list">&lt;declaration-rule-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="dfn" data-export id="font-feature-values-font-feature-value-type">font-feature-value-type</dfn> = <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-stylistic" id="ref-for-at-ruledef-font-feature-values-stylistic">&lt;<c- n>@stylistic</c->></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②①">|</a> <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-historical-forms" id="ref-for-at-ruledef-font-feature-values-historical-forms">&lt;<c- n>@historical-forms</c->></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②②">|</a> <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-styleset" id="ref-for-at-ruledef-font-feature-values-styleset">&lt;<c- n>@styleset</c->></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②③">|</a> <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-character-variant" id="ref-for-at-ruledef-font-feature-values-character-variant">&lt;<c- n>@character-variant</c->></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②④">|</a> <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-swash" id="ref-for-at-ruledef-font-feature-values-swash">&lt;<c- n>@swash</c->></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②⑤">|</a> <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-ornaments" id="ref-for-at-ruledef-font-feature-values-ornaments">&lt;<c- n>@ornaments</c->></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②⑥">|</a> <a class="production" data-link-type="at-rule" href="#at-ruledef-font-feature-values-annotation" id="ref-for-at-ruledef-font-feature-values-annotation">&lt;<c- n>@annotation</c->></a> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-stylistic"><c- n>@stylistic</c-></dfn> = <c- n>@stylistic</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list①">&lt;declaration-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-historical-forms"><c- n>@historical-forms</c-></dfn> = <c- n>@historical-forms</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list②">&lt;declaration-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-styleset"><c- n>@styleset</c-></dfn> = <c- n>@styleset</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list③">&lt;declaration-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-character-variant"><c- n>@character-variant</c-></dfn> = <c- n>@character-variant</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list④">&lt;declaration-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-swash"><c- n>@swash</c-></dfn> = <c- n>@swash</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list⑤">&lt;declaration-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-ornaments"><c- n>@ornaments</c-></dfn> = <c- n>@ornaments</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list⑥">&lt;declaration-list></a> <c- p>}</c-> <dfn class="dfn-paneled" data-dfn-for="@font-feature-values" data-dfn-type="at-rule" data-export id="at-ruledef-font-feature-values-annotation"><c- n>@annotation</c-></dfn> = <c- n>@annotation</c-> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list⑦">&lt;declaration-list></a> <c- p>}</c-> </pre> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/alternates-order.html" title="css/css-fonts/alternates-order.html">alternates-order.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/alternates-order.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/alternates-order.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/test_font_feature_values_parsing.html" title="css/css-fonts/test_font_feature_values_parsing.html">test_font_feature_values_parsing.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/test_font_feature_values_parsing.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/test_font_feature_values_parsing.html"><small>(source)</small></a> </ul> </details> <p>The <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values⑦">@font-feature-values</a> prelude is a comma-delimited list of font family names that match the definition of <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value①②">&lt;family-name></a> for the <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①⑥">font-family</a> property. This means that only named font families are allowed; rules that include generic or system fonts in the list of font families are syntax errors. However, if a user agent defines a generic font to be a specific named font (e.g. Helvetica), the settings associated with that family name will be used. If syntax errors occur within the <span class="production" id="ref-for-family-name-value①③">&lt;family-name></span> list, the entire rule <span class="css" id="ref-for-at-ruledef-font-feature-values⑧">@font-feature-values</span> rule is invalid and must be ignored.</p> <p>The <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values⑨">@font-feature-values</a> block accepts <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-rule-list" id="ref-for-typedef-declaration-rule-list①">&lt;declaration-rule-list></a> as its contents; these list items are either:</p> <ul> <li data-md> <p><a data-link-type="dfn" href="https://drafts.csswg.org/css-syntax-3/#at-rule" id="ref-for-at-rule">at-rules</a> named by one of the <a class="production css" data-link-type="type">&lt;font-feature-value-type></a> at-keyword tokens</p> </ul> <p>or</p> <ul> <li data-md> <p>the <a class="property" data-link-type="propdesc" href="#descdef-font-feature-values-font-display" id="ref-for-descdef-font-feature-values-font-display③">font-display</a> descriptor.</p> </ul> <p>Specifying the same <a class="production css" data-link-type="type">&lt;font-feature-value-type></a> more than once is valid; their contents are cascaded together. Each <span class="production">&lt;feature-value-block></span> accepts a list of <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-1/#cssstyledeclaration-declarations" id="ref-for-cssstyledeclaration-declarations">declarations</a>, the <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="font feature value declaration" data-noexport id="font-feature-value-declaration">font feature value declarations</dfn>, where the declaration’s name can be any <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-css-identifier" id="ref-for-css-css-identifier">identifier</a>, and the value must be a list of one or more non-negative <span class="production">&lt;integer></span>s.</p> <p>The <a class="production css" data-link-type="type">&lt;feature-value-block></a>s accept any declaration name; these names must be identifiers, per standard CSS syntax rules, and are <a data-link-type="dfn" href="https://w3c.github.io/i18n-glossary/#dfn-case-sensitive" id="ref-for-dfn-case-sensitive">case-sensitive</a> (so <span class="css">foo: 1;</span> and <span class="css">FOO: 2</span> define two different features). Each declaration’s value must match the grammar <span class="css">&lt;integer [0,∞]>+</span>, or else the declaration is invalid and must be ignored.</p> <p class="note" role="note"><span class="marker">Note:</span> Each feature name is unique only within a single <a class="production css" data-link-type="type">&lt;feature-value-block></a>. Between different <span class="production">&lt;feature-value-block></span>s, or the same type of <span class="production">&lt;feature-value-block></span>s in separate <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①⓪">@font-feature-values</a> rules, names can be reused without colliding.</p> <p>For each <a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value①④">&lt;family-name></a> in the <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①①">@font-feature-values</a> prelude, each <a data-link-type="dfn" href="#font-feature-value-declaration" id="ref-for-font-feature-value-declaration">font feature value declaration</a> defines a mapping between a (family name, feature block name, declaration name) <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple">tuple</a> and the list of one or more integers from the declaration’s value. If the same tuple appears more than once in a document (such as if a single block), the last-defined one is used.</p> <div class="example" id="ex-same-font-feature-values"> <a class="self-link" href="#ex-same-font-feature-values"></a> For example, the following all define the exact same set of font feature values: <pre class="highlight"><c- c>/* Default */</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>cool</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> <c- c>/* Repeated declaration names */</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>0</c-><c- p>;</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>cool</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> <c- c>/* Multiple blocks of the same type */</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>cool</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> <c- c>/* Multiple rules for the same family */</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>cool</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> </div> <p>A syntax error within a <a data-link-type="dfn" href="#font-feature-value-declaration" id="ref-for-font-feature-value-declaration①">font feature value declaration</a> makes the declaration invalid and ignored, but does not invalidate the <a data-link-type="dfn">font feature value block</a> it occurs in. An unknown at-rule within a <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①②">@font-feature-values</a> block (not using one of the predefined list of allowed at-keywords) makes that at-rule invalid and ignored, but does not invalidate the <span class="css" id="ref-for-at-ruledef-font-feature-values①③">@font-feature-values</span> rule.</p> <div class="example" id="ex-invalid-ignored"> <a class="self-link" href="#ex-invalid-ignored"></a> Rules that are equivalent given syntax error handling: <pre class="highlight"><c- n>@font-feature-values</c-> Bongo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>ornate</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> annotation <c- p>{</c-> <c- k>boxed</c-><c- p>:</c-> <c- m>4</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* should be @annotation! */</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>double-loops</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>flowing</c-><c- p>:</c-> <c- m>-1</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* negative value */</c-> <c- n>@ornaments</c-> <c- p>;</c-> <c- c>/* incomplete definition */</c-> <c- n>@styleset</c-> <c- p>{</c-> <c- k>double-W</c-><c- p>:</c-> <c- m>14</c-><c- p>;</c-> <c- k>sharp-terminals</c-><c- p>:</c-> <c- m>16</c-> <c- m>1</c-> <c- p>}</c-> <c- c>/* missing ; */</c-> redrum <c- c>/* random editing mistake */</c-> <c- p>}</c-> </pre> <p>The example above is equivalent to:</p> <pre class="highlight"><c- n>@font-feature-values</c-> Bongo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>ornate</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>double-loops</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- n>@styleset</c-> <c- p>{</c-> <c- k>double-W</c-><c- p>:</c-> <c- m>14</c-><c- p>;</c-> <c- k>sharp-terminals</c-><c- p>:</c-> <c- m>16</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> </div> <p>If multiple <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①④">@font-feature-values</a> rules are defined for a given family, the resulting values definitions are the union of the definitions contained within these rules. This allows a set of named values to be defined for a given font family globally for a site and specific additions made per-page.</p> <div class="example" id="ex-site-wide-per-page"> <a class="self-link" href="#ex-site-wide-per-page"></a> Using both site-wide and per-page feature values: <p>site.css:</p> <pre class="highlight"><c- n>@font-feature-values</c-> Mercury Serif <c- p>{</c-> <c- n>@styleset</c-> <c- p>{</c-> <c- k>stacked-g</c-><c- p>:</c-> <c- m>3</c-><c- p>;</c-> <c- c>/* "two-storey" versions of g, a */</c-> stacked-a: <c- m>4</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> <p>page.css:</p> <pre class="highlight"><c- n>@font-feature-values</c-> Mercury Serif <c- p>{</c-> <c- n>@styleset</c-> <c- p>{</c-> <c- k>geometric-m</c-><c- p>:</c-> <c- m>7</c-><c- p>;</c-> <c- c>/* alternate version of m */</c-> <c- p>}</c-> <c- p>}</c-> body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Mercury Serif<c- p>,</c-> serif<c- p>;</c-> <c- c>/* enable both the use of stacked g and alternate m */</c-> font-variant-alternates: <c- nf>styleset</c-><c- p>(</c->stacked-g<c- p>,</c-> geometric-m<c- p>);</c-> <c- p>}</c-> </pre> </div> <h4 class="heading settled" data-level="6.9.2" id="multi-value-features"><span class="secno">6.9.2. </span><span class="content"> Multi-valued feature value definitions</span><a class="self-link" href="#multi-value-features"></a></h4> <p>Most <em>font specific</em> functional values of the <a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates④">font-variant-alternates</a> property take a single value (e.g. <a class="css" data-link-type="maybe" href="#swash" id="ref-for-swash">swash()</a>) which enables the feature.</p> <pre class="example highlight" id="ex-single-valued-feature"><a class="self-link" href="#ex-single-valued-feature"></a><c- n>@font-feature-values</c-> Jupiter Serif <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>swishy</c-><c- p>:</c-> <c- m>5</c-><c- p>;</c-> <c- c>/* implies ss05 = 1 */</c-> swirly: <c- m>2</c-><c- p>;</c-> <c- c>/* implies ss02 = 1 */</c-> <c- p>}</c-> <c- p>}</c-> </pre> <p>The <a class="css" data-link-type="maybe" href="#character-variant" id="ref-for-character-variant">character-variant()</a> property value and the <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values-character-variant" id="ref-for-at-ruledef-font-feature-values-character-variant①">@character-variant</a> descriptor allow two values, which enables a feature (from the first value) and sets it to a given (second) value.</p> <pre class="example highlight" id="ex-two-valued-feature"><a class="self-link" href="#ex-two-valued-feature"></a><c- n>@font-feature-values</c-> MM Greek <c- p>{</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>alpha-2</c-><c- p>:</c-> <c- m>1</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv01 = 2 */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>beta-3</c-><c- p>:</c-> <c- m>2</c-> <c- m>3</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv02 = 3 */</c-> <c- p>}</c-> </pre> <p>For the <a class="css" data-link-type="maybe" href="#styleset" id="ref-for-styleset">styleset()</a> property value and <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values-styleset" id="ref-for-at-ruledef-font-feature-values-styleset①">@styleset</a> rule, multiple values indicate the style sets to be enabled. Values between 1 and 99 enable OpenType features <span class="tag">ss01</span> through <span class="tag">ss99</span>. However, the OpenType standard only officially defines <span class="tag">ss01</span> through <span class="tag">ss20</span>. For OpenType fonts, values greater than 99 or equal to 0 do not generate a syntax error when parsed but enable no OpenType features.</p> <pre class="example highlight" id="ex-multi-valued-feature"><a class="self-link" href="#ex-multi-valued-feature"></a><c- n>@font-feature-values</c-> Mars Serif <c- p>{</c-> <c- n>@styleset</c-> <c- p>{</c-> <c- k>alt-g</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- c>/* implies ss01 = 1 */</c-> curly-quotes: <c- m>3</c-><c- p>;</c-> <c- c>/* implies ss03 = 1 */</c-> code: <c- m>4</c-> <c- m>5</c-><c- p>;</c-> <c- c>/* implies ss04 = 1, ss05 = 1 */</c-> <c- p>}</c-> <c- n>@styleset</c-> <c- p>{</c-> <c- k>dumb</c-><c- p>:</c-> <c- m>125</c-><c- p>;</c-> <c- c>/* >99, ignored */</c-> <c- p>}</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>swishy</c-><c- p>:</c-> <c- m>3</c-> <c- m>5</c-><c- p>;</c-> <c- c>/* more than 1 value for swash, syntax error */</c-> <c- p>}</c-> <c- p>}</c-> p.codeblock <c- p>{</c-> <c- c>/* implies ss03 = 1, ss04 = 1, ss05 = 1 */</c-> font-variant-alternates: <c- nf>styleset</c-><c- p>(</c->curly-quotes<c- p>,</c-> code<c- p>);</c-> <c- p>}</c-></pre> <p>For <a class="production css" data-link-type="at-rule" href="#at-ruledef-font-feature-values-character-variant" id="ref-for-at-ruledef-font-feature-values-character-variant②">&lt;@character-variant></a>, a single value between 1 and 99 indicates the enabling of OpenType feature <span class="tag">cv01</span> through <span class="tag">cv99</span>. For OpenType fonts, values greater than 99 or equal to 0 are ignored but do not generate a syntax error when parsed but enable no OpenType features. When two values are listed, the first value indicates the feature used and the second the value passed for that feature. If more than two values are assigned to a given name, a syntax error occurs and the entire feature value definition is ignored.</p> <pre class="example highlight" id="ex-greek-variant-features"><a class="self-link" href="#ex-greek-variant-features"></a><c- n>@font-feature-values</c-> MM Greek <c- p>{</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>alpha-2</c-><c- p>:</c-> <c- m>1</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv01 = 2 */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>beta-3</c-><c- p>:</c-> <c- m>2</c-> <c- m>3</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv02 = 3 */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>epsilon</c-><c- p>:</c-> <c- m>5</c-> <c- m>3</c-> <c- m>6</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* more than 2 values, syntax error, definition ignored */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>gamma</c-><c- p>:</c-> <c- m>12</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv12 = 1 */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>zeta</c-><c- p>:</c-> <c- m>20</c-> <c- m>3</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv20 = 3 */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>zeta-2</c-><c- p>:</c-> <c- m>20</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* implies cv20 = 2 */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>silly</c-><c- p>:</c-> <c- m>105</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* >99, ignored */</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>dumb</c-><c- p>:</c-> <c- m>323</c-> <c- m>3</c-><c- p>;</c-> <c- p>}</c-> <c- c>/* >99, ignored */</c-> <c- p>}</c-> #title <c- p>{</c-> <c- c>/* use the third alternate beta, first alternate gamma */</c-> font-variant-alternates: <c- nf>character-variant</c-><c- p>(</c->beta-3<c- p>,</c-> gamma<c- p>);</c-> <c- p>}</c-> p <c- p>{</c-> <c- c>/* zeta-2 follows zeta, implies cv20 = 2 */</c-> font-variant-alternates: <c- nf>character-variant</c-><c- p>(</c->zeta<c- p>,</c-> zeta-2<c- p>);</c-> <c- p>}</c-> .special <c- p>{</c-> <c- c>/* zeta follows zeta-2, implies cv20 = 3 */</c-> font-variant-alternates: <c- nf>character-variant</c-><c- p>(</c->zeta-2<c- p>,</c-> zeta<c- p>);</c-> <c- p>}</c-></pre> <div class="figure"> <img alt="Matching text on Byzantine seals using character variants" height="522" src="images/byzantineseal.png" width="543"> <p class="caption">Byzantine seal text displayed with character variants</p> </div> <div class="example" id="ex-byzantine-variants"> <a class="self-link" href="#ex-byzantine-variants"></a> <p>In the figure above, the text in red is rendered using a font containing character variants that mimic the character forms found on a Byzantine seal from the 8th century A.D. Two lines below is the same text displayed in a font without variants. Note the two variants for U and N used on the seal.</p> <pre class="highlight"><c- n>@font-feature-values</c-> Athena Ruby <c- p>{</c-> <c- n>@character-variant</c-> <c- p>{</c-> <c- k>leo-B</c-><c- p>:</c-> <c- m>2</c-> <c- m>1</c-><c- p>;</c-> <c- k>leo-M</c-><c- p>:</c-> <c- m>13</c-> <c- m>3</c-><c- p>;</c-> <c- k>leo-alt-N</c-><c- p>:</c-> <c- m>14</c-> <c- m>1</c-><c- p>;</c-> <c- k>leo-N</c-><c- p>:</c-> <c- m>14</c-> <c- m>2</c-><c- p>;</c-> <c- k>leo-T</c-><c- p>:</c-> <c- m>20</c-> <c- m>1</c-><c- p>;</c-> <c- k>leo-U</c-><c- p>:</c-> <c- m>21</c-> <c- m>2</c-><c- p>;</c-> <c- k>leo-alt-U</c-><c- p>:</c-> <c- m>21</c-> <c- m>4</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> p <c- p>{</c-> <c- k>font-variant</c-><c- p>:</c-> discretionary-ligatures <c- nf>character-variant</c-><c- p>(</c->leo-B<c- p>,</c-> leo-M<c- p>,</c-> leo-N<c- p>,</c-> leo-T<c- p>,</c-> leo-U<c- p>);</c-> <c- p>}</c-> span.alt-N <c- p>{</c-> <c- k>font-variant-alternates</c-><c- p>:</c-> <c- nf>character-variant</c-><c- p>(</c->leo-alt-N<c- p>);</c-> <c- p>}</c-> span.alt-U <c- p>{</c-> <c- k>font-variant-alternates</c-><c- p>:</c-> <c- nf>character-variant</c-><c- p>(</c->leo-alt-U<c- p>);</c-> <c- p>}</c-> &lt;p>ENO....UP͞RSTU&lt;span class=<c- s>"alt-U"</c->>U&lt;/span>͞&lt;span class=<c- s>"alt-U"</c->>U&lt;/span>ΚΑΙTỤẠG̣IUPNS&lt;/p> &lt;p>LEON|ΚΑΙCONSTA|NTI&lt;span class=<c- s>"alt-N"</c->>N&lt;/span>OS..|STOIBAṢ.|LIṢROM|AIO&lt;span class=<c- s>"alt-N"</c->>N&lt;/span>&lt;/p> </pre> </div> <h3 class="heading settled" data-level="6.10" id="font-variant-east-asian-prop"><span class="secno">6.10. </span><span class="content"> East Asian text rendering: the <a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian①">font-variant-east-asian</a> property</span><a class="self-link" href="#font-variant-east-asian-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-east-asian"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-east-asian">font-variant-east-asian</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②⑦">|</a> [ <a class="production css" data-link-type="type" href="#east-asian-variant-values" id="ref-for-east-asian-variant-values">&lt;east-asian-variant-values></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any①⑨">||</a> <a class="production css" data-link-type="type" href="#east-asian-width-values" id="ref-for-east-asian-width-values">&lt;east-asian-width-values></a> <span id="ref-for-comb-any②⓪">||</span> ruby ] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-01.html" title="css/css-fonts/font-variant-east-asian-01.html">font-variant-east-asian-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-02.html" title="css/css-fonts/font-variant-east-asian-02.html">font-variant-east-asian-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-03.html" title="css/css-fonts/font-variant-east-asian-03.html">font-variant-east-asian-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-04.html" title="css/css-fonts/font-variant-east-asian-04.html">font-variant-east-asian-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-05.html" title="css/css-fonts/font-variant-east-asian-05.html">font-variant-east-asian-05.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-05.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-05.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-06.html" title="css/css-fonts/font-variant-east-asian-06.html">font-variant-east-asian-06.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-06.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-06.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-07.html" title="css/css-fonts/font-variant-east-asian-07.html">font-variant-east-asian-07.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-07.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-07.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-08.html" title="css/css-fonts/font-variant-east-asian-08.html">font-variant-east-asian-08.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-08.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-08.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-09.html" title="css/css-fonts/font-variant-east-asian-09.html">font-variant-east-asian-09.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-09.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-09.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian-10.html" title="css/css-fonts/font-variant-east-asian-10.html">font-variant-east-asian-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-east-asian.html" title="css/css-fonts/font-variant-east-asian.html">font-variant-east-asian.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-east-asian.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-east-asian.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-east-asian-computed.html" title="css/css-fonts/parsing/font-variant-east-asian-computed.html">font-variant-east-asian-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-east-asian-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-east-asian-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-east-asian-invalid.html" title="css/css-fonts/parsing/font-variant-east-asian-invalid.html">font-variant-east-asian-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-east-asian-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-east-asian-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-east-asian-valid.html" title="css/css-fonts/parsing/font-variant-east-asian-valid.html">font-variant-east-asian-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-east-asian-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-east-asian-valid.html"><small>(source)</small></a> </ul> </details> <p>Allows control of glyph substitution and sizing in East Asian text.</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="east-asian-variant-values"><var>&lt;east-asian-variant-values></var></dfn> = <c- p>[</c-> <span>jis78</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②⑧">|</a> <span>jis83</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②⑨">|</a> <span>jis90</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③⓪">|</a> <span>jis04</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③①">|</a> <span>simplified</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③②">|</a> <span>traditional</span> <c- p>]</c-></pre> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="east-asian-width-values"><var>&lt;east-asian-width-values></var></dfn> = <c- p>[</c-> <span>full-width</span> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③③">|</a> <span>proportional-width</span> <c- p>]</c-></pre> <p>Individual values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="font-variant-east-asian-normal-value" title="normal!!font-variant-east-asian">normal</dfn> <dd>None of the features listed below are enabled. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-jis78">jis78</dfn> <dd> Enables rendering of JIS78 forms (OpenType feature: <span class="tag">jp78</span>). <div class="featex"><img alt="JIS78 form example" height="78" src="images/jp78.png" width="350"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-jis83">jis83</dfn> <dd>Enables rendering of JIS83 forms (OpenType feature: <span class="tag">jp83</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-jis90">jis90</dfn> <dd>Enables rendering of JIS90 forms (OpenType feature: <span class="tag">jp90</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-jis04">jis04</dfn> <dd> Enables rendering of JIS2004 forms (OpenType feature: <span class="tag">jp04</span>). <p>The various JIS variants reflect the glyph forms defined in different Japanese national standards. Fonts generally include glyphs defined by the most recent national standard, but it’s sometimes necessary to use older variants, to match signage for example.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-simplified">simplified</dfn> <dd>Enables rendering of simplified forms (OpenType feature: <span class="tag">smpl</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-traditional">traditional</dfn> <dd> Enables rendering of traditional forms (OpenType feature: <span class="tag">trad</span>). <p>The <a class="property css" data-link-type="property">simplified</a> and <span class="property">traditional</span> values allow control over the glyph forms for characters which have been simplified over time but for which the older, traditional form is still used in some contexts. The exact set of characters and glyph forms will vary to some degree by the context for which a given font was designed.</p> <div class="featex"><img alt="traditional form example" height="74" src="images/trad.png" width="350"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-full-width">full-width</dfn> <dd>Enables rendering of full-width variants (OpenType feature: <span class="tag">fwid</span>). <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-proportional-width">proportional-width</dfn> <dd> Enables rendering of proportionally-spaced variants (OpenType feature: <span class="tag">pwid</span>). <div class="featex"><img alt="proportionally spaced Japanese example" height="64" src="images/pwid.png" width="700"></div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-east-asian" data-dfn-type="value" data-export id="valdef-font-variant-east-asian-ruby">ruby</dfn> <dd> Enables display of ruby variant glyphs (OpenType feature: <span class="tag">ruby</span>). Since ruby text is generally smaller than the associated body text, font designers can design special glyphs for use with ruby that are more readable than scaled down versions of the default glyphs. Only glyph selection is affected, there is no associated font scaling or other change that affects line layout. <p>The red ruby text below is shown with default glyphs (top) and with ruby variant glyphs (bottom). Note the slight difference in stroke thickness.</p> <div class="featex"><img alt="ruby variant example" height="272" src="images/rubyshinkansen.png" width="226"></div> </dl> <h3 class="heading settled" data-level="6.11" id="font-variant-prop"><span class="secno">6.11. </span><span class="content"> Overall shorthand for font rendering: the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant⑧">font-variant</a> property</span><a class="self-link" href="#font-variant-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant">font-variant</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③④">|</a> none <span id="ref-for-comb-one①③⑤">|</span> [ [ <a class="production css" data-link-type="type" href="#common-lig-values" id="ref-for-common-lig-values">&lt;common-lig-values></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any②①">||</a> <a class="production css" data-link-type="type" href="#discretionary-lig-values" id="ref-for-discretionary-lig-values">&lt;discretionary-lig-values></a> <span id="ref-for-comb-any②②">||</span> <a class="production css" data-link-type="type" href="#historical-lig-values" id="ref-for-historical-lig-values">&lt;historical-lig-values></a> <span id="ref-for-comb-any②③">||</span> <a class="production css" data-link-type="type" href="#contextual-alt-values" id="ref-for-contextual-alt-values">&lt;contextual-alt-values></a> ] <span id="ref-for-comb-any②④">||</span> [ small-caps <span id="ref-for-comb-one①③⑥">|</span> all-small-caps <span id="ref-for-comb-one①③⑦">|</span> petite-caps <span id="ref-for-comb-one①③⑧">|</span> all-petite-caps <span id="ref-for-comb-one①③⑨">|</span> unicase <span id="ref-for-comb-one①④⓪">|</span> titling-caps ] <span id="ref-for-comb-any②⑤">||</span> [ stylistic(<a class="production css" data-link-type="type" href="#feature-value-name-value" id="ref-for-feature-value-name-value①⑤">&lt;feature-value-name></a>) <span id="ref-for-comb-any②⑥">||</span> historical-forms <span id="ref-for-comb-any②⑦">||</span> styleset(<span class="production" id="ref-for-feature-value-name-value①⑥">&lt;feature-value-name></span><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma⑨">#</a>) <span id="ref-for-comb-any②⑧">||</span> character-variant(<span class="production" id="ref-for-feature-value-name-value①⑦">&lt;feature-value-name></span><span id="ref-for-mult-comma①⓪">#</span>) <span id="ref-for-comb-any②⑨">||</span> swash(<span class="production" id="ref-for-feature-value-name-value①⑧">&lt;feature-value-name></span>) <span id="ref-for-comb-any③⓪">||</span> ornaments(<span class="production" id="ref-for-feature-value-name-value①⑨">&lt;feature-value-name></span>) <span id="ref-for-comb-any③①">||</span> annotation(<span class="production" id="ref-for-feature-value-name-value②⓪">&lt;feature-value-name></span>) ] <span id="ref-for-comb-any③②">||</span> [ <a class="production css" data-link-type="type" href="#numeric-figure-values" id="ref-for-numeric-figure-values①">&lt;numeric-figure-values></a> <span id="ref-for-comb-any③③">||</span> <a class="production css" data-link-type="type" href="#numeric-spacing-values" id="ref-for-numeric-spacing-values①">&lt;numeric-spacing-values></a> <span id="ref-for-comb-any③④">||</span> <a class="production css" data-link-type="type" href="#numeric-fraction-values" id="ref-for-numeric-fraction-values①">&lt;numeric-fraction-values></a> <span id="ref-for-comb-any③⑤">||</span> ordinal <span id="ref-for-comb-any③⑥">||</span> slashed-zero ] <span id="ref-for-comb-any③⑦">||</span> [ <a class="production css" data-link-type="type" href="#east-asian-variant-values" id="ref-for-east-asian-variant-values①">&lt;east-asian-variant-values></a> <span id="ref-for-comb-any③⑧">||</span> <a class="production css" data-link-type="type" href="#east-asian-width-values" id="ref-for-east-asian-width-values①">&lt;east-asian-width-values></a> <span id="ref-for-comb-any③⑨">||</span> ruby ] <span id="ref-for-comb-any④⓪">||</span> [ sub <span id="ref-for-comb-one①④①">|</span> super ] <span id="ref-for-comb-any④①">||</span> [ text <span id="ref-for-comb-one①④②">|</span> emoji <span id="ref-for-comb-one①④③">|</span> unicode ] ] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-01.html" title="css/css-fonts/font-variant-01.html">font-variant-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-02.html" title="css/css-fonts/font-variant-02.html">font-variant-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-03.html" title="css/css-fonts/font-variant-03.html">font-variant-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-04.html" title="css/css-fonts/font-variant-04.html">font-variant-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-04.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-shorthand-variant.html" title="css/css-fonts/parsing/font-shorthand-variant.html">font-shorthand-variant.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-shorthand-variant.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-shorthand-variant.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-invalid.html" title="css/css-fonts/parsing/font-variant-invalid.html">font-variant-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-valid.html" title="css/css-fonts/parsing/font-variant-valid.html">font-variant-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-valid.html"><small>(source)</small></a> </ul> </details> <p>The <span title="font-variant!!property"><a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant⑨">font-variant</a></span> property is a shorthand for all font-variant subproperties: </p> <ul> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures②">font-variant-ligatures</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position⑧">font-variant-position</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps③">font-variant-caps</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric②">font-variant-numeric</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates⑤">font-variant-alternates</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian②">font-variant-east-asian</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji①">font-variant-emoji</a></p> </ul> <p>The value <dfn class="dfn-paneled css" data-dfn-for="font-variant" data-dfn-type="value" data-export id="font-variant-normal-value" title="normal!!font-variant"><a class="property css" data-link-type="property">normal</a></dfn> resets all subproperties of <span title="font-variant!!property"><a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①⓪">font-variant</a></span> to their initial value. The <dfn class="dfn-paneled css" data-dfn-for="font-variant" data-dfn-type="value" data-export id="font-variant-none-value" title="none!!font-variant"><a class="css" data-link-type="maybe" href="#font-variant-none-value" id="ref-for-font-variant-none-value">none</a></dfn> value sets <a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures③">font-variant-ligatures</a> to <a class="property css" data-link-type="property">none</a> and resets all other font feature properties to their initial value. Like other shorthands, using <span title="font-variant!!property"><a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①①">font-variant</a></span> resets unspecified <span title="font-variant!!property"><a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①②">font-variant</a></span> subproperties to their initial values.</p> <p></p> <p>It does not reset the values of <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override⑤">font-language-override</a>, <span title="font-feature-settings!!property"><a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings⑤">font-feature-settings</a></span> or <span title="font-variation-settings!!property"><a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings②">font-variation-settings</a></span>.</p> <h3 class="heading settled" data-level="6.12" id="font-feature-settings-prop"><span class="secno">6.12. </span><span class="content"> Low-level font feature settings control: the <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings⑥">font-feature-settings</a> property</span><a class="self-link" href="#font-feature-settings-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-feature-settings"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-feature-settings">font-feature-settings</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④④">|</a> <a class="production css" data-link-type="type">&lt;feature-tag-value></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①①">#</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>as specified <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-features-across-space-1.html" title="css/css-fonts/font-features-across-space-1.html">font-features-across-space-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-features-across-space-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-features-across-space-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-features-across-space-2.html" title="css/css-fonts/font-features-across-space-2.html">font-features-across-space-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-features-across-space-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-features-across-space-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-features-across-space-3.html" title="css/css-fonts/font-features-across-space-3.html">font-features-across-space-3.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-features-across-space-3.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-features-across-space-3.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-settings-tibetan.html" title="css/css-fonts/font-feature-settings-tibetan.html">font-feature-settings-tibetan.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-settings-tibetan.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-settings-tibetan.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-feature-settings-computed.html" title="css/css-fonts/parsing/font-feature-settings-computed.html">font-feature-settings-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-feature-settings-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-feature-settings-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-feature-settings-invalid.html" title="css/css-fonts/parsing/font-feature-settings-invalid.html">font-feature-settings-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-feature-settings-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-feature-settings-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-feature-settings-valid.html" title="css/css-fonts/parsing/font-feature-settings-valid.html">font-feature-settings-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-feature-settings-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-feature-settings-valid.html"><small>(source)</small></a> </ul> </details> <p>This property provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case. </p> <div class="advisement"> Authors should <em>not</em> use <span title="font-feature-settings!!property"><a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings⑦">font-feature-settings</a></span> to set any of the font features in the table below. Instead, please use the higher-level replacement properties, because: <ol> <li>The higher-level properties cascade individually. You can set one without setting the whole <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings⑧">font-feature-settings</a> list <li>Some higher-level properties can be synthesized for fonts that do not support the font feature. </ol> <table class="data" id="ffs-replacements"> <thead> <tr> <th>If you want to set this font feature <th>then use this <em>instead of</em> <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings⑨">font-feature-settings</a> <th>Notes <tbody> <tr> <td>Kerning (<code class="highlight">kern</code>) or Vertical Kerning (<code class="highlight">vkrn</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning②">font-kerning</a>: <a class="css" data-link-type="maybe" href="#font-kerning-normal-value" id="ref-for-font-kerning-normal-value">normal</a> <td>The <a class="property css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning③">font-kerning</a> property will set the <code class="highlight">kern</code> or <code class="highlight">vkrn</code> feature depending on the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode">writing-mode</a>. <tr> <td>Standard Ligatures (<code class="highlight">liga</code>) or Contextual Ligatures (<code class="highlight">clig</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures④">font-variant-ligatures</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-ligatures-common-ligatures" id="ref-for-valdef-font-variant-ligatures-common-ligatures">common-ligatures</a> <td> <tr> <td>Discretionary Ligatures (<code class="highlight">dlig</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures⑤">font-variant-ligatures</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-ligatures-discretionary-ligatures" id="ref-for-valdef-font-variant-ligatures-discretionary-ligatures">discretionary-ligatures</a> <td> <tr> <td>Historical Ligatures (<code class="highlight">hlig</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures⑥">font-variant-ligatures</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-ligatures-historical-ligatures" id="ref-for-valdef-font-variant-ligatures-historical-ligatures">historical-ligatures</a> <td> <tr> <td>Contextual Alternates (<code class="highlight">calt</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures⑦">font-variant-ligatures</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-ligatures-contextual" id="ref-for-valdef-font-variant-ligatures-contextual">contextual</a> <td> <tr> <td>Subscript (<code class="highlight">subs</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position⑨">font-variant-position</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-position-sub" id="ref-for-valdef-font-variant-position-sub">sub</a> <td> <tr> <td>Superscript (<code class="highlight">sups</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position①⓪">font-variant-position</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-position-super" id="ref-for-valdef-font-variant-position-super">super</a> <td> <tr> <td>Small Capitals (<code class="highlight">smcp</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps④">font-variant-caps</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-small-caps" id="ref-for-valdef-font-variant-caps-small-caps①">small-caps</a> <td> <tr> <td>Small Capitals From Capitals (<code class="highlight">c2sc</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps⑤">font-variant-caps</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-all-small-caps" id="ref-for-valdef-font-variant-caps-all-small-caps">all-small-caps</a> <td> <tr> <td>Petite Capitals (<code class="highlight">pcap</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps⑥">font-variant-caps</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-petite-caps" id="ref-for-valdef-font-variant-caps-petite-caps">petite-caps</a> <td> <tr> <td>Petite Capitals From Capitals (<code class="highlight">c2pc</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps⑦">font-variant-caps</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-all-petite-caps" id="ref-for-valdef-font-variant-caps-all-petite-caps">all-petite-caps</a> <td> <tr> <td>Unicase (<code class="highlight">unic</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps⑧">font-variant-caps</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-unicase" id="ref-for-valdef-font-variant-caps-unicase">unicase</a> <td> <tr> <td>Titling (<code class="highlight">titl</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps⑨">font-variant-caps</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-caps-titling-caps" id="ref-for-valdef-font-variant-caps-titling-caps">titling-caps</a> <td> <tr> <td>Lining Figures (<code class="highlight">lnum</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric③">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-lining-nums" id="ref-for-valdef-font-variant-numeric-lining-nums">lining-nums</a> <td> <tr> <td>Oldstyle Figures (<code class="highlight">onum</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric④">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-oldstyle-nums" id="ref-for-valdef-font-variant-numeric-oldstyle-nums">oldstyle-nums</a> <td> <tr> <td>Proportional Figures (<code class="highlight">pnum</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric⑤">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-proportional-nums" id="ref-for-valdef-font-variant-numeric-proportional-nums">proportional-nums</a> <td> <tr> <td>Tabular Figures (<code class="highlight">tnum</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric⑥">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-tabular-nums" id="ref-for-valdef-font-variant-numeric-tabular-nums">tabular-nums</a> <td> <tr> <td>Fractions (<code class="highlight">frac</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric⑦">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-diagonal-fractions" id="ref-for-valdef-font-variant-numeric-diagonal-fractions">diagonal-fractions</a> <td> <tr> <td>Alternative Fractions (<code class="highlight">afrc</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric⑧">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-stacked-fractions" id="ref-for-valdef-font-variant-numeric-stacked-fractions">stacked-fractions</a> <td> <tr> <td>Ordinals (<code class="highlight">ordn</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric⑨">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-ordinal" id="ref-for-valdef-font-variant-numeric-ordinal">ordinal</a> <td> <tr> <td>Slashed Zero (<code class="highlight">zero</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric①⓪">font-variant-numeric</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-numeric-slashed-zero" id="ref-for-valdef-font-variant-numeric-slashed-zero">slashed-zero</a> <td> <tr> <td>Historical Forms (<code class="highlight">hist</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates⑥">font-variant-alternates</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-alternates-historical-forms" id="ref-for-valdef-font-variant-alternates-historical-forms">historical-forms</a> <td> <tr> <td>Stylistic Alternates (<code class="highlight">salt</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates⑦">font-variant-alternates</a>: <a class="css" data-link-type="maybe" href="#stylistic" id="ref-for-stylistic">stylistic()</a> <td>Define which alternate gets used by making an <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①⑤">@font-feature-values</a> rule <tr> <td>Character Variant 1 - Character Variant 99 (<code class="highlight">cv01</code> - <code class="highlight">cv99</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates⑧">font-variant-alternates</a>: <a class="css" data-link-type="maybe" href="#character-variant" id="ref-for-character-variant①">character-variant()</a> <td>Define which character variant gets used by making an <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①⑥">@font-feature-values</a> rule <tr> <td>Swash (<code class="highlight">swsh</code>) or Contextual Swash (<code class="highlight">cswh</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates⑨">font-variant-alternates</a>: <a class="css" data-link-type="maybe" href="#swash" id="ref-for-swash①">swash()</a> <td>Define which swash gets used by making an <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①⑦">@font-feature-values</a> rule <tr> <td>Ornaments (<code class="highlight">ornm</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates①⓪">font-variant-alternates</a>: <a class="css" data-link-type="maybe" href="#ornaments" id="ref-for-ornaments①">ornaments()</a> <td>Define which ornament gets used by making an <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①⑧">@font-feature-values</a> rule <tr> <td>Alternate Annotation Forms (<code class="highlight">nalt</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates①①">font-variant-alternates</a>: <a class="css" data-link-type="maybe" href="#annotation" id="ref-for-annotation">annotation()</a> <td>Define which annotation gets used by making an <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values①⑨">@font-feature-values</a> rule <tr> <td>JIS78 Forms (<code class="highlight">jp78</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian③">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-jis78" id="ref-for-valdef-font-variant-east-asian-jis78">jis78</a> <td> <tr> <td>JIS83 Forms (<code class="highlight">jp83</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian④">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-jis83" id="ref-for-valdef-font-variant-east-asian-jis83">jis83</a> <td> <tr> <td>JIS90 Forms (<code class="highlight">jp90</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian⑤">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-jis90" id="ref-for-valdef-font-variant-east-asian-jis90">jis90</a> <td> <tr> <td>JIS2004 Forms (<code class="highlight">jp04</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian⑥">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-jis04" id="ref-for-valdef-font-variant-east-asian-jis04">jis04</a> <td> <tr> <td>Simplified Forms (<code class="highlight">smpl</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian⑦">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-simplified" id="ref-for-valdef-font-variant-east-asian-simplified">simplified</a> <td> <tr> <td>Traditional Forms (<code class="highlight">trad</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian⑧">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-traditional" id="ref-for-valdef-font-variant-east-asian-traditional">traditional</a> <td> <tr> <td>Full Widths (<code class="highlight">fwid</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian⑨">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-full-width" id="ref-for-valdef-font-variant-east-asian-full-width">full-width</a> <td> <tr> <td>Proportional Widths (<code class="highlight">pwid</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian①⓪">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-proportional-width" id="ref-for-valdef-font-variant-east-asian-proportional-width">proportional-width</a> <td> <tr> <td>Ruby Notation Forms (<code class="highlight">ruby</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian①①">font-variant-east-asian</a>: <a class="css" data-link-type="maybe" href="#valdef-font-variant-east-asian-ruby" id="ref-for-valdef-font-variant-east-asian-ruby">ruby</a> <td> </table> </div> <div class="example" id="ex-scientific-inferiors"> <a class="self-link" href="#ex-scientific-inferiors"></a> <p>For example, there is no font-variant value to control Scientific Inferiors (small numerals used in chemical formulae). Readability is enhanced by using them, so they must be enabled using font-feature-settings:</p> <pre class="highlight">.chem <c- p>{</c-> <c- k>font-feature-settings</c-><c- p>:</c-> <c- s>'sinf'</c-> <c- p>}</c-> </pre> <figure> <img alt="scientific inferior numbers in a chemical formula" height="231" src="images/scientific-inferiors.png" width="853"> <figcaption>Scientific inferiors improve readability of chemical formulae</figcaption> </figure> </div> <p class="note" role="note">The entire property value is set at once. Unlike the font-variant properties, there is no way to modify the inherited value by adding or removing individual features. </p> <p>A value of <dfn class="dfn-paneled css" data-dfn-for="font-feature-settings" data-dfn-type="value" data-export id="font-feature-settings-normal-value" title="normal!!font-feature-settings"><a class="property css" data-link-type="property">normal</a></dfn> means that no change in glyph selection or positioning occurs due to this property.</p> <p>Feature tag values have the following syntax:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-for="font-feature-settings" data-dfn-type="value" data-export id="feature-tag-value"><var>&lt;feature-tag-value></var></dfn> = &lt;opentype-tag> <c- p>[</c-> &lt;integer <c- p>[</c-><c- m>0</c-><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma"><c- p>,</c-></a>∞<c- p>]</c->> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④⑤">|</a> on <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④⑥">|</a> off <c- p>]</c-><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑥">?</a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-opentype-tag">&lt;opentype-tag></dfn> = &lt;string> </pre> <p>The <a class="production css" data-link-type="type" href="#typedef-opentype-tag" id="ref-for-typedef-opentype-tag">&lt;opentype-tag></a> is a case-sensitive OpenType feature tag. As specified in the OpenType specification <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a>, feature tags contain four ASCII characters. Tag strings longer or shorter than four characters, or containing characters outside the U+20–7E codepoint range are invalid. Feature tags need only match a feature tag defined in the font, so they are not limited to explicitly registered OpenType features. Fonts defining custom feature tags should follow the <a href="https://www.microsoft.com/typography/otspec/featuretags.htm">tag name rules</a> defined in the OpenType specification <a data-link-type="biblio" href="#biblio-opentype-features" title="OpenType feature registry">[OPENTYPE-FEATURES]</a>. </p> <p id="must-not-synthesize-features">Feature tags not present in the font are ignored; a user agent must not attempt to synthesize fallback behavior based on these feature tags. The one exception is that user agents may synthetically support the <span class="tag">kern</span> feature with fonts that contain kerning data in the form of a <a class="property css" data-link-type="property">kern</a> table but lack <span class="tag">kern</span> feature support in the <span class="property">GPOS</span> table.</p> <p class="note" role="note">In general, authors should use the <a class="property css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning④">font-kerning</a> property to explicitly enable or disable kerning since this property always affects fonts with either type of kerning data.</p> <p>If present, a value indicates an index used for glyph selection. An &lt;integer> value must be 0 or greater. A value of 0 indicates that the feature is disabled. For boolean features, a value of 1 enables the feature. For non-boolean features, a value of 1 or greater enables the feature and indicates the feature selection index. A value of <a class="property css" data-link-type="property">on</a> is synonymous with 1 and <span class="property">off</span> is synonymous with 0. If the value is omitted, a value of 1 is assumed. </p> <p id="ffs-map">The computed value of font-feature-settings is a map, so any duplicates in the specified value must not be preserved. If the same feature tag appears more than once, the value associated with the last appearance supersedes any previous value for that axis.</p> <p id="ffs-sorted">The computed value contains the de-duplicated feature tags, sorted in ascending order by <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#code-unit" id="ref-for-code-unit">code unit</a>. </p> <div class="example" id="ex-font-feature-settings-map"> <a class="self-link" href="#ex-font-feature-settings-map"></a> <pre class="highlight"><c- k>font-feature-settings</c-><c- p>:</c-> <c- s>"sinf"</c-> <c- m>1</c-><c- p>;</c-> <c- c>/* sinf=1 enable Scientific Inferiors */</c-> font-feature-settings: <c- s>"sinf"</c-> on<c- p>;</c-> <c- c>/* sinf=1 enable Scientific Inferiors */</c-> font-feature-settings: <c- s>'sinf'</c-><c- p>;</c-> <c- c>/* sinf=1 enable Scientific Inferiors */</c-> font-feature-settings: <c- s>"sinf"</c-> off<c- p>;</c-> <c- c>/* sinf=0 disable Scientific Inferiors */</c-> font-feature-settings: <c- s>"sinf"</c-><c- p>,</c-> <c- s>'twid'</c-><c- p>;</c-> <c- c>/* sinf=1, twid=1 enable Scientific Inferiors and Third Widths */</c-> font-feature-settings: <c- s>"sinf"</c-> <c- s>"twid"</c-><c- p>;</c-> <c- c>/* invalid, need a comma-delimited list */</c-> font-feature-settings: <c- s>"silly"</c-> off<c- p>;</c-> <c- c>/* invalid, tag too long */</c-> font-feature-settings: <c- s>"PKRN"</c-><c- p>;</c-> <c- c>/* PKRN=1 enable custom feature */</c-> font-feature-settings: sinf<c- p>;</c-> <c- c>/* invalid, tag must be a string */</c-> </pre> </div> <p>When values greater than the range supported by the font are specified, the behavior is explicitly undefined. For boolean features, in general these will enable the feature. For non-boolean features, out of range values will in general be equivalent to a 0 value. However, in both cases the exact behavior will depend upon the way the font is designed (specifically, which type of lookup is used to define the feature).</p> <p>Implementations may choose to ignore turning off features which the OpenType specification says are always required, such as required ligatures "rlig".</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-ligatures-11.optional.html" title="css/css-fonts/font-variant-ligatures-11.optional.html">font-variant-ligatures-11.optional.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-ligatures-11.optional.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-ligatures-11.optional.html"><small>(source)</small></a> </ul> </details> <p>Although specifically defined for OpenType feature tags, feature tags for other modern font formats that support font features may be added in the future. Where possible, features defined for other font formats should attempt to follow the pattern of registered OpenType tags.</p> <div class="example" id="ex-half-width-kana"> <a class="self-link" href="#ex-half-width-kana"></a> <p>The Japanese text below will be rendered with half-width kana characters:</p> <pre class="highlight" lang="ja">body <c- p>{</c-> <c- k>font-feature-settings</c-><c- p>:</c-> <c- s>"hwid"</c-><c- p>;</c-> <c- c>/* Half-width OpenType feature */</c-> <c- p>}</c-> &lt;p>毎日<a href="https://example.com/?q=%E3%82%AB%E3%83%AC%E3%83%BC" style="text-decoration: none;">カレー</a>食べてるのに、飽きない&lt;/p> </pre> </div> <h3 class="heading settled" data-level="6.13" id="font-language-override-prop"><span class="secno">6.13. </span><span class="content">Font language override: the <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override⑥">font-language-override</a> property</span><a class="self-link" href="#font-language-override-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-language-override"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-language-override">font-language-override</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④⑦">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value⑦">&lt;string></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified string or the keyword <span class="css">none</span> <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-language-override-01.html" title="css/css-fonts/font-language-override-01.html">font-language-override-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-language-override-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-language-override-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-language-override-02.html" title="css/css-fonts/font-language-override-02.html">font-language-override-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-language-override-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-language-override-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-language-override-03.html" title="css/css-fonts/font-language-override-03.html">font-language-override-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-language-override-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-language-override-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-language-override-computed.html" title="css/css-fonts/parsing/font-language-override-computed.html">font-language-override-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-language-override-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-language-override-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-language-override-invalid.html" title="css/css-fonts/parsing/font-language-override-invalid.html">font-language-override-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-language-override-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-language-override-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-language-override-valid.html" title="css/css-fonts/parsing/font-language-override-valid.html">font-language-override-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-language-override-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-language-override-valid.html"><small>(source)</small></a> </ul> </details> <p>Normally, authors can control the use of language-specific glyph substitutions and positioning by setting the content language of an element, as <a href="#language-specific-support">described above</a>:</p> <div class="example" id="ex-font-lang-override"> <a class="self-link" href="#ex-font-lang-override"></a> <pre class="highlight">&lt;!-- Display text using S’gaw Karen specific features --> &lt;p lang=<c- s>"ksw"</c->>...&lt;/p></pre> </div> <p>In some cases, authors may need to specify a language system that differs from the content language, for example due to the need to mimic another language’s typographic traditions. The <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override⑦">font-language-override</a> property allows authors to explicitly specify the language system of the font, overriding the language system implied by the content language.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-language override" data-dfn-type="value" data-export id="font-language-override-normal-value">normal</dfn> <dd>specifies that when rendering with OpenType fonts, the content language of the element is used to infer the OpenType language system <dt><dfn class="dfn-paneled css" data-dfn-for="font-language-override" data-dfn-type="value" data-export id="font-language-override-string-value"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#string-value" id="ref-for-string-value⑧">&lt;string></a></dfn> <dd>single four-character case-sensitive OpenType <a href="https://www.microsoft.com/typography/otspec/languagetags.htm">language system tag</a>, specifies the OpenType language system to be used instead of the language system implied by the language of the element. If the string is shorter than four characters, it is padded at the end with space (U+0020) characters such that the length is 4, before being matched. </dl> <p>Unknown OpenType language system tags are silently ignored, and do not affect glyph selection and placement.</p> <div class="example" id="ex-related-language"> <a class="self-link" href="#ex-related-language"></a> The <a href="https://www.un.org/en/about-us/universal-declaration-of-human-rights">Universal Declaration of Human Rights</a> has been translated into a wide variety of languages. In Turkish, Article 9 of this document might be marked up as below: <pre class="highlight" lang="tr">&lt;body lang=<c- s>"tr"</c->> &lt;h4>Madde <c- m>9</c->&lt;/h4> &lt;p>Hiç kimse keyfi olarak tutuklanamaz<c- p>,</c-> alıkonulanamaz veya sürülemez.&lt;/p> </pre> <p>Here the user agent uses the value of the <a class="property css" data-link-type="property">lang</a> attribute when rendering text and appropriately renders this text without <span class="property">fi</span> ligatures. There is no need to use the <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override⑧">font-language-override</a> property.</p> <p>However, a given font may lack support for a specific language. In this situation authors may need to use the typographic conventions of a related language that are supported by that font:</p> <pre class="highlight" lang="mk">&lt;body lang=<c- s>"mk"</c->> &lt;!-- Macedonian lang code --> body <c- p>{</c-> <c- k>font-language-override</c-><c- p>:</c-> <c- s>"SRB"</c-><c- p>;</c-> <c- c>/* Serbian OpenType language tag */</c-> <c- p>}</c-> &lt;h4>Члeн <c- m>9</c->&lt;/h4> &lt;p>Никoj чoвeк нeмa дa бидe пoдлoжeн нa прoизвoлнo aпсeњe<c- p>,</c-> притвoр или прoгoнувaњe.&lt;/p> </pre> <p>As the content creator knows that font specified supports Serbian, the Macedonian text here will be rendered using Serbian typographic conventions.</p> </div> <h2 class="heading settled" data-level="7" id="font-feature-variation-resolution"><span class="secno">7. </span><span class="content"> Font Feature and Variation Resolution</span><a class="self-link" href="#font-feature-variation-resolution"></a></h2> <p>As described in the previous section, font features and variations can be enabled in a variety of ways, either via the use of <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①③">font-variant</a>, <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①⓪">font-feature-settings</a>, <a class="property css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font①②">font</a><a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings③">font-variation-settings</a> in a style rule or within an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥③">@font-face</a> rule. The resolution order for the union of these settings is defined below. Features defined via CSS properties are applied on top of layout engine default features.</p> <h3 class="heading settled" data-level="7.1" id="default-features"><span class="secno">7.1. </span><span class="content"> Default features</span><a class="self-link" href="#default-features"></a></h3> <p>For OpenType fonts, user agents must enable the default features defined in the OpenType documentation for a given script and writing mode. Required ligatures, common ligatures and contextual forms must be enabled by default (OpenType features: <span class="tag">rlig, liga, clig, calt</span>), along with localized forms (OpenType feature: <span class="tag">locl</span>), and features required for proper display of composed characters and marks (OpenType features: <span class="tag">ccmp, mark, mkmk</span>). These features must always be enabled, even when the value of the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①④">font-variant</a> and <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①①">font-feature-settings</a> properties is <span class="css">normal</span>. Individual features are only disabled when explicitly overridden by the author, as when <a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures⑧">font-variant-ligatures</a> is set to <a class="property css" data-link-type="property">no-common-ligatures</a>.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-default-01.html" title="css/css-fonts/font-default-01.html">font-default-01.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-default-01.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-default-01.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-default-02.html" title="css/css-fonts/font-default-02.html">font-default-02.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-default-02.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-default-02.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-default-03.html" title="css/css-fonts/font-default-03.html">font-default-03.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-default-03.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-default-03.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-default-04.html" title="css/css-fonts/font-default-04.html">font-default-04.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-default-04.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-default-04.html"><small>(source)</small></a> </ul> </details> <p>For handling complex scripts such as <a href="https://www.microsoft.com/typography/otfntdev/arabicot/features.aspx">Arabic</a>, <a href="https://www.microsoft.com/typography/otfntdev/mongolot/features.htm">Mongolian</a> or <a href="https://www.microsoft.com/typography/otfntdev/devanot/features.aspx">Devanagari</a> additional features are required. For upright text within vertical text runs, vertical alternates (OpenType feature: <span class="tag">vert</span>) must be enabled.</p> <h3 class="heading settled" data-level="7.2" id="feature-variation-precedence"><span class="secno">7.2. </span><span class="content"> Feature and variation precedence</span><a class="self-link" href="#feature-variation-precedence"></a></h3> <p>General and <em>font specific</em> font feature property settings are resolved in the order below, in ascending order of precedence. This ordering is used to construct a combined list of font features that affect a given text run.</p> <ol> <li data-md> <p>Font features enabled by default are applied, including features required for a given script. See <a href="#default-features">§ 7.1 Default features</a> for a description of these.</p> <li data-md> <p><span id="apply-font-matching-variations">Font variations as enabled by the <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②④">font-weight</a>, <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②③">font-width</a>, and <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②④">font-style</a> properties are applied.</span></p> <p>The application of the value enabled by <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②⑤">font-style</a> is affected by font selection, because this property might select an italic or an oblique font. The value applied is the closest matching value as determined by the <a href="#font-style-matching">font matching algorithm</a>. User agents must apply at most one value due to the <span class="property" id="ref-for-propdef-font-style②⑥">font-style</span> property; both "ital" and "slnt" values must not be set together.</p> <p>If the selected font is defined in an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥④">@font-face</a> rule, then the values applied at this step should be clamped to the value of the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-weight" id="ref-for-descdef-font-face-font-weight①">font-weight</a>, <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-width" id="ref-for-descdef-font-face-font-width②">font-width</a>, and <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-style" id="ref-for-descdef-font-face-font-style②">font-style</a> descriptors in that <span class="css" id="ref-for-at-font-face-rule⑥⑤">@font-face</span> rule.</p> <p>Then, the values applied in this step should be clamped (possibly again) to the values that are supported by the font.</p> <li data-md> <p>The language specified by the inherited value of lang/xml:lang is applied.</p> <li data-md> <p>If the font is defined via an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥⑥">@font-face</a> rule, the font language override implied by the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-language-override" id="ref-for-descdef-font-face-font-language-override①">font-language-override</a> descriptor in the <span class="css" id="ref-for-at-font-face-rule⑥⑦">@font-face</span> rule is applied.</p> <li data-md> <p>If the font is defined via an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑥⑧">@font-face</a> rule, that <span class="css" id="ref-for-at-font-face-rule⑥⑨">@font-face</span> rule includes at least one valid <a class="property css" data-link-type="property">font-named-instance</a> descriptor with a value other than <span class="property">none</span>, and the loaded font resource includes a named instance with that name according to the <a href="#localized-name-matching">§ 5.1 Localized name matching</a> rules, then all the variation values represented by that named instance are applied. These values are clamped to the values that are supported by the font.</p> <li data-md> <p>If the font is defined via an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑦⓪">@font-face</a> rule, the font variations implied by the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-variation-settings" id="ref-for-descdef-font-face-font-variation-settings①">font-variation-settings</a> descriptor in the <span class="css" id="ref-for-at-font-face-rule⑦①">@font-face</span> rule are applied.</p> <li data-md> <p>If the font is defined via an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑦②">@font-face</a> rule, the font features implied by the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-feature-settings" id="ref-for-descdef-font-face-font-feature-settings①">font-feature-settings</a> descriptor in the <span class="css" id="ref-for-at-font-face-rule⑦③">@font-face</span> rule are applied.</p> <li data-md> <p>The font language override implied by the value of the <a class="property css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override⑨">font-language-override</a> property is applied.</p> <li data-md> <p>Font variations implied by the value of the <a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing①">font-optical-sizing</a> property are applied.</p> <li data-md> <p>Font features implied by the value of the <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①⑤">font-variant</a> property, the related <span class="property" id="ref-for-propdef-font-variant①⑥">font-variant</span> subproperties and any other CSS property that uses OpenType features (e.g. the <a class="property css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning⑤">font-kerning</a> property) are applied.</p> <li data-md> <p>Feature settings determined by properties other than <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①⑦">font-variant</a> or <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①②">font-feature-settings</a> are applied. For example, setting a non-default value for the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-text-4/#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①">letter-spacing</a> property disables optional ligatures.</p> <li data-md> <p>Font variations implied by the value of the <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings④">font-variation-settings</a> property are applied. These values should be clamped to the values that are supported by the font.</p> <li data-md> <p>Font features implied by the value of <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①③">font-feature-settings</a> property are applied.</p> </ol> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-resolution-001.html" title="css/css-fonts/font-feature-resolution-001.html">font-feature-resolution-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-resolution-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-resolution-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-feature-resolution-002.html" title="css/css-fonts/font-feature-resolution-002.html">font-feature-resolution-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-feature-resolution-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-feature-resolution-002.html"><small>(source)</small></a> </ul> </details> <p>This ordering allows authors to set up a general set of defaults for fonts within their <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑦④">@font-face</a> rules, then override them with property settings for specific elements. General property settings override the settings in <span class="css" id="ref-for-at-font-face-rule⑦⑤">@font-face</span> rules and low-level font feature settings override <a class="property css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①⑧">font-variant</a> property settings.</p> <p>For situations where the combined list of font feature settings contains more than one value for the same feature, the last value is used. When a font lacks support for a given underlying font feature, text is simply rendered as if that font feature was not enabled; font fallback does not occur and no attempt is made to synthesize the feature except where explicitly defined for specific properties.</p> <h3 class="heading settled" data-level="7.3" id="feature-precedence-examples"><span class="secno">7.3. </span><span class="content"> Feature precedence examples</span><a class="self-link" href="#feature-precedence-examples"></a></h3> <div class="example" id="ex-tabular-prices"> <a class="self-link" href="#ex-tabular-prices"></a> With the styles below, numbers are rendered proportionally when used within a paragraph but are shown in tabular form within tables of prices: <pre class="highlight">body <c- p>{</c-> <c- k>font-variant-numeric</c-><c- p>:</c-> proportional-nums<c- p>;</c-> <c- p>}</c-> table.prices td <c- p>{</c-> <c- k>font-variant-numeric</c-><c- p>:</c-> tabular-nums<c- p>;</c-> <c- p>}</c-> </pre> </div> <div class="example" id="ex-features-local"> <a class="self-link" href="#ex-features-local"></a> The <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑦⑥">@font-face</a> rule can also be used to access font features in locally available fonts via the use of <code class="highlight"><c- nf>local</c-><c- p>()</c-></code> in the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src⑧">src</a> descriptor of the <span class="css" id="ref-for-at-font-face-rule⑦⑦">@font-face</span> definition: <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> BodyText<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>local</c-><c- p>(</c-><c- s>"HiraMaruPro-W4"</c-><c- p>);</c-> <c- k>font-variant</c-><c- p>:</c-> proportional-width<c- p>;</c-> <c- k>font-feature-settings</c-><c- p>:</c-> <c- s>"ital"</c-><c- p>;</c-> <c- c>/* Latin italics within CJK text feature */</c-> <c- p>}</c-> body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> BodyText<c- p>,</c-> serif<c- p>;</c-> <c- p>}</c-> </pre> <p>If available, a Japanese font "Hiragino Maru Gothic" will be used. When text rendering occurs, Japanese kana will be proportionally spaced and Latin text will be italicized. Text rendered with the fallback serif font will use default rendering properties.</p> </div> <div class="example" id="ex-no-dlig-in-special"> <a class="self-link" href="#ex-no-dlig-in-special"></a> In the example below, discretionary ligatures are enabled only for a downloadable font but are disabled within spans of class "special": <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> main<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>fonts/ffmeta.woff</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"woff"</c-><c- p>);</c-> <c- k>font-variant</c-><c- p>:</c-> discretionary-ligatures<c- p>;</c-> <c- p>}</c-> body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> main<c- p>,</c-> Helvetica<c- p>;</c-> <c- p>}</c-> span.special <c- p>{</c-> <c- k>font-variant-ligatures</c-><c- p>:</c-> no-discretionary-ligatures<c- p>;</c-> <c- p>}</c-> </pre> <p>Suppose one adds a rule using <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①④">font-feature-settings</a> to enable discretionary ligatures:</p> <pre class="highlight">body <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> main<c- p>,</c-> Helvetica<c- p>;</c-> <c- p>}</c-> span <c- p>{</c-> <c- k>font-feature-settings</c-><c- p>:</c-> <c- s>"dlig"</c-><c- p>;</c-> <c- p>}</c-> span.special <c- p>{</c-> <c- k>font-variant-ligatures</c-><c- p>:</c-> no-discretionary-ligatures<c- p>;</c-> <c- p>}</c-> </pre> <p>In this case, discretionary ligatures <em>will</em> be rendered within spans of class "special". This is because both the <a class="property css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①⑤">font-feature-settings</a> and <a class="property css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures⑨">font-variant-ligatures</a> properties apply to these spans. Although the <a class="css" data-link-type="maybe" href="#valdef-font-variant-ligatures-no-discretionary-ligatures" id="ref-for-valdef-font-variant-ligatures-no-discretionary-ligatures">no-discretionary-ligatures</a> setting of <span class="property" id="ref-for-propdef-font-variant-ligatures①⓪">font-variant-ligatures</span> effectively disables the OpenType "dlig" feature, because the <span class="property" id="ref-for-propdef-font-feature-settings①⑥">font-feature-settings</span> is resolved after that, the "dlig" value reenables discretionary ligatures.</p> </div> <h2 class="heading settled" data-level="8" id="font-variation-props"><span class="secno">8. </span><span class="content"> Font Variation Properties</span><a class="self-link" href="#font-variation-props"></a></h2> <p class="note" role="note"><span class="marker">Note:</span> The technology in use in this section is named "font variations." An instance of one such font as a "variable font."</p> <h3 class="heading settled" data-level="8.1" id="font-optical-sizing-def"><span class="secno">8.1. </span><span class="content"> Optical sizing control: the <a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing②">font-optical-sizing</a> property</span><a class="self-link" href="#font-optical-sizing-def"></a></h3> <table class="def propdef" data-link-for-hint="font-optical-sizing"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-optical-sizing">font-optical-sizing</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④⑧">|</a> none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-optical-sizing-computed.html" title="css/css-fonts/parsing/font-optical-sizing-computed.html">font-optical-sizing-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-optical-sizing-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-optical-sizing-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-optical-sizing-invalid.html" title="css/css-fonts/parsing/font-optical-sizing-invalid.html">font-optical-sizing-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-optical-sizing-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-optical-sizing-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-optical-sizing-valid.html" title="css/css-fonts/parsing/font-optical-sizing-valid.html">font-optical-sizing-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-optical-sizing-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-optical-sizing-valid.html"><small>(source)</small></a> </ul> </details> <p>Typographically, text rendered at different sizes often benefits from slightly different visual representations. For example, to aid reading at small text sizes, strokes are often thicker with larger serifs. Larger text often has a more delicate figure with more contrast between thicker and thinner strokes.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-optical-sizing" data-dfn-type="value" data-export id="font-optical-sizing-auto-value">auto</dfn> <dd> The user agent may modify the shape of glyphs based on the font-size and the pixel density of the screen. For OpenType and TrueType fonts using font variations, this is often done by using the "opsz" font variation. <dt><dfn class="dfn-paneled css" data-dfn-for="font-optical-sizing" data-dfn-type="value" data-export id="font-optical-sizing-none-value">none</dfn> <dd> The user agent must not modify the shape of glyphs for optical size. </dl> <figure id="optical-size-example"> <img alt="text with different optical sizes, normalized to similar physical sizes" height="160" src="images/Century_Expanded-a-normalized.jpg" width="1118"> <figcaption> Each size of Century Expanded as it existed in analog metal form. The different optical sizes, normalized here to the same physical size, have design variations to maintain stylistic traits and improve readability. </figcaption> </figure> <p><a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size①⑨">font-size</a> must be considered when selecting a variation value for the "opsz" axis, but other signals may also be considered.</p> <p class="note" role="note"><span class="marker">Note:</span> User agents are expected to supply a value for the "opsz" axis which is close to the used value for <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size②⓪">font-size</a>. However, user agents might wish to consider other factors such as pixel density of the screen, or the solid angle the text subtends in the viewer’s retina. <a href="https://github.com/w3c/csswg-drafts/issues/807#issue-195683688">Experiments have shown</a>, however, that disregarding these other ancillary factors and using only <span class="property" id="ref-for-propdef-font-size②①">font-size</span> might be the best way for a user agent to select this value.</p> <p>Pixel density as well as visual size of the text may influence the variation value chosen for <a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing③">font-optical-sizing</a>. When either pixel density or visual size of the text changes in response to a user operation or style change, user agents must not choose a new value for this variation value unless the change is layout-causing. User agents are free to determine which changes are layout-causing.</p> <p class="note" role="note"><span class="marker">Note:</span> Some user operations, such as pinch-zoom, can be considered not-layout-causing if they do not cause text to reflow. However, other user operations, such as increasing text size for accessibility purposes, can be considered layout-causing because they cause text to reflow. Similarly, the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-transforms-1/#propdef-transform" id="ref-for-propdef-transform">transform</a> property can be considered not-layout-causing because transforms generally do not cause text to reflow. Each user-agent is free to decide whether or not each operation is layout-changing or not.</p> <p>User agents must not synthesize optical sizing when it is not performed by the font directly.</p> <p>User agents must not select a value for the "opsz" axis which is not supported by the font used for rendering the text. This can be accomplished by clamping a chosen value to the range supported by the font.</p> <p><a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing④">font-optical-sizing</a> interacts with <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①⑥">font-size-adjust</a>. When applying optical sizing, User agents must apply an optical sizing value appropriate for the adjusted font size, subject to the above restrictions.</p> <h3 class="heading settled" data-level="8.2" id="font-variation-settings-def"><span class="secno">8.2. </span><span class="content"> Low-level font variation settings control: the <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings⑤">font-variation-settings</a> property</span><a class="self-link" href="#font-variation-settings-def"></a></h3> <table class="def propdef" data-link-for-hint="font-variation-settings"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variation-settings">font-variation-settings</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④⑨">|</a> [ <a class="production css" data-link-type="type" href="#typedef-opentype-tag" id="ref-for-typedef-opentype-tag①">&lt;opentype-tag></a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value⑤">&lt;number></a>]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①②">#</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>the keyword <span class="css">normal</span> or a list, each item a string paired with a number <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>see prose </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variable-in-font-variation-settings.html" title="css/css-fonts/variable-in-font-variation-settings.html">variable-in-font-variation-settings.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variable-in-font-variation-settings.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variable-in-font-variation-settings.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/variable-box-font.html" title="css/css-fonts/variations/variable-box-font.html">variable-box-font.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/variable-box-font.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/variable-box-font.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/variable-gpos-m2b.html" title="css/css-fonts/variations/variable-gpos-m2b.html">variable-gpos-m2b.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/variable-gpos-m2b.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/variable-gpos-m2b.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/variable-gsub.html" title="css/css-fonts/variations/variable-gsub.html">variable-gsub.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/variable-gsub.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/variable-gsub.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/variable-opsz-size-adjust.html" title="css/css-fonts/variations/variable-opsz-size-adjust.html">variable-opsz-size-adjust.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/variable-opsz-size-adjust.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/variable-opsz-size-adjust.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/variable-opsz.html" title="css/css-fonts/variations/variable-opsz.html">variable-opsz.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/variable-opsz.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/variable-opsz.html"><small>(source)</small></a> </ul> </details> <p>This property provides low-level control over OpenType or TrueType font variations. It is intended as a way of providing access to font variations that are not widely used but are needed for a particular use case.</p> <div class="advisement"> Authors should <em>not</em> use <span title="font-variation-settings!!property"><a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings⑥">font-variation-settings</a></span> to set any of the variation axes in the table below. Instead, please use the higher-level replacement properties, because: <ol> <li>The higher-level properties cascade individually. You can set one without setting the whole <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings⑦">font-variation-settings</a> list <li>Some higher-level properties can be synthesized for fonts that do not support the font variation. </ol> <table class="data" id="fvs-replacements"> <thead> <tr> <th>If you want to set this variation axis <th>then use this <em>instead of</em> <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings⑧">font-variation-settings</a> <th>Notes <tbody> <tr> <td>Weight (<code class="highlight">wght</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②⑤">font-weight</a> <td>The <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②⑥">font-weight</a> property will set the <code class="highlight">wght</code> axis if one is present. <tr> <td>Width (<code class="highlight">wdth</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②④">font-width</a> <td>The <a class="property css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②⑤">font-width</a> property will set the <code class="highlight">wdth</code> axis if one is present. <tr> <td>Slant (<code class="highlight">slnt</code>) or Italic (<code class="highlight">ital</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②⑦">font-style</a> <td>The <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②⑧">font-style</a> property will set the <code class="highlight">slnt</code> or <code class="highlight">ital</code> axis, depending on its value. <tr> <td>Optical size (<code class="highlight">opsz</code>) <td><a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing⑤">font-optical-sizing</a> <td>The <a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing⑥">font-optical-sizing</a> property will set the <code class="highlight">opsz</code> axis if one is present. </table> </div> <p>The use of font variation settings does not affect font selection where a fallback font is to be used, where using font properties for the same axis would have an effect on font selection.</p> <p>When possible, authors should generally use the other properties related to font variations (such as <a class="property css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing⑦">font-optical-sizing</a>), and only use this property for special cases where its use is the only way of accessing a particular infrequently used font variation.</p> <p>For example, it is preferable to use <a class="property css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②⑦">font-weight</a>: 700 rather than <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings⑨">font-variation-settings</a>: "wght" 700.</p> <p>A value of <span class="css">normal</span> means that no change in glyph shape, matching, or positioning occurs due to this property.</p> <p>The <a class="production css" data-link-type="type" href="#typedef-opentype-tag" id="ref-for-typedef-opentype-tag②">&lt;opentype-tag></a> is a case-sensitive OpenType or TrueType variation axis name. As specified in the OpenType / TrueType specifications, axis names contain four ASCII characters. Axis name strings longer or shorter than four characters, or containing characters outside the U+20–7E codepoint range are invalid. Axis names need only match an axis tag defined in the font, so they are not limited to explicitly registered OpenType / TrueType variation axes. Fonts defining custom axis names should follow the <a href="https://www.microsoft.com/typography/otspec/fvar.htm">name rules</a> defined in the OpenType specification.</p> <p>If a given axis is not supported by a font, its value setting is ignored and therefore has no effect; a user agent must not attempt to synthesize fallback behavior based on these axis tags. Other axis values within the same CSS <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings①⓪">font-variation-settings</a> statement are not ignored.</p> <p>If a variation axis is supported by a font but its set value is greater or less than the predefined font range, it will be clamped to the closest value supported by the font.</p> <p>Values are allowed to be fractional or negative.</p> <p class="note" role="note"><span class="marker">Note:</span> it is preferable to obtain slanted faces by using the <a class="property css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style②⑨">font-style</a> property. However, if using the <code class="highlight">slnt</code> axis directly, via <a class="property css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings①①">font-variation-settings</a>, remember that it is defined with a positive angle meaning a counter-clockwise slant, the opposite direction to CSS.</p> <p>If the same axis name appears more than once, the value associated with the last appearance supersedes any previous value for that axis. This deduplication is observable by accessing the computed value of this property.</p> <p id="fvs-sorted">The computed value contains the de-duplicated axis names, sorted in ascending order by <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#code-unit" id="ref-for-code-unit①">code unit</a>.</p> <p>Although specifically defined for OpenType / TrueType variations, variation axes for other modern font formats that support font variations might be added in the future. Where possible, variations defined for other font formats should attempt to follow the pattern of registered variation axes.</p> <p>Animating font-variation-settings is possible using the following mechanism. Two declarations of font-feature-settings can be animated between if they are "like". "Like" declarations are ones where the same set of properties appear (in any order). Because successive duplicate properties are applied instead of prior duplicate properties, two declarations can be "like" even if they have differing number of properties. If two declarations are "like" then animation occurs pairwise between corresponding values in the declarations. Otherwise, animation is not possible. In this situation, the "from" values of the animation are swapped to the "to" values at an unspecified time during the animation.</p> <h2 class="heading settled" data-level="9" id="color-font-support"><span class="secno">9. </span><span class="content"> Color Font Support</span><a class="self-link" href="#color-font-support"></a></h2> <p>Color fonts allow for font files to describe, not just the contours describing the edges of glyphs, but also the colors present inside the glyphs.</p> <figure id="multicolore"> <img alt="an example multicolored font" height="212" src="images/multicolore.png" width="955"> <figcaption>Multicolore, by Ivan Filipov</figcaption> </figure> <figure id="magicalunicorn"> <img alt="an example multicolored font" height="587" src="images/please.png" width="1468"> <figcaption>Magical Unicorn Neue Pro, by Arthur Reinders Folmer</figcaption> </figure> <p>For some uses, such as emoji, having the colors fixed in the font is appropriate. For others, there is a need to control the colors used from a stylesheet.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-colorization.html" title="css/css-fonts/font-colorization.html">font-colorization.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-colorization.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-colorization.html"><small>(source)</small></a> </ul> </details> <p>CSS provides two ways to do this. The <a class="property css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette①">font-palette</a> property allows selecting one of several different palettes contained in the font. The <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values">@font-palette-values</a> rule allows overriding one or more colors from within a palette or even the creation of an entirely different palette.</p> <h3 class="heading settled" data-level="9.1" id="font-palette-prop"><span class="secno">9.1. </span><span class="content"> Controlling Color Font Palettes: The <a class="property css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette②">font-palette</a> property</span><a class="self-link" href="#font-palette-prop"></a></h3> <p>Many color font file formats allow colors within glyphs to be parameterized. In these fonts, colors are referenced by index when describing the geometry of each glyph. These indices are resolved within a current active palette using a lookup table present inside the font. However, many fonts contain multiple palettes, each containing a set of complementary colors chosen by the font designer to provide pleasing visual results.</p> <p>In addition, some color font file formats provide a regular, uncolored glyph outline as well as the colored versions.</p> <table class="def propdef" data-link-for-hint="font-palette"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-palette">font-palette</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤⓪">|</a> light <span id="ref-for-comb-one①⑤①">|</span> dark <span id="ref-for-comb-one①⑤②">|</span> <a class="production css" data-link-type="type" href="#typedef-font-palette-palette-identifier" id="ref-for-typedef-font-palette-palette-identifier">&lt;palette-identifier></a> <span id="ref-for-comb-one①⑤③">|</span> <a class="production css" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix">&lt;palette-mix()></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword, identifier or <a class="production css" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix①">&lt;palette-mix()></a> function. <span class="production" id="ref-for-funcdef-palette-mix②">&lt;palette-mix()></span> must be simplified to a single keyword or identifier if resulting palette is equivalent. <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-10.html" title="css/css-fonts/font-palette-10.html">font-palette-10.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-10.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-10.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-11.html" title="css/css-fonts/font-palette-11.html">font-palette-11.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-11.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-11.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-12.html" title="css/css-fonts/font-palette-12.html">font-palette-12.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-12.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-12.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-13.html" title="css/css-fonts/font-palette-13.html">font-palette-13.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-13.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-13.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-14.html" title="css/css-fonts/font-palette-14.html">font-palette-14.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-14.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-14.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-15.html" title="css/css-fonts/font-palette-15.html">font-palette-15.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-15.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-15.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-16.html" title="css/css-fonts/font-palette-16.html">font-palette-16.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-16.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-16.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-17.html" title="css/css-fonts/font-palette-17.html">font-palette-17.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-17.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-17.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-18.html" title="css/css-fonts/font-palette-18.html">font-palette-18.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-18.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-18.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-19.html" title="css/css-fonts/font-palette-19.html">font-palette-19.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-19.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-19.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-2.html" title="css/css-fonts/font-palette-2.html">font-palette-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-20.html" title="css/css-fonts/font-palette-20.html">font-palette-20.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-20.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-20.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-21.html" title="css/css-fonts/font-palette-21.html">font-palette-21.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-21.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-21.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-22.html" title="css/css-fonts/font-palette-22.html">font-palette-22.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-22.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-22.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-23.html" title="css/css-fonts/font-palette-23.html">font-palette-23.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-23.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-23.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-24.html" title="css/css-fonts/font-palette-24.html">font-palette-24.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-24.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-24.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-25.html" title="css/css-fonts/font-palette-25.html">font-palette-25.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-25.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-25.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-26.html" title="css/css-fonts/font-palette-26.html">font-palette-26.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-26.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-26.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-27.html" title="css/css-fonts/font-palette-27.html">font-palette-27.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-27.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-27.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-28.html" title="css/css-fonts/font-palette-28.html">font-palette-28.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-28.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-28.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-29.html" title="css/css-fonts/font-palette-29.html">font-palette-29.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-29.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-29.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-3.html" title="css/css-fonts/font-palette-3.html">font-palette-3.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-3.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-3.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-30.html" title="css/css-fonts/font-palette-30.html">font-palette-30.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-30.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-30.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-31.html" title="css/css-fonts/font-palette-31.html">font-palette-31.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-31.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-31.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-32.html" title="css/css-fonts/font-palette-32.html">font-palette-32.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-32.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-32.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-33.html" title="css/css-fonts/font-palette-33.html">font-palette-33.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-33.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-33.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-34.html" title="css/css-fonts/font-palette-34.html">font-palette-34.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-34.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-34.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-35.html" title="css/css-fonts/font-palette-35.html">font-palette-35.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-35.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-35.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-36.html" title="css/css-fonts/font-palette-36.html">font-palette-36.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-36.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-36.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-4.html" title="css/css-fonts/font-palette-4.html">font-palette-4.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-4.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-4.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-5.html" title="css/css-fonts/font-palette-5.html">font-palette-5.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-5.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-5.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-6.html" title="css/css-fonts/font-palette-6.html">font-palette-6.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-6.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-6.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-7.html" title="css/css-fonts/font-palette-7.html">font-palette-7.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-7.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-7.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-8.html" title="css/css-fonts/font-palette-8.html">font-palette-8.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-8.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-8.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-9.html" title="css/css-fonts/font-palette-9.html">font-palette-9.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-9.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-9.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-add-2.html" title="css/css-fonts/font-palette-add-2.html">font-palette-add-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-add-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-add-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-add.html" title="css/css-fonts/font-palette-add.html">font-palette-add.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-add.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-add.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-empty-font-family.html" title="css/css-fonts/font-palette-empty-font-family.html">font-palette-empty-font-family.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-empty-font-family.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-empty-font-family.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-modify-2.html" title="css/css-fonts/font-palette-modify-2.html">font-palette-modify-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-modify-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-modify-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-modify.html" title="css/css-fonts/font-palette-modify.html">font-palette-modify.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-modify.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-modify.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-non-ident-font-family.html" title="css/css-fonts/font-palette-non-ident-font-family.html">font-palette-non-ident-font-family.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-non-ident-font-family.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-non-ident-font-family.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-remove-2.html" title="css/css-fonts/font-palette-remove-2.html">font-palette-remove-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-remove-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-remove-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-remove.html" title="css/css-fonts/font-palette-remove.html">font-palette-remove.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-remove.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-remove.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette.html" title="css/css-fonts/font-palette.html">font-palette.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-palette-interpolation.html" title="css/css-fonts/animations/font-palette-interpolation.html">font-palette-interpolation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-palette-interpolation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-palette-interpolation.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-palette-vs-shorthand.html" title="css/css-fonts/font-palette-vs-shorthand.html">font-palette-vs-shorthand.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-palette-vs-shorthand.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-palette-vs-shorthand.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-palette-computed.html" title="css/css-fonts/parsing/font-palette-computed.html">font-palette-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-palette-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-palette-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-palette-invalid.html" title="css/css-fonts/parsing/font-palette-invalid.html">font-palette-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-palette-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-palette-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-palette-valid.html" title="css/css-fonts/parsing/font-palette-valid.html">font-palette-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-palette-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-palette-valid.html"><small>(source)</small></a> </ul> </details> <p>With the <dfn class="dfn-paneled css" data-dfn-type="function" data-export id="funcdef-palette-mix">palette-mix()</dfn> function defined as follows:</p> <pre class="def prod"><a class="production" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix③">&lt;palette-mix()></a> = palette-mix(<a class="production" data-link-type="type" href="https://drafts.csswg.org/css-color-5/#color-interpolation-method" id="ref-for-color-interpolation-method">&lt;color-interpolation-method></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma①">,</a> [ [normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤④">|</a> light <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤⑤">|</a> dark <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤⑥">|</a> <a class="production" data-link-type="type" href="#typedef-font-palette-palette-identifier" id="ref-for-typedef-font-palette-palette-identifier①">&lt;palette-identifier></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤⑦">|</a> <a class="production" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix④">&lt;palette-mix()></a> ] <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-all" id="ref-for-comb-all">&amp;&amp;</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value⑥">&lt;percentage [0,100]></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑦">?</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①③">#{2}</a>) </pre> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-palette" data-dfn-type="value" data-export id="valdef-font-palette-normal">normal</dfn> <dd> If the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-color-adjust-1/#propdef-color-scheme" id="ref-for-propdef-color-scheme">color-scheme</a> property is set to a value other than <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-adjust-1/#valdef-color-scheme-normal" id="ref-for-valdef-color-scheme-normal">normal</a>', user-agents should select the first light or dark palette as appropriate. Otherwise, user-agents display the color font with the default palette or default glyph colorisation. <p>User-agents should take the computed value of the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-color-4/#propdef-color" id="ref-for-propdef-color">color</a> property into consideration when a color font format requires use of the foreground color</p> <div class="example" id="ex-FFFF-means-color"><a class="self-link" href="#ex-FFFF-means-color"></a>In the <code class="highlight">COLR</code> <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> table, color index 0xFFFF should be rendered according the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-color-4/#propdef-color" id="ref-for-propdef-color①">color</a> property.</div> <div class="example" id="ex-normal-is-index-0"><a class="self-link" href="#ex-normal-is-index-0"></a>For <code class="highlight">COLR</code>/<code class="highlight">CPAL</code> <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> fonts, <a class="property css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette③">font-palette</a>: <a class="css" data-link-type="maybe" href="#valdef-font-palette-normal" id="ref-for-valdef-font-palette-normal">normal</a> usually means rendering the font with the palette in the font at index 0.</div> <dt><dfn class="dfn-paneled css" data-dfn-for="font-palette" data-dfn-type="value" data-export id="valdef-font-palette-light">light</dfn> <dd> Some color font formats include metadata marking certain palettes as applicable on a light (close to white) background. This keyword causes the user-agent to use the first available palette in the font file marked this way. If the font file format does not account for this metadata, or no palette in the font is marked this way, this value behaves as <a class="css" data-link-type="maybe" href="#valdef-font-palette-normal" id="ref-for-valdef-font-palette-normal①">normal</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-palette" data-dfn-type="value" data-export id="valdef-font-palette-dark">dark</dfn> <dd> Some color font formats include metadata marking certain palettes as applicable on a dark (close to black) background. This keyword causes the user-agent to use the first available palette in the font file marked this way. If the font file format does not account for this metadata, or no palette in the font is marked this way, this value behaves as <a class="css" data-link-type="maybe" href="#valdef-font-palette-normal" id="ref-for-valdef-font-palette-normal②">normal</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-palette" data-dfn-type="type" data-export id="typedef-font-palette-palette-identifier"><a class="production css" data-link-type="type" href="#typedef-font-palette-palette-identifier" id="ref-for-typedef-font-palette-palette-identifier②">&lt;palette-identifier></a></dfn> <dd> This value identifies an CSS-defined palette to use. Users can define a palette by using the <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①">@font-palette-values</a> rule. If no applicable <span class="css" id="ref-for-at-ruledef-font-palette-values②">@font-palette-values</span> rule is present, this value behaves as <a class="css" data-link-type="maybe" href="#valdef-font-palette-normal" id="ref-for-valdef-font-palette-normal③">normal</a>. <p><a class="production css" data-link-type="type" href="#typedef-font-palette-palette-identifier" id="ref-for-typedef-font-palette-palette-identifier③">&lt;palette-identifier></a> is parsed as a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-dashed-ident" id="ref-for-typedef-dashed-ident">&lt;dashed-ident></a>.</p> <p class="note" role="note"><span class="marker">Note:</span> Such a CSS-defined palette may be a reference to an existing palette already present in the font, be a modification of an existing palette already present in the font, or be an entirely new palette.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="font-palette" data-dfn-type="type" data-export id="typedef-font-palette-palette-mix"><a class="production css" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix⑤">&lt;palette-mix()></a></dfn> <dd> This value defines a position in the interpolation between two palette values, identified by <a class="production css" data-link-type="type" href="#typedef-font-palette-palette-identifier" id="ref-for-typedef-font-palette-palette-identifier④">&lt;palette-identifier></a>, by the palette keywords <a class="css" data-link-type="maybe" href="#valdef-font-palette-normal" id="ref-for-valdef-font-palette-normal④">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-font-palette-light" id="ref-for-valdef-font-palette-light">light</a>, <a class="css" data-link-type="maybe" href="#valdef-font-palette-dark" id="ref-for-valdef-font-palette-dark">dark</a>, or by another <a class="production css" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix⑥">&lt;palette-mix()></a> value. <p>The glyphs of the font must be rendered with a palette that is created by interpolating for each palette color index between the matching color indices of the first and second palette specified as arguments, recursively resolving <a class="production css" data-link-type="function" href="#funcdef-palette-mix" id="ref-for-funcdef-palette-mix⑦">&lt;palette-mix()></a> functions if needed.</p> <p>For each palette color, the interpolation follows the rules of the <a class="production css" data-link-type="function" href="https://drafts.csswg.org/css-color-5/#funcdef-color-mix" id="ref-for-funcdef-color-mix">&lt;color-mix()></a> function.</p> <p>Percentages are normalized according to <a href="https://drafts.csswg.org/css-color-5/#color-mix-percent-norm"><cite>CSS Color 5</cite> § 3.1 Percentage Normalization</a>.</p> </dl> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/palette-mix-computed.html" title="css/css-fonts/palette-mix-computed.html">palette-mix-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/palette-mix-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/palette-mix-computed.html"><small>(source)</small></a> </ul> </details> <p class="note" role="note"><span class="marker">Note:</span> The names <a class="property css" data-link-type="property">light</a> and <span class="property">dark</span> describe the <i>background</i> the color palette is usable on, not the colors in the color palette themselves.</p> <div class="example" id="ex-dark-mode-palette"> <a class="self-link" href="#ex-dark-mode-palette"></a>When dark mode is in effect, use a dark mode palette <pre class="highlight"><c- n>@media</c-> <c- p>(</c->prefers-color-scheme: dark<c- p>)</c-> <c- p>{</c-> .banner <c- p>{</c-><c- k>font-palette</c-><c- p>:</c-> dark<c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> </div> <div class="example" id="ex-bixa-palette-anim"> <a class="self-link" href="#ex-bixa-palette-anim"></a> Animate between palettes. <pre class="highlight"><c- n>@font-palette-values</c-> --pink <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Nabla<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- n>@font-palette-values</c-> --yellow <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Nabla<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>7</c-><c- p>;</c-> <c- p>}</c-> <c- n>@keyframes</c-> animate-palette <c- p>{</c-> from <c- p>{</c-> <c- k>font-palette</c-><c- p>:</c-> --yellow<c- p>;</c-> <c- p>}</c-> to <c- p>{</c-> <c- k>font-palette</c-><c- p>:</c-> --pink<c- p>;</c-> <c- p>}</c-> <c- p>}</c-> p <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Nabla<c- p>;</c-> <c- k>animation</c-><c- p>:</c-> animate-palette <c- m>1.4</c-><c- k>s</c-> infinite alternate linear<c- p>;</c-> <c- p>}</c-> </pre> <figure> <img alt="The word Animate animated between a pink and a yellow palette." height="350" src="images/nabla-animated.webp" width="705"> <figcaption>Nabla Color by typearture.com - animating between palettes 1 and 7 in the font.</figcaption> </figure> </div> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/font-palette-animation-not-specified-endpoints.html" title="css/css-fonts/animations/font-palette-animation-not-specified-endpoints.html">font-palette-animation-not-specified-endpoints.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/font-palette-animation-not-specified-endpoints.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/font-palette-animation-not-specified-endpoints.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/animations/multiple-elements-font-palette-animation.html" title="css/css-fonts/animations/multiple-elements-font-palette-animation.html">multiple-elements-font-palette-animation.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/animations/multiple-elements-font-palette-animation.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/animations/multiple-elements-font-palette-animation.html"><small>(source)</small></a> </ul> </details> <p class="issue" id="issue-6dfa50ce"><a class="self-link" href="#issue-6dfa50ce"></a> Add more examples and pictures.</p> <h3 class="heading settled" data-level="9.2" id="font-palette-values"><span class="secno">9.2. </span><span class="content"> User-defined font color palettes: The <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values③">@font-palette-values</a> rule</span><a class="self-link" href="#font-palette-values"></a></h3> <p>The <dfn class="dfn-paneled css" data-dfn-type="at-rule" data-export id="at-ruledef-font-palette-values">@font-palette-values</dfn> rule defines a color palette and associates that color palette with a specific font. This allows a web author to select arbitrary <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-5/#typedef-color" id="ref-for-typedef-color">&lt;color></a>s to use inside a color font rather than being limited to the preexisting palettes inside font files.</p> <p class="note" role="note"><span class="marker">Note:</span> The OpenType <a class="property css" data-link-type="property">CPAL</a> table is restricted to sRGB colors. The <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-5/#typedef-color" id="ref-for-typedef-color①">&lt;color></a>s in <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values④">@font-palette-values</a> allow any CSS color. Some implementations currently use APIs which are restricted to sRGB and may therefore map the specified colors to sRGB. This is expected to be a temporary limitation. Authors should not rely on this mapping to sRGB.</p> <p>In addition, this rule’s association with a specific font allows a name of a palette to apply differently to different fonts, which allows similar colors to be used across multiple fonts when multiple fonts are used in an element (i.e. for font fallback).</p> <p class="note" role="note"><span class="marker">Note:</span> A web author might wish to create multiple palettes for a single font in order to create multiple themes for their web content. A web author might also wish to create matching palettes for multiple fonts to achieve a consistent design across a collection of different fonts.</p> <p>A <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values⑤">@font-palette-values</a> rule represents a palette of colors used in a font. A palette consists of an ordered collection of colors. Using the <span class="css" id="ref-for-at-ruledef-font-palette-values⑥">@font-palette-values</span> allows a web author to reference a palette existing within a font as well as creating a palette populated with author-defined colors. In addition, it allows overriding a set of colors from a palette in the font with colors described by the web author.</p> <p>A palette is always <i>complete</i>, meaning that it is impossible to describe a palette which has missing colors. If colors would be missing, they are taken from the palette within the font identified by the <a class="property css" data-link-type="descriptor" href="#descdef-font-palette-values-base-palette" id="ref-for-descdef-font-palette-values-base-palette">base-palette</a> descriptor.</p> <p><a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#math-function" id="ref-for-math-function">Math functions</a>, such as <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#funcdef-calc" id="ref-for-funcdef-calc">calc()</a>, and also <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-variables-2/#funcdef-var" id="ref-for-funcdef-var">var()</a>, and <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-env-1/#funcdef-env" id="ref-for-funcdef-env">env()</a>, are valid within descriptor values in a <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values⑦">@font-palette-values</a> rule. They are evaluated within the context of the root element. Relative units are also evaluated within the context of the root element.</p> <p>The <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values⑧">@font-palette-values</a> rule consists of the <span class="css" id="ref-for-at-ruledef-font-palette-values⑨">@font-palette-values</span> at-keyword followed by a block of descriptor declarations. It has the following syntax:</p> <pre class="prod highlight"><c- n>@font-palette-values</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-dashed-ident" id="ref-for-typedef-dashed-ident①">&lt;dashed-ident></a> <c- p>{</c-> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list" id="ref-for-typedef-declaration-list⑧">&lt;declaration-list></a> <c- p>}</c-> </pre> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/palette-values-rule-add-2.html" title="css/css-fonts/palette-values-rule-add-2.html">palette-values-rule-add-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/palette-values-rule-add-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/palette-values-rule-add-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/palette-values-rule-add.html" title="css/css-fonts/palette-values-rule-add.html">palette-values-rule-add.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/palette-values-rule-add.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/palette-values-rule-add.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/palette-values-rule-delete-2.html" title="css/css-fonts/palette-values-rule-delete-2.html">palette-values-rule-delete-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/palette-values-rule-delete-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/palette-values-rule-delete-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/palette-values-rule-delete.html" title="css/css-fonts/palette-values-rule-delete.html">palette-values-rule-delete.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/palette-values-rule-delete.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/palette-values-rule-delete.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-palette-values-invalid.html" title="css/css-fonts/parsing/font-palette-values-invalid.html">font-palette-values-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-palette-values-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-palette-values-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-palette-values-valid.html" title="css/css-fonts/parsing/font-palette-values-valid.html">font-palette-values-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-palette-values-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-palette-values-valid.html"><small>(source)</small></a> </ul> </details> <p>The <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①⓪">@font-palette-values</a> rule accepts the descriptors defined in this specification.</p> <div class="example" id="ex-bixa-palette"> <a class="self-link" href="#ex-bixa-palette"></a> Modify Bixa Color’s color palette. <pre class="highlight"><c- n>@font-palette-values</c-> --Cooler <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bixa<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>override-colors</c-><c- p>:</c-> <c- m>1</c-> #7EB7E4<c- p>;</c-> <c- p>}</c-> </pre> <figure> <img alt="overriding a color" height="516" src="images/bixa-colors.png" width="1177"> <figcaption>Bixa Color by Novo Typo. Above, using the colors in the font; below, the orange changed to a blue.</figcaption> </figure> </div> <div class="example" id="ex-handover-palette"> <a class="self-link" href="#ex-handover-palette"></a> Modify Handover Sans’s color palette <pre class="highlight"><c- n>@font-palette-values</c-> --Augusta <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Handover Sans<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>3</c-><c- p>;</c-> <c- k>override-colors</c-><c- p>:</c-> <c- m>1</c-> <c- nf>rgb</c-><c- p>(</c-><c- m>43</c-><c- p>,</c-> <c- m>12</c-><c- p>,</c-> <c- m>9</c-><c- p>),</c-> <c- m>3</c-> <c- nf>var</c-><c- p>(</c->--highlight<c- p>);</c-> <c- p>}</c-> </pre> </div> <p>These descriptors apply solely within the context of the <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①①">@font-palette-values</a> rule in which they are defined, and do not apply to document language elements. When a given descriptor occurs multiple times in a given <span class="css" id="ref-for-at-ruledef-font-palette-values①②">@font-palette-values</span> rule, only the last descriptor declaration is used and all prior declarations for that descriptor are ignored.</p> <p>Each of these palettes are applied to each @font-face that share a family name.</p> <div class="example" id="ex-greenish-two-fonts"> <a class="self-link" href="#ex-greenish-two-fonts"></a> I want to use two color fonts in a greenish palette. The first font, Bixxxa, already has palette that I can use, but for Bungeehee I need to overwrite one color to get my green palette. <pre class="lang-css highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bixxxa<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>'./bixxxa.woff'</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>'woff'</c-><c- p>);</c-> <c- p>}</c-> <c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bungeehee<c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>'./bungeehee.woff'</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>'woff'</c-><c- p>);</c-> <c- p>}</c-> <c- n>@font-palette-values</c-> --ToxicGreen <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bixxxa<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>3</c-><c- p>;</c-> <c- c>/* This is Bixxxa’s green palette */</c-> <c- p>}</c-> <c- n>@font-palette-values</c-> --ToxicGreen <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bungeehee<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>7</c-><c- p>;</c-> <c- c>/* This is Bungeehee’s green palette... */</c-> override-colors: <c- m>2</c-> lime<c- p>;</c-> <c- c>/* ...except this is pink, which I overwrite to lime */</c-> <c- p>}</c-> h1 <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bixxxa<c- p>;</c-> <c- k>font-palette</c-><c- p>:</c-> --ToxicGreen<c- p>;</c-> <c- p>}</c-> h2 <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bungeehee<c- p>;</c-> <c- k>font-palette</c-><c- p>:</c-> --ToxicGreen<c- p>;</c-> <c- p>}</c-> </pre> <p><em>Example by Roel Nieskens</em></p> </div> <p class="note" role="note"><span class="marker">Note:</span> In the case where a family name is shared between multiple physical fonts, (such as when a compound font is created, using <a class="property css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range⑧">unicode-range</a>), and if those fonts have different palettes, the result of specifying a partial palette using <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①③">@font-palette-values</a> is unlikely to be what the author intended. In this case, it is better to supply a complete palette definition.</p> <div class="example" id="ex-named-palettes"> <a class="self-link" href="#ex-named-palettes"></a> In the above example, since two different font families have been set up to have compatible named palettes, one could go on to write <pre class="lang-css highlight">h3 <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Bixxxa<c- p>,</c-> Bungeehee<c- p>;</c-> <c- k>font-palette</c-><c- p>:</c-> --ToxicGreen<c- p>;</c-> <c- p>}</c-> </pre> <p>Which would correctly apply the desired palette in each font even though they have different palette numbers.</p> </div> <p>A given set of <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①④">@font-palette-values</a> rules define which author-defined palettes are available for use within the documents that contain these rules.</p> <p>An author-defined font color palette must only be available to the documents that reference it. Using an author-defined color palette outside of the documents that reference it would constitute a security leak since the contents of one page would be able to affect other pages, something an attacker could use as an attack vector.</p> <p>This at-rule follows the forward-compatible parsing rules of CSS. Like properties in a declaration block, declarations of any descriptors that are not supported by the user agent must be ignored. <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①⑤">@font-palette-values</a> rules require a <a class="property" data-link-type="propdesc" href="#descdef-font-palette-values-font-family" id="ref-for-descdef-font-palette-values-font-family">font-family</a> descriptor; if it is missing, the <span class="css" id="ref-for-at-ruledef-font-palette-values①⑥">@font-palette-values</span> rule is invalid and must be ignored entirely.</p> <p>In cases where user agents have limited platform resources, do not implement support for color fonts, or implement the ability to disable color fonts, <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①⑦">@font-palette-values</a> rules must simply be ignored; the behavior of individual descriptors as defined in this specification should not be altered.</p> <h4 class="heading settled" data-level="9.2.1" id="font-family-2-desc"><span class="secno">9.2.1. </span><span class="content"> Font family: the <a class="property" data-link-type="propdesc" href="#descdef-font-palette-values-font-family" id="ref-for-descdef-font-palette-values-font-family①">font-family</a> descriptor</span><a class="self-link" href="#font-family-2-desc"></a></h4> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-palette-values" data-dfn-type="descriptor" data-export id="descdef-font-palette-values-font-family">font-family</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①⑧">@font-palette-values</a> <tr> <th>Value: <td class="prod"><a class="production css" data-link-type="type" href="#family-name-value" id="ref-for-family-name-value①⑤">&lt;family-name></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①④">#</a> <tr> <th>Initial: <td>N/A </table> <p>This descriptor defines the font families that this palette applies to, using the same list of font families as <a href="#font-matching-algorithm">§ 5 Font Matching Algorithm</a>. This palette will only ever be applied to the fonts with these family names. The value of this descriptor means that only named font families are allowed and rules that include generic fonts in the list of font families are syntax errors. If syntax errors occur within the font family list, the descriptor must be ignored (will still be in the CSS OM, but will not match any font families).</p> <h4 class="heading settled" data-level="9.2.2" id="base-palette-desc"><span class="secno">9.2.2. </span><span class="content"> Specifying the base palette: the <a class="property css" data-link-type="descriptor" href="#descdef-font-palette-values-base-palette" id="ref-for-descdef-font-palette-values-base-palette①">base-palette</a> descriptor</span><a class="self-link" href="#base-palette-desc"></a></h4> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-palette-values" data-dfn-type="descriptor" data-export id="descdef-font-palette-values-base-palette">base-palette</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values①⑨">@font-palette-values</a> <tr> <th>Value: <td class="prod">light <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤⑧">|</a> dark <span id="ref-for-comb-one①⑤⑨">|</span> <a class="production css" data-link-type="type">&lt;integer [0,∞]></a> <tr> <th>Initial: <td>N/A </table> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="base-palette" data-dfn-type="value" data-export id="valdef-base-palette-light">light</dfn> <dd> Some color font formats include metadata marking certain palettes as applicable on a light (close to white) background. This keyword identifies the first available palette in the font file marked this way. If the font file format does not account for this metadata, or no palette in the font is marked this way, this value behaves as 0. <dt><dfn class="dfn-paneled css" data-dfn-for="base-palette" data-dfn-type="value" data-export id="valdef-base-palette-dark">dark</dfn> <dd> Some color font formats include metadata marking certain palettes as applicable on a dark (close to black) background. This keyword identifies the first available palette in the font file marked this way. If the font file format does not account for this metadata, or no palette in the font is marked this way, this value behaves as 0. <dt><dfn class="dfn-paneled css" data-dfn-for="base-palette" data-dfn-type="type" data-export id="typedef-base-palette-integer"><a class="production css" data-link-type="type">&lt;integer></a></dfn> <dd> Identifies a (zero-based) numerical palette index within the font. </dl> <div class="example" id="ex-banner-palette"> <a class="self-link" href="#ex-banner-palette"></a> Modify Banner Flag’s color palette <pre class="highlight"><c- n>@font-palette-values</c-> --Festival <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Banner Flag<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- k>override-colors</c-><c- p>:</c-> <c- m>0</c-> <c- nf>rgb</c-><c- p>(</c-><c- m>123</c-><c- p>,</c-> <c- m>64</c-><c- p>,</c-> <c- m>27</c-><c- p>),</c-> <c- m>1</c-> darkblue<c- p>,</c-> <c- m>2</c-> <c- nf>var</c-><c- p>(</c->--highlight<c- p>);</c-> <c- p>}</c-> </pre> </div> <p>This descriptor specifies a palette in the font which the containing <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values②⓪">@font-palette-values</a> rule uses as an initial value. If no <a class="production css" data-link-type="type">&lt;override-colors></a> key is present in the <span class="css" id="ref-for-at-ruledef-font-palette-values②①">@font-palette-values</span> rule, then the <span class="css" id="ref-for-at-ruledef-font-palette-values②②">@font-palette-values</span> rule represents the palette in the font with the same index as the value of this descriptor. If a <span class="production">&lt;override-colors></span> key is present in the <span class="css" id="ref-for-at-ruledef-font-palette-values②③">@font-palette-values</span> rule, each item in the value of that descriptor overrides a single color in the color palette represented by this <span class="css" id="ref-for-at-ruledef-font-palette-values②④">@font-palette-values</span> block.</p> <div class="example" id="ex-handover-3rd"> <a class="self-link" href="#ex-handover-3rd"></a> Rename Handover Sans’s 3rd color palette <pre class="highlight"><c- n>@font-palette-values</c-> --Augusta <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Handover Sans<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>3</c-><c- p>;</c-> <c- p>}</c-> </pre> </div> <p>If this descriptor is not present in the <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values②⑤">@font-palette-values</a>, or if the font does not contain a palette at the index of the value of <a class="property css" data-link-type="property">base-palette</a>, it behaves as if <span class="css">0</span> were specified. If a font does not contain any color palettes, no colors are included in the initial color palette represented by this <span class="css" id="ref-for-at-ruledef-font-palette-values②⑥">@font-palette-values</span> rule. Colors in the palette can be overridden by using the <span class="property">override-color</span> descriptor in the <span class="css" id="ref-for-at-ruledef-font-palette-values②⑦">@font-palette-values</span> rule.</p> <h4 class="heading settled" data-level="9.2.3" id="override-color"><span class="secno">9.2.3. </span><span class="content"> Overriding a colors from a palette: The <a class="property css" data-link-type="descriptor" href="#descdef-font-palette-values-override-colors" id="ref-for-descdef-font-palette-values-override-colors">override-colors</a> descriptor</span><a class="self-link" href="#override-color"></a></h4> <table class="def descdef"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-for="@font-palette-values" data-dfn-type="descriptor" data-export id="descdef-font-palette-values-override-colors">override-colors</dfn> <tr> <th>For: <td><a class="css" data-link-type="at-rule" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values②⑧">@font-palette-values</a> <tr> <th>Value: <td class="prod">[ <a class="production css" data-link-type="type">&lt;integer [0,∞]></a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-5/#typedef-color" id="ref-for-typedef-color②">&lt;color></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①⑤">#</a> <tr> <th>Initial: <td>N/A </table> <p>This descriptor overrides colors to the initial color palette represented by this <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values②⑨">@font-palette-values</a> rule.</p> <p>The specified <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-5/#typedef-color" id="ref-for-typedef-color③">&lt;color></a> must be an <a data-link-type="dfn" href="https://drafts.csswg.org/css-color-5/#absolute-color" id="ref-for-absolute-color">absolute color</a>.</p> <p>The <a class="property" data-link-type="propdesc" href="#descdef-font-palette-values-override-colors" id="ref-for-descdef-font-palette-values-override-colors①">override-colors</a> descriptor takes a comma-separated list of palette index entries and colors. Each item in the comma-separated list represents a tuple of an entry into the palette and a color to replace it with.</p> <p>For each key/value pair in the value of this descriptor, the color with that key in the initial palette (i.e. by using the <a class="property css" data-link-type="property">base-palette</a> descriptor) is overwritten by the color specified in this descriptor’s value. A key that is outside the range of indices of the initial palette is ignored.</p> <p>Palette index entries in the <span class="css">override-colors</span> descriptor are a (zero-based) palette index entry.</p> <p>Integer values are zero-indexed.</p> <p>If the keys of multiple distinct key/value pairs identify the same color index (either by name or by integer), the last key is used for the purposes of rendering. However, for serialization purposes, both key/value pairs are present.</p> <p class="note" role="note"><span class="marker">Note:</span> This means that using <a class="property css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette④">font-palette</a> with the same value on two different elements might result in different used palettes because the value of variables inside the <a class="css" data-link-type="maybe" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values③⓪">@font-palette-values</a> rule might apply differently in the context of those two elements.</p> <p>Colors provided from CSS (as overrides, or as new entries) may use any supported colorspace.</p> <div class="example" id="ex-palette-anycolorspace"> <a class="self-link" href="#ex-palette-anycolorspace"></a> Modify Blaka Ink’s color palette <pre class="highlight"><c- n>@font-palette-values</c-> --Festival <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> Blaka Ink<c- p>;</c-> <c- k>base-palette</c-><c- p>:</c-> <c- m>0</c-><c- p>;</c-> <c- k>override-colors</c-><c- p>:</c-> <c- m>0</c-> <c- nf>oklch</c-><c- p>(</c-><c- m>0.63</c-> <c- m>0.12</c-> <c- m>105.7</c-><c- p>),</c-> <c- m>1</c-> <c- nf>color</c-><c- p>(</c->display-p3 <c- m>0.23</c-> <c- m>0.22</c-> <c- m>0.04</c-><c- p>),</c-> <c- m>2</c-> <c- nf>color</c-><c- p>(</c->prophoto-rgb <c- m>0.37</c-> <c- m>0.27</c-> <c- m>0.09</c-><c- p>);</c-> <c- p>}</c-> </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> The colors specified in versions 0 and 1 of the CPAL table are in sRGB.</p> <h3 class="heading settled" data-level="9.3" id="font-variant-emoji-prop"><span class="secno">9.3. </span><span class="content"> Selecting the text presentation style: The <a class="property css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji②">font-variant-emoji</a> property</span><a class="self-link" href="#font-variant-emoji-prop"></a></h3> <table class="def propdef" data-link-for-hint="font-variant-emoji"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-font-variant-emoji">font-variant-emoji</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑥⓪">|</a> text <span id="ref-for-comb-one①⑥①">|</span> emoji <span id="ref-for-comb-one①⑥②">|</span> unicode <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>all elements and text <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-emoji-1.html" title="css/css-fonts/font-variant-emoji-1.html">font-variant-emoji-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-emoji-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-emoji-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-emoji-2.html" title="css/css-fonts/font-variant-emoji-2.html">font-variant-emoji-2.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-emoji-2.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-emoji-2.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-emoji-003.html" title="css/css-fonts/font-variant-emoji-003.html">font-variant-emoji-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-emoji-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-emoji-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/font-variant-emoji-004.html" title="css/css-fonts/font-variant-emoji-004.html">font-variant-emoji-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/font-variant-emoji-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/font-variant-emoji-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variation-sequences.html" title="css/css-fonts/variation-sequences.html">variation-sequences.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variation-sequences.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variation-sequences.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-emoji-computed.html" title="css/css-fonts/parsing/font-variant-emoji-computed.html">font-variant-emoji-computed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-emoji-computed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-emoji-computed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-emoji-invalid.html" title="css/css-fonts/parsing/font-variant-emoji-invalid.html">font-variant-emoji-invalid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-emoji-invalid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-emoji-invalid.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-emoji-valid.html" title="css/css-fonts/parsing/font-variant-emoji-valid.html">font-variant-emoji-valid.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-emoji-valid.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-emoji-valid.html"><small>(source)</small></a> </ul> </details> <p>This property allows web authors to select whether emoji presentation or text presentation is used for certain emoji code points. Traditionally, these presentation styles were selected by appending Variation Selector 15 (U+FE0E) or Variation Selector 16 (U+FE0F) to certain code points. However, <a class="property css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji③">font-variant-emoji</a> allows web authors to set a default presentation style which can replace the variation selectors.</p> <p>Only the code points <a href="http://www.unicode.org/emoji/charts/emoji-variants.html">listed</a> by Unicode as contributing to a Unicode emoji presentation sequence are affected by this property. Within this CSS specification, these characters are referred to as <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="emoji-presentation-participating-code-points">Emoji Presentation Participating Code Points</dfn>. This property has no effect on any other characters.</p> <p>This property is expected to affect font fallback; however, the exact nature of the interaction of font fallback with <a class="property css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji④">font-variant-emoji</a> is explicitly unspecified. However, a variation selector must be included in a previous cluster as defined by the <a href="#cluster-matching">cluster matching</a> section above. A natural result of this behavior is that a variation selector must not be rendered in a different font than the previous character. It thus causes font fallback to behave as if the respective variation selector was intended (as in the values description); then font fallback, including the cluster fallback rules, is performed, which must take the presentation preference of these "appended" variation selectors into account.</p> <p>Even when <a class="property css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji⑤">font-variant-emoji</a> is used, the presence of Variation Selector 15 (U+FE0E) or Variation Selector 16 (U+FE0F) in the contents of an element override the rendering specified in <span class="property" id="ref-for-propdef-font-variant-emoji⑥">font-variant-emoji</span>. Therefore, <span class="property" id="ref-for-propdef-font-variant-emoji⑦">font-variant-emoji</span> sets a default presentation which the text being rendered can opt out of.</p> <p class="note" role="note"><span class="marker">Note:</span> Different platforms have different conventions about how to handle emoji presentation sequences. A cross-platform UA might wish to follow the conventions of each individual platform, or it might wish to use the same approach on all platforms. When tasked with a request for an emoji style rendering, a UA might wish to disregard fonts which do not include color tables. A different UA might wish instead to use the same mechanical cluster fallback algorithm that it would use for any arbitrary cluster.</p> <p>Variation selectors other than FE0E VARIATION SELECTOR-15 and U+FE0F VARIATION SELECTOR-16 must not have any effect on font selection. If one of these variation selectors is present, but unsupported by the font previously selected, the variation selector is ignored.</p> <p>BCP47’s <code class="highlight">-u-</code> extension to the language tag accepted by <code class="highlight">lang</code> or <code class="highlight"><c- k>xml</c-><c- p>:</c->lang</code> should not be considered when the user-agent decides whether to use emoji presentation or text presentation for a particular character.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-emoji" data-dfn-type="value" data-export id="valdef-font-variant-emoji-normal">normal</dfn> <dd> User agents can choose to draw a <a data-link-type="dfn">Presentation Participating Code Point</a> in either emoji style or text style. User agents typically follow platform conventions when performing this decision. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-emoji" data-dfn-type="value" data-export id="valdef-font-variant-emoji-text">text</dfn> <dd> Code points are rendered as if U+FE0E VARIATION SELECTOR-15 was appended to every <a data-link-type="dfn">Presentation Participating Code Point</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-emoji" data-dfn-type="value" data-export id="valdef-font-variant-emoji-emoji">emoji</dfn> <dd> Code points are rendered as if U+FE0F VARIATION SELECTOR-16 was appended to every <a data-link-type="dfn">Presentation Participating Code Point</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="font-variant-emoji" data-dfn-type="value" data-export id="valdef-font-variant-emoji-unicode">unicode</dfn> <dd> Code points are rendered in accordance with <a data-link-type="biblio" href="#biblio-uts51" title="Unicode Emoji">[UTS51]</a> as either emoji-default, text-default, or text-only, depending on the values of the Emoji and Emoji_Presentation properties for each <a data-link-type="dfn">Presentation Participating Code Point</a>. If present, FE0E VARIATION SELECTOR-15 and U+FE0F VARIATION SELECTOR-16 will override the default presentation of individual <span>Presentation Participating Code Points</span>. </dl> <div class="example" id="ex-emoji-variant"> <a class="self-link" href="#ex-emoji-variant"></a> To show the emoji form of U+1F6CB COUCH AND LAMP, let CustomEmoji.ttf obey the user agent’s notion of supporting the emoji form of this character, and use the following: <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"Custom Emoji"</c-><c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"CustomEmoji.ttf"</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c-><c- s>"truetype"</c-><c- p>);</c-> <c- p>}</c-> ... &lt;div style=<c- s>"font-family: 'Custom Emoji'; font-variant-emoji: emoji;"</c->>&amp;#x1F6CB<c- p>;</c->&lt;/div> </pre> </div> <h2 class="heading settled" data-level="10" id="font-taxonomy"><span class="secno">10. </span><span class="content"> Font Taxonomy</span><a class="self-link" href="#font-taxonomy"></a></h2> <p>A given font may belong in one or more of the following categories:</p> <h3 class="heading settled" data-level="10.1" id="installed-fonts"><span class="secno">10.1. </span><span class="content"> Installed Fonts</span><a class="self-link" href="#installed-fonts"></a></h3> <p>A font may be installed globally on a device. Such fonts are generally accessible in any application, even applications which have no concept of CSS. The file or files backing the font object exist on the user’s device, not as a remote resource.</p> <p>Installed Fonts must not be Web Fonts, and Web Fonts must not be Installed Fonts.</p> <h3 class="heading settled" data-level="10.2" id="web-fonts"><span class="secno">10.2. </span><span class="content"> Web Fonts</span><a class="self-link" href="#web-fonts"></a></h3> A font may be backed by a remote resource, which must be requested using the user agent’s resource fetching infrastructure. Web Fonts are represented by one of two mechanisms: <ul> <li data-md> <p><a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑦⑧">@font-face</a> rules</p> <li data-md> <p>A <span class="css">FontFace</span> member of the Document’s <span class="css">FontFaceSet</span></p> </ul> <p>A Web Font must not be accessible in any other Document from the one which either is associated with the <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑦⑨">@font-face</a> rule or owns the <span class="css">FontFaceSet</span>. Other applications on the device must not be able to access Web Fonts.</p> <p>Installed Fonts must not be Web Fonts, and Web Fonts must not be Installed Fonts.</p> <p>Web Fonts shadow Installed Fonts, so if an Installed Font has the same family name as a Web Font, the Installed Font is not accessible.</p> <h3 class="heading settled" data-level="10.3" id="preinstalled-and-user-installed-fonts"><span class="secno">10.3. </span><span class="content"> Preinstalled Fonts and User-Installed Fonts</span><a class="self-link" href="#preinstalled-and-user-installed-fonts"></a></h3> <p>Users can choose to install fonts on their devices. User-Installed Fonts are installed by an explicit action by the user, such as clicking an "Install" button or copying a file into a particular directory on their device. Such fonts are User-Installed Fonts and also are Installed Fonts. Web content authors should not count on the presence of user-installed fonts, because there is no guarantee any user will have performed the action to install a specific font.</p> <p>Please see the <a href="#font-matching-algorithm">Font Matching Algorithm</a> description of how user-installed fonts may interact with the font matching algorithm.</p> <p>Any Installed Font which is not a User-Installed font is a Preinstalled Font. It is likely that all users of a particular version of a particular Operating System will have the same set of Preinstalled Fonts installed. As such, Web content authors targeting these Operating Systems may wish to use these fonts' family names inside <a class="property css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①⑦">font-family</a> properties.</p> <h3 class="heading settled" data-level="10.4" id="system-font"><span class="secno">10.4. </span><span class="content"> System Font</span><a class="self-link" href="#system-font"></a></h3> <p>The System Font is the font which is used by the <a class="css" data-link-type="maybe" href="#valdef-font-family-system-ui" id="ref-for-valdef-font-family-system-ui④">system-ui</a> <a href="#system-ui-def">generic font family name</a>. It is an example of a Preinstalled Font.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ar.html" title="css/css-fonts/system-ui-ar.html">system-ui-ar.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ar.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ar.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ja-vs-zh.html" title="css/css-fonts/system-ui-ja-vs-zh.html">system-ui-ja-vs-zh.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ja-vs-zh.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ja-vs-zh.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ja.html" title="css/css-fonts/system-ui-ja.html">system-ui-ja.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ja.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ja.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-mixed.html" title="css/css-fonts/system-ui-mixed.html">system-ui-mixed.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-mixed.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-mixed.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ur-vs-ar.html" title="css/css-fonts/system-ui-ur-vs-ar.html">system-ui-ur-vs-ar.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ur-vs-ar.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ur-vs-ar.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-ur.html" title="css/css-fonts/system-ui-ur.html">system-ui-ur.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-ur.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-ur.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui-zh.html" title="css/css-fonts/system-ui-zh.html">system-ui-zh.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui-zh.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui-zh.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/system-ui.html" title="css/css-fonts/system-ui.html">system-ui.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/system-ui.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/system-ui.html"><small>(source)</small></a> </ul> </details> <h2 class="heading settled" data-level="11" id="font-technologies-formats"><span class="secno">11. </span><span class="content"> Font Technologies and Formats </span><a class="self-link" href="#font-technologies-formats"></a></h2> <h3 class="heading settled" data-level="11.1" id="font-tech-definitions"><span class="secno">11.1. </span><span class="content">Font tech</span><a class="self-link" href="#font-tech-definitions"></a></h3> <p>The <a class="property css" data-link-type="property">features-opentype</a>, <span class="property">features-aat</span> and <span class="property">features-graphite</span> techs refer to support for font features, commonly implemented in <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> with the <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/gsub">GSUB</a></code> and the <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/gpos">GPOS</a></code> tables, as well as in <a data-link-type="biblio" href="#biblio-aat-features" title="Apple Advanced Typography Font Feature Registry">[AAT-FEATURES]</a> using the <code class="highlight"><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6morx.html">morx</a></code> and <code class="highlight"><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6kerx.html">kerx</a></code> tables and <a data-link-type="biblio" href="#biblio-graphite" title="Graphite technical overview">[GRAPHITE]</a> with the <code class="highlight">Silf</code>, <code class="highlight">Glat </code>, <code class="highlight">Gloc </code>, <code class="highlight">Feat </code> and <code class="highlight">Sill </code> tables as documented in the <a href="https://graphite.sil.org/">Graphite Table Format</a>. The section on <a href="#font-rend-props">§ 6 Font Feature Properties</a> describes properties that interact with these facilities.</p> <p>The <a class="property css" data-link-type="property">variations</a> tech refers to the support of font variations, commonly implemented in <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> with the <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/avar">avar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/cvar">cvar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/fvar">fvar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/gvar">gvar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/hvar">HVAR</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/mvar">MVAR</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/stat">STAT</a></code>, and <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/vvar">VVAR</a></code> tables, as well as in <a data-link-type="biblio" href="#biblio-aat-features" title="Apple Advanced Typography Font Feature Registry">[AAT-FEATURES]</a> using the <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/avar">avar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/cvar">cvar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/fvar">fvar</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/gvar">gvar</a></code> tables. The section on <a href="#basic-font-props">§ 2 Basic Font Properties</a> as well as the section on <a href="#font-variation-props">§ 8 Font Variation Properties</a> describe properties that interact with these facilities.</p> <p>The <a class="property css" data-link-type="property">color-colrv0</a>, <span class="property">color-colrv1</span>, <span class="property">color-svg</span>, <span class="property">color-sbix</span> and <span class="property">color-cbdt</span> technologies refers to various types of color font file technologies. Each one represents a table (<code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/colr">COLR</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/svg">SVG</a></code>, <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/sbix">sbix</a></code> or <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/cbdt">CBDT</a></code>) inside <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> or <a data-link-type="biblio" href="#biblio-aat-features" title="Apple Advanced Typography Font Feature Registry">[AAT-FEATURES]</a> fonts which must be supported to satisfy this requirement.</p> <p>The <a class="property css" data-link-type="property">palettes</a> tech refers to support for font palettes, commonly implemented in the <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a> and <a data-link-type="biblio" href="#biblio-aat-features" title="Apple Advanced Typography Font Feature Registry">[AAT-FEATURES]</a> with the <code class="highlight"><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/cpal">CPAL</a></code> table. The section on <a href="#color-font-support">§ 9 Color Font Support</a> describes properties that interact with these facilities.</p> <p>The <a class="property css" data-link-type="property">incremental</a> tech refers to client support for incremental font transfer <a data-link-type="biblio" href="#biblio-ift" title="Incremental Font Transfer">[IFT]</a>.</p> <p class="informative">For background on these, see <a data-link-type="biblio" href="#biblio-pfe-report" title="Progressive Font Enrichment: Evaluation Report">[PFE-report]</a>.</p> <p>Web authors can specify the <a class="property css" data-link-type="property">tech</a> function inside an <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑧⓪">@font-face</a> <a class="property css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src⑨">src</a> descriptor to indicate that support is required for correct rendering of a font. This mechanism can be used for gracefully falling back to an ancillary font when requested support is not present.</p> <div class="example" id="ex-color-if-supported"> <a class="self-link" href="#ex-color-if-supported"></a> This <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑧①">@font-face</a> block shows how to use a color font if support is present on the user agent, and falls back to a non-color-font if support is not present. <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"Trickster"</c-><c- p>;</c-> <c- k>src</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"trickster-COLRv1.otf"</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c->opentype<c- p>)</c-> <c- nf>tech</c-><c- p>(</c->color-COLRv1<c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>"trickster-outline.otf"</c-><c- p>)</c-> <c- nf>format</c-><c- p>(</c->opentype<c- p>);</c-> <c- p>}</c-> </pre> </div> <h3 class="heading settled" data-level="11.2" id="font-format-definitions"><span class="secno">11.2. </span><span class="content">Font formats</span><a class="self-link" href="#font-format-definitions"></a></h3> <p>Format strings defined by this specification are as follows. The <a class="production css" data-link-type="type" href="#font-format-values" id="ref-for-font-format-values①">&lt;font-format></a> values are synonyms for the formats below.</p> <table class="data" id="fontformats"> <thead> <tr> <th>String <th>Font Format <th>Common extensions <th>Common media types <tbody> <tr> <th>"collection" <td><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/otff#collections">OpenType Collection</a> <td>.otc,.ttc <td><a href="https://www.iana.org/assignments/media-types/font/collection">font/collection</a> <tr> <th>"embedded-opentype" <td><a href="https://www.w3.org/Submission/2008/SUBM-EOT-20080305/">Embedded OpenType</a> <td>.eot <td><a href="https://www.iana.org/assignments/media-types/application/vnd.ms-fontobject">application/vnd.ms-fontobject</a> <tr> <th>"opentype" <td><a href="https://www.microsoft.com/typography/otspec/default.htm">OpenType</a> <td>.ttf, .otf <td><a href="https://www.iana.org/assignments/media-types/font/otf">font/otf</a>, <a href="https://www.iana.org/assignments/media-types/font/ttf">font/ttf</a> <tr> <th>"svg" <td><a href="https://www.w3.org/TR/SVG11/fonts.html">SVG Font</a> (deprecated) <td>.svg, .svgz <td><a href="https://www.iana.org/assignments/media-types/image/svg+xml">image/svg+xml</a> <tr> <th>"truetype" <td><a href="https://www.microsoft.com/typography/otspec/default.htm">TrueType</a> <td>.ttf <td><a href="https://www.iana.org/assignments/media-types/font/ttf">font/ttf</a> <tr> <th>"woff" <td><a href="https://www.w3.org/TR/WOFF/">WOFF 1.0 (Web Open Font Format)</a> <td>.woff <td><a href="https://www.iana.org/assignments/media-types/font/woff">font/woff</a> <tr> <th>"woff2" <td><a href="https://www.w3.org/TR/WOFF2/">WOFF 2.0 (Web Open Font Format)</a> <td>.woff2 <td><a href="https://www.iana.org/assignments/media-types/font/woff2">font/woff2</a> </table> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/format-specifiers-variations.html" title="css/css-fonts/format-specifiers-variations.html">format-specifiers-variations.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/format-specifiers-variations.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/format-specifiers-variations.html"><small>(source)</small></a> </ul> </details> <p>Given the overlap in common usage between TrueType and OpenType, the format hints "truetype" and "opentype" must be considered as synonymous; a format hint of "opentype" does not imply that the font contains Postscript CFF style glyph data or that it contains OpenType layout information (see <a href="#platform-props-to-css">Appendix A</a> for more background on this).</p> <h2 class="heading settled" data-level="12" id="object-model"><span class="secno">12. </span><span class="content"> Object Model</span><a class="self-link" href="#object-model"></a></h2> <p>The contents of <a class="css" data-link-type="maybe" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑧②">@font-face</a> and <a class="css" data-link-type="maybe" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values②⓪">@font-feature-values</a> rules can be accessed via the following extensions to the CSS Object Model.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/idlharness.html" title="css/css-fonts/idlharness.html">idlharness.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/idlharness.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/idlharness.html"><small>(source)</small></a> </ul> </details> <h3 class="heading settled" data-level="12.1" id="om-fontface"><span class="secno">12.1. </span><span class="content"> The <code class="highlight" id="cssfontfacerule2">CSSFontFaceRule</code> interface</span><a class="self-link" href="#om-fontface"></a></h3> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="cssfontfacerule-interface">CSSFontFaceRule</dfn> interface represents a <a class="production css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑧③">&lt;@font-face></a> rule.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="cssfontfacedescriptors"><code class="highlight"><c- g>CSSFontFaceDescriptors</c-></code></dfn> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssstyledeclaration" id="ref-for-cssstyledeclaration"><c- n>CSSStyleDeclaration</c-></a> { <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-src"><code class="highlight"><c- g>src</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontfamily"><code class="highlight"><c- g>fontFamily</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-family"><code class="highlight"><c- g>font-family</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString③"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontstyle"><code class="highlight"><c- g>fontStyle</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString④"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring④"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-style"><code class="highlight"><c- g>font-style</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString⑤"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑤"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontweight"><code class="highlight"><c- g>fontWeight</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString⑥"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑥"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-weight"><code class="highlight"><c- g>font-weight</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString⑦"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑦"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontstretch"><code class="highlight"><c- g>fontStretch</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString⑧"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑧"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-stretch"><code class="highlight"><c- g>font-stretch</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString⑨"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑨"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontwidth"><code class="highlight"><c- g>fontWidth</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①⓪"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⓪"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-width"><code class="highlight"><c- g>font-width</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①①"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①①"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-unicoderange"><code class="highlight"><c- g>unicodeRange</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①②"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①②"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-unicode-range"><code class="highlight"><c- g>unicode-range</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①③"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①③"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontfeaturesettings"><code class="highlight"><c- g>fontFeatureSettings</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①④"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①④"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-feature-settings"><code class="highlight"><c- g>font-feature-settings</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①⑤"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⑤"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontvariationsettings"><code class="highlight"><c- g>fontVariationSettings</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①⑥"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⑥"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-variation-settings"><code class="highlight"><c- g>font-variation-settings</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①⑦"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⑦"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontnamedinstance"><code class="highlight"><c- g>fontNamedInstance</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①⑧"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⑧"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-named-instance"><code class="highlight"><c- g>font-named-instance</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString①⑨"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⑨"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontdisplay"><code class="highlight"><c- g>fontDisplay</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②⓪"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②⓪"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-display"><code class="highlight"><c- g>font-display</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②①"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②①"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-fontlanguageoverride"><code class="highlight"><c- g>fontLanguageOverride</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②②"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②②"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-font-language-override"><code class="highlight"><c- g>font-language-override</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②③"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②③"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-ascentoverride"><code class="highlight"><c- g>ascentOverride</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②④"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②④"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-ascent-override"><code class="highlight"><c- g>ascent-override</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②⑤"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②⑤"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-descentoverride"><code class="highlight"><c- g>descentOverride</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②⑥"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②⑥"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-descent-override"><code class="highlight"><c- g>descent-override</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②⑦"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②⑦"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-linegapoverride"><code class="highlight"><c- g>lineGapOverride</c-></code></dfn>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString" id="ref-for-LegacyNullToEmptyString②⑧"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②⑧"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceDescriptors" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfacedescriptors-line-gap-override"><code class="highlight"><c- g>line-gap-override</c-></code></dfn>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="cssfontfacerule"><code class="highlight"><c- g>CSSFontFaceRule</c-></code></dfn> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssrule" id="ref-for-cssrule"><c- n>CSSRule</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject"><c- g>SameObject</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#PutForwards" id="ref-for-PutForwards"><c- g>PutForwards</c-></a>=<a class="idl-code" data-link-type="attribute"><c- n>cssText</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfacedescriptors" id="ref-for-cssfontfacedescriptors"><c- n>CSSFontFaceDescriptors</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFaceRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFaceDescriptors" id="dom-cssfontfacerule-style"><code class="highlight"><c- g>style</c-></code></dfn>; }; </pre> <h3 class="heading settled" data-level="12.2" id="om-fontfeaturevalues"><span class="secno">12.2. </span><span class="content"> The <code class="highlight" id="cssfontfeaturevaluesrule-interface">CSSFontFeatureValuesRule</code> interface</span><a class="self-link" href="#om-fontfeaturevalues"></a></h3> <p>The <code class="highlight">CSSRule</code> interface is extended as follows:</p> <pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://drafts.csswg.org/cssom-1/#cssrule" id="ref-for-cssrule①"><c- g>CSSRule</c-></a> { <c- b>const</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-short" id="ref-for-idl-unsigned-short"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSRule" data-dfn-type="const" data-export id="dom-cssrule-font_feature_values_rule"><code class="highlight"><c- g>FONT_FEATURE_VALUES_RULE</c-></code></dfn> = 14; };</pre> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="cssfontfeaturevaluesrule-dfn">CSSFontFeatureValuesRule</dfn> interface represents a <code class="highlight"><c- n>@font-feature-values</c-></code> rule.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed②"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="cssfontfeaturevaluesrule"><code class="highlight"><c- g>CSSFontFeatureValuesRule</c-></code></dfn> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssrule" id="ref-for-cssrule②"><c- n>CSSRule</c-></a> { <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②⑨"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-type="CSSOMString" id="dom-cssfontfeaturevaluesrule-fontfamily"><code class="highlight"><c- g>fontFamily</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-annotation"><code class="highlight"><c- g>annotation</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap①"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-ornaments"><code class="highlight"><c- g>ornaments</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap②"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-stylistic"><code class="highlight"><c- g>stylistic</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap③"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-swash"><code class="highlight"><c- g>swash</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap④"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-charactervariant"><code class="highlight"><c- g>characterVariant</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap⑤"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-styleset"><code class="highlight"><c- g>styleset</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap" id="ref-for-cssfontfeaturevaluesmap⑥"><c- n>CSSFontFeatureValuesMap</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSFontFeatureValuesMap" id="dom-cssfontfeaturevaluesrule-historicalforms"><code class="highlight"><c- g>historicalForms</c-></code></dfn>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed③"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="cssfontfeaturevaluesmap"><code class="highlight"><c- g>CSSFontFeatureValuesMap</c-></code></dfn> { <c- b>maplike</c->&lt;<a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③⓪"><c- n>CSSOMString</c-></a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a>>>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined"><c- b>undefined</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesMap" data-dfn-type="method" data-export data-lt="set(featureValueName, values)" id="dom-cssfontfeaturevaluesmap-set"><code class="highlight"><c- g>set</c-></code></dfn>(<a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③①"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesMap/set(featureValueName, values)" data-dfn-type="argument" data-export id="dom-cssfontfeaturevaluesmap-set-featurevaluename-values-featurevaluename"><code class="highlight"><c- g>featureValueName</c-></code></dfn>, (<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long①"><c- b>unsigned</c-> <c- b>long</c-></a> <c- b>or</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence①"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long②"><c- b>unsigned</c-> <c- b>long</c-></a>>) <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontFeatureValuesMap/set(featureValueName, values)" data-dfn-type="argument" data-export id="dom-cssfontfeaturevaluesmap-set-featurevaluename-values-values"><code class="highlight"><c- g>values</c-></code></dfn>); }; </pre> <dl class="idl-attributes"> <dt><var>fontFamily</var> of type <code class="highlight">CSSOMString</code> <dd>The list of one or more font families for which a given set of feature values is defined. <dt>value maps of type <code class="highlight">CSSFontFeatureValuesMap</code>, readonly <dd>Maps of feature values associated with feature value names for a given <a class="property css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates①②">font-variant-alternates</a> value type </dl> <p>Each value map attribute of <code class="highlight">CSSFontFeatureValuesRule</code> reflects the values defined via a corresponding <i title="feature_value_block">feature value block</i>. Thus, the <var title="annotation attribute">annotation</var> attribute contains the values contained within a <code class="highlight" title="@annotation"><c- n>@annotation</c-></code> <i title="feature_value_block">feature value block</i>, the <var title="ornaments attribute">ornaments</var> attribute contains the values contained with a <code class="highlight" title="@ornaments"><c- n>@ornaments</c-></code> <i title="feature_value_block">feature value block</i> and so forth.</p> <p>The <code class="highlight">CSSFontFeatureValuesMap</code> interface uses the <a href="https://webidl.spec.whatwg.org/#js-maplike">default map class methods</a> but the <code class="highlight">set</code> method has different behavior. It takes a sequence of unsigned integers and associates it with a given <code class="highlight">featureValueName</code>. The method behaves the same as the default map class method except that a single unsigned long value is treated as a sequence of a single value. The method throws an exception if an invalid number of values is passed in. If the associated <i title="feature_value_block">feature value block</i> only allows a limited number of values, the <code class="highlight">set</code> method throws an <code class="highlight">InvalidAccessError</code> exception when the input sequence to <code class="highlight">set</code> contains more than the limited number of values. See the description of <a href="#multi-value-features">multi-valued feature value definitions</a> for details on the maximum number of values allowed for a given type of <i title="feature_value_block">feature value block</i>. The <code class="highlight">get</code> method always returns a sequence of values, even if the sequence only contains a single value.</p> <h3 class="heading settled" data-level="12.3" id="om-fontpalettevalues"><span class="secno">12.3. </span><span class="content"> The <code class="highlight" id="cssfontpalettevaluesrule2">CSSFontPaletteValuesRule</code> interface</span><a class="self-link" href="#om-fontpalettevalues"></a></h3> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed④"><c- g>Exposed</c-></a>=<c- n>Window</c->]<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="cssfontpalettevaluesrule"><code class="highlight"><c- g>CSSFontPaletteValuesRule</c-></code></dfn> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssrule" id="ref-for-cssrule③"><c- n>CSSRule</c-></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③②"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontPaletteValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSOMString" id="dom-cssfontpalettevaluesrule-name"><code class="highlight"><c- g>name</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③③"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontPaletteValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSOMString" id="dom-cssfontpalettevaluesrule-fontfamily"><code class="highlight"><c- g>fontFamily</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③④"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontPaletteValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSOMString" id="dom-cssfontpalettevaluesrule-basepalette"><code class="highlight"><c- g>basePalette</c-></code></dfn>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③⑤"><c- n>CSSOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="CSSFontPaletteValuesRule" data-dfn-type="attribute" data-export data-readonly data-type="CSSOMString" id="dom-cssfontpalettevaluesrule-overridecolors"><code class="highlight"><c- g>overrideColors</c-></code></dfn>; };</pre> <p>The <code class="highlight">fontFamily</code> and <code class="highlight">basePalette</code> interfaces are parsed according to the appropriate CSS property syntax.</p> <h2 class="heading settled" data-level="13" id="serializing"><span class="secno">13. </span><span class="content"> Serializing </span><a class="self-link" href="#serializing"></a></h2> <h3 class="heading settled" data-level="13.1" id="serializing-properties"><span class="secno">13.1. </span><span class="content"> Serializing font-related properties </span><a class="self-link" href="#serializing-properties"></a></h3> <p>Unless specifically noted for individual properties, the properties defined in this module follow the principles of <a href="https://drafts.csswg.org/cssom-1/#serializing-css-values"><cite>CSSOM</cite> § 6.7.2 Serializing CSS Values</a>.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/parsing/font-variant-serialization.html" title="css/css-fonts/parsing/font-variant-serialization.html">font-variant-serialization.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/parsing/font-variant-serialization.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/parsing/font-variant-serialization.html"><small>(source)</small></a> </ul> </details> <h3 class="heading settled" data-level="13.2" id="serializing-at-rules"><span class="secno">13.2. </span><span class="content"> Serializing font-related at-rules </span><a class="self-link" href="#serializing-at-rules"></a></h3> <p>Unless specifically noted for individual descriptors, the descriptors defined for at-rules in this module follow the principles of <a href="https://drafts.csswg.org/cssom-1/#serializing-css-values"><cite>CSSOM</cite> § 6.7.2 Serializing CSS Values</a>.</p> <p>In particular, following the principle of shorter representation: for descriptors which accept a range of values, if the start and end values are the same (the range is zero) the descriptor is serialized as a single value, not a range.</p> <details class="wpt-tests-block" dir="ltr" lang="en"> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-fonts/variations/at-font-face-descriptors.html" title="css/css-fonts/variations/at-font-face-descriptors.html">at-font-face-descriptors.html</a> <a class="wpt-live" href="http://wpt.live/css/css-fonts/variations/at-font-face-descriptors.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/variations/at-font-face-descriptors.html"><small>(source)</small></a> </ul> </details> <div class="example" id="ex-zero-range"> <a class="self-link" href="#ex-zero-range"></a> For example, the rule <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"foo"</c-><c- p>;</c-> <c- k>font-weight</c-><c- p>:</c-> <c- m>200</c-> <c- m>200</c-><c- p>;</c-> <c- p>}</c-> </pre> <p>would serialize as</p> <pre class="highlight"><c- n>@font-face</c-> <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> <c- s>"foo"</c-><c- p>;</c-> <c- k>font-weight</c-><c- p>:</c-> <c- m>200</c-><c- p>;</c-> <c- p>}</c-> </pre> </div> <p>Also, following the principle of retaining only the last-defined value, as well as the principle of shortest representation, multiply-specified tuples and multiple blocks are serialized as a single block containing only the last-defined value.</p> <div class="example" id="ex-serialize-same-font-feature-values"> <a class="self-link" href="#ex-serialize-same-font-feature-values"></a> For example, the declaration: <pre class="highlight" highlight-css><c- c>/* Repeated declaration names, and multiple blocks of the same type*/</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>0</c-><c- p>;</c-> <c- k>cool</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- p>}</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> <p>would be serialized as:</p> <pre class="highlight"><c- c>/* Canonical serialization */</c-> <c- n>@font-feature-values</c-> foo <c- p>{</c-> <c- n>@swash</c-> <c- p>{</c-> <c- k>cool</c-><c- p>:</c-> <c- m>2</c-><c- p>;</c-> <c- k>pretty</c-><c- p>:</c-> <c- m>1</c-><c- p>;</c-> <c- p>}</c-> <c- p>}</c-> </pre> </div> <h2 class="no-num heading settled" id="platform-props-to-css"><span class="content"> Appendix A: Mapping platform font properties to CSS properties</span><a class="self-link" href="#platform-props-to-css"></a></h2> <p><em>This appendix is included as background for some of the problems and situations that are described in other sections. It should be viewed as informative only.</em></p> <p>Font properties in CSS are designed to be independent of the underlying font formats used; they can be used to specify bitmap fonts, Type1 fonts, SVG fonts in addition to the common TrueType and OpenType fonts. But there are facets of the TrueType and OpenType formats that often cause confusion for authors and present challenges to implementers on different platforms.</p> <p>Originally developed at Apple, TrueType <a data-link-type="biblio" href="#biblio-truetype" title="TrueType™ Reference Manual">[TRUETYPE]</a> was designed as an outline font format for both screen and print. Microsoft joined Apple in developing the TrueType format and both platforms have supported TrueType fonts since then. Font data in the TrueType format consists of a set of tables distinguished with common four-letter tag names, each containing a specific type of data. For example, naming information, including copyright and license information, is stored in the <a class="property css" data-link-type="property">name</a> table. The <a data-link-type="dfn" href="#character-map" id="ref-for-character-map①⓪">character map</a> (<span class="property">cmap</span>) table contains a mapping of character encodings to glyphs. Apple later added additional tables for supporting enhanced typographic functionality; these are now called Apple Advanced Typography, or AAT, fonts. Microsoft and Adobe developed a separate set of tables for advanced typography and called their format OpenType <a data-link-type="biblio" href="#biblio-opentype" title="OpenType specification">[OPENTYPE]</a>. The OpenType specification is standardized at ISO as the Open Font Format <a data-link-type="biblio" href="#biblio-open-font-format" title="Information technology — Coding of audio-visual objects — Part 22: Open Font Format">[OPEN-FONT-FORMAT]</a>.</p> <p>In many cases the font data used under Microsoft Windows or Linux is slightly different from the data used under Apple’s Mac OS X because the TrueType format allowed for explicit variation across platforms. This includes font metrics, names and <a data-link-type="dfn" href="#character-map" id="ref-for-character-map①①">character map</a> data.</p> <p>Specifically, font family name data is handled differently across platforms. For TrueType and OpenType fonts these names are contained in the <a class="property css" data-link-type="property">name</a> table, in name records with name ID 1. Multiple names can be stored for different locales, but Microsoft recommends fonts always include at least a US English version of the name. On Windows, Microsoft made the decision for backwards compatibility to limit this family name to a maximum of four faces; for larger groupings the "preferred family" (name ID 16) or "WWS family" (name ID 21) can be used. Other platforms such as OSX don’t have this limitation, so the family name is used to define all possible groupings.</p> <p>Other name table data provides names used to uniquely identify a specific face within a family. The full font name (name ID 4) and the Postscript name (name ID 6) describe a single face uniquely. For example, the bold face of the Gill Sans family has a fullname of "Gill Sans Bold" and a Postscript name of "GillSans-Bold". There can be multiple localized versions of the fullname for a given face, but the Postscript name is always a unique name made from a limited set of ASCII characters.</p> <p>On various platforms, different names are used to search for a font. For example, with the Windows GDI CreateIndirectFont API, either a family or fullname can be used to lookup a face, while on Mac OS X the CTFontCreateWithName API call is used to lookup a given face using the fullname and Postscript name. Under Linux, the fontconfig API allows fonts to be searched using any of these names. In situations where platform API’s automatically substitute other font choices, it may be necessary to verify a returned font matches a given name.</p> <p>The weight of a given face can be determined via the usWeightClass field of the OS/2 table or inferred from the style name (name ID 2). Likewise, the width can be determined via the usWidthClass of the OS/2 table or inferred from the style name. For historical reasons related to synthetic bolding at weights 200 or lower with the Windows GDI API, font designers have sometimes skewed values in the OS/2 table to avoid these weights.</p> <p>Rendering complex scripts that use contextual shaping such as Thai, Arabic and Devanagari requires features present only in OpenType or AAT fonts. Currently, complex script rendering is supported on Windows and Linux using OpenType font features while both OpenType and AAT font features are used under Mac OS X.</p> <h2 class="heading settled" data-level="14" id="security"><span class="secno">14. </span><span class="content"> Security Considerations </span><a class="self-link" href="#security"></a></h2> <p>See items <a href="#sp209">9</a>, <a href="#sp216">16</a> and <a href="#sp217">17</a> in the self-review questionnaire below.</p> <h2 class="heading settled" data-level="15" id="privacy"><span class="secno">15. </span><span class="content"> Privacy Considerations </span><a class="self-link" href="#privacy"></a></h2> <p>Following <a href="https://www.w3.org/TR/security-privacy-questionnaire/#questions">Self-Review Questionnaire: Security and Privacy</a>, and using the <a href="#font-taxonomy">§ 10 Font Taxonomy</a>:</p> <h3 class="heading settled" data-level="15.1" id="sp201"><span class="secno">15.1. </span><span class="content"> What information might this feature expose to Web sites or other parties, and for what purposes is that exposure necessary?</span><a class="self-link" href="#sp201"></a></h3> <p>This specification allows the use of Web Fonts, which are requested on demand but are not installed. In the case where the document or stylesheet has a different origin to the Web Font, this network request exposes information in the Referer header, which may be harvested by font providers.</p> <p>In addition to Web Fonts, this specification continues to allow the use of Installed Fonts (both Preinstalled Fonts and User-Installed Fonts) as introduced in CSS1.</p> <p>While Web Fonts have the advantage of consistency across platforms, Installed Fonts have the advantage of zero download time.</p> <p>In some cases, and particularly for poorly-supported or minority languages, Installed Fonts allow information to be displayed which could not otherwise be displayed because there is no freely licensable Web Font which supports that language or because the latency or download time would make it’s use infeasible, particularly for languages with a large character repertoire, or on slow or metered connections.</p> <p class="note" role="note"><span class="marker">Note:</span> The set of <a href="#installed-fonts">installed fonts</a> available in the <a href="#font-matching-algorithm">Font Matching Algorithm</a> is explicitly undefined. The available set of fonts <a href="https://panopticlick.eff.org">is</a> used by trackers to fingerprint users and reduce their privacy. However, some <a href="#installed-fonts">installed fonts</a>, even some <a href="#preinstalled-and-user-installed-fonts">user-installed fonts</a>, are required to make languages readable. User Agents may choose to make all installed fonts available for language support and design integrity reasons, or may choose to make some fonts unavailable for privacy reasons. In addition, User Agents may have additional facilities for fine-tuning this balance, such as interfaces which prompt users to explicitly make certain requested fonts available or unavailable (perhaps on a per-site basis). Different User Agents, even running on the same Operating System, are expected to strike different balances here.</p> <p>In the case of user agents which perform rendering of local resources (such as an HTML and CSS to PDF renderer, or a Web-based wordprocessor) access to all Installed Fonts (both Preinstalled Fonts and User-Installed Fonts) is necessary to provide the expected functionality.</p> <p>An attacker may obtain fingerprinting information by querying the Installed Fonts. In contrast to older technologies (notably Adobe Flash, which provided a complete list of Installed Fonts and sent this information in HTTP headers) such probing must be done one font at a time, providing the font family name and then checking (either via script, or by using unicode-range to selectively download webfonts depending on whether the user has a font by a certain name that supports a certain character) whether the font was loaded. This takes time, and checking for more than a few hundred fonts introduces a noticeable delay in page rendering.</p> <p>For <em>especially privacy-sensitive contexts</em>, options would include never downloading any webfonts (at the risk that some characters may be rendered incorrectly, or not at all), or always downloading all webfonts whether needed or not (ignoring unicode-range, and potentially downloading vast quantities of unused fonts each time the page is viewed).</p> <h3 class="heading settled" data-level="15.2" id="sp202"><span class="secno">15.2. </span><span class="content">Is this specification exposing the minimum amount of information necessary to power the feature? </span><a class="self-link" href="#sp202"></a></h3> <p>An emerging consensus is that a user agent must expose Preinstalled Fonts for correct functioning, but there is no consensus on exposing User-Installed Fonts. This specification <a href="#preinstalled-and-user-installed-fonts"> allows a user agent</a> to ignore User-Installed Fonts for the purpose of the Font Matching Algorithm. Several existing user agents already do this.</p> <p>The minimum amount varies by type of user and is <a href="https://github.com/w3c/csswg-drafts/issues/4497">currently being debated</a>. There is a useful <a href="https://github.com/w3c/csswg-drafts/issues/4055#issuecomment-536169515">taxonomy of User-Installed Font users</a> which has been <a href="https://github.com/w3c/csswg-drafts/issues/4055#issuecomment-536815201"> slightly extended</a>.</p> <p>A permissive amount of information exposes potentially more fingerprinting information; a restrictive amount of information reduces fingerprinting but also reduces functionality and in some cases, for minority languages, would break the Web completely for those users.</p> <p>The possibility of a configurable, per-user opt-in to exposing some or all User-Installed Fonts, or a per-origin opt-in, is being discussed.</p> <p>The possibility of a privacy budget, which would penalize or disable a malicious web page which tested a large number of fonts, but allow a harmless page which tested a much smaller number, has also been discussed.</p> <p>Some user agents expose a more restricted set of Preinstalled Fonts in their Private Browsing, Incognito, or Resist Fingerprinting modes, compared to their normal mode.</p> <h3 class="heading settled" data-level="15.3" id="sp203"><span class="secno">15.3. </span><span class="content"> How does this specification deal with personal information or personally-identifiable information or information derived thereof? </span><a class="self-link" href="#sp203"></a></h3> <p>Personal information is not exposed by this specification.</p> <p>Personally identifiable information may be exposed in some cases. For example, for someone in Japan, having conditionally-enabled Japanese fonts enumerable probably isn’t a substantial fingerprinting vector. For someone in Europe who has a Japanese IME in the text input menu, they are.</p> <h3 class="heading settled" data-level="15.4" id="sp204"><span class="secno">15.4. </span><span class="content">How does this specification deal with sensitive information?</span><a class="self-link" href="#sp204"></a></h3> <p>Fingerprinting on Installed Fonts may expose sensitive information in some cases. For example, persecuted minorities risk leaking sensitive information by exposing that they use fonts required for a persecuted minority language; either by requesting a Web Font from a third party service, or exposing Preinstalled Fonts or User-Installed Fonts associated with that language.</p> <h3 class="heading settled" data-level="15.5" id="sp205"><span class="secno">15.5. </span><span class="content"> Does this specification introduce new state for an origin that persists across browsing sessions?</span><a class="self-link" href="#sp205"></a></h3> <p>No.</p> <p>Specifically, Web Fonts <a href="#web-fonts">must not be accessible in any other Document from the one which either is associated with the @font-face rule or owns the FontFaceSet. Other applications on the device must not be able to access Web Fonts.</a> This avoids information leaking across origins.</p> <p>Similarly, font palette values <a href="#font-palette-values">must only be available to the documents that reference it</a>. Using an author-defined color palette outside of the documents that reference it would constitute a security leak since the contents of one page would be able to affect other pages, something an attacker could use as an attack vector.</p> <h3 class="heading settled" data-level="15.6" id="sp206"><span class="secno">15.6. </span><span class="content">What information from the underlying platform, e.g. configuration data, is exposed by this specification to an origin? </span><a class="self-link" href="#sp206"></a></h3> <p>The <a class="css" data-link-type="maybe" href="#valdef-font-family-system-ui" id="ref-for-valdef-font-family-system-ui⑤">system-ui</a> keyword exposes the operating system’s default system UI font to fingerprinting mechanisms.</p> <h3 class="heading settled" data-level="15.7" id="sp207"><span class="secno">15.7. </span><span class="content">Does this specification allow an origin access to sensors on a user’s device</span><a class="self-link" href="#sp207"></a></h3> <p>No.</p> <h3 class="heading settled" data-level="15.8" id="sp208"><span class="secno">15.8. </span><span class="content">What data does this specification expose to an origin? Please also document what data is identical to data exposed by other features, in the same or different contexts. </span><a class="self-link" href="#sp208"></a></h3> <p>For third-party Web Fonts loaded via a stylesheet, the stylesheet origin may be exposed to the third party in the Referer header. In addition, careful pairing of unicode-range and distinct src urls allows the third-party to see which characters are used on a page, which is a privacy risk for large character repertoire scripts such as CJK.</p> <p>For third-party Web Fonts preloaded in the HTML, the document origin may be similarly exposed.</p> <h3 class="heading settled" data-level="15.9" id="sp209"><span class="secno">15.9. </span><span class="content">Does this specification enable new script execution/loading mechanisms? </span><a class="self-link" href="#sp209"></a></h3> <p>No.</p> <p>Specifically, for SVG-in-OpenType color fonts, the SVG used for glyph definitions should not contain script elements, and any script elements that do occur will not be executed.</p> <h3 class="heading settled" data-level="15.10" id="sp210"><span class="secno">15.10. </span><span class="content">Does this specification allow an origin to access other devices? </span><a class="self-link" href="#sp210"></a></h3> <p>No.</p> <h3 class="heading settled" data-level="15.11" id="sp211"><span class="secno">15.11. </span><span class="content">Does this specification allow an origin some measure of control over a user agent’s native UI?</span><a class="self-link" href="#sp211"></a></h3> <p>There is some risk that an attacker can spoof a native UI feature by determining the Operating System and using native-looking fonts appropriate to that Operating System.</p> <h3 class="heading settled" data-level="15.12" id="sp212"><span class="secno">15.12. </span><span class="content">What temporary identifiers might this specification create or expose to the web? </span><a class="self-link" href="#sp212"></a></h3> <p>None.</p> <h3 class="heading settled" data-level="15.13" id="sp213"><span class="secno">15.13. </span><span class="content">How does this specification distinguish between behavior in first-party and third-party contexts?</span><a class="self-link" href="#sp213"></a></h3> <p><a href="#font-fetching-requirements">For font loads</a>, user agents must use the potentially CORS-enabled fetch method defined by the <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a> specification for URLs defined within @font-face rules. When fetching, user agents must use "Anonymous" mode, set the referrer source to the stylesheet’s URL and set the origin to the URL of the containing document.</p> <p>Thus, fonts will typically not be loaded cross-origin unless authors specifically take steps to permit cross-origin loads.</p> <h3 class="heading settled" data-level="15.14" id="sp214"><span class="secno">15.14. </span><span class="content">How does this specification work in the context of a user agent’s Private Browsing or "incognito" mode? </span><a class="self-link" href="#sp214"></a></h3> <p>The specification makes no distinction.</p> <p>Some user agents may expose a more restricted set of Installed Fonts in these modes.</p> <h3 class="heading settled" data-level="15.15" id="sp215"><span class="secno">15.15. </span><span class="content"> Does this specification have a "Security Considerations" and "Privacy Considerations" section?</span><a class="self-link" href="#sp215"></a></h3> <p>Yes.</p> <h3 class="heading settled" data-level="15.16" id="sp216"><span class="secno">15.16. </span><span class="content"> Does this specification allow downgrading default security characteristics?</span><a class="self-link" href="#sp216"></a></h3> <p>No.</p> <h3 class="heading settled" data-level="15.17" id="sp217"><span class="secno">15.17. </span><span class="content">What should this questionnaire have asked? </span><a class="self-link" href="#sp217"></a></h3> <p>It should have asked whether a malicious payload could crash the application, or indeed the entire Operating System, or even cause remote code execution.</p> <p>This possibility does exist for suitably crafted fonts on some platforms when fonts are installed and rendered, and this has been exploited in the wild.</p> <p>In practice, user agents running on Operating Systems with this vulnerability use a font sanitizer to detect such malformed or malicious fonts and prevent their being used.</p> <h2 class="heading settled" data-level="16" id="a11y"><span class="secno">16. </span><span class="content"> Accessibility Considerations </span><a class="self-link" href="#a11y"></a></h2> <p>The use of fonts to provide a visual rendering of text should not, in general, impact accessibility. For example, people using a screen reader to render text to speech will not download fonts, and are unaffected by what those fonts would have contained.</p> <p>However, this assumes that the semantics conveyed by the font glyphs and the semantics conveyed by the characters are the same.</p> <p>Historically, this has not always been the case. For example, in the early days of the Web it was common to use fonts (such as "Symbol", though others were used) to make Latin letters have Greek glyphs; while this worked visually, it would not work with a screen reader and text was also hard to search or index because the mapping was font-specific. With the rise of Unicode, it is now standard practice to use Greek characters for Greek text, and for Greek glyphs in fonts to map to Greek characters.</p> <p>Sadly, but avoidably, this practice persists with badly designed icon fonts. For example, such a font might put a "printer" icon on the Latin letter "P". This practice scatters meaningless letters through the text, which negatively affects text searching and indexing, gives hard to understand rendering if the icon font does not load, and impedes screen readers. A well designed font must assign such icons to semantically meaningful characters. For example, the printer icon might be assigned to the string "printer" or to the Unicode character 🖨 U+1F5A8 (PRINTER).</p> <h2 class="heading settled" data-level="17" id="acknowledgments"><span class="secno">17. </span><span class="content"> Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2> <p>The CSS Working group would like to thank:</p> <p>Peter Constable for assorted language fixes.</p> <p>Optical sizing <a href="#optical-size-example">image</a> prepared by Nick Sherman.</p> <p>Urdu samples prepared by Richard Ishida.</p> <p>Munira Tursunova and Dominik Röttsches developed the features for animating font-palette.</p> <p>John Hudson was kind enough to take the time to explain the subtleties of OpenType language tags and provided the example of character variant usage for displaying text on Byzantine seals.</p> <p>Elika Etemad supplied some of the initial design ideas for the '@font-feature-values' rule.</p> <p>Special thanks to Tab Atkins Jr. for providing the text for the section on <a href="#font-rendering-controls">Font Rendering Controls</a> as well as the section on the <a class="property css" data-link-type="descriptor" href="#descdef-font-face-font-display" id="ref-for-descdef-font-face-font-display⑤">font-display</a> descriptor. Special thanks to Ilya Grigorik and David Kuettel for their help in developing these sections.</p> <h2 class="heading settled" data-level="18" id="changes"><span class="secno">18. </span><span class="content"> Changes </span><a class="self-link" href="#changes"></a></h2> <h3 class="heading settled" data-level="18.1" id="changes-2021-12-21"><span class="secno">18.1. </span><span class="content">Changes from the <a href="https://www.w3.org/TR/2021/WD-css-fonts-4-20211221/">21 December 2021 Working Draft</a> </span><a class="self-link" href="#changes-2021-12-21"></a></h3> <ul> <li>Corrected some broken links <li>In font matching algorithm, distinguished use of varfont slnt axis from synthetic obliquing <li> Clarified that font variations do not count as font synthesis <li>Clarified the effect of auto values on @font-face is to select the appropriate "normal" value <li>Improved font fallback on font-variant-emoji with variation selectors <li>Clarified that the oblique angle must be the same sign as requested <li>Defined synthetic oblique in vertical text <li>Used CSS Color 5 absolute color definition for override-colors <li>Made font-stretch a legacy name alias for font-width <li>The palette-mix() grammar requires color-interpolation-method, so removed leftover prose defining what to do if it is omitted <li>Add more generics samples, for fang song and kai <li>Listed fonts used for Urdu samples <li>Users must be able to modify the set of installed fonts available for rendering web pages <li>Added examples of Urdu text in nastaliq and in fallback naskh fonts <li>Clarified that keywords inside local() are an error <li>Clarified that the system-ui generic font family may be composite, and is affected by unicode coverage and content language <li>Removed culturally specific claims that particular typographic styles universally convey concepts such as formality or playfulness <li>Added a new generic(nastaliq) family, for Urdu, Persian, and other languages <li>Added a new generic(kai) family, for Simplified and Traditional Chinese <li>No longer claim that cursive and kaiti have identical meanings <li>Added a note on the historical reasons for the serif and sans-serif generic font families <li>Dropped the emoji generic font-family, because the font-variant-emoji property covers the desired functionality better <li>Added Internet Media Types to the table of font formats <li>Moved the consequences of installed fonts out of Taxonomy and into Font Matching Algorithm <li>Clarified that the font-family and src descriptors are no longer required for validity, as they can be added later by script. <li>Consistently use generic(fangsong) instead of fangsong, as the generic font family name. Note that it is script-specific <li>Defined a third type of font family name, &lt;system-family-name> which has some constraints on how it can be specified <li>Added a missing at-keword in the production of @font-feature-values <li>Refactored the @font-feature-values grammar <li>Restored some acknowlegements which had been dropped when porting CSS Fonts 3 into this specification <li>Redefined the grammar of the src attribute to use a &lt;font-src-list> production, rather than "see prose" <li>Deleted broken link to an informative reference which no longer exists <li>Described three classes of generic font families, including whether they are writing system (script) specific and whether they are always required to match to a locally installed font <li>Added a new functional notation, generic(), for new generic font families <li>Added a clarifying note about platform API limitations which might restrict color font rendering to sRGB <li>Removed leftover, no-longer applicable mention of "forcing colored glyphs not to be used" <li>Refined the font-palette computed value <li>Added an example of Nabla font with an animated palette <li>Described modified font-palette syntax and rules for interpolation and percentage normalization, referencing the CSS Color specification <li>Clarified that the used color-scheme affects font-palette: normal <li>Added missing numeric range annotations for slope angle and font-feature-settings integer <li>Defined a production for &lt;family-name> <li>For locally installed fonts, used local(&lt;family-name>) <li>Fixed ambiguous descriptor auto-links <li>Fixed markup of the &lt;family-name> production <li>Defined feature and variation names with &lt;opentype-tag> rather than bare strings <li>Clarified that general math functions (not just calc) are allowed in @font-palette-values descriptors <li>Added the <span class="css">font-synthesis-position</span> property'' <li>Added an example of a non-sRGB color in override-colors <li>Use rule-list rather than stylesheet in productions <li>Added URL request modifiers for crossorigin, referrerpolicy &amp; integrity <li>Aligned the incremental tech keywords to match the latest Incremental Font Transfer specification <li>Use last-defined value for font-feature-values <li>font-feature-values and font-feature-settings are now de-duplicated, and sorted <li>Suggested user agents prompt users to make certain user-installed fonts available, or unavailable <li>Improved the Privacy Considerations, balancing privacy and legibility trade-offs for user-installed fonts <li>Clarified the font shorthand, using the terms set explicitly, reset implicitly and cascade implicitly <li>Clarified shorter representation for zero ranged descriptors <li>Tightened definition of first available font <li>Added emoji as a keyword to unicode-range <li>Allowed implementations to ignore requests to turn off font features which the OpenType specification says are always required <li>Gave clearer advice to authors about font-feature-settings and font-variation-settings <li>Readability improvements to the grammar for font-variant sub-properties <li>Corrections to some examples so they again match the specification <li>Clarified what it means to ignore an invalid font-family descriptor <li>Allowed the font-family descriptor of @font-palette-values to take a list <li>Added Web Platform Tests coverage <li><a class="property css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette⑤">font-palette</a> and '@font-palette-values' no longer at risk <li>Allowed limited set of string-form format specifies, for Web compatibility <li>Make feature-* features-* for consistency <li>Changed initial value of font-variant-emoji from auto to normal, for consistency with other font-variant-* properties <li>Added values from font-variant-emoji to font-variant shorthand <li>Added canonical list of font-variant-* properties affected by font-variant shorthand <li>Renamed "system font fallback" to "installed font fallback to avoid confusion with system font <li>Updated property and descriptor values to use the range notation <li>Fixed some examples which did not match the specification <li>Clarified that color fonts are not enabled by default <li>Added some more explanation to font-palette:light|dark <li>Use last declaration of key/palette index in override-colors <li>Removed currentColor from override-colors example <li>Clarified that out of range palette indexes are ignored <li>Assorted typo corrections and markup fixes </ul> <h3 class="heading settled" data-level="18.2" id="changes-2021-07-29"><span class="secno">18.2. </span><span class="content">Changes from the <a href="https://www.w3.org/TR/2021/WD-css-fonts-4-20210729/">29 July 2021 Working Draft</a> </span><a class="self-link" href="#changes-2021-07-29"></a></h3> <ul> <li>Clarified that functions and relative lengths in palettes are evaluated within the root element’s context <li>Added new section, overall changes since CSS Fonts 3 <li>Added more font-palette-values examples <li>Renamed technology to tech <li>New <a class="property css" data-link-type="property">math</a> value added to <a class="property css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size②②">font-size</a> <li>Security and Privacy are now separate sections <li>Linked to OpenType, TrueType and Graphite table definitions <li>Updated examples which had used "supports" <li>Removed old "supports" from format in src descriptor, replaced with new technology production <li>Moved font-technology &amp; font-format to a new section <li>Formalized fetching and resource timing reporting, applied to fetching fonts <li>Removed the &lt;string> values from override-color and base-palette <li>Defined correct processing of conflicting override-colors <li>Introduced concept of complete palettes <li>Clearer description of override-colors <li>Removed conflict between FONT_PALETTE_VALUES_RULE and VIEWPORT_RULE <li>Defined context for resolving override-color colors, no longer per-element <li>Allowed base-palette to reference dark and light palettes <li>Changed properties in CSSFontPaletteValuesRule to be read-only <li>The palette-identifier parses as a dashed-ident rather than custom-ident, for extensibility <li>Renamed override-color descriptor to override-colors, because it accepts a list of colors <li>Clarified that base-palette and override-color take non-negative integers <li>Corrected grammar of the font shorthand property <li>Several corrections to the IDL for CSSFontPaletteValuesRule <li>Removed the "none" value from font-palette <li>Clarified incremental requirement <li>A few more examples <li>Added incremental font technology to supports <li>Reduced the critical angle for oblique font matching from 20deg to 11deg, per WG resolution <li>Allowed font-display in @font-feature-values (the prose allowed it but the grammar did not) </ul> <h3 class="heading settled" data-level="18.3" id="changes-2020-11-17"><span class="secno">18.3. </span><span class="content">Changes from the <a href="https://www.w3.org/TR/2020/WD-css-fonts-4-20201117/">17 November 2020 Working Draft</a> </span><a class="self-link" href="#changes-2020-11-17"></a></h3> <ul> <li>Added Graphite reference <li>Added font feature technology keywords opentype, aat, and graphite <li>Removed scary wording about variable fonts being new and experimental <li>Reference to CSS Fonts 3 in introduction is informative <li>Differentiated COLRv1 from COLRv0 <li>Clarify well-designed vs badly-designed icon fonts in terms of Unicode codepoints <li>Added Accessibility Considerations section <li>Clarified that font-optical-sizing interacts with font-size-adjust <li>Used consistent capitalization for "user agent" <li>Clarified that font-stretch should serialize to a number/percentage, not a keyword <li>Suggested heuristics for loading <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional" id="ref-for-valdef-font-face-font-display-optional⑦">optional</a> fonts <li>Clarified repeated items in grammars <li>Replaced obsolete “potentially CORS-enabled fetch” with reference to Fetch <li>Added missing small-caps value to font-synthesis <li>Be explicit about which properties apply to text <li>Updated links <li>Fixed typos, syntax errors </ul> <h3 class="heading settled" data-level="18.4" id="changes-2019-11-13"><span class="secno">18.4. </span><span class="content">Changes from the <a href="https://www.w3.org/TR/2019/WD-css-fonts-4-20191113/">13 November 2019 Working Draft</a></span><a class="self-link" href="#changes-2019-11-13"></a></h3> <ul> <li>Clarified that JS-free probing of Unicode support of fonts is possible <li>Clarified OpenType feature tags are 4 characters, trailing-space padded <li>Added font metric override descriptors <li>Added link to font features enabled by default <li>Aligned with ebIDL specification (undefined, not void) <li>Corrected cross-origin example to use http not https <li>Clarified that font-range, per OpenType, is between 1 and 999 <li>(Privacy) added mention of unicode-range privacy exploit <li>Clarified use of kern vs. vkrn <li>Added font collection format, example of Font Collection <li>Added CBDT color fonts <li>Added Security &amp; Privacy appendix <li>Added palette examples, including dark mode <li>Clarified colorspace of font palette entries <li>Avoiding cross-site font leakage amde RFC-2119 MUST <li>Clarified monochromatic fallback on color fonts <li>Removed remaining references to min-font-size, max-font-size <li>Clarified that color names are ASCII case insensitive <li>Added the value none to font-palette <li>Marked font-palette and @font-palette-values as at-risk <li>Aligned value definition reference across all specs. <li>Further clarified the behavior of <a class="property css" data-link-type="property">optional</a> <li>Clarified that not all generic font families have to map to a font <li>Reorganized generic font family introduction <li>Added some motivation for generic font families <li>Added a note about the generic emoji family and character support <li>Clarified that italic is not a fallback for oblique <li>Added warning on too large x-height <li>Added better example for <a class="property css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①⑦">font-size-adjust</a> <li>Added example for ui-sans-serif <li>Miscellaneous editorial improvements, typo fixes, broken link fixes and markup improvements </ul> <h3 class="heading settled" data-level="18.5" id="changes-2018-09-20"><span class="secno">18.5. </span><span class="content">Changes from the <a href="https://www.w3.org/TR/2018/WD-css-fonts-4-20180920/">20 September 2018 Working Draft</a></span><a class="self-link" href="#changes-2018-09-20"></a></h3> <ul> <li>Add note encouraging UAs to also implement platform-specific names for standard font families <li>Add ui-serif, ui-sans-serif, ui-monospace, and ui-rounded generic font families <li>Remove font-variant @font-face descriptor per WG resolution <li>Remove font-min-size and font-max-size per WG resolution <li>Clarify that font-style <a class="css" data-link-type="maybe" href="#valdef-font-style-normal" id="ref-for-valdef-font-style-normal③">normal</a> animates as <span class="css">oblique 0deg</span> <li>Clarify why specifying incomplete color palettes for compound fonts is a bad idea <li>Add explicit [Exposed=Window] on interfaces <li>Use correct terms, Unicode emoji presentation sequence and Emoji Presentation Participating Code Points <li>Clarify that each string in font-variation-settings is paired with a single number <li>Remove stray titling-caps from definition of font-variant-numeric property <li>Better introduction to color fonts <li>Add basic multicolor example <li>Clarify that font variation settings do no affect font selection of fallback fonts <li>Clarify italic angle wrt direction of slnt axis <li>Better define emoji and math generic font families <li>Add font-size: xxx-large <li>Link to CSS Values definition of ex units <li>Add scientific inferiors example of font-feature-settings <li>Clarify that letter-spacing disables optional ligatures <li>Port font-feature-settings property from CSS Fonts 3 <li>Port font-variant shorthand property from CSS Fonts 3 <li>Port font-variant-east-asian property from CSS Fonts 3 <li>Port font-variant-numeric property from CSS Fonts 3 <li>Port font-variant-caps property from CSS Fonts 3 <li>Port font-variant-position property from CSS Fonts 3 <li>Port font-variant-ligatures property from CSS Fonts 3 <li>Port font-kerning property from CSS Fonts 3 <li>Update IDL of The CSSFontPaletteValuesRule interface <li>Changed initial value of font property descriptors from normal to auto <li>Update syntax for font-stretch in font matching section <li>Update font style matching examples <li>Clarify description of font palettes <li>Stop claiming that <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#ch" id="ref-for-ch">ch</a> uses the first available font <li>Assorted formatting and markup fixes, link fixes, removal of inline closed issues <li>Linking to latest versions of normative references </ul> <h3 class="heading settled" data-level="18.6" id="changes-2018-04-10"><span class="secno">18.6. </span><span class="content"> Changes from the <a href="https://www.w3.org/TR/2018/WD-css-fonts-4-20180410/">10 April 2018 Working Draft</a> </span><a class="self-link" href="#changes-2018-04-10"></a></h3> <ul> <li>Added unicode value to font-variant-emoji <li>Removed the media entry from property descriptions <li>Broke up font-synthesis into longhands, for future extensibility <li>Added override-color descriptor for color palettes <li>Defined feature-value-name for font-variant-alternates <li>Clarified @font-face src parsing rules <li>Allow named instances from variable fonts to be used <li>Appendix A: Mapping platform font properties to CSS properties ported over from CSS Fonts 3 <li>Character handling issues ported over from CSS Fonts 3 <li>Cluster matching ported over from CSS Fonts 3 <li>Add new auto value for font-weight, font-style and font-stretch descriptors <li>Clarified font-display descriptor value names <li>Support named palette entries <li>More details on Fang Song generic family <li>Changed default angle of oblique fonts to 14deg. <li>font-feature-values ported over from CSS Fonts 3 <li>Clarified handling of unknown or unsupported fragment identifiers <li>Clarified that color records in font palettes are zero-indexed <li>Consistently use the new generic font families <li>Editorial cleanup, clarifying examples, markup improvements, linkfixes, updating to latest references, and so on </ul> <h3 class="heading settled" data-level="18.7" id="changes-fonts-3"><span class="secno">18.7. </span><span class="content"> Changes from the 20 September 2018 <a href="https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/">CSS Fonts 3 Recommendation</a> </span><a class="self-link" href="#changes-fonts-3"></a></h3> <p>This summarizes the changes in CSS Fonts 4, compared to CSS Fonts 3.</p> <ul> <li>Added font-display descriptor for @font-face <li>Added @font-feature-values rule <li>Added font variation properties, including font-optical-sizing and font-variation-settings <li>Added color font support <li>Defined feature-value-name for font-variant-alternates <li>Added new auto value for font-weight, font-style and font-stretch descriptors <li>Added ui-serif, ui-sans-serif, ui-monospace, and ui-rounded generic font families <li>Added font-size: xxx-large <li>Added font metric override descriptors <li>Added some motivation for generic font families <li>Added font feature technology keywords opentype, aat, and graphite <li>Added math value to font-size </ul> </main> <h2 class="no-ref no-num heading settled" id="w3c-conformance"><span class="content"> Conformance</span><a class="self-link" href="#w3c-conformance"></a></h2> <h3 class="no-ref heading settled" id="w3c-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#w3c-conventions"></a></h3> <p>Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification. </p> <p>All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</a></p> <p>Examples in this specification are introduced with the words “for example” or are set apart from the normative text with <code class="highlight">class=<c- s>"example"</c-></code>, like this: </p> <div class="example" id="w3c-example"> <a class="self-link" href="#w3c-example"></a> <p>This is an example of an informative example.</p> </div> <p>Informative notes begin with the word “Note” and are set apart from the normative text with <code class="highlight">class=<c- s>"note"</c-></code>, like this: </p> <p class="note" role="note">Note, this is an informative note.</p> <p>Advisements are normative sections styled to evoke special attention and are set apart from other normative text with <code class="highlight">&lt;strong class=<c- s>"advisement"</c->></code>, like this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong></p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <p>Tests relating to the content of this specification may be documented in “Tests” blocks like this one. Any such block is non-normative.</p> <ul class="wpt-tests-list"></ul> <hr> </details> <h3 class="no-ref heading settled" id="w3c-conformance-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#w3c-conformance-classes"></a></h3> <p>Conformance to this specification is defined for three conformance classes: </p> <dl> <dt>style sheet <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS style sheet</a>. <dt>renderer <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders documents that use them. <dt>authoring tool <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that writes a style sheet. </dl> <p>A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module. </p> <p>A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.) </p> <p>An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module. </p> <h3 class="no-ref heading settled" id="w3c-partial"><span class="content"> Partial implementations</span><a class="self-link" href="#w3c-partial"></a></h3> <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers <strong>must</strong> treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as appropriate</a>) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents <strong>must not</strong> selectively ignore unsupported component values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.</p> <h4 class="heading settled" id="w3c-conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#w3c-conform-future-proofing"></a></h4> <p>To avoid clashes with future stable CSS features, the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p> <h3 class="no-ref heading settled" id="w3c-testing"><span class="content"> Non-experimental implementations</span><a class="self-link" href="#w3c-testing"></a></h3> <p>Once a specification reaches the Candidate Recommendation stage, non-experimental implementations are possible, and implementors should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec. </p> <p>To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group. </p> <p>Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>. Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list.</p> <script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script> <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2> <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3> <ul class="index"> <li><a href="#valdef-font-size-absolute-size">&lt;absolute-size></a><span>, in § 2.5</span> <li><a href="#valdef-font-variant-caps-all-petite-caps">all-petite-caps</a><span>, in § 6.6</span> <li><a href="#valdef-font-variant-caps-all-small-caps">all-small-caps</a><span>, in § 6.6</span> <li><a href="#at-ruledef-font-feature-values-annotation">@annotation</a><span>, in § 6.9.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-annotation">annotation</a><span>, in § 12.2</span> <li><a href="#annotation">annotation(&lt;feature-value-name>)</a><span>, in § 6.8</span> <li> ascent-override <ul> <li><a href="#dom-cssfontfacedescriptors-ascent-override">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-ascent-override">descriptor for @font-face</a><span>, in § 4.11</span> </ul> <li><a href="#dom-cssfontfacedescriptors-ascentoverride">ascentOverride</a><span>, in § 12.1</span> <li><a href="#aspect-value">aspect value</a><span>, in § 2.6</span> <li> auto <ul> <li><a href="#valdef-font-face-font-display-auto">value for @font-face/font-display</a><span>, in § 4.9</span> <li><a href="#font-kerning-auto-value">value for font-kerning</a><span>, in § 6.3</span> <li><a href="#font-optical-sizing-auto-value">value for font-optical-sizing</a><span>, in § 8.1</span> <li><a href="#valdef-font-synthesis-position-auto">value for font-synthesis-position</a><span>, in § 2.8.4</span> <li><a href="#valdef-font-synthesis-small-caps-auto">value for font-synthesis-small-caps</a><span>, in § 2.8.3</span> <li><a href="#valdef-font-synthesis-style-auto">value for font-synthesis-style</a><span>, in § 2.8.2</span> <li><a href="#valdef-font-synthesis-weight-auto">value for font-synthesis-weight</a><span>, in § 2.8.1</span> </ul> <li><a href="#descdef-font-palette-values-base-palette">base-palette</a><span>, in § 9.2.2</span> <li><a href="#dom-cssfontpalettevaluesrule-basepalette">basePalette</a><span>, in § 12.3</span> <li><a href="#valdef-font-face-font-display-block">block</a><span>, in § 4.9</span> <li><a href="#font-block-period">block period</a><span>, in § 3.2</span> <li><a href="#valdef-font-weight-bold">bold</a><span>, in § 2.2</span> <li><a href="#valdef-font-weight-bolder">bolder</a><span>, in § 2.2</span> <li><a href="#valdef-font-caption">caption</a><span>, in § 2.1</span> <li><a href="#cascaded-independently">Cascaded Independently</a><span>, in § 2.7</span> <li><a href="#character-map">character map</a><span>, in § 5.2</span> <li><a href="#at-ruledef-font-feature-values-character-variant">@character-variant</a><span>, in § 6.9.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-charactervariant">characterVariant</a><span>, in § 12.2</span> <li><a href="#character-variant">character-variant(&lt;feature-value-name>#)</a><span>, in § 6.8</span> <li><a href="#color-font-tech-values">&lt;color-font-tech></a><span>, in § 4.3.1</span> <li><a href="#valdef-font-variant-ligatures-common-ligatures">common-ligatures</a><span>, in § 6.4</span> <li><a href="#common-lig-values">&lt;common-lig-values></a><span>, in § 6.4</span> <li><a href="#composite-face">composite face</a><span>, in § 5.2</span> <li><a href="#valdef-font-width-condensed">condensed</a><span>, in § 2.3</span> <li><a href="#valdef-font-variant-ligatures-contextual">contextual</a><span>, in § 6.4</span> <li><a href="#contextual-alt-values">&lt;contextual-alt-values></a><span>, in § 6.4</span> <li><a href="#cssfontfacedescriptors">CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li> CSSFontFaceRule <ul> <li><a href="#cssfontfacerule">(interface)</a><span>, in § 12.1</span> <li><a href="#cssfontfacerule-interface">definition of</a><span>, in § 12.1</span> </ul> <li><a href="#cssfontfeaturevaluesmap">CSSFontFeatureValuesMap</a><span>, in § 12.2</span> <li> CSSFontFeatureValuesRule <ul> <li><a href="#cssfontfeaturevaluesrule">(interface)</a><span>, in § 12.2</span> <li><a href="#cssfontfeaturevaluesrule-dfn">definition of</a><span>, in § 12.2</span> </ul> <li><a href="#cssfontpalettevaluesrule">CSSFontPaletteValuesRule</a><span>, in § 12.3</span> <li><a href="#valdef-font-family-cursive">cursive</a><span>, in § 2.1.5</span> <li> dark <ul> <li><a href="#valdef-base-palette-dark">value for base-palette</a><span>, in § 9.2.2</span> <li><a href="#valdef-font-palette-dark">value for font-palette</a><span>, in § 9.1</span> </ul> <li><a href="#default-face">default face</a><span>, in § 5.2</span> <li> descent-override <ul> <li><a href="#dom-cssfontfacedescriptors-descent-override">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-descent-override">descriptor for @font-face</a><span>, in § 4.11</span> </ul> <li><a href="#dom-cssfontfacedescriptors-descentoverride">descentOverride</a><span>, in § 12.1</span> <li><a href="#valdef-font-variant-numeric-diagonal-fractions">diagonal-fractions</a><span>, in § 6.7</span> <li><a href="#valdef-font-variant-ligatures-discretionary-ligatures">discretionary-ligatures</a><span>, in § 6.4</span> <li><a href="#discretionary-lig-values">&lt;discretionary-lig-values></a><span>, in § 6.4</span> <li><a href="#east-asian-variant-values">&lt;east-asian-variant-values></a><span>, in § 6.10</span> <li><a href="#east-asian-width-values">&lt;east-asian-width-values></a><span>, in § 6.10</span> <li><a href="#effective-character-map">effective character map</a><span>, in § 4.5</span> <li><a href="#valdef-font-variant-emoji-emoji">emoji</a><span>, in § 9.3</span> <li><a href="#emoji-presentation-participating-code-points">Emoji Presentation Participating Code Points</a><span>, in § 9.3</span> <li><a href="#valdef-font-width-expanded">expanded</a><span>, in § 2.3</span> <li><a href="#valdef-font-width-extra-condensed">extra-condensed</a><span>, in § 2.3</span> <li><a href="#valdef-font-width-extra-expanded">extra-expanded</a><span>, in § 2.3</span> <li><a href="#font-failure-period">failure period</a><span>, in § 3.2</span> <li><a href="#valdef-font-face-font-display-fallback">fallback</a><span>, in § 4.9</span> <li><a href="#family-name-value">&lt;family-name></a><span>, in § 2.1</span> <li><a href="#valdef-font-family-fantasy">fantasy</a><span>, in § 2.1.5</span> <li><a href="#feature-tag-value">&lt;feature-tag-value></a><span>, in § 6.12</span> <li><a href="#feature-value-name-value">&lt;feature-value-name></a><span>, in § 6.8</span> <li><a href="#fetch-a-font">fetch a font</a><span>, in § 4.8.2</span> <li><a href="#first-available-font">first available font</a><span>, in § 5.2</span> <li><a href="#propdef-font">font</a><span>, in § 2.7</span> <li><a href="#font-block-period">font block period</a><span>, in § 3.2</span> <li> font-display <ul> <li><a href="#dom-cssfontfacedescriptors-font-display">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-display">descriptor for @font-face</a><span>, in § 4.9</span> <li><a href="#descdef-font-feature-values-font-display">descriptor for @font-feature-values</a><span>, in § 4.9.1</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontdisplay">fontDisplay</a><span>, in § 12.1</span> <li><a href="#font-download-timer">font download timer</a><span>, in § 3.2</span> <li><a href="#at-font-face-rule">@font-face</a><span>, in § 4.1</span> <li><a href="#font-failure-period">font failure period</a><span>, in § 3.2</span> <li> font-family <ul> <li><a href="#propdef-font-family">(property)</a><span>, in § 2.1</span> <li><a href="#dom-cssfontfacedescriptors-font-family">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-family">descriptor for @font-face</a><span>, in § 4.2</span> <li><a href="#descdef-font-palette-values-font-family">descriptor for @font-palette-values</a><span>, in § 9.2.1</span> </ul> <li> fontFamily <ul> <li><a href="#dom-cssfontfacedescriptors-fontfamily">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-fontfamily">attribute for CSSFontFeatureValuesRule</a><span>, in § 12.2</span> <li><a href="#dom-cssfontpalettevaluesrule-fontfamily">attribute for CSSFontPaletteValuesRule</a><span>, in § 12.3</span> </ul> <li> font-feature-settings <ul> <li><a href="#propdef-font-feature-settings">(property)</a><span>, in § 6.12</span> <li><a href="#dom-cssfontfacedescriptors-font-feature-settings">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-feature-settings">descriptor for @font-face</a><span>, in § 4.6</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontfeaturesettings">fontFeatureSettings</a><span>, in § 12.1</span> <li><a href="#font-features-tech-values">&lt;font-features-tech></a><span>, in § 4.3.1</span> <li><a href="#font-feature-value-declaration">font feature value declaration</a><span>, in § 6.9.1</span> <li><a href="#at-ruledef-font-feature-values">@font-feature-values</a><span>, in § 6.9</span> <li><a href="#dom-cssrule-font_feature_values_rule">FONT_FEATURE_VALUES_RULE</a><span>, in § 12.2</span> <li><a href="#font-feature-values-font-feature-value-type">font-feature-value-type</a><span>, in § 6.9.1</span> <li><a href="#font-format-values">&lt;font-format></a><span>, in § 4.3.1</span> <li><a href="#propdef-font-kerning">font-kerning</a><span>, in § 6.3</span> <li> font-language-override <ul> <li><a href="#propdef-font-language-override">(property)</a><span>, in § 6.13</span> <li><a href="#dom-cssfontfacedescriptors-font-language-override">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-language-override">descriptor for @font-face</a><span>, in § 4.10</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontlanguageoverride">fontLanguageOverride</a><span>, in § 12.1</span> <li> font-named-instance <ul> <li><a href="#dom-cssfontfacedescriptors-font-named-instance">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-named-instance">descriptor for @font-face</a><span>, in § 4.7</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontnamedinstance">fontNamedInstance</a><span>, in § 12.1</span> <li><a href="#propdef-font-optical-sizing">font-optical-sizing</a><span>, in § 8.1</span> <li><a href="#propdef-font-palette">font-palette</a><span>, in § 9.1</span> <li><a href="#at-ruledef-font-palette-values">@font-palette-values</a><span>, in § 9.2</span> <li><a href="#propdef-font-size">font-size</a><span>, in § 2.5</span> <li><a href="#propdef-font-size-adjust">font-size-adjust</a><span>, in § 2.6</span> <li><a href="#font-specific">font specific</a><span>, in § 6.8</span> <li><a href="#typedef-font-src">&lt;font-src></a><span>, in § 4.3.1</span> <li><a href="#typedef-font-src-list">&lt;font-src-list></a><span>, in § 4.3.1</span> <li> font-stretch <ul> <li><a href="#propdef-font-stretch">(property)</a><span>, in § 2.3.1</span> <li><a href="#dom-cssfontfacedescriptors-font-stretch">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#font-face-font-stretch">dfn for @font-face</a><span>, in § 4.4.1</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontstretch">fontStretch</a><span>, in § 12.1</span> <li> font-style <ul> <li><a href="#propdef-font-style">(property)</a><span>, in § 2.4</span> <li><a href="#dom-cssfontfacedescriptors-font-style">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-style">descriptor for @font-face</a><span>, in § 4.4</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontstyle">fontStyle</a><span>, in § 12.1</span> <li><a href="#font-swap-period">font swap period</a><span>, in § 3.2</span> <li><a href="#propdef-font-synthesis">font-synthesis</a><span>, in § 2.8.5</span> <li><a href="#propdef-font-synthesis-position">font-synthesis-position</a><span>, in § 2.8.4</span> <li><a href="#propdef-font-synthesis-small-caps">font-synthesis-small-caps</a><span>, in § 2.8.3</span> <li><a href="#propdef-font-synthesis-style">font-synthesis-style</a><span>, in § 2.8.2</span> <li><a href="#propdef-font-synthesis-weight">font-synthesis-weight</a><span>, in § 2.8.1</span> <li><a href="#font-tech-values">&lt;font-tech></a><span>, in § 4.3.1</span> <li><a href="#propdef-font-variant">font-variant</a><span>, in § 6.11</span> <li><a href="#propdef-font-variant-alternates">font-variant-alternates</a><span>, in § 6.8</span> <li><a href="#propdef-font-variant-caps">font-variant-caps</a><span>, in § 6.6</span> <li><a href="#font-variant-css21-values">&lt;font-variant-css2></a><span>, in § 2.7</span> <li><a href="#propdef-font-variant-east-asian">font-variant-east-asian</a><span>, in § 6.10</span> <li><a href="#propdef-font-variant-emoji">font-variant-emoji</a><span>, in § 9.3</span> <li><a href="#propdef-font-variant-ligatures">font-variant-ligatures</a><span>, in § 6.4</span> <li><a href="#propdef-font-variant-numeric">font-variant-numeric</a><span>, in § 6.7</span> <li><a href="#propdef-font-variant-position">font-variant-position</a><span>, in § 6.5</span> <li> font-variation-settings <ul> <li><a href="#propdef-font-variation-settings">(property)</a><span>, in § 8.2</span> <li><a href="#dom-cssfontfacedescriptors-font-variation-settings">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-variation-settings">descriptor for @font-face</a><span>, in § 4.6</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontvariationsettings">fontVariationSettings</a><span>, in § 12.1</span> <li> font-weight <ul> <li><a href="#propdef-font-weight">(property)</a><span>, in § 2.2</span> <li><a href="#dom-cssfontfacedescriptors-font-weight">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-weight">descriptor for @font-face</a><span>, in § 4.4</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontweight">fontWeight</a><span>, in § 12.1</span> <li><a href="#font-weight-absolute-values">&lt;font-weight-absolute></a><span>, in § 2.2</span> <li> font-width <ul> <li><a href="#propdef-font-width">(property)</a><span>, in § 2.3</span> <li><a href="#dom-cssfontfacedescriptors-font-width">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-font-width">descriptor for @font-face</a><span>, in § 4.4</span> </ul> <li><a href="#dom-cssfontfacedescriptors-fontwidth">fontWidth</a><span>, in § 12.1</span> <li><a href="#font-width-css3-values">&lt;font-width-css3></a><span>, in § 2.7</span> <li><a href="#valdef-font-variant-east-asian-full-width">full-width</a><span>, in § 6.10</span> <li><a href="#typedef-generic-complete">&lt;generic-complete></a><span>, in § 2.1.2</span> <li><a href="#typedef-generic-family">&lt;generic-family></a><span>, in § 2.1.2</span> <li><a href="#valdef-font-family-generic-fangsong">generic(fangsong)</a><span>, in § 2.1.5</span> <li><a href="#typedef-generic-incomplete">&lt;generic-incomplete></a><span>, in § 2.1.2</span> <li><a href="#valdef-font-family-generic-kai">generic(kai)</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-family-generic-nastaliq">generic(nastaliq)</a><span>, in § 2.1.5</span> <li><a href="#typedef-generic-script-specific">&lt;generic-script-specific></a><span>, in § 2.1.2</span> <li><a href="#at-ruledef-font-feature-values-historical-forms">@historical-forms</a><span>, in § 6.9.1</span> <li><a href="#valdef-font-variant-alternates-historical-forms">historical-forms</a><span>, in § 6.8</span> <li><a href="#dom-cssfontfeaturevaluesrule-historicalforms">historicalForms</a><span>, in § 12.2</span> <li><a href="#valdef-font-variant-ligatures-historical-ligatures">historical-ligatures</a><span>, in § 6.4</span> <li><a href="#historical-lig-values">&lt;historical-lig-values></a><span>, in § 6.4</span> <li><a href="#valdef-font-icon">icon</a><span>, in § 2.1</span> <li><a href="#installed-font-fallback">installed font fallback</a><span>, in § 5.2</span> <li><a href="#typedef-base-palette-integer">&lt;integer></a><span>, in § 9.2.2</span> <li><a href="#valdef-font-style-italic">italic</a><span>, in § 2.4</span> <li><a href="#valdef-font-variant-east-asian-jis04">jis04</a><span>, in § 6.10</span> <li><a href="#valdef-font-variant-east-asian-jis78">jis78</a><span>, in § 6.10</span> <li><a href="#valdef-font-variant-east-asian-jis83">jis83</a><span>, in § 6.10</span> <li><a href="#valdef-font-variant-east-asian-jis90">jis90</a><span>, in § 6.10</span> <li><a href="#valdef-font-size-length-percentage-0">&lt;length-percentage [0,∞]></a><span>, in § 2.5</span> <li> light <ul> <li><a href="#valdef-base-palette-light">value for base-palette</a><span>, in § 9.2.2</span> <li><a href="#valdef-font-palette-light">value for font-palette</a><span>, in § 9.1</span> </ul> <li><a href="#valdef-font-weight-lighter">lighter</a><span>, in § 2.2</span> <li> line-gap-override <ul> <li><a href="#dom-cssfontfacedescriptors-line-gap-override">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-line-gap-override">descriptor for @font-face</a><span>, in § 4.11</span> </ul> <li><a href="#dom-cssfontfacedescriptors-linegapoverride">lineGapOverride</a><span>, in § 12.1</span> <li><a href="#valdef-font-variant-numeric-lining-nums">lining-nums</a><span>, in § 6.7</span> <li> math <ul> <li><a href="#valdef-font-family-math">value for font-family, &lt;generic-family></a><span>, in § 2.1.5</span> <li><a href="#valdef-font-size-math">value for font-size</a><span>, in § 2.5</span> </ul> <li><a href="#valdef-font-menu">menu</a><span>, in § 2.1</span> <li><a href="#valdef-font-message-box">message-box</a><span>, in § 2.1</span> <li><a href="#valdef-font-family-monospace">monospace</a><span>, in § 2.1.5</span> <li><a href="#dom-cssfontpalettevaluesrule-name">name</a><span>, in § 12.3</span> <li><a href="#valdef-font-variant-ligatures-no-common-ligatures">no-common-ligatures</a><span>, in § 6.4</span> <li><a href="#valdef-font-variant-ligatures-no-contextual">no-contextual</a><span>, in § 6.4</span> <li><a href="#valdef-font-variant-ligatures-no-discretionary-ligatures">no-discretionary-ligatures</a><span>, in § 6.4</span> <li><a href="#valdef-font-variant-ligatures-no-historical-ligatures">no-historical-ligatures</a><span>, in § 6.4</span> <li> none <ul> <li><a href="#font-kerning-none-value">value for font-kerning</a><span>, in § 6.3</span> <li><a href="#font-optical-sizing-none-value">value for font-optical-sizing</a><span>, in § 8.1</span> <li><a href="#font-size-adjust-none-value">value for font-size-adjust</a><span>, in § 2.6</span> <li><a href="#valdef-font-synthesis-position-none">value for font-synthesis-position</a><span>, in § 2.8.4</span> <li><a href="#valdef-font-synthesis-small-caps-none">value for font-synthesis-small-caps</a><span>, in § 2.8.3</span> <li><a href="#valdef-font-synthesis-style-none">value for font-synthesis-style</a><span>, in § 2.8.2</span> <li><a href="#valdef-font-synthesis-weight-none">value for font-synthesis-weight</a><span>, in § 2.8.1</span> <li><a href="#font-variant-none-value">value for font-variant</a><span>, in § 6.11</span> <li><a href="#font-variant-ligatures-none-value">value for font-variant-ligatures</a><span>, in § 6.4</span> </ul> <li> normal <ul> <li><a href="#font-feature-settings-normal-value">value for font-feature-settings</a><span>, in § 6.12</span> <li><a href="#font-kerning-normal-value">value for font-kerning</a><span>, in § 6.3</span> <li><a href="#font-language-override-normal-value">value for font-language override</a><span>, in § 6.13</span> <li><a href="#valdef-font-palette-normal">value for font-palette</a><span>, in § 9.1</span> <li><a href="#valdef-font-style-normal">value for font-style</a><span>, in § 2.4</span> <li><a href="#font-variant-normal-value">value for font-variant</a><span>, in § 6.11</span> <li><a href="#font-variant-alternates-normal-value">value for font-variant-alternates</a><span>, in § 6.8</span> <li><a href="#font-variant-caps-normal-value">value for font-variant-caps</a><span>, in § 6.6</span> <li><a href="#font-variant-east-asian-normal-value">value for font-variant-east-asian</a><span>, in § 6.10</span> <li><a href="#valdef-font-variant-emoji-normal">value for font-variant-emoji</a><span>, in § 9.3</span> <li><a href="#font-variant-ligatures-normal-value">value for font-variant-ligatures</a><span>, in § 6.4</span> <li><a href="#font-variant-numeric-normal-value">value for font-variant-numeric</a><span>, in § 6.7</span> <li><a href="#font-variant-position-normal-value">value for font-variant-position</a><span>, in § 6.5</span> <li><a href="#valdef-font-weight-normal">value for font-weight</a><span>, in § 2.2</span> <li><a href="#valdef-font-width-normal">value for font-width</a><span>, in § 2.3</span> </ul> <li><a href="#aspect-ratio-value">&lt;number [0,∞]></a><span>, in § 2.6</span> <li><a href="#valdef-font-weight-number-1-1000">&lt;number [1,1000]></a><span>, in § 2.2</span> <li><a href="#numeric-figure-values">&lt;numeric-figure-values></a><span>, in § 6.7</span> <li><a href="#numeric-fraction-values">&lt;numeric-fraction-values></a><span>, in § 6.7</span> <li><a href="#numeric-spacing-values">&lt;numeric-spacing-values></a><span>, in § 6.7</span> <li><a href="#valdef-font-style-oblique-angle--90deg-90deg">oblique &lt;angle [-90deg,90deg]>?</a><span>, in § 2.4</span> <li><a href="#valdef-font-variant-numeric-oldstyle-nums">oldstyle-nums</a><span>, in § 6.7</span> <li><a href="#typedef-opentype-tag">&lt;opentype-tag></a><span>, in § 6.12</span> <li><a href="#valdef-font-face-font-display-optional">optional</a><span>, in § 4.9</span> <li><a href="#valdef-font-variant-numeric-ordinal">ordinal</a><span>, in § 6.7</span> <li><a href="#at-ruledef-font-feature-values-ornaments">@ornaments</a><span>, in § 6.9.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-ornaments">ornaments</a><span>, in § 12.2</span> <li><a href="#ornaments">ornaments(&lt;feature-value-name>)</a><span>, in § 6.8</span> <li><a href="#descdef-font-palette-values-override-colors">override-colors</a><span>, in § 9.2.3</span> <li><a href="#dom-cssfontpalettevaluesrule-overridecolors">overrideColors</a><span>, in § 12.3</span> <li><a href="#typedef-font-palette-palette-identifier">&lt;palette-identifier></a><span>, in § 9.1</span> <li><a href="#typedef-font-palette-palette-mix">&lt;palette-mix()></a><span>, in § 9.1</span> <li><a href="#funcdef-palette-mix">palette-mix()</a><span>, in § 9.1</span> <li><a href="#valdef-font-width-percentage-0">&lt;percentage [0,∞]></a><span>, in § 2.3</span> <li><a href="#valdef-font-variant-caps-petite-caps">petite-caps</a><span>, in § 6.6</span> <li><a href="#valdef-font-variant-numeric-proportional-nums">proportional-nums</a><span>, in § 6.7</span> <li><a href="#valdef-font-variant-east-asian-proportional-width">proportional-width</a><span>, in § 6.10</span> <li><a href="#valdef-font-size-relative-size">&lt;relative-size></a><span>, in § 2.5</span> <li><a href="#render-with-a-fallback-font-face">render with a fallback font face</a><span>, in § 3.2</span> <li><a href="#render-with-an-invisible-fallback-font-face">render with an invisible fallback font face</a><span>, in § 3.2</span> <li><a href="#reset-implicitly">Reset Implicitly</a><span>, in § 2.7</span> <li><a href="#valdef-font-variant-east-asian-ruby">ruby</a><span>, in § 6.10</span> <li><a href="#valdef-font-family-sans-serif">sans-serif</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-width-semi-condensed">semi-condensed</a><span>, in § 2.3</span> <li><a href="#valdef-font-width-semi-expanded">semi-expanded</a><span>, in § 2.3</span> <li><a href="#valdef-font-family-serif">serif</a><span>, in § 2.1.5</span> <li><a href="#set-explicitly">Set Explicitly</a><span>, in § 2.7</span> <li><a href="#dom-cssfontfeaturevaluesmap-set">set(featureValueName, values)</a><span>, in § 12.2</span> <li><a href="#valdef-font-variant-east-asian-simplified">simplified</a><span>, in § 6.10</span> <li><a href="#valdef-font-variant-numeric-slashed-zero">slashed-zero</a><span>, in § 6.7</span> <li><a href="#valdef-font-variant-caps-small-caps">small-caps</a><span>, in § 6.6</span> <li><a href="#valdef-font-small-caption">small-caption</a><span>, in § 2.1</span> <li> src <ul> <li><a href="#dom-cssfontfacedescriptors-src">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-src">descriptor for @font-face</a><span>, in § 4.3</span> </ul> <li><a href="#valdef-font-variant-numeric-stacked-fractions">stacked-fractions</a><span>, in § 6.7</span> <li><a href="#valdef-font-status-bar">status-bar</a><span>, in § 2.1</span> <li><a href="#font-language-override-string-value">&lt;string></a><span>, in § 6.13</span> <li><a href="#dom-cssfontfacerule-style">style</a><span>, in § 12.1</span> <li><a href="#at-ruledef-font-feature-values-styleset">@styleset</a><span>, in § 6.9.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-styleset">styleset</a><span>, in § 12.2</span> <li><a href="#styleset">styleset(&lt;feature-value-name>#)</a><span>, in § 6.8</span> <li><a href="#at-ruledef-font-feature-values-stylistic">@stylistic</a><span>, in § 6.9.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-stylistic">stylistic</a><span>, in § 12.2</span> <li><a href="#stylistic">stylistic(&lt;feature-value-name>)</a><span>, in § 6.8</span> <li><a href="#valdef-font-variant-position-sub">sub</a><span>, in § 6.5</span> <li><a href="#valdef-font-variant-position-super">super</a><span>, in § 6.5</span> <li><a href="#support">support</a><span>, in § 5.2</span> <li><a href="#valdef-font-face-font-display-swap">swap</a><span>, in § 4.9</span> <li><a href="#font-swap-period">swap period</a><span>, in § 3.2</span> <li><a href="#at-ruledef-font-feature-values-swash">@swash</a><span>, in § 6.9.1</span> <li><a href="#dom-cssfontfeaturevaluesrule-swash">swash</a><span>, in § 12.2</span> <li><a href="#swash">swash(&lt;feature-value-name>)</a><span>, in § 6.8</span> <li><a href="#system-family-name-value">&lt;system-family-name></a><span>, in § 2.1</span> <li><a href="#valdef-font-family-system-ui">system-ui</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-variant-numeric-tabular-nums">tabular-nums</a><span>, in § 6.7</span> <li><a href="#valdef-font-variant-emoji-text">text</a><span>, in § 9.3</span> <li><a href="#font-download-timer">timer</a><span>, in § 3.2</span> <li><a href="#valdef-font-variant-caps-titling-caps">titling-caps</a><span>, in § 6.6</span> <li><a href="#valdef-font-variant-east-asian-traditional">traditional</a><span>, in § 6.10</span> <li><a href="#valdef-font-family-ui-monospace">ui-monospace</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-family-ui-rounded">ui-rounded</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-family-ui-sans-serif">ui-sans-serif</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-family-ui-serif">ui-serif</a><span>, in § 2.1.5</span> <li><a href="#valdef-font-width-ultra-condensed">ultra-condensed</a><span>, in § 2.3</span> <li><a href="#valdef-font-width-ultra-expanded">ultra-expanded</a><span>, in § 2.3</span> <li><a href="#valdef-font-variant-caps-unicase">unicase</a><span>, in § 6.6</span> <li><a href="#valdef-font-variant-emoji-unicode">unicode</a><span>, in § 9.3</span> <li> unicode-range <ul> <li><a href="#dom-cssfontfacedescriptors-unicode-range">attribute for CSSFontFaceDescriptors</a><span>, in § 12.1</span> <li><a href="#descdef-font-face-unicode-range">descriptor for @font-face</a><span>, in § 4.5</span> </ul> <li><a href="#dom-cssfontfacedescriptors-unicoderange">unicodeRange</a><span>, in § 12.1</span> </ul> <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3> <ul class="index"> <li> <a data-link-type="biblio">[CSS-CASCADE-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c388d253">inherit</span> <li><span class="dfn-paneled" id="a91f632a">legacy name alias</span> </ul> <li> <a data-link-type="biblio">[CSS-COLOR-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="73ea1d43">color</span> </ul> <li> <a data-link-type="biblio">[CSS-COLOR-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2394bfd1">&lt;color-interpolation-method></span> <li><span class="dfn-paneled" id="1548047a">&lt;color></span> <li><span class="dfn-paneled" id="de5d4ce1">absolute color</span> <li><span class="dfn-paneled" id="cfdf030c">color-mix()</span> </ul> <li> <a data-link-type="biblio">[CSS-COLOR-ADJUST-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c373c5f8">color-scheme</span> <li><span class="dfn-paneled" id="4af5e3f0">normal</span> </ul> <li> <a data-link-type="biblio">[CSS-DISPLAY-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="bb886fc6">block</span> <li><span class="dfn-paneled" id="ea663a43">containing block</span> </ul> <li> <a data-link-type="biblio">[CSS-ENV-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="807f9351">env()</span> </ul> <li> <a data-link-type="biblio">[CSS-INLINE-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8f393f47">ascent metric</span> <li><span class="dfn-paneled" id="53e3a28b">descent metric</span> <li><span class="dfn-paneled" id="b553840d">line gap metric</span> </ul> <li> <a data-link-type="biblio">[CSS-OVERFLOW-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="0812e39f">ink overflow</span> </ul> <li> <a data-link-type="biblio">[CSS-SYNTAX-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="84252421">&lt;declaration-list></span> <li><span class="dfn-paneled" id="4bcd07f8">&lt;declaration-rule-list></span> <li><span class="dfn-paneled" id="ef9a1f56">&lt;unicode-range-token></span> <li><span class="dfn-paneled" id="762610c7">at-rule</span> <li><span class="dfn-paneled" id="3bb3a53a">invalid</span> <li><span class="dfn-paneled" id="ca0abe12">parse a list</span> </ul> <li> <a data-link-type="biblio">[CSS-TEXT-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="5879b11d">content language</span> <li><span class="dfn-paneled" id="cacc0af2">letter-spacing</span> <li><span class="dfn-paneled" id="cbc54f93">text-transform</span> </ul> <li> <a data-link-type="biblio">[CSS-TRANSFORMS-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="e2e08d07">transform</span> </ul> <li> <a data-link-type="biblio">[CSS-VALUES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="68487d22">#</span> <li><span class="dfn-paneled" id="f0809abc">&amp;&amp;</span> <li><span class="dfn-paneled" id="bedd9d42">+</span> <li><span class="dfn-paneled" id="9f9120ff">,</span> <li><span class="dfn-paneled" id="3559c926">&lt;angle></span> <li><span class="dfn-paneled" id="e274345c">&lt;custom-ident></span> <li><span class="dfn-paneled" id="8a427103">&lt;dashed-ident></span> <li><span class="dfn-paneled" id="9213678e">&lt;ident></span> <li><span class="dfn-paneled" id="18222566">&lt;length-percentage></span> <li><span class="dfn-paneled" id="16310992">&lt;number></span> <li><span class="dfn-paneled" id="15f5b381">&lt;percentage></span> <li><span class="dfn-paneled" id="977d3003">&lt;string></span> <li><span class="dfn-paneled" id="fa293cdd">&lt;url></span> <li><span class="dfn-paneled" id="537cf076">?</span> <li><span class="dfn-paneled" id="584e9c31">calc()</span> <li><span class="dfn-paneled" id="620ca81c">ch</span> <li><span class="dfn-paneled" id="358fd6ff">CSS-wide keywords</span> <li><span class="dfn-paneled" id="e8ff0bb4">em</span> <li><span class="dfn-paneled" id="e0ee1990">ex</span> <li><span class="dfn-paneled" id="ee30bd68">fetch a style resource</span> <li><span class="dfn-paneled" id="35d9f24e">font-relative lengths</span> <li><span class="dfn-paneled" id="9dc6ce48">identifier</span> <li><span class="dfn-paneled" id="2a26d53d">math function</span> <li><span class="dfn-paneled" id="e8bcf956">rem</span> <li><span class="dfn-paneled" id="938ba280">{A,B}</span> <li><span class="dfn-paneled" id="6ec67710">|</span> <li><span class="dfn-paneled" id="8a82fda1">||</span> </ul> <li> <a data-link-type="biblio">[CSS-VARIABLES-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="dbba942a">var()</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="e0f451e6">sideways typesetting</span> <li><span class="dfn-paneled" id="fb12b38c">typographic mode</span> <li><span class="dfn-paneled" id="c359ae51">upright typesetting</span> <li><span class="dfn-paneled" id="1c5240b0">vertical typographic mode</span> <li><span class="dfn-paneled" id="385326d7">writing-mode</span> </ul> <li> <a data-link-type="biblio">[CSS22]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="4962ecad">&lt;absolute-size></span> <li><span class="dfn-paneled" id="d686638a">&lt;relative-size></span> <li><span class="dfn-paneled" id="ac54fbff">line-height</span> <li><span class="dfn-paneled" id="15a266c1">medium</span> <li><span class="dfn-paneled" id="6cb740a0">oblique</span> </ul> <li> <a data-link-type="biblio">[CSSOM-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="5fced98b">CSSOMString</span> <li><span class="dfn-paneled" id="ebaeb088">CSSRule</span> <li><span class="dfn-paneled" id="a82a20ef">CSSStyleDeclaration</span> <li><span class="dfn-paneled" id="e4ffca7f">declarations</span> <li><span class="dfn-paneled" id="b203675a">getComputedStyle(elt)</span> <li><span class="dfn-paneled" id="77d5a8bc">parent CSS style sheet</span> </ul> <li> <a data-link-type="biblio">[FETCH]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a33db89a">fetch</span> <li><span class="dfn-paneled" id="ee7bba09">response</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="91dcc557">font</span> </ul> <li> <a data-link-type="biblio">[I18N-GLOSSARY]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="86c3e5ca">case-sensitive</span> </ul> <li> <a data-link-type="biblio">[INFRA]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="59912c93">code unit</span> <li><span class="dfn-paneled" id="0e8de730">tuple</span> </ul> <li> <a data-link-type="biblio">[WEBIDL]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="889e932f">Exposed</span> <li><span class="dfn-paneled" id="2c4af168">LegacyNullToEmptyString</span> <li><span class="dfn-paneled" id="21ecf38f">PutForwards</span> <li><span class="dfn-paneled" id="a5c91173">SameObject</span> <li><span class="dfn-paneled" id="9cce47fd">sequence</span> <li><span class="dfn-paneled" id="5f90bbfb">undefined</span> <li><span class="dfn-paneled" id="e97a9688">unsigned long</span> <li><span class="dfn-paneled" id="450958f7">unsigned short</span> </ul> </ul> <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2> <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3> <dl> <dt id="biblio-aat-features">[AAT-FEATURES] <dd><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html"><cite>Apple Advanced Typography Font Feature Registry</cite></a>. URL: <a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html">https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html</a> <dt id="biblio-css-cascade-5">[CSS-CASCADE-5] <dd>Elika Etemad; Miriam Suzanne; Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-cascade-5/"><cite>CSS Cascading and Inheritance Level 5</cite></a>. URL: <a href="https://drafts.csswg.org/css-cascade-5/">https://drafts.csswg.org/css-cascade-5/</a> <dt id="biblio-css-color-4">[CSS-COLOR-4] <dd>Chris Lilley; Tab Atkins Jr.; Lea Verou. <a href="https://drafts.csswg.org/css-color-4/"><cite>CSS Color Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-color-4/">https://drafts.csswg.org/css-color-4/</a> <dt id="biblio-css-color-5">[CSS-COLOR-5] <dd>Chris Lilley; et al. <a href="https://drafts.csswg.org/css-color-5/"><cite>CSS Color Module Level 5</cite></a>. URL: <a href="https://drafts.csswg.org/css-color-5/">https://drafts.csswg.org/css-color-5/</a> <dt id="biblio-css-color-adjust-1">[CSS-COLOR-ADJUST-1] <dd>Elika Etemad; et al. <a href="https://drafts.csswg.org/css-color-adjust-1/"><cite>CSS Color Adjustment Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-color-adjust-1/">https://drafts.csswg.org/css-color-adjust-1/</a> <dt id="biblio-css-env-1">[CSS-ENV-1] <dd><a href="https://drafts.csswg.org/css-env-1/"><cite>CSS Environment Variables Module Level 1</cite></a>. Editor's Draft. URL: <a href="https://drafts.csswg.org/css-env-1/">https://drafts.csswg.org/css-env-1/</a> <dt id="biblio-css-inline-3">[CSS-INLINE-3] <dd>Elika Etemad. <a href="https://drafts.csswg.org/css-inline-3/"><cite>CSS Inline Layout Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-inline-3/">https://drafts.csswg.org/css-inline-3/</a> <dt id="biblio-css-syntax-3">[CSS-SYNTAX-3] <dd>Tab Atkins Jr.; Simon Sapin. <a href="https://drafts.csswg.org/css-syntax/"><cite>CSS Syntax Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-syntax/">https://drafts.csswg.org/css-syntax/</a> <dt id="biblio-css-text-4">[CSS-TEXT-4] <dd>Elika Etemad; et al. <a href="https://drafts.csswg.org/css-text-4/"><cite>CSS Text Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-text-4/">https://drafts.csswg.org/css-text-4/</a> <dt id="biblio-css-values-3">[CSS-VALUES-3] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://drafts.csswg.org/css-values-3/"><cite>CSS Values and Units Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-values-3/">https://drafts.csswg.org/css-values-3/</a> <dt id="biblio-css-values-4">[CSS-VALUES-4] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://drafts.csswg.org/css-values-4/"><cite>CSS Values and Units Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-values-4/">https://drafts.csswg.org/css-values-4/</a> <dt id="biblio-css-variables-2">[CSS-VARIABLES-2] <dd><a href="https://drafts.csswg.org/css-variables-2/"><cite>CSS Custom Properties for Cascading Variables Module Level 2</cite></a>. Editor's Draft. URL: <a href="https://drafts.csswg.org/css-variables-2/">https://drafts.csswg.org/css-variables-2/</a> <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4] <dd>Elika Etemad; Koji Ishii. <a href="https://drafts.csswg.org/css-writing-modes-4/"><cite>CSS Writing Modes Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-writing-modes-4/">https://drafts.csswg.org/css-writing-modes-4/</a> <dt id="biblio-css2">[CSS2] <dd>Bert Bos; et al. <a href="https://drafts.csswg.org/css2/"><cite>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</cite></a>. URL: <a href="https://drafts.csswg.org/css2/">https://drafts.csswg.org/css2/</a> <dt id="biblio-css22">[CSS22] <dd>Bert Bos. <a href="https://drafts.csswg.org/css2/"><cite>Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification</cite></a>. URL: <a href="https://drafts.csswg.org/css2/">https://drafts.csswg.org/css2/</a> <dt id="biblio-css3text">[CSS3TEXT] <dd>Elika Etemad; Koji Ishii; Florian Rivoal. <a href="https://drafts.csswg.org/css-text-3/"><cite>CSS Text Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-text-3/">https://drafts.csswg.org/css-text-3/</a> <dt id="biblio-cssom-1">[CSSOM-1] <dd>Daniel Glazman; Emilio Cobos Álvarez. <a href="https://drafts.csswg.org/cssom/"><cite>CSS Object Model (CSSOM)</cite></a>. URL: <a href="https://drafts.csswg.org/cssom/">https://drafts.csswg.org/cssom/</a> <dt id="biblio-fetch">[FETCH] <dd>Anne van Kesteren. <a href="https://fetch.spec.whatwg.org/"><cite>Fetch Standard</cite></a>. Living Standard. URL: <a href="https://fetch.spec.whatwg.org/">https://fetch.spec.whatwg.org/</a> <dt id="biblio-graphite">[GRAPHITE] <dd><a href="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout"><cite>Graphite technical overview</cite></a>. 2012. URL: <a href="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">https://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout</a> <dt id="biblio-html">[HTML] <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/"><cite>HTML Standard</cite></a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a> <dt id="biblio-i18n-glossary">[I18N-GLOSSARY] <dd>Richard Ishida; Addison Phillips. <a href="https://w3c.github.io/i18n-glossary/"><cite>Internationalization Glossary</cite></a>. URL: <a href="https://w3c.github.io/i18n-glossary/">https://w3c.github.io/i18n-glossary/</a> <dt id="biblio-infra">[INFRA] <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/"><cite>Infra Standard</cite></a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a> <dt id="biblio-opentype">[OPENTYPE] <dd><a href="http://www.microsoft.com/typography/otspec/default.htm"><cite>OpenType specification</cite></a>. URL: <a href="http://www.microsoft.com/typography/otspec/default.htm">http://www.microsoft.com/typography/otspec/default.htm</a> <dt id="biblio-opentype-features">[OPENTYPE-FEATURES] <dd><a href="http://www.microsoft.com/typography/otspec/featurelist.htm"><cite>OpenType feature registry</cite></a>. URL: <a href="http://www.microsoft.com/typography/otspec/featurelist.htm">http://www.microsoft.com/typography/otspec/featurelist.htm</a> <dt id="biblio-rfc2119">[RFC2119] <dd>S. Bradner. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <a href="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a> <dt id="biblio-rfc8081">[RFC8081] <dd>C. Lilley. <a href="https://www.rfc-editor.org/rfc/rfc8081"><cite>The "font" Top-Level Media Type</cite></a>. February 2017. Proposed Standard. URL: <a href="https://www.rfc-editor.org/rfc/rfc8081">https://www.rfc-editor.org/rfc/rfc8081</a> <dt id="biblio-unicode">[UNICODE] <dd><a href="https://www.unicode.org/versions/latest/"><cite>The Unicode Standard</cite></a>. URL: <a href="https://www.unicode.org/versions/latest/">https://www.unicode.org/versions/latest/</a> <dt id="biblio-uts51">[UTS51] <dd>Mark Davis; Ned Holbrook. <a href="https://www.unicode.org/reports/tr51/tr51-27.html"><cite>Unicode Emoji</cite></a>. 15 August 2024. Unicode Technical Standard #51. URL: <a href="https://www.unicode.org/reports/tr51/tr51-27.html">https://www.unicode.org/reports/tr51/tr51-27.html</a> <dt id="biblio-webidl">[WEBIDL] <dd>Edgar Chen; Timothy Gu. <a href="https://webidl.spec.whatwg.org/"><cite>Web IDL Standard</cite></a>. Living Standard. URL: <a href="https://webidl.spec.whatwg.org/">https://webidl.spec.whatwg.org/</a> </dl> <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3> <dl> <dt id="biblio-charmod-norm">[CHARMOD-NORM] <dd>Addison Phillips; et al. <a href="https://w3c.github.io/charmod-norm/"><cite>Character Model for the World Wide Web: String Matching</cite></a>. URL: <a href="https://w3c.github.io/charmod-norm/">https://w3c.github.io/charmod-norm/</a> <dt id="biblio-css-display-4">[CSS-DISPLAY-4] <dd><a href="https://drafts.csswg.org/css-display-4/"><cite>CSS Display Module Level 4</cite></a>. Editor's Draft. URL: <a href="https://drafts.csswg.org/css-display-4/">https://drafts.csswg.org/css-display-4/</a> <dt id="biblio-css-font-loading-3">[CSS-FONT-LOADING-3] <dd>Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-font-loading/"><cite>CSS Font Loading Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-font-loading/">https://drafts.csswg.org/css-font-loading/</a> <dt id="biblio-css-fonts-3">[CSS-FONTS-3] <dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://drafts.csswg.org/css-fonts-3/"><cite>CSS Fonts Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-fonts-3/">https://drafts.csswg.org/css-fonts-3/</a> <dt id="biblio-css-overflow-3">[CSS-OVERFLOW-3] <dd>Elika Etemad; Florian Rivoal. <a href="https://drafts.csswg.org/css-overflow-3/"><cite>CSS Overflow Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-overflow-3/">https://drafts.csswg.org/css-overflow-3/</a> <dt id="biblio-css-transforms-1">[CSS-TRANSFORMS-1] <dd>Simon Fraser; et al. <a href="https://drafts.csswg.org/css-transforms/"><cite>CSS Transforms Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-transforms/">https://drafts.csswg.org/css-transforms/</a> <dt id="biblio-css3-conditional">[CSS3-CONDITIONAL] <dd>Chris Lilley; David Baron; Elika Etemad. <a href="https://drafts.csswg.org/css-conditional-3/"><cite>CSS Conditional Rules Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-conditional-3/">https://drafts.csswg.org/css-conditional-3/</a> <dt id="biblio-ift">[IFT] <dd>Chris Lilley; Garret Rieger; Skef Iterum. <a href="https://w3c.github.io/IFT/Overview.html"><cite>Incremental Font Transfer</cite></a>. URL: <a href="https://w3c.github.io/IFT/Overview.html">https://w3c.github.io/IFT/Overview.html</a> <dt id="biblio-open-font-format">[OPEN-FONT-FORMAT] <dd><a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009%28E%29.zip"><cite>Information technology — Coding of audio-visual objects — Part 22: Open Font Format</cite></a>. URL: <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009%28E%29.zip">http://standards.iso.org/ittf/PubliclyAvailableStandards/c052136_ISO_IEC_14496-22_2009%28E%29.zip</a> <dt id="biblio-pfe-report">[PFE-report] <dd>Chris Lilley. <a href="https://www.w3.org/TR/PFE-evaluation/"><cite>Progressive Font Enrichment: Evaluation Report</cite></a>. 15 October 2020. Note. URL: <a href="https://www.w3.org/TR/PFE-evaluation/">https://www.w3.org/TR/PFE-evaluation/</a> <dt id="biblio-truetype">[TRUETYPE] <dd><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/"><cite>TrueType™ Reference Manual</cite></a>. URL: <a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/">https://developer.apple.com/fonts/TrueType-Reference-Manual/</a> <dt id="biblio-uax29">[UAX29] <dd>Josh Hadley. <a href="https://www.unicode.org/reports/tr29/tr29-45.html"><cite>Unicode Text Segmentation</cite></a>. 28 August 2024. Unicode Standard Annex #29. URL: <a href="https://www.unicode.org/reports/tr29/tr29-45.html">https://www.unicode.org/reports/tr29/tr29-45.html</a> <dt id="biblio-windows-glyph-proc">[WINDOWS-GLYPH-PROC] <dd>John Hudson. <a href="http://www.microsoft.com/typography/developers/opentype/default.htm"><cite>Windows Glyph Processing</cite></a>. URL: <a href="http://www.microsoft.com/typography/developers/opentype/default.htm">http://www.microsoft.com/typography/developers/opentype/default.htm</a> </dl> <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2> <div class="big-element-wrapper"> <table class="index"> <thead> <tr> <th scope="col">Name <th scope="col">Value <th scope="col">Initial <th scope="col">Applies to <th scope="col">Inh. <th scope="col">%ages <th scope="col">Anim­ation type <th scope="col">Canonical order <th scope="col">Com­puted value <th scope="col">Media <tbody> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font" id="ref-for-propdef-font①③">font</a> <td>[ [ &lt;'font-style'> || &lt;font-variant-css2> || &lt;'font-weight'> || &lt;font-width-css3> ]? &lt;'font-size'> [ / &lt;'line-height'> ]? &lt;'font-family'># ] | &lt;system-family-name> <td>see individual properties <td>all elements and text <td>yes <td>see individual properties <td>see individual properties <td>per grammar <td>see individual properties <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-family" id="ref-for-propdef-font-family①⑧">font-family</a> <td>[ &lt;family-name> | &lt;generic-family> ]# <td>depends on user agent <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>list, each item a string and/or &lt;generic-family> keywords <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings①⑦">font-feature-settings</a> <td>normal | &lt;feature-tag-value># <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-kerning" id="ref-for-propdef-font-kerning⑥">font-kerning</a> <td>auto | normal | none <td>auto <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-language-override" id="ref-for-propdef-font-language-override①⓪">font-language-override</a> <td>normal | &lt;string> <td>normal <td>all elements and text <td>yes <td>N/A <td>discrete <td>per grammar <td>specified string or the keyword none <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-optical-sizing" id="ref-for-propdef-font-optical-sizing⑧">font-optical-sizing</a> <td>auto | none <td>auto <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>specified keyword <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-palette" id="ref-for-propdef-font-palette⑥">font-palette</a> <td>normal | light | dark | &lt;palette-identifier> | &lt;palette-mix()> <td>normal <td>all elements and text <td>yes <td>N/a <td>by computed value <td>per grammar <td>specified keyword, identifier or &lt;palette-mix()> function. &lt;palette-mix()> must be simplified to a single keyword or identifier if resulting palette is equivalent. <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-size" id="ref-for-propdef-font-size②③">font-size</a> <td>&lt;absolute-size> | &lt;relative-size> | &lt;length-percentage [0,∞]> | math <td>medium <td>all elements and text <td>yes <td>refer to parent element’s font size <td>by computed value type <td>per grammar <td>an absolute length <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-size-adjust" id="ref-for-propdef-font-size-adjust①⑧">font-size-adjust</a> <td>none | &lt;number [0,∞]> <td>none <td>all elements and text <td>yes <td>N/A <td>by computed value type <td>per grammar <td>a number or the keyword none <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-style" id="ref-for-propdef-font-style③⓪">font-style</a> <td>normal | italic | oblique &lt;angle [-90deg,90deg]>? <td>normal <td>all elements and text <td>yes <td>n/a <td>by computed value type;normal animates as oblique 0deg <td>per grammar <td>the keyword specified, plus angle in degrees if specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-synthesis" id="ref-for-propdef-font-synthesis⑦">font-synthesis</a> <td>none | [ weight || style || small-caps || position] <td>weight style small-caps position <td>all elements and text <td>yes <td>N/A <td>discrete <td>per grammar <td>specified keyword(s) <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-synthesis-position" id="ref-for-propdef-font-synthesis-position③">font-synthesis-position</a> <td>auto | none <td>auto <td>all elements and text <td>yes <td>N/A <td>discrete <td>per grammar <td>specified keyword <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-synthesis-small-caps" id="ref-for-propdef-font-synthesis-small-caps④">font-synthesis-small-caps</a> <td>auto | none <td>auto <td>all elements and text <td>yes <td>N/A <td>discrete <td>per grammar <td>specified keyword <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-synthesis-style" id="ref-for-propdef-font-synthesis-style⑦">font-synthesis-style</a> <td>auto | none <td>auto <td>all elements and text <td>yes <td>N/A <td>discrete <td>per grammar <td>specified keyword <td>visual <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-synthesis-weight" id="ref-for-propdef-font-synthesis-weight④">font-synthesis-weight</a> <td>auto | none <td>auto <td>all elements and text <td>yes <td>N/A <td>discrete <td>per grammar <td>specified keyword <td>visual <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant" id="ref-for-propdef-font-variant①⑨">font-variant</a> <td>normal | none | [ [ &lt;common-lig-values> || &lt;discretionary-lig-values> || &lt;historical-lig-values> || &lt;contextual-alt-values> ] || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || [ stylistic(&lt;feature-value-name>) || historical-forms || styleset(&lt;feature-value-name>#) || character-variant(&lt;feature-value-name>#) || swash(&lt;feature-value-name>) || ornaments(&lt;feature-value-name>) || annotation(&lt;feature-value-name>) ] || [ &lt;numeric-figure-values> || &lt;numeric-spacing-values> || &lt;numeric-fraction-values> || ordinal || slashed-zero ] || [ &lt;east-asian-variant-values> || &lt;east-asian-width-values> || ruby ] || [ sub | super ] || [ text | emoji | unicode ] ] <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-alternates" id="ref-for-propdef-font-variant-alternates①③">font-variant-alternates</a> <td>normal | [ stylistic(&lt;feature-value-name>) || historical-forms || styleset(&lt;feature-value-name>#) || character-variant(&lt;feature-value-name>#) || swash(&lt;feature-value-name>) || ornaments(&lt;feature-value-name>) || annotation(&lt;feature-value-name>) ] <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-caps" id="ref-for-propdef-font-variant-caps①⓪">font-variant-caps</a> <td>normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-east-asian" id="ref-for-propdef-font-variant-east-asian①②">font-variant-east-asian</a> <td>normal | [ &lt;east-asian-variant-values> || &lt;east-asian-width-values> || ruby ] <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-emoji" id="ref-for-propdef-font-variant-emoji⑧">font-variant-emoji</a> <td>normal | text | emoji | unicode <td>normal <td>all elements and text <td>yes <td>N/a <td>discrete <td>per grammar <td>specified keyword <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-ligatures" id="ref-for-propdef-font-variant-ligatures①①">font-variant-ligatures</a> <td>normal | none | [ &lt;common-lig-values> || &lt;discretionary-lig-values> || &lt;historical-lig-values> || &lt;contextual-alt-values> ] <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-numeric" id="ref-for-propdef-font-variant-numeric①①">font-variant-numeric</a> <td>normal | [ &lt;numeric-figure-values> || &lt;numeric-spacing-values> || &lt;numeric-fraction-values> || ordinal || slashed-zero ] <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variant-position" id="ref-for-propdef-font-variant-position①①">font-variant-position</a> <td>normal | sub | super <td>normal <td>all elements and text <td>yes <td>n/a <td>discrete <td>per grammar <td>as specified <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-variation-settings" id="ref-for-propdef-font-variation-settings①②">font-variation-settings</a> <td>normal | [ &lt;opentype-tag> &lt;number>]# <td>normal <td>all elements and text <td>yes <td>n/a <td>see prose <td>per grammar <td>the keyword normal or a list, each item a string paired with a number <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-weight" id="ref-for-propdef-font-weight②⑧">font-weight</a> <td>&lt;font-weight-absolute> | bolder | lighter <td>normal <td>all elements and text <td>yes <td>n/a <td>by computed value type <td>per grammar <td>a number, see below <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-font-width" id="ref-for-propdef-font-width②⑥">font-width</a> <td>normal | &lt;percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded <td>normal <td>all elements and text <td>yes <td>Not resolved <td>by computed value type <td>per grammar <td>a percentage, see below <td> </table> </div> <h3 class="no-num no-ref heading settled" id="font-face-descriptor-table"><span class="content"><a class="css" data-link-type="at-rule" href="#at-font-face-rule" id="ref-for-at-font-face-rule⑧④">@font-face</a> Descriptors</span><a class="self-link" href="#font-face-descriptor-table"></a></h3> <div class="big-element-wrapper"> <table class="index"> <thead> <tr> <th scope="col">Name <th scope="col">Value <th scope="col">Initial <tbody> <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-ascent-override" id="ref-for-descdef-font-face-ascent-override②">ascent-override</a> <td>normal | &lt;percentage [0,∞]> <td>normal <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-descent-override" id="ref-for-descdef-font-face-descent-override②">descent-override</a> <td>normal | &lt;percentage [0,∞]> <td>normal <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-display" id="ref-for-descdef-font-face-font-display⑥">font-display</a> <td>auto | block | swap | fallback | optional <td>auto <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-family" id="ref-for-descdef-font-face-font-family①">font-family</a> <td>&lt;family-name> <td>N/A <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-feature-settings" id="ref-for-descdef-font-face-font-feature-settings②">font-feature-settings</a> <td>normal | &lt;feature-tag-value># <td>normal <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-language-override" id="ref-for-descdef-font-face-font-language-override②">font-language-override</a> <td>normal | &lt;string> <td>normal <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-named-instance" id="ref-for-descdef-font-face-font-named-instance③">font-named-instance</a> <td>auto | &lt;string> <td>auto <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-style" id="ref-for-descdef-font-face-font-style③">font-style</a> <td>auto | normal | italic | oblique [ &lt;angle [-90deg,90deg]>{1,2} ]? <td>auto <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-variation-settings" id="ref-for-descdef-font-face-font-variation-settings②">font-variation-settings</a> <td>normal | [ &lt;string> &lt;number>]# <td>normal <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-weight" id="ref-for-descdef-font-face-font-weight②">font-weight</a> <td>auto | &lt;font-weight-absolute>{1,2} <td>auto <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-font-width" id="ref-for-descdef-font-face-font-width③">font-width</a> <td>auto | &lt;'font-width'>{1,2} <td>auto <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-line-gap-override" id="ref-for-descdef-font-face-line-gap-override②">line-gap-override</a> <td>normal | &lt;percentage [0,∞]> <td>normal <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-src" id="ref-for-descdef-font-face-src①⓪">src</a> <td>&lt;font-src-list> <td>N/A <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-face-unicode-range" id="ref-for-descdef-font-face-unicode-range⑨">unicode-range</a> <td>&lt;unicode-range-token># <td>U+0-10FFFF </table> </div> <h3 class="no-num no-ref heading settled" id="font-feature-values-descriptor-table"><span class="content"><a class="css" data-link-type="at-rule" href="#at-ruledef-font-feature-values" id="ref-for-at-ruledef-font-feature-values②①">@font-feature-values</a> Descriptors</span><a class="self-link" href="#font-feature-values-descriptor-table"></a></h3> <div class="big-element-wrapper"> <table class="index"> <thead> <tr> <th scope="col">Name <th scope="col">Value <th scope="col">Initial <tbody> <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-feature-values-font-display" id="ref-for-descdef-font-feature-values-font-display④">font-display</a> <td>auto | block | swap | fallback | optional <td>auto </table> </div> <h3 class="no-num no-ref heading settled" id="font-palette-values-descriptor-table"><span class="content"><a class="css" data-link-type="at-rule" href="#at-ruledef-font-palette-values" id="ref-for-at-ruledef-font-palette-values③①">@font-palette-values</a> Descriptors</span><a class="self-link" href="#font-palette-values-descriptor-table"></a></h3> <div class="big-element-wrapper"> <table class="index"> <thead> <tr> <th scope="col">Name <th scope="col">Value <th scope="col">Initial <tbody> <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-palette-values-base-palette" id="ref-for-descdef-font-palette-values-base-palette②">base-palette</a> <td>light | dark | &lt;integer [0,∞]> <td>N/A <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-palette-values-font-family" id="ref-for-descdef-font-palette-values-font-family②">font-family</a> <td>&lt;family-name># <td>N/A <tr> <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-font-palette-values-override-colors" id="ref-for-descdef-font-palette-values-override-colors②">override-colors</a> <td>[ &lt;integer [0,∞]> &lt;color> ]# <td>N/A </table> </div> <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#cssfontfacedescriptors"><code class="highlight"><c- g>CSSFontFaceDescriptors</c-></code></a> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssstyledeclaration"><c- n>CSSStyleDeclaration</c-></a> { <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-src"><code class="highlight"><c- g>src</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontfamily"><code class="highlight"><c- g>fontFamily</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-family"><code class="highlight"><c- g>font-family</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontstyle"><code class="highlight"><c- g>fontStyle</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-style"><code class="highlight"><c- g>font-style</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontweight"><code class="highlight"><c- g>fontWeight</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-weight"><code class="highlight"><c- g>font-weight</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontstretch"><code class="highlight"><c- g>fontStretch</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-stretch"><code class="highlight"><c- g>font-stretch</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontwidth"><code class="highlight"><c- g>fontWidth</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-width"><code class="highlight"><c- g>font-width</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-unicoderange"><code class="highlight"><c- g>unicodeRange</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-unicode-range"><code class="highlight"><c- g>unicode-range</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontfeaturesettings"><code class="highlight"><c- g>fontFeatureSettings</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-feature-settings"><code class="highlight"><c- g>font-feature-settings</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontvariationsettings"><code class="highlight"><c- g>fontVariationSettings</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-variation-settings"><code class="highlight"><c- g>font-variation-settings</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontnamedinstance"><code class="highlight"><c- g>fontNamedInstance</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-named-instance"><code class="highlight"><c- g>font-named-instance</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontdisplay"><code class="highlight"><c- g>fontDisplay</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-display"><code class="highlight"><c- g>font-display</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-fontlanguageoverride"><code class="highlight"><c- g>fontLanguageOverride</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-font-language-override"><code class="highlight"><c- g>font-language-override</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-ascentoverride"><code class="highlight"><c- g>ascentOverride</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-ascent-override"><code class="highlight"><c- g>ascent-override</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-descentoverride"><code class="highlight"><c- g>descentOverride</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-descent-override"><code class="highlight"><c- g>descent-override</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-linegapoverride"><code class="highlight"><c- g>lineGapOverride</c-></code></a>; <c- b>attribute</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"><c- g>LegacyNullToEmptyString</c-></a>] <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfacedescriptors-line-gap-override"><code class="highlight"><c- g>line-gap-override</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#cssfontfacerule"><code class="highlight"><c- g>CSSFontFaceRule</c-></code></a> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssrule"><c- n>CSSRule</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#PutForwards"><c- g>PutForwards</c-></a>=<a class="idl-code" data-link-type="attribute"><c- n>cssText</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfacedescriptors"><c- n>CSSFontFaceDescriptors</c-></a> <a data-readonly data-type="CSSFontFaceDescriptors" href="#dom-cssfontfacerule-style"><code class="highlight"><c- g>style</c-></code></a>; }; <c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://drafts.csswg.org/cssom-1/#cssrule"><c- g>CSSRule</c-></a> { <c- b>const</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-short"><c- b>unsigned</c-> <c- b>short</c-></a> <a href="#dom-cssrule-font_feature_values_rule"><code class="highlight"><c- g>FONT_FEATURE_VALUES_RULE</c-></code></a> = 14; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#cssfontfeaturevaluesrule"><code class="highlight"><c- g>CSSFontFeatureValuesRule</c-></code></a> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssrule"><c- n>CSSRule</c-></a> { <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-type="CSSOMString" href="#dom-cssfontfeaturevaluesrule-fontfamily"><code class="highlight"><c- g>fontFamily</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-annotation"><code class="highlight"><c- g>annotation</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-ornaments"><code class="highlight"><c- g>ornaments</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-stylistic"><code class="highlight"><c- g>stylistic</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-swash"><code class="highlight"><c- g>swash</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-charactervariant"><code class="highlight"><c- g>characterVariant</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-styleset"><code class="highlight"><c- g>styleset</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#cssfontfeaturevaluesmap"><c- n>CSSFontFeatureValuesMap</c-></a> <a data-readonly data-type="CSSFontFeatureValuesMap" href="#dom-cssfontfeaturevaluesrule-historicalforms"><code class="highlight"><c- g>historicalForms</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#cssfontfeaturevaluesmap"><code class="highlight"><c- g>CSSFontFeatureValuesMap</c-></code></a> { <c- b>maplike</c->&lt;<a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a>>>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a> <a href="#dom-cssfontfeaturevaluesmap-set"><code class="highlight"><c- g>set</c-></code></a>(<a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a href="#dom-cssfontfeaturevaluesmap-set-featurevaluename-values-featurevaluename"><code class="highlight"><c- g>featureValueName</c-></code></a>, (<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <c- b>or</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a>>) <a href="#dom-cssfontfeaturevaluesmap-set-featurevaluename-values-values"><code class="highlight"><c- g>values</c-></code></a>); }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->]<c- b>interface</c-> <a href="#cssfontpalettevaluesrule"><code class="highlight"><c- g>CSSFontPaletteValuesRule</c-></code></a> : <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssrule"><c- n>CSSRule</c-></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-readonly data-type="CSSOMString" href="#dom-cssfontpalettevaluesrule-name"><code class="highlight"><c- g>name</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-readonly data-type="CSSOMString" href="#dom-cssfontpalettevaluesrule-fontfamily"><code class="highlight"><c- g>fontFamily</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-readonly data-type="CSSOMString" href="#dom-cssfontpalettevaluesrule-basepalette"><code class="highlight"><c- g>basePalette</c-></code></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <a data-readonly data-type="CSSOMString" href="#dom-cssfontpalettevaluesrule-overridecolors"><code class="highlight"><c- g>overrideColors</c-></code></a>; }; </pre> <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2> <div style="counter-reset:issue"> <div class="issue"> What direction should positive and negative obliques skew in vertical writing mode? How do we achieve skews in the opposite dimension (needed for vertical writing)? <a class="issue-return" href="#issue-d46def88" title="Jump to section">↵</a></div> <div class="issue"> <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-fallback">fallback</a> and <a class="css" data-link-type="maybe" href="#valdef-font-face-font-display-optional">optional</a> can result in some faces in a family being used while others are required to fallback, giving a "ransom note" look. Perhaps require that all fonts in a family have the same behavior (all swapped in, or all fallback)? See also the @font-feature-values for controlling the behavior on a font family basis. <a class="issue-return" href="#issue-160eca9c" title="Jump to section">↵</a></div> <div class="issue"> Load a font from <var>stream</var> according to its type. <a class="issue-return" href="#issue-518894d9" title="Jump to section">↵</a></div> <div class="issue"> The threshold for preferring oblique over normal <a href="https://github.com/w3c/csswg-drafts/issues/2295">should be lower than the average angle</a>. <a class="issue-return" href="#issue-c152d461" title="Jump to section">↵</a></div> <div class="issue"> Add more examples and pictures. <a class="issue-return" href="#issue-6dfa50ce" title="Jump to section">↵</a></div> </div> <details class="mdn-anno unpositioned" data-anno-for="dom-cssfontfacerule-style"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFaceRule/style" title="The read-only style property of the CSSFontFaceRule interface returns the style information from the @font-face at-rule. This will be in the form of a CSSStyleDeclaration object.">CSSFontFaceRule/style</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>12.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>12.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="om-fontface"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFaceRule" title="The CSSFontFaceRule interface represents an @font-face at-rule.">CSSFontFaceRule</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>12.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>12.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-cssfontfeaturevaluesrule-fontfamily"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFeatureValuesRule/fontFamily" title="The fontFamily property of the CSSConditionRule interface represents the name of the font family it applies to.">CSSFontFeatureValuesRule/fontFamily</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>16.2+</span></span><span class="chrome yes"><span>Chrome</span><span>111+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>111+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="cssfontfeaturevaluesrule"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFeatureValuesRule" title="The CSSFontFeatureValuesRule interface represents an @font-feature-values at-rule, letting developers assign for each font face a common name to specify features indices to be used in font-variant-alternates.">CSSFontFeatureValuesRule</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>16.2+</span></span><span class="chrome yes"><span>Chrome</span><span>111+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>111+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-cssfontpalettevaluesrule-basepalette"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontPaletteValuesRule/basePalette" title="The read-only basePalette property of the CSSFontPaletteValuesRule interface indicates the base palette associated with the rule.">CSSFontPaletteValuesRule/basePalette</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-cssfontpalettevaluesrule-fontfamily"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontPaletteValuesRule/fontFamily" title="The read-only fontFamily property of the CSSFontPaletteValuesRule interface lists the font families the rule can be applied to. The font families must be named families; generic families like courier are not valid.">CSSFontPaletteValuesRule/fontFamily</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-cssfontpalettevaluesrule-name"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontPaletteValuesRule/name" title="The read-only name property of the CSSFontPaletteValuesRule interface represents the name identifying the associated @font-palette-values at-rule. A valid name always starts with two dashes, such as --Alternate.">CSSFontPaletteValuesRule/name</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-cssfontpalettevaluesrule-overridecolors"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontPaletteValuesRule/overrideColors" title="The read-only overrideColors property of the CSSFontPaletteValuesRule interface is a string containing a list of color index and color pair that are to be used instead. It is specified in the same format as the corresponding override-colors descriptor.">CSSFontPaletteValuesRule/overrideColors</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="om-fontpalettevalues"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSFontPaletteValuesRule" title="The CSSFontPaletteValuesRule interface represents an @font-palette-values at-rule.">CSSFontPaletteValuesRule</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-metrics-override-desc"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/ascent-override" title="The ascent-override CSS descriptor for the @font-face at-rule defines the ascent metric for the font. The ascent metric is the height above the baseline that CSS uses to lay out line boxes in an inline formatting context.">@font-face/ascent-override</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>89+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>87+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>87+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/descent-override" title="The descent-override CSS descriptor for the @font-face at-rule defines the descent metric for the font. The descent metric is the height below the baseline that CSS uses to lay out line boxes in an inline formatting context.">@font-face/descent-override</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>89+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>87+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>87+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/line-gap-override" title="The line-gap-override CSS descriptor for the @font-face at-rule defines the line-gap metric for the font. The line-gap metric is the font recommended line-gap or external leading.">@font-face/line-gap-override</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>89+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>87+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>87+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-display-desc"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display" title="The font-display descriptor for the @font-face at-rule determines how a font face is displayed based on whether and when it is downloaded and ready to use.">@font-face/font-display</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>58+</span></span><span class="safari yes"><span>Safari</span><span>11.1+</span></span><span class="chrome yes"><span>Chrome</span><span>60+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.0+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-family-desc"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-family" title="The font-family CSS descriptor sets the font family for a font specified in an @font-face at-rule.">@font-face/font-family</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>6+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>2.2+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-rend-desc"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-feature-settings" title="The font-feature-settings CSS descriptor allows you to define the initial settings to use for the font defined by the @font-face at-rule. You can further use this descriptor to control typographic font features such as ligatures, small caps, and swashes, for the font defined by @font-face. The values for this descriptor are the same as the font-feature-settings property, except for the global keyword values.">@font-face/font-feature-settings</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-variation-settings" title="The font-variation-settings CSS descriptor allows authors to specify low-level OpenType or TrueType font variations in the @font-face at-rule. The values for this descriptor are the same as the font-variation-settings property, except for the global keyword values.">@font-face/font-variation-settings</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>62+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-prop-desc"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-stretch" title="The font-stretch CSS descriptor allows authors to specify a normal, condensed, or expanded face for the fonts specified in the @font-face at-rule.">@font-face/font-stretch</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>62+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>62+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>17+</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>6.0+</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>41+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-style" title="The font-style CSS descriptor allows authors to specify font styles for the fonts specified in the @font-face at-rule.">@font-face/font-style</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight" title="The font-weight CSS descriptor allows authors to specify font weights for the fonts specified in the @font-face at-rule. The font-weight property can separately be used to set how thick or thin characters in text should be displayed.">@font-face/font-weight</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-variant" title="The @font-face CSS at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user&apos;s own computer.">@font-face/font-variant</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant" title="The font-variant CSS shorthand property allows you to set all the font variants for a font.">font-variant</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>11+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-variant" title="The font-variant attribute indicates whether the text is to be rendered using variations of the font&apos;s glyphs.">Attribute/font-variant</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="src-desc"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src" title="The src CSS descriptor for the @font-face at-rule specifies the resource containing font data. It is required for the @font-face rule to be valid.">@font-face/src</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>6+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>2.2+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="unicode-range-desc"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range" title="The unicode-range CSS descriptor sets the specific range of characters to be used from a font defined using the @font-face at-rule and made available for use on the current page. If the page doesn&apos;t use any character in this range, the font is not downloaded; if it uses at least one, the whole font is downloaded.">@font-face/unicode-range</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>36+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios yes"><span>iOS Safari</span><span>3+</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-face-rule"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face" title="The @font-face CSS at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user&apos;s own computer.">@font-face</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-feature-values"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-feature-values" title="The @font-feature-values CSS at-rule lets you use a common name in the font-variant-alternates property for features activated differently in OpenType. This can help simplify your CSS when using multiple fonts.">@font-feature-values</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="at-ruledef-font-palette-values"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-palette-values" title="The @font-palette-values CSS at-rule allows you to customize the default values of font-palette created by the font-maker.">@font-palette-values</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="generic-font-families"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-family" title="The font-family CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element.">font-family</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>4+</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-family" title="The font-family attribute indicates which font family will be used to render the text, specified as a prioritized list of font family names and/or generic family names.">Attribute/font-family</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-family-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-family" title="The font-family CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element.">font-family</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>4+</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-family" title="The font-family attribute indicates which font family will be used to render the text, specified as a prioritized list of font family names and/or generic family names.">Attribute/font-family</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-feature-settings-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings" title="The font-feature-settings CSS property controls advanced typographic features in OpenType fonts.">font-feature-settings</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>15+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android yes"><span>Chrome for Android</span><span>48+</span></span><span class="webview_android yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>35+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-kerning-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-kerning" title="The font-kerning CSS property sets the use of the kerning information stored in a font.">font-kerning</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>32+</span></span><span class="safari yes"><span>Safari</span><span>9+</span></span><span class="chrome yes"><span>Chrome</span><span>33+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>2.0+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-language-override-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-language-override" title="The font-language-override CSS property controls the use of language-specific glyphs in a typeface.">font-language-override</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-optical-sizing-def"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-optical-sizing" title="The font-optical-sizing CSS property sets whether text rendering is optimized for viewing at different sizes.">font-optical-sizing</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>62+</span></span><span class="safari yes"><span>Safari</span><span>11+</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>17+</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-palette-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-palette" title="The font-palette CSS property allows specifying one of the many palettes contained in a font that a user agent should use for the font. Users can also override the values in a palette or create a new palette by using the @font-palette-values at-rule.">font-palette</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>107+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>101+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>101+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-size-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" title="The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em, ex, and so forth.">font-size</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>7+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>5.5+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-size" title="The font-size attribute refers to the size of the font from baseline to baseline when multiple lines of text are set solid in a multiline layout environment.">Attribute/font-size</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-stretch-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch" title="The font-stretch CSS property selects a normal, condensed, or expanded face from a font.">font-stretch</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>9+</span></span><span class="safari yes"><span>Safari</span><span>11+</span></span><span class="chrome yes"><span>Chrome</span><span>60+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-stretch" title="The font-stretch attribute indicates the desired amount of condensing or expansion in the glyphs used to render the text.">Attribute/font-stretch</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-style-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-style" title="The font-style CSS property sets whether a font should be styled with a normal, italic, or oblique face from its font-family.">font-style</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>7+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-style" title="The font-style attribute specifies whether the text is to be rendered using a normal, italic, or oblique face.">Attribute/font-style</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-synthesis-small-caps"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-synthesis-small-caps" title="The font-synthesis-small-caps CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters.">font-synthesis-small-caps</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>111+</span></span><span class="safari yes"><span>Safari</span><span>16.4+</span></span><span class="chrome yes"><span>Chrome</span><span>97+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>97+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-synthesis-style"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-synthesis-style" title="The font-synthesis-style CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family.">font-synthesis-style</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>111+</span></span><span class="safari yes"><span>Safari</span><span>16.4+</span></span><span class="chrome yes"><span>Chrome</span><span>97+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>97+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-synthesis-weight"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-synthesis-weight" title="The font-synthesis-weight CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family.">font-synthesis-weight</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>111+</span></span><span class="safari yes"><span>Safari</span><span>16.4+</span></span><span class="chrome yes"><span>Chrome</span><span>97+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>97+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-synthesis"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-synthesis" title="The font-synthesis shorthand CSS property lets you specify whether or not the browser may synthesize the bold, italic, and/or small-caps typefaces when they are missing in the specified font-family.">font-synthesis</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9+</span></span><span class="chrome yes"><span>Chrome</span><span>97+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>97+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-alternates-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates" title="The font-variant-alternates CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in @font-feature-values.">font-variant-alternates</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome yes"><span>Chrome</span><span>111+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>111+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-caps-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps" title="The font-variant-caps CSS property controls the use of alternate glyphs for capital letters.">font-variant-caps</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome yes"><span>Chrome</span><span>52+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-east-asian-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-east-asian" title="The font-variant-east-asian CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese.">font-variant-east-asian</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome yes"><span>Chrome</span><span>63+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-emoji-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-emoji" title="The font-variant-emoji CSS property specifies the default presentation style for displaying emojis.">font-variant-emoji</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span title="Requires setting a user preference or runtime flag.">🔰 108+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-emoji" title="The font-variant-emoji CSS property specifies the default presentation style for displaying emojis.">font-variant-emoji</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>108+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-ligatures-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures" title="The font-variant-ligatures CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text.">font-variant-ligatures</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome yes"><span>Chrome</span><span>34+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>21+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android yes"><span>Chrome for Android</span><span>34+</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>21+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-numeric-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric" title="The font-variant-numeric CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers.">font-variant-numeric</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome yes"><span>Chrome</span><span>52+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variant-position-prop"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-position" title="The font-variant-position CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript.">font-variant-position</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>34+</span></span><span class="safari yes"><span>Safari</span><span>9.1+</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-variation-settings-def"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variation-settings" title="The font-variation-settings CSS property provides low-level control over variable font characteristics by letting you specify the four letter axis names of the characteristics you want to vary along with their values.">font-variation-settings</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>62+</span></span><span class="safari yes"><span>Safari</span><span>11+</span></span><span class="chrome yes"><span>Chrome</span><span>62+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>17+</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios yes"><span>iOS Safari</span><span>11+</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-weight-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight" title="The font-weight CSS property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set.">font-weight</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>2+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-weight" title="The font-weight attribute refers to the boldness or lightness of the glyphs used to render the text, relative to other fonts in the same font family.">Attribute/font-weight</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari no"><span>Safari</span><span>?</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-prop"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font" title="The font CSS shorthand property sets all the different properties of an element&apos;s font. Alternatively, it sets an element&apos;s font to a system font.">font</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="font-size-adjust-prop"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/font-size-adjust" title="The font-size-adjust attribute allows authors to specify an aspect value for an element that will preserve the x-height of the first choice font in a substitute font.">Attribute/font-size-adjust</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>?</span></span><span class="safari yes"><span>Safari</span><span>16.4+</span></span><span class="chrome no"><span>Chrome</span><span>?</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>?</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>?</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <script>/* Boilerplate: script-dom-helper */ "use strict"; function query(sel) { return document.querySelector(sel); } function queryAll(sel) { return [...document.querySelectorAll(sel)]; } function iter(obj) { if(!obj) return []; var it = obj[Symbol.iterator]; if(it) return it; return Object.entries(obj); } function mk(tagname, attrs, ...children) { const el = document.createElement(tagname); for(const [k,v] of iter(attrs)) { if(k.slice(0,3) == "_on") { const eventName = k.slice(3); el.addEventListener(eventName, v); } else if(k[0] == "_") { // property, not attribute el[k.slice(1)] = v; } else { if(v === false || v == null) { continue; } else if(v === true) { el.setAttribute(k, ""); continue; } else { el.setAttribute(k, v); } } } append(el, children); return el; } /* Create shortcuts for every known HTML element */ [ "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "meta", "meter", "nav", "nobr", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "s", "samp", "script", "section", "select", "small", "source", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "u", "ul", "var", "video", "wbr", "xmp", ].forEach(tagname=>{ mk[tagname] = (...args) => mk(tagname, ...args); }); function* nodesFromChildList(children) { for(const child of children.flat(Infinity)) { if(child instanceof Node) { yield child; } else { yield new Text(child); } } } function append(el, ...children) { for(const child of nodesFromChildList(children)) { if(el instanceof Node) el.appendChild(child); else el.push(child); } return el; } function insertAfter(el, ...children) { for(const child of nodesFromChildList(children)) { el.parentNode.insertBefore(child, el.nextSibling); } return el; } function clearContents(el) { el.innerHTML = ""; return el; } function parseHTML(markup) { if(markup.toLowerCase().trim().indexOf('<!doctype') === 0) { const doc = document.implementation.createHTMLDocument(""); doc.documentElement.innerHTML = markup; return doc; } else { const el = mk.template({}); el.innerHTML = markup; return el.content; } }</script> <script>/* Boilerplate: script-dfn-panel */ "use strict"; { let dfnPanelData = { "0812e39f": {"dfnID":"0812e39f","dfnText":"ink overflow","external":true,"refSections":[{"refs":[{"id":"ref-for-ink-overflow"}],"title":"2.5. \nFont size: the font-size property"}],"url":"https://drafts.csswg.org/css-overflow-3/#ink-overflow"}, "0e8de730": {"dfnID":"0e8de730","dfnText":"tuple","external":true,"refSections":[{"refs":[{"id":"ref-for-tuple"}],"title":"6.9.1. Basic syntax"}],"url":"https://infra.spec.whatwg.org/#tuple"}, "1548047a": {"dfnID":"1548047a","dfnText":"<color>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-color"},{"id":"ref-for-typedef-color\u2460"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"},{"refs":[{"id":"ref-for-typedef-color\u2461"},{"id":"ref-for-typedef-color\u2462"}],"title":"9.2.3. \nOverriding a colors from a palette: The override-colors descriptor"}],"url":"https://drafts.csswg.org/css-color-5/#typedef-color"}, "15a266c1": {"dfnID":"15a266c1","dfnText":"medium","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-font-size-medium"}],"title":"2.5.1. \n\tAbsolute Size Keyword Mapping Table"}],"url":"https://drafts.csswg.org/css2/#valdef-font-size-medium"}, "15f5b381": {"dfnID":"15f5b381","dfnText":"<percentage>","external":true,"refSections":[{"refs":[{"id":"ref-for-percentage-value"},{"id":"ref-for-percentage-value\u2460"},{"id":"ref-for-percentage-value\u2461"}],"title":"2.3. \nFont width: the font-width property"},{"refs":[{"id":"ref-for-percentage-value\u2462"},{"id":"ref-for-percentage-value\u2463"},{"id":"ref-for-percentage-value\u2464"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"},{"refs":[{"id":"ref-for-percentage-value\u2465"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-values-4/#percentage-value"}, "16310992": {"dfnID":"16310992","dfnText":"<number>","external":true,"refSections":[{"refs":[{"id":"ref-for-number-value"},{"id":"ref-for-number-value\u2460"}],"title":"2.2. Font weight: the font-weight property"},{"refs":[{"id":"ref-for-number-value\u2461"},{"id":"ref-for-number-value\u2462"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"},{"refs":[{"id":"ref-for-number-value\u2463"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-number-value\u2464"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"https://drafts.csswg.org/css-values-4/#number-value"}, "18222566": {"dfnID":"18222566","dfnText":"<length-percentage>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-length-percentage"},{"id":"ref-for-typedef-length-percentage\u2460"}],"title":"2.5. \nFont size: the font-size property"}],"url":"https://drafts.csswg.org/css-values-4/#typedef-length-percentage"}, "1c5240b0": {"dfnID":"1c5240b0","dfnText":"vertical typographic mode","external":true,"refSections":[{"refs":[{"id":"ref-for-vertical-typographic-mode"}],"title":"6.3. \nKerning: the font-kerning property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#vertical-typographic-mode"}, "21ecf38f": {"dfnID":"21ecf38f","dfnText":"PutForwards","external":true,"refSections":[{"refs":[{"id":"ref-for-PutForwards"}],"title":"12.1. \nThe CSSFontFaceRule interface"}],"url":"https://webidl.spec.whatwg.org/#PutForwards"}, "2394bfd1": {"dfnID":"2394bfd1","dfnText":"<color-interpolation-method>","external":true,"refSections":[{"refs":[{"id":"ref-for-color-interpolation-method"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-color-5/#color-interpolation-method"}, "2a26d53d": {"dfnID":"2a26d53d","dfnText":"math function","external":true,"refSections":[{"refs":[{"id":"ref-for-math-function"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"https://drafts.csswg.org/css-values-4/#math-function"}, "2c4af168": {"dfnID":"2c4af168","dfnText":"LegacyNullToEmptyString","external":true,"refSections":[{"refs":[{"id":"ref-for-LegacyNullToEmptyString"},{"id":"ref-for-LegacyNullToEmptyString\u2460"},{"id":"ref-for-LegacyNullToEmptyString\u2461"},{"id":"ref-for-LegacyNullToEmptyString\u2462"},{"id":"ref-for-LegacyNullToEmptyString\u2463"},{"id":"ref-for-LegacyNullToEmptyString\u2464"},{"id":"ref-for-LegacyNullToEmptyString\u2465"},{"id":"ref-for-LegacyNullToEmptyString\u2466"},{"id":"ref-for-LegacyNullToEmptyString\u2467"},{"id":"ref-for-LegacyNullToEmptyString\u2468"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u24ea"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2460"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2461"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2462"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2463"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2464"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2465"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2466"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2467"},{"id":"ref-for-LegacyNullToEmptyString\u2460\u2468"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u24ea"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2460"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2461"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2462"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2463"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2464"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2465"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2466"},{"id":"ref-for-LegacyNullToEmptyString\u2461\u2467"}],"title":"12.1. \nThe CSSFontFaceRule interface"}],"url":"https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"}, "3559c926": {"dfnID":"3559c926","dfnText":"<angle>","external":true,"refSections":[{"refs":[{"id":"ref-for-angle-value"},{"id":"ref-for-angle-value\u2460"},{"id":"ref-for-angle-value\u2461"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-angle-value\u2462"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"https://drafts.csswg.org/css-values-4/#angle-value"}, "358fd6ff": {"dfnID":"358fd6ff","dfnText":"CSS-wide keywords","external":true,"refSections":[{"refs":[{"id":"ref-for-css-wide-keywords"}],"title":"1.1. \nValue Definitions"},{"refs":[{"id":"ref-for-css-wide-keywords\u2460"},{"id":"ref-for-css-wide-keywords\u2461"},{"id":"ref-for-css-wide-keywords\u2462"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-css-wide-keywords\u2463"}],"title":"4.3.3.1. Local font fallback"},{"refs":[{"id":"ref-for-css-wide-keywords\u2464"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"}],"url":"https://drafts.csswg.org/css-values-4/#css-wide-keywords"}, "35d9f24e": {"dfnID":"35d9f24e","dfnText":"font-relative lengths","external":true,"refSections":[{"refs":[{"id":"ref-for-font-relative-length"}],"title":"2.5. \nFont size: the font-size property"},{"refs":[{"id":"ref-for-font-relative-length\u2460"}],"title":"5.2. Matching font styles"}],"url":"https://drafts.csswg.org/css-values-4/#font-relative-length"}, "385326d7": {"dfnID":"385326d7","dfnText":"writing-mode","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-writing-mode"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode"}, "3bb3a53a": {"dfnID":"3bb3a53a","dfnText":"invalid","external":true,"refSections":[{"refs":[{"id":"ref-for-css-invalid"}],"title":"2.2. Font weight: the font-weight property"},{"refs":[{"id":"ref-for-css-invalid\u2460"}],"title":"2.3. \nFont width: the font-width property"},{"refs":[{"id":"ref-for-css-invalid\u2461"}],"title":"2.4. \nFont style: the font-style property"}],"url":"https://drafts.csswg.org/css-syntax-3/#css-invalid"}, "450958f7": {"dfnID":"450958f7","dfnText":"unsigned short","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-unsigned-short"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"}],"url":"https://webidl.spec.whatwg.org/#idl-unsigned-short"}, "4962ecad": {"dfnID":"4962ecad","dfnText":"<absolute-size>","external":true,"refSections":[{"refs":[{"id":"ref-for-value-def-absolute-size"},{"id":"ref-for-value-def-absolute-size\u2460"},{"id":"ref-for-value-def-absolute-size\u2461"}],"title":"2.5. \nFont size: the font-size property"}],"url":"https://drafts.csswg.org/css2/#value-def-absolute-size"}, "4af5e3f0": {"dfnID":"4af5e3f0","dfnText":"normal","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-color-scheme-normal"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-color-adjust-1/#valdef-color-scheme-normal"}, "4bcd07f8": {"dfnID":"4bcd07f8","dfnText":"<declaration-rule-list>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-declaration-rule-list"},{"id":"ref-for-typedef-declaration-rule-list\u2460"}],"title":"6.9.1. Basic syntax"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-declaration-rule-list"}, "537cf076": {"dfnID":"537cf076","dfnText":"?","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-opt"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-mult-opt\u2460"},{"id":"ref-for-mult-opt\u2461"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-mult-opt\u2462"},{"id":"ref-for-mult-opt\u2463"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-mult-opt\u2464"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-mult-opt\u2465"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-mult-opt\u2466"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-values-4/#mult-opt"}, "53e3a28b": {"dfnID":"53e3a28b","dfnText":"descent metric","external":true,"refSections":[{"refs":[{"id":"ref-for-descent-metric"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"}],"url":"https://drafts.csswg.org/css-inline-3/#descent-metric"}, "584e9c31": {"dfnID":"584e9c31","dfnText":"calc()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-calc"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"https://drafts.csswg.org/css-values-4/#funcdef-calc"}, "5879b11d": {"dfnID":"5879b11d","dfnText":"content language","external":true,"refSections":[{"refs":[{"id":"ref-for-content-language"}],"title":"2.1.5. \nGeneric font families"},{"refs":[{"id":"ref-for-content-language\u2460"},{"id":"ref-for-content-language\u2461"}],"title":"6.2. \nLanguage-specific display"}],"url":"https://drafts.csswg.org/css-text-4/#content-language"}, "59912c93": {"dfnID":"59912c93","dfnText":"code unit","external":true,"refSections":[{"refs":[{"id":"ref-for-code-unit"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-code-unit\u2460"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"https://infra.spec.whatwg.org/#code-unit"}, "5f90bbfb": {"dfnID":"5f90bbfb","dfnText":"undefined","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-undefined"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"}],"url":"https://webidl.spec.whatwg.org/#idl-undefined"}, "5fced98b": {"dfnID":"5fced98b","dfnText":"CSSOMString","external":true,"refSections":[{"refs":[{"id":"ref-for-cssomstring"},{"id":"ref-for-cssomstring\u2460"},{"id":"ref-for-cssomstring\u2461"},{"id":"ref-for-cssomstring\u2462"},{"id":"ref-for-cssomstring\u2463"},{"id":"ref-for-cssomstring\u2464"},{"id":"ref-for-cssomstring\u2465"},{"id":"ref-for-cssomstring\u2466"},{"id":"ref-for-cssomstring\u2467"},{"id":"ref-for-cssomstring\u2468"},{"id":"ref-for-cssomstring\u2460\u24ea"},{"id":"ref-for-cssomstring\u2460\u2460"},{"id":"ref-for-cssomstring\u2460\u2461"},{"id":"ref-for-cssomstring\u2460\u2462"},{"id":"ref-for-cssomstring\u2460\u2463"},{"id":"ref-for-cssomstring\u2460\u2464"},{"id":"ref-for-cssomstring\u2460\u2465"},{"id":"ref-for-cssomstring\u2460\u2466"},{"id":"ref-for-cssomstring\u2460\u2467"},{"id":"ref-for-cssomstring\u2460\u2468"},{"id":"ref-for-cssomstring\u2461\u24ea"},{"id":"ref-for-cssomstring\u2461\u2460"},{"id":"ref-for-cssomstring\u2461\u2461"},{"id":"ref-for-cssomstring\u2461\u2462"},{"id":"ref-for-cssomstring\u2461\u2463"},{"id":"ref-for-cssomstring\u2461\u2464"},{"id":"ref-for-cssomstring\u2461\u2465"},{"id":"ref-for-cssomstring\u2461\u2466"},{"id":"ref-for-cssomstring\u2461\u2467"}],"title":"12.1. \nThe CSSFontFaceRule interface"},{"refs":[{"id":"ref-for-cssomstring\u2461\u2468"},{"id":"ref-for-cssomstring\u2462\u24ea"},{"id":"ref-for-cssomstring\u2462\u2460"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"},{"refs":[{"id":"ref-for-cssomstring\u2462\u2461"},{"id":"ref-for-cssomstring\u2462\u2462"},{"id":"ref-for-cssomstring\u2462\u2463"},{"id":"ref-for-cssomstring\u2462\u2464"}],"title":"12.3. \nThe CSSFontPaletteValuesRule interface"}],"url":"https://drafts.csswg.org/cssom-1/#cssomstring"}, "620ca81c": {"dfnID":"620ca81c","dfnText":"ch","external":true,"refSections":[{"refs":[{"id":"ref-for-ch"}],"title":"18.5. Changes from the 20 September 2018\n\tWorking Draft"}],"url":"https://drafts.csswg.org/css-values-4/#ch"}, "68487d22": {"dfnID":"68487d22","dfnText":"#","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-comma"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-mult-comma\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-mult-comma\u2461"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-mult-comma\u2462"}],"title":"4.5. \nCharacter range: the unicode-range descriptor"},{"refs":[{"id":"ref-for-mult-comma\u2463"},{"id":"ref-for-mult-comma\u2464"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-mult-comma\u2465"},{"id":"ref-for-mult-comma\u2466"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-mult-comma\u2467"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-mult-comma\u2468"},{"id":"ref-for-mult-comma\u2460\u24ea"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-mult-comma\u2460\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-mult-comma\u2460\u2461"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"},{"refs":[{"id":"ref-for-mult-comma\u2460\u2462"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"},{"refs":[{"id":"ref-for-mult-comma\u2460\u2463"}],"title":"9.2.1. \nFont family: the font-family descriptor"},{"refs":[{"id":"ref-for-mult-comma\u2460\u2464"}],"title":"9.2.3. \nOverriding a colors from a palette: The override-colors descriptor"}],"url":"https://drafts.csswg.org/css-values-4/#mult-comma"}, "6cb740a0": {"dfnID":"6cb740a0","dfnText":"oblique","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-font-style-oblique"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-valdef-font-style-oblique\u2460"},{"id":"ref-for-valdef-font-style-oblique\u2461"},{"id":"ref-for-valdef-font-style-oblique\u2462"},{"id":"ref-for-valdef-font-style-oblique\u2463"},{"id":"ref-for-valdef-font-style-oblique\u2464"},{"id":"ref-for-valdef-font-style-oblique\u2465"}],"title":"5.2. Matching font styles"}],"url":"https://drafts.csswg.org/css2/#valdef-font-style-oblique"}, "6ec67710": {"dfnID":"6ec67710","dfnText":"|","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-one"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-comb-one\u2460"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-comb-one\u2461"},{"id":"ref-for-comb-one\u2462"},{"id":"ref-for-comb-one\u2463"},{"id":"ref-for-comb-one\u2464"},{"id":"ref-for-comb-one\u2465"},{"id":"ref-for-comb-one\u2466"},{"id":"ref-for-comb-one\u2467"},{"id":"ref-for-comb-one\u2468"},{"id":"ref-for-comb-one\u2460\u24ea"},{"id":"ref-for-comb-one\u2460\u2460"},{"id":"ref-for-comb-one\u2460\u2461"},{"id":"ref-for-comb-one\u2460\u2462"},{"id":"ref-for-comb-one\u2460\u2463"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-comb-one\u2460\u2464"},{"id":"ref-for-comb-one\u2460\u2465"},{"id":"ref-for-comb-one\u2460\u2466"},{"id":"ref-for-comb-one\u2460\u2467"},{"id":"ref-for-comb-one\u2460\u2468"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"},{"refs":[{"id":"ref-for-comb-one\u2461\u24ea"},{"id":"ref-for-comb-one\u2461\u2460"},{"id":"ref-for-comb-one\u2461\u2461"},{"id":"ref-for-comb-one\u2461\u2462"}],"title":"2.2. Font weight: the font-weight property"},{"refs":[{"id":"ref-for-comb-one\u2461\u2463"},{"id":"ref-for-comb-one\u2461\u2464"},{"id":"ref-for-comb-one\u2461\u2465"},{"id":"ref-for-comb-one\u2461\u2466"},{"id":"ref-for-comb-one\u2461\u2467"},{"id":"ref-for-comb-one\u2461\u2468"},{"id":"ref-for-comb-one\u2462\u24ea"},{"id":"ref-for-comb-one\u2462\u2460"},{"id":"ref-for-comb-one\u2462\u2461"}],"title":"2.3. \nFont width: the font-width property"},{"refs":[{"id":"ref-for-comb-one\u2462\u2462"},{"id":"ref-for-comb-one\u2462\u2463"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-comb-one\u2462\u2464"},{"id":"ref-for-comb-one\u2462\u2465"},{"id":"ref-for-comb-one\u2462\u2466"},{"id":"ref-for-comb-one\u2462\u2467"},{"id":"ref-for-comb-one\u2462\u2468"},{"id":"ref-for-comb-one\u2463\u24ea"},{"id":"ref-for-comb-one\u2463\u2460"},{"id":"ref-for-comb-one\u2463\u2461"},{"id":"ref-for-comb-one\u2463\u2462"},{"id":"ref-for-comb-one\u2463\u2463"},{"id":"ref-for-comb-one\u2463\u2464"}],"title":"2.5. \nFont size: the font-size property"},{"refs":[{"id":"ref-for-comb-one\u2463\u2465"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"},{"refs":[{"id":"ref-for-comb-one\u2463\u2466"},{"id":"ref-for-comb-one\u2463\u2467"},{"id":"ref-for-comb-one\u2463\u2468"},{"id":"ref-for-comb-one\u2464\u24ea"},{"id":"ref-for-comb-one\u2464\u2460"},{"id":"ref-for-comb-one\u2464\u2461"},{"id":"ref-for-comb-one\u2464\u2462"},{"id":"ref-for-comb-one\u2464\u2463"},{"id":"ref-for-comb-one\u2464\u2464"},{"id":"ref-for-comb-one\u2464\u2465"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-comb-one\u2464\u2466"}],"title":"2.8.1. \nControlling synthesized bold: The font-synthesis-weight property"},{"refs":[{"id":"ref-for-comb-one\u2464\u2467"}],"title":"2.8.2. \nControlling synthesized oblique: The font-synthesis-style property"},{"refs":[{"id":"ref-for-comb-one\u2464\u2468"}],"title":"2.8.3. \nControlling synthesized small caps: The font-synthesis-small-caps property"},{"refs":[{"id":"ref-for-comb-one\u2465\u24ea"}],"title":"2.8.4. \nControlling synthesized super- and subscripts: The font-synthesis-position property"},{"refs":[{"id":"ref-for-comb-one\u2465\u2460"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"},{"refs":[{"id":"ref-for-comb-one\u2465\u2461"},{"id":"ref-for-comb-one\u2465\u2462"},{"id":"ref-for-comb-one\u2465\u2463"},{"id":"ref-for-comb-one\u2465\u2464"},{"id":"ref-for-comb-one\u2465\u2465"},{"id":"ref-for-comb-one\u2465\u2466"},{"id":"ref-for-comb-one\u2465\u2467"},{"id":"ref-for-comb-one\u2465\u2468"},{"id":"ref-for-comb-one\u2466\u24ea"},{"id":"ref-for-comb-one\u2466\u2460"},{"id":"ref-for-comb-one\u2466\u2461"},{"id":"ref-for-comb-one\u2466\u2462"},{"id":"ref-for-comb-one\u2466\u2463"},{"id":"ref-for-comb-one\u2466\u2464"},{"id":"ref-for-comb-one\u2466\u2465"},{"id":"ref-for-comb-one\u2466\u2466"},{"id":"ref-for-comb-one\u2466\u2467"},{"id":"ref-for-comb-one\u2466\u2468"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-comb-one\u2467\u24ea"},{"id":"ref-for-comb-one\u2467\u2460"},{"id":"ref-for-comb-one\u2467\u2461"},{"id":"ref-for-comb-one\u2467\u2462"},{"id":"ref-for-comb-one\u2467\u2463"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-comb-one\u2467\u2464"},{"id":"ref-for-comb-one\u2467\u2465"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-comb-one\u2467\u2466"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"},{"refs":[{"id":"ref-for-comb-one\u2467\u2467"},{"id":"ref-for-comb-one\u2467\u2468"},{"id":"ref-for-comb-one\u2468\u24ea"},{"id":"ref-for-comb-one\u2468\u2460"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"},{"refs":[{"id":"ref-for-comb-one\u2468\u2461"},{"id":"ref-for-comb-one\u2468\u2462"},{"id":"ref-for-comb-one\u2468\u2463"},{"id":"ref-for-comb-one\u2468\u2464"}],"title":"4.9.1. \nControlling Font Display Per Font-Family via @font-feature-values"},{"refs":[{"id":"ref-for-comb-one\u2468\u2465"}],"title":"4.10. \nDefault font language overriding: the font-language-override descriptor"},{"refs":[{"id":"ref-for-comb-one\u2468\u2466"},{"id":"ref-for-comb-one\u2468\u2467"},{"id":"ref-for-comb-one\u2468\u2468"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"},{"refs":[{"id":"ref-for-comb-one\u2460\u24ea\u24ea"},{"id":"ref-for-comb-one\u2460\u24ea\u2460"}],"title":"6.3. \nKerning: the font-kerning property"},{"refs":[{"id":"ref-for-comb-one\u2460\u24ea\u2461"},{"id":"ref-for-comb-one\u2460\u24ea\u2462"},{"id":"ref-for-comb-one\u2460\u24ea\u2463"},{"id":"ref-for-comb-one\u2460\u24ea\u2464"},{"id":"ref-for-comb-one\u2460\u24ea\u2465"},{"id":"ref-for-comb-one\u2460\u24ea\u2466"}],"title":"6.4. \nLigatures: the font-variant-ligatures property"},{"refs":[{"id":"ref-for-comb-one\u2460\u24ea\u2467"},{"id":"ref-for-comb-one\u2460\u24ea\u2468"}],"title":"6.5. \nSubscript and superscript forms: the font-variant-position property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2460\u24ea"},{"id":"ref-for-comb-one\u2460\u2460\u2460"},{"id":"ref-for-comb-one\u2460\u2460\u2461"},{"id":"ref-for-comb-one\u2460\u2460\u2462"},{"id":"ref-for-comb-one\u2460\u2460\u2463"},{"id":"ref-for-comb-one\u2460\u2460\u2464"}],"title":"6.6. \nCapitalization: the font-variant-caps property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2460\u2465"},{"id":"ref-for-comb-one\u2460\u2460\u2466"},{"id":"ref-for-comb-one\u2460\u2460\u2467"},{"id":"ref-for-comb-one\u2460\u2460\u2468"}],"title":"6.7. \nNumerical formatting: the font-variant-numeric property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2461\u24ea"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2461\u2460"},{"id":"ref-for-comb-one\u2460\u2461\u2461"},{"id":"ref-for-comb-one\u2460\u2461\u2462"},{"id":"ref-for-comb-one\u2460\u2461\u2463"},{"id":"ref-for-comb-one\u2460\u2461\u2464"},{"id":"ref-for-comb-one\u2460\u2461\u2465"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-comb-one\u2460\u2461\u2466"},{"id":"ref-for-comb-one\u2460\u2461\u2467"},{"id":"ref-for-comb-one\u2460\u2461\u2468"},{"id":"ref-for-comb-one\u2460\u2462\u24ea"},{"id":"ref-for-comb-one\u2460\u2462\u2460"},{"id":"ref-for-comb-one\u2460\u2462\u2461"},{"id":"ref-for-comb-one\u2460\u2462\u2462"}],"title":"6.10. \nEast Asian text rendering: the font-variant-east-asian property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2462\u2463"},{"id":"ref-for-comb-one\u2460\u2462\u2464"},{"id":"ref-for-comb-one\u2460\u2462\u2465"},{"id":"ref-for-comb-one\u2460\u2462\u2466"},{"id":"ref-for-comb-one\u2460\u2462\u2467"},{"id":"ref-for-comb-one\u2460\u2462\u2468"},{"id":"ref-for-comb-one\u2460\u2463\u24ea"},{"id":"ref-for-comb-one\u2460\u2463\u2460"},{"id":"ref-for-comb-one\u2460\u2463\u2461"},{"id":"ref-for-comb-one\u2460\u2463\u2462"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2463\u2463"},{"id":"ref-for-comb-one\u2460\u2463\u2464"},{"id":"ref-for-comb-one\u2460\u2463\u2465"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2463\u2466"}],"title":"6.13. Font language override: the font-language-override property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2463\u2467"}],"title":"8.1. \nOptical sizing control: the font-optical-sizing property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2463\u2468"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2464\u24ea"},{"id":"ref-for-comb-one\u2460\u2464\u2460"},{"id":"ref-for-comb-one\u2460\u2464\u2461"},{"id":"ref-for-comb-one\u2460\u2464\u2462"},{"id":"ref-for-comb-one\u2460\u2464\u2463"},{"id":"ref-for-comb-one\u2460\u2464\u2464"},{"id":"ref-for-comb-one\u2460\u2464\u2465"},{"id":"ref-for-comb-one\u2460\u2464\u2466"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2464\u2467"},{"id":"ref-for-comb-one\u2460\u2464\u2468"}],"title":"9.2.2. \nSpecifying the base palette: the base-palette descriptor"},{"refs":[{"id":"ref-for-comb-one\u2460\u2465\u24ea"},{"id":"ref-for-comb-one\u2460\u2465\u2460"},{"id":"ref-for-comb-one\u2460\u2465\u2461"}],"title":"9.3. \nSelecting the text presentation style: The font-variant-emoji property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-one"}, "73ea1d43": {"dfnID":"73ea1d43","dfnText":"color","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-color"},{"id":"ref-for-propdef-color\u2460"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-color-4/#propdef-color"}, "762610c7": {"dfnID":"762610c7","dfnText":"at-rule","external":true,"refSections":[{"refs":[{"id":"ref-for-at-rule"}],"title":"6.9.1. Basic syntax"}],"url":"https://drafts.csswg.org/css-syntax-3/#at-rule"}, "77d5a8bc": {"dfnID":"77d5a8bc","dfnText":"parent CSS style sheet","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-css-rule-parent-css-style-sheet"}],"title":"4.8.2. \nFont fetching requirements"}],"url":"https://drafts.csswg.org/cssom-1/#concept-css-rule-parent-css-style-sheet"}, "807f9351": {"dfnID":"807f9351","dfnText":"env()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-env"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"https://drafts.csswg.org/css-env-1/#funcdef-env"}, "84252421": {"dfnID":"84252421","dfnText":"<declaration-list>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-declaration-list"}],"title":"4.1. \nThe @font-face rule"},{"refs":[{"id":"ref-for-typedef-declaration-list\u2460"},{"id":"ref-for-typedef-declaration-list\u2461"},{"id":"ref-for-typedef-declaration-list\u2462"},{"id":"ref-for-typedef-declaration-list\u2463"},{"id":"ref-for-typedef-declaration-list\u2464"},{"id":"ref-for-typedef-declaration-list\u2465"},{"id":"ref-for-typedef-declaration-list\u2466"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-typedef-declaration-list\u2467"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list"}, "86c3e5ca": {"dfnID":"86c3e5ca","dfnText":"case-sensitive","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-case-sensitive"}],"title":"6.9.1. Basic syntax"}],"url":"https://w3c.github.io/i18n-glossary/#dfn-case-sensitive"}, "889e932f": {"dfnID":"889e932f","dfnText":"Exposed","external":true,"refSections":[{"refs":[{"id":"ref-for-Exposed"},{"id":"ref-for-Exposed\u2460"}],"title":"12.1. \nThe CSSFontFaceRule interface"},{"refs":[{"id":"ref-for-Exposed\u2461"},{"id":"ref-for-Exposed\u2462"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"},{"refs":[{"id":"ref-for-Exposed\u2463"}],"title":"12.3. \nThe CSSFontPaletteValuesRule interface"}],"url":"https://webidl.spec.whatwg.org/#Exposed"}, "8a427103": {"dfnID":"8a427103","dfnText":"<dashed-ident>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-dashed-ident"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"},{"refs":[{"id":"ref-for-typedef-dashed-ident\u2460"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"https://drafts.csswg.org/css-values-4/#typedef-dashed-ident"}, "8a82fda1": {"dfnID":"8a82fda1","dfnText":"||","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-any"},{"id":"ref-for-comb-any\u2460"},{"id":"ref-for-comb-any\u2461"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-comb-any\u2462"},{"id":"ref-for-comb-any\u2463"},{"id":"ref-for-comb-any\u2464"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"},{"refs":[{"id":"ref-for-comb-any\u2465"},{"id":"ref-for-comb-any\u2466"},{"id":"ref-for-comb-any\u2467"}],"title":"6.4. \nLigatures: the font-variant-ligatures property"},{"refs":[{"id":"ref-for-comb-any\u2468"},{"id":"ref-for-comb-any\u2460\u24ea"},{"id":"ref-for-comb-any\u2460\u2460"},{"id":"ref-for-comb-any\u2460\u2461"}],"title":"6.7. \nNumerical formatting: the font-variant-numeric property"},{"refs":[{"id":"ref-for-comb-any\u2460\u2462"},{"id":"ref-for-comb-any\u2460\u2463"},{"id":"ref-for-comb-any\u2460\u2464"},{"id":"ref-for-comb-any\u2460\u2465"},{"id":"ref-for-comb-any\u2460\u2466"},{"id":"ref-for-comb-any\u2460\u2467"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-comb-any\u2460\u2468"},{"id":"ref-for-comb-any\u2461\u24ea"}],"title":"6.10. \nEast Asian text rendering: the font-variant-east-asian property"},{"refs":[{"id":"ref-for-comb-any\u2461\u2460"},{"id":"ref-for-comb-any\u2461\u2461"},{"id":"ref-for-comb-any\u2461\u2462"},{"id":"ref-for-comb-any\u2461\u2463"},{"id":"ref-for-comb-any\u2461\u2464"},{"id":"ref-for-comb-any\u2461\u2465"},{"id":"ref-for-comb-any\u2461\u2466"},{"id":"ref-for-comb-any\u2461\u2467"},{"id":"ref-for-comb-any\u2461\u2468"},{"id":"ref-for-comb-any\u2462\u24ea"},{"id":"ref-for-comb-any\u2462\u2460"},{"id":"ref-for-comb-any\u2462\u2461"},{"id":"ref-for-comb-any\u2462\u2462"},{"id":"ref-for-comb-any\u2462\u2463"},{"id":"ref-for-comb-any\u2462\u2464"},{"id":"ref-for-comb-any\u2462\u2465"},{"id":"ref-for-comb-any\u2462\u2466"},{"id":"ref-for-comb-any\u2462\u2467"},{"id":"ref-for-comb-any\u2462\u2468"},{"id":"ref-for-comb-any\u2463\u24ea"},{"id":"ref-for-comb-any\u2463\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-any"}, "8f393f47": {"dfnID":"8f393f47","dfnText":"ascent metric","external":true,"refSections":[{"refs":[{"id":"ref-for-ascent-metric"},{"id":"ref-for-ascent-metric\u2460"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"}],"url":"https://drafts.csswg.org/css-inline-3/#ascent-metric"}, "91dcc557": {"dfnID":"91dcc557","dfnText":"font","external":true,"refSections":[{"refs":[{"id":"ref-for-font"}],"title":"2.5.1. \n\tAbsolute Size Keyword Mapping Table"}],"url":"https://html.spec.whatwg.org/multipage/obsolete.html#font"}, "9213678e": {"dfnID":"9213678e","dfnText":"<ident>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-ident"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"}],"url":"https://drafts.csswg.org/css-values-4/#typedef-ident"}, "938ba280": {"dfnID":"938ba280","dfnText":"{A,B}","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-num-range"},{"id":"ref-for-mult-num-range\u2460"},{"id":"ref-for-mult-num-range\u2461"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"https://drafts.csswg.org/css-values-4/#mult-num-range"}, "977d3003": {"dfnID":"977d3003","dfnText":"<string>","external":true,"refSections":[{"refs":[{"id":"ref-for-string-value"},{"id":"ref-for-string-value\u2460"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-string-value\u2461"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-string-value\u2462"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-string-value\u2463"},{"id":"ref-for-string-value\u2464"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"},{"refs":[{"id":"ref-for-string-value\u2465"}],"title":"4.10. \nDefault font language overriding: the font-language-override descriptor"},{"refs":[{"id":"ref-for-string-value\u2466"},{"id":"ref-for-string-value\u2467"}],"title":"6.13. Font language override: the font-language-override property"}],"url":"https://drafts.csswg.org/css-values-4/#string-value"}, "9cce47fd": {"dfnID":"9cce47fd","dfnText":"sequence","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-sequence"},{"id":"ref-for-idl-sequence\u2460"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"}],"url":"https://webidl.spec.whatwg.org/#idl-sequence"}, "9dc6ce48": {"dfnID":"9dc6ce48","dfnText":"identifier","external":true,"refSections":[{"refs":[{"id":"ref-for-css-css-identifier"}],"title":"6.9.1. Basic syntax"}],"url":"https://drafts.csswg.org/css-values-4/#css-css-identifier"}, "9f9120ff": {"dfnID":"9f9120ff","dfnText":",","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-comma"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-comb-comma\u2460"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-comma"}, "a33db89a": {"dfnID":"a33db89a","dfnText":"fetch","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-fetch"}],"title":"4.8.2. \nFont fetching requirements"}],"url":"https://fetch.spec.whatwg.org/#concept-fetch"}, "a5c91173": {"dfnID":"a5c91173","dfnText":"SameObject","external":true,"refSections":[{"refs":[{"id":"ref-for-SameObject"}],"title":"12.1. \nThe CSSFontFaceRule interface"}],"url":"https://webidl.spec.whatwg.org/#SameObject"}, "a82a20ef": {"dfnID":"a82a20ef","dfnText":"CSSStyleDeclaration","external":true,"refSections":[{"refs":[{"id":"ref-for-cssstyledeclaration"}],"title":"12.1. \nThe CSSFontFaceRule interface"}],"url":"https://drafts.csswg.org/cssom-1/#cssstyledeclaration"}, "a91f632a": {"dfnID":"a91f632a","dfnText":"legacy name alias","external":true,"refSections":[{"refs":[{"id":"ref-for-legacy-name-alias"}],"title":"2.3.1. \n\t\tFont width: the font-stretch legacy name alias"},{"refs":[{"id":"ref-for-legacy-name-alias\u2460"}],"title":"4.4.1. \n\t\tFont width: the font-stretch legacy name alias"}],"url":"https://drafts.csswg.org/css-cascade-5/#legacy-name-alias"}, "ac54fbff": {"dfnID":"ac54fbff","dfnText":"line-height","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-line-height"},{"id":"ref-for-propdef-line-height\u2460"},{"id":"ref-for-propdef-line-height\u2461"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"},{"refs":[{"id":"ref-for-propdef-line-height\u2462"},{"id":"ref-for-propdef-line-height\u2463"},{"id":"ref-for-propdef-line-height\u2464"},{"id":"ref-for-propdef-line-height\u2465"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-line-height\u2466"}],"title":"5.2. Matching font styles"}],"url":"https://drafts.csswg.org/css2/#propdef-line-height"}, "annotation": {"dfnID":"annotation","dfnText":"annotation(<feature-value-name>)","external":false,"refSections":[{"refs":[{"id":"ref-for-annotation"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#annotation"}, "aspect-ratio-value": {"dfnID":"aspect-ratio-value","dfnText":"<number [0,\u221e]>","external":false,"refSections":[],"url":"#aspect-ratio-value"}, "aspect-value": {"dfnID":"aspect-value","dfnText":"aspect value","external":false,"refSections":[{"refs":[{"id":"ref-for-aspect-value"},{"id":"ref-for-aspect-value\u2460"},{"id":"ref-for-aspect-value\u2461"},{"id":"ref-for-aspect-value\u2462"},{"id":"ref-for-aspect-value\u2463"},{"id":"ref-for-aspect-value\u2464"},{"id":"ref-for-aspect-value\u2465"},{"id":"ref-for-aspect-value\u2466"},{"id":"ref-for-aspect-value\u2467"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"}],"url":"#aspect-value"}, "at-font-face-rule": {"dfnID":"at-font-face-rule","dfnText":"@font-face","external":false,"refSections":[{"refs":[{"id":"ref-for-at-font-face-rule"}],"title":"3.1. \nIntroduction to Font Rendering Controls"},{"refs":[{"id":"ref-for-at-font-face-rule\u2460"},{"id":"ref-for-at-font-face-rule\u2461"},{"id":"ref-for-at-font-face-rule\u2462"},{"id":"ref-for-at-font-face-rule\u2463"},{"id":"ref-for-at-font-face-rule\u2464"},{"id":"ref-for-at-font-face-rule\u2465"},{"id":"ref-for-at-font-face-rule\u2466"},{"id":"ref-for-at-font-face-rule\u2467"},{"id":"ref-for-at-font-face-rule\u2468"},{"id":"ref-for-at-font-face-rule\u2460\u24ea"},{"id":"ref-for-at-font-face-rule\u2460\u2460"}],"title":"4.1. \nThe @font-face rule"},{"refs":[{"id":"ref-for-at-font-face-rule\u2460\u2461"}],"title":"4.2. Font family: the font-family descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2460\u2462"}],"title":"4.3. Font reference: the src descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2460\u2463"},{"id":"ref-for-at-font-face-rule\u2460\u2464"}],"title":"4.3.2. Loading an individual item in the src descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2460\u2465"},{"id":"ref-for-at-font-face-rule\u2460\u2466"}],"title":"4.3.3.1. Local font fallback"},{"refs":[{"id":"ref-for-at-font-face-rule\u2460\u2467"},{"id":"ref-for-at-font-face-rule\u2460\u2468"},{"id":"ref-for-at-font-face-rule\u2461\u24ea"},{"id":"ref-for-at-font-face-rule\u2461\u2460"},{"id":"ref-for-at-font-face-rule\u2461\u2461"},{"id":"ref-for-at-font-face-rule\u2461\u2462"},{"id":"ref-for-at-font-face-rule\u2461\u2463"},{"id":"ref-for-at-font-face-rule\u2461\u2464"},{"id":"ref-for-at-font-face-rule\u2461\u2465"},{"id":"ref-for-at-font-face-rule\u2461\u2466"},{"id":"ref-for-at-font-face-rule\u2461\u2467"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-at-font-face-rule\u2461\u2468"}],"title":"4.5. \nCharacter range: the unicode-range descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2462\u24ea"},{"id":"ref-for-at-font-face-rule\u2462\u2460"},{"id":"ref-for-at-font-face-rule\u2462\u2461"},{"id":"ref-for-at-font-face-rule\u2462\u2462"}],"title":"4.5.1. Using character ranges to define composite fonts"},{"refs":[{"id":"ref-for-at-font-face-rule\u2462\u2463"},{"id":"ref-for-at-font-face-rule\u2462\u2464"},{"id":"ref-for-at-font-face-rule\u2462\u2465"},{"id":"ref-for-at-font-face-rule\u2462\u2466"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-at-font-face-rule\u2462\u2467"},{"id":"ref-for-at-font-face-rule\u2462\u2468"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2463\u24ea"},{"id":"ref-for-at-font-face-rule\u2463\u2460"},{"id":"ref-for-at-font-face-rule\u2463\u2461"},{"id":"ref-for-at-font-face-rule\u2463\u2462"}],"title":"4.8.1. Font loading guidelines"},{"refs":[{"id":"ref-for-at-font-face-rule\u2463\u2463"}],"title":"4.8.2. \nFont fetching requirements"},{"refs":[{"id":"ref-for-at-font-face-rule\u2463\u2464"},{"id":"ref-for-at-font-face-rule\u2463\u2465"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2463\u2466"},{"id":"ref-for-at-font-face-rule\u2463\u2467"},{"id":"ref-for-at-font-face-rule\u2463\u2468"},{"id":"ref-for-at-font-face-rule\u2464\u24ea"}],"title":"4.9.1. \nControlling Font Display Per Font-Family via @font-feature-values"},{"refs":[{"id":"ref-for-at-font-face-rule\u2464\u2460"}],"title":"4.10. \nDefault font language overriding: the font-language-override descriptor"},{"refs":[{"id":"ref-for-at-font-face-rule\u2464\u2461"},{"id":"ref-for-at-font-face-rule\u2464\u2462"},{"id":"ref-for-at-font-face-rule\u2464\u2463"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"},{"refs":[{"id":"ref-for-at-font-face-rule\u2464\u2464"}],"title":"5.1. Localized name matching"},{"refs":[{"id":"ref-for-at-font-face-rule\u2464\u2465"},{"id":"ref-for-at-font-face-rule\u2464\u2466"},{"id":"ref-for-at-font-face-rule\u2464\u2467"},{"id":"ref-for-at-font-face-rule\u2464\u2468"},{"id":"ref-for-at-font-face-rule\u2465\u24ea"},{"id":"ref-for-at-font-face-rule\u2465\u2460"},{"id":"ref-for-at-font-face-rule\u2465\u2461"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-at-font-face-rule\u2465\u2462"}],"title":"7. \nFont Feature and Variation Resolution"},{"refs":[{"id":"ref-for-at-font-face-rule\u2465\u2463"},{"id":"ref-for-at-font-face-rule\u2465\u2464"},{"id":"ref-for-at-font-face-rule\u2465\u2465"},{"id":"ref-for-at-font-face-rule\u2465\u2466"},{"id":"ref-for-at-font-face-rule\u2465\u2467"},{"id":"ref-for-at-font-face-rule\u2465\u2468"},{"id":"ref-for-at-font-face-rule\u2466\u24ea"},{"id":"ref-for-at-font-face-rule\u2466\u2460"},{"id":"ref-for-at-font-face-rule\u2466\u2461"},{"id":"ref-for-at-font-face-rule\u2466\u2462"},{"id":"ref-for-at-font-face-rule\u2466\u2463"},{"id":"ref-for-at-font-face-rule\u2466\u2464"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-at-font-face-rule\u2466\u2465"},{"id":"ref-for-at-font-face-rule\u2466\u2466"}],"title":"7.3. \nFeature precedence examples"},{"refs":[{"id":"ref-for-at-font-face-rule\u2466\u2467"},{"id":"ref-for-at-font-face-rule\u2466\u2468"}],"title":"10.2. \nWeb Fonts"},{"refs":[{"id":"ref-for-at-font-face-rule\u2467\u24ea"},{"id":"ref-for-at-font-face-rule\u2467\u2460"}],"title":"11.1. Font tech"},{"refs":[{"id":"ref-for-at-font-face-rule\u2467\u2461"}],"title":"12. \nObject Model"},{"refs":[{"id":"ref-for-at-font-face-rule\u2467\u2462"}],"title":"12.1. \nThe CSSFontFaceRule interface"}],"url":"#at-font-face-rule"}, "at-ruledef-font-feature-values": {"dfnID":"at-ruledef-font-feature-values","dfnText":"@font-feature-values","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values"},{"id":"ref-for-at-ruledef-font-feature-values\u2460"},{"id":"ref-for-at-ruledef-font-feature-values\u2461"},{"id":"ref-for-at-ruledef-font-feature-values\u2462"}],"title":"4.9.1. \nControlling Font Display Per Font-Family via @font-feature-values"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values\u2463"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values\u2464"}],"title":"6.9. \nDefining font specific alternates: the @font-feature-values rule"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values\u2465"},{"id":"ref-for-at-ruledef-font-feature-values\u2466"},{"id":"ref-for-at-ruledef-font-feature-values\u2467"},{"id":"ref-for-at-ruledef-font-feature-values\u2468"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u24ea"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2460"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2461"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2462"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2463"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2464"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2465"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2466"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2467"},{"id":"ref-for-at-ruledef-font-feature-values\u2460\u2468"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values\u2461\u24ea"}],"title":"12. \nObject Model"}],"url":"#at-ruledef-font-feature-values"}, "at-ruledef-font-feature-values-annotation": {"dfnID":"at-ruledef-font-feature-values-annotation","dfnText":"@annotation","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-annotation"}],"title":"6.9.1. Basic syntax"}],"url":"#at-ruledef-font-feature-values-annotation"}, "at-ruledef-font-feature-values-character-variant": {"dfnID":"at-ruledef-font-feature-values-character-variant","dfnText":"@character-variant","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-character-variant"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-character-variant\u2460"},{"id":"ref-for-at-ruledef-font-feature-values-character-variant\u2461"}],"title":"6.9.2. \nMulti-valued feature value definitions"}],"url":"#at-ruledef-font-feature-values-character-variant"}, "at-ruledef-font-feature-values-historical-forms": {"dfnID":"at-ruledef-font-feature-values-historical-forms","dfnText":"@historical-forms","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-historical-forms"}],"title":"6.9.1. Basic syntax"}],"url":"#at-ruledef-font-feature-values-historical-forms"}, "at-ruledef-font-feature-values-ornaments": {"dfnID":"at-ruledef-font-feature-values-ornaments","dfnText":"@ornaments","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-ornaments"}],"title":"6.9.1. Basic syntax"}],"url":"#at-ruledef-font-feature-values-ornaments"}, "at-ruledef-font-feature-values-styleset": {"dfnID":"at-ruledef-font-feature-values-styleset","dfnText":"@styleset","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-styleset"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-styleset\u2460"}],"title":"6.9.2. \nMulti-valued feature value definitions"}],"url":"#at-ruledef-font-feature-values-styleset"}, "at-ruledef-font-feature-values-stylistic": {"dfnID":"at-ruledef-font-feature-values-stylistic","dfnText":"@stylistic","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-stylistic"}],"title":"6.9.1. Basic syntax"}],"url":"#at-ruledef-font-feature-values-stylistic"}, "at-ruledef-font-feature-values-swash": {"dfnID":"at-ruledef-font-feature-values-swash","dfnText":"@swash","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-feature-values-swash"}],"title":"6.9.1. Basic syntax"}],"url":"#at-ruledef-font-feature-values-swash"}, "at-ruledef-font-palette-values": {"dfnID":"at-ruledef-font-palette-values","dfnText":"@font-palette-values","external":false,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-font-palette-values"}],"title":"9. \nColor Font Support"},{"refs":[{"id":"ref-for-at-ruledef-font-palette-values\u2460"},{"id":"ref-for-at-ruledef-font-palette-values\u2461"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"},{"refs":[{"id":"ref-for-at-ruledef-font-palette-values\u2462"},{"id":"ref-for-at-ruledef-font-palette-values\u2463"},{"id":"ref-for-at-ruledef-font-palette-values\u2464"},{"id":"ref-for-at-ruledef-font-palette-values\u2465"},{"id":"ref-for-at-ruledef-font-palette-values\u2466"},{"id":"ref-for-at-ruledef-font-palette-values\u2467"},{"id":"ref-for-at-ruledef-font-palette-values\u2468"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u24ea"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2460"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2461"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2462"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2463"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2464"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2465"},{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2466"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"},{"refs":[{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2467"}],"title":"9.2.1. \nFont family: the font-family descriptor"},{"refs":[{"id":"ref-for-at-ruledef-font-palette-values\u2460\u2468"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u24ea"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2460"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2461"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2462"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2463"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2464"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2465"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2466"}],"title":"9.2.2. \nSpecifying the base palette: the base-palette descriptor"},{"refs":[{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2467"},{"id":"ref-for-at-ruledef-font-palette-values\u2461\u2468"},{"id":"ref-for-at-ruledef-font-palette-values\u2462\u24ea"}],"title":"9.2.3. \nOverriding a colors from a palette: The override-colors descriptor"}],"url":"#at-ruledef-font-palette-values"}, "b203675a": {"dfnID":"b203675a","dfnText":"getComputedStyle(elt)","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-window-getcomputedstyle"}],"title":"2.3. \nFont width: the font-width property"}],"url":"https://drafts.csswg.org/cssom-1/#dom-window-getcomputedstyle"}, "b553840d": {"dfnID":"b553840d","dfnText":"line gap metric","external":true,"refSections":[{"refs":[{"id":"ref-for-line-gap-metric"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"}],"url":"https://drafts.csswg.org/css-inline-3/#line-gap-metric"}, "bb886fc6": {"dfnID":"bb886fc6","dfnText":"block","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-display-block"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"}],"url":"https://drafts.csswg.org/css-display-4/#valdef-display-block"}, "bedd9d42": {"dfnID":"bedd9d42","dfnText":"+","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-one-plus"}],"title":"2.1.1. \nSyntax of <family-name>\n"}],"url":"https://drafts.csswg.org/css-values-4/#mult-one-plus"}, "c359ae51": {"dfnID":"c359ae51","dfnText":"upright typesetting","external":true,"refSections":[{"refs":[{"id":"ref-for-typeset-upright"}],"title":"6.3. \nKerning: the font-kerning property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#typeset-upright"}, "c373c5f8": {"dfnID":"c373c5f8","dfnText":"color-scheme","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-color-scheme"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-color-adjust-1/#propdef-color-scheme"}, "c388d253": {"dfnID":"c388d253","dfnText":"inherit","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-all-inherit"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-valdef-all-inherit\u2460"}],"title":"4.3.3.1. Local font fallback"}],"url":"https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit"}, "ca0abe12": {"dfnID":"ca0abe12","dfnText":"parse a list","external":true,"refSections":[{"refs":[{"id":"ref-for-css-parse-a-comma-separated-list-according-to-a-css-grammar"}],"title":"4.3.1. Parsing the src descriptor"}],"url":"https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar"}, "cacc0af2": {"dfnID":"cacc0af2","dfnText":"letter-spacing","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-letter-spacing"}],"title":"6.3. \nKerning: the font-kerning property"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2460"}],"title":"7.2. \nFeature and variation precedence"}],"url":"https://drafts.csswg.org/css-text-4/#propdef-letter-spacing"}, "cascaded-independently": {"dfnID":"cascaded-independently","dfnText":"Cascaded Independently","external":false,"refSections":[],"url":"#cascaded-independently"}, "cbc54f93": {"dfnID":"cbc54f93","dfnText":"text-transform","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-transform"}],"title":"6.6. \nCapitalization: the font-variant-caps property"}],"url":"https://drafts.csswg.org/css-text-4/#propdef-text-transform"}, "cfdf030c": {"dfnID":"cfdf030c","dfnText":"color-mix()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-color-mix"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-color-5/#funcdef-color-mix"}, "character-map": {"dfnID":"character-map","dfnText":"character map","external":false,"refSections":[{"refs":[{"id":"ref-for-character-map"},{"id":"ref-for-character-map\u2460"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-character-map\u2461"}],"title":"4.5. \nCharacter range: the unicode-range descriptor"},{"refs":[{"id":"ref-for-character-map\u2462"},{"id":"ref-for-character-map\u2463"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-character-map\u2464"},{"id":"ref-for-character-map\u2465"},{"id":"ref-for-character-map\u2466"},{"id":"ref-for-character-map\u2467"}],"title":"5.4. \nCharacter handling issues"},{"refs":[{"id":"ref-for-character-map\u2468"}],"title":"6.1. \nGlyph selection and positioning"},{"refs":[{"id":"ref-for-character-map\u2460\u24ea"},{"id":"ref-for-character-map\u2460\u2460"}],"title":"\nAppendix A: Mapping platform font properties to CSS properties"}],"url":"#character-map"}, "character-variant": {"dfnID":"character-variant","dfnText":"character-variant(<feature-value-name>#)","external":false,"refSections":[{"refs":[{"id":"ref-for-character-variant"}],"title":"6.9.2. \nMulti-valued feature value definitions"},{"refs":[{"id":"ref-for-character-variant\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#character-variant"}, "color-font-tech-values": {"dfnID":"color-font-tech-values","dfnText":"<color-font-tech>","external":false,"refSections":[{"refs":[{"id":"ref-for-color-font-tech-values"}],"title":"4.3.1. Parsing the src descriptor"}],"url":"#color-font-tech-values"}, "common-lig-values": {"dfnID":"common-lig-values","dfnText":"<common-lig-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-common-lig-values"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#common-lig-values"}, "composite-face": {"dfnID":"composite-face","dfnText":"composite face","external":false,"refSections":[],"url":"#composite-face"}, "contextual-alt-values": {"dfnID":"contextual-alt-values","dfnText":"<contextual-alt-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-contextual-alt-values"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#contextual-alt-values"}, "cssfontfacedescriptors": {"dfnID":"cssfontfacedescriptors","dfnText":"CSSFontFaceDescriptors","external":false,"refSections":[{"refs":[{"id":"ref-for-cssfontfacedescriptors"}],"title":"12.1. \nThe CSSFontFaceRule interface"}],"url":"#cssfontfacedescriptors"}, "cssfontfacerule": {"dfnID":"cssfontfacerule","dfnText":"CSSFontFaceRule","external":false,"refSections":[],"url":"#cssfontfacerule"}, "cssfontfacerule-interface": {"dfnID":"cssfontfacerule-interface","dfnText":"CSSFontFaceRule","external":false,"refSections":[],"url":"#cssfontfacerule-interface"}, "cssfontfeaturevaluesmap": {"dfnID":"cssfontfeaturevaluesmap","dfnText":"CSSFontFeatureValuesMap","external":false,"refSections":[{"refs":[{"id":"ref-for-cssfontfeaturevaluesmap"},{"id":"ref-for-cssfontfeaturevaluesmap\u2460"},{"id":"ref-for-cssfontfeaturevaluesmap\u2461"},{"id":"ref-for-cssfontfeaturevaluesmap\u2462"},{"id":"ref-for-cssfontfeaturevaluesmap\u2463"},{"id":"ref-for-cssfontfeaturevaluesmap\u2464"},{"id":"ref-for-cssfontfeaturevaluesmap\u2465"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"}],"url":"#cssfontfeaturevaluesmap"}, "cssfontfeaturevaluesrule": {"dfnID":"cssfontfeaturevaluesrule","dfnText":"CSSFontFeatureValuesRule","external":false,"refSections":[],"url":"#cssfontfeaturevaluesrule"}, "cssfontfeaturevaluesrule-dfn": {"dfnID":"cssfontfeaturevaluesrule-dfn","dfnText":"CSSFontFeatureValuesRule","external":false,"refSections":[],"url":"#cssfontfeaturevaluesrule-dfn"}, "cssfontpalettevaluesrule": {"dfnID":"cssfontpalettevaluesrule","dfnText":"CSSFontPaletteValuesRule","external":false,"refSections":[],"url":"#cssfontpalettevaluesrule"}, "d686638a": {"dfnID":"d686638a","dfnText":"<relative-size>","external":true,"refSections":[{"refs":[{"id":"ref-for-value-def-relative-size"},{"id":"ref-for-value-def-relative-size\u2460"},{"id":"ref-for-value-def-relative-size\u2461"}],"title":"2.5. \nFont size: the font-size property"}],"url":"https://drafts.csswg.org/css2/#value-def-relative-size"}, "dbba942a": {"dfnID":"dbba942a","dfnText":"var()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-var"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"https://drafts.csswg.org/css-variables-2/#funcdef-var"}, "de5d4ce1": {"dfnID":"de5d4ce1","dfnText":"absolute color","external":true,"refSections":[{"refs":[{"id":"ref-for-absolute-color"}],"title":"9.2.3. \nOverriding a colors from a palette: The override-colors descriptor"}],"url":"https://drafts.csswg.org/css-color-5/#absolute-color"}, "default-face": {"dfnID":"default-face","dfnText":"default face","external":false,"refSections":[],"url":"#default-face"}, "descdef-font-face-ascent-override": {"dfnID":"descdef-font-face-ascent-override","dfnText":"ascent-override","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-ascent-override"},{"id":"ref-for-descdef-font-face-ascent-override\u2460"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"}],"url":"#descdef-font-face-ascent-override"}, "descdef-font-face-descent-override": {"dfnID":"descdef-font-face-descent-override","dfnText":"descent-override","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-descent-override"},{"id":"ref-for-descdef-font-face-descent-override\u2460"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"}],"url":"#descdef-font-face-descent-override"}, "descdef-font-face-font-display": {"dfnID":"descdef-font-face-font-display","dfnText":"font-display","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-display"}],"title":"4.8.1. Font loading guidelines"},{"refs":[{"id":"ref-for-descdef-font-face-font-display\u2460"},{"id":"ref-for-descdef-font-face-font-display\u2461"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"},{"refs":[{"id":"ref-for-descdef-font-face-font-display\u2462"},{"id":"ref-for-descdef-font-face-font-display\u2463"}],"title":"4.9.1. \nControlling Font Display Per Font-Family via @font-feature-values"},{"refs":[{"id":"ref-for-descdef-font-face-font-display\u2464"}],"title":"17. \nAcknowledgments"}],"url":"#descdef-font-face-font-display"}, "descdef-font-face-font-family": {"dfnID":"descdef-font-face-font-family","dfnText":"font-family","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-family"}],"title":"4.2. Font family: the font-family descriptor"}],"url":"#descdef-font-face-font-family"}, "descdef-font-face-font-feature-settings": {"dfnID":"descdef-font-face-font-feature-settings","dfnText":"font-feature-settings","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-feature-settings"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-descdef-font-face-font-feature-settings\u2460"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#descdef-font-face-font-feature-settings"}, "descdef-font-face-font-language-override": {"dfnID":"descdef-font-face-font-language-override","dfnText":"font-language-override","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-language-override\u2460"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#descdef-font-face-font-language-override"}, "descdef-font-face-font-named-instance": {"dfnID":"descdef-font-face-font-named-instance","dfnText":"font-named-instance","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-named-instance"},{"id":"ref-for-descdef-font-face-font-named-instance\u2460"},{"id":"ref-for-descdef-font-face-font-named-instance\u2461"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"}],"url":"#descdef-font-face-font-named-instance"}, "descdef-font-face-font-style": {"dfnID":"descdef-font-face-font-style","dfnText":"font-style","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-style"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-descdef-font-face-font-style\u2460"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-descdef-font-face-font-style\u2461"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#descdef-font-face-font-style"}, "descdef-font-face-font-variation-settings": {"dfnID":"descdef-font-face-font-variation-settings","dfnText":"font-variation-settings","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-variation-settings"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-descdef-font-face-font-variation-settings\u2460"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#descdef-font-face-font-variation-settings"}, "descdef-font-face-font-weight": {"dfnID":"descdef-font-face-font-weight","dfnText":"font-weight","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-weight"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-descdef-font-face-font-weight\u2460"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#descdef-font-face-font-weight"}, "descdef-font-face-font-width": {"dfnID":"descdef-font-face-font-width","dfnText":"font-width","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-font-width"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-descdef-font-face-font-width\u2460"}],"title":"4.4.1. \n\t\tFont width: the font-stretch legacy name alias"},{"refs":[{"id":"ref-for-descdef-font-face-font-width\u2461"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#descdef-font-face-font-width"}, "descdef-font-face-line-gap-override": {"dfnID":"descdef-font-face-line-gap-override","dfnText":"line-gap-override","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-line-gap-override"},{"id":"ref-for-descdef-font-face-line-gap-override\u2460"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"}],"url":"#descdef-font-face-line-gap-override"}, "descdef-font-face-src": {"dfnID":"descdef-font-face-src","dfnText":"src","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-src"}],"title":"4.3. Font reference: the src descriptor"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2460"},{"id":"ref-for-descdef-font-face-src\u2461"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2462"}],"title":"4.3.2. Loading an individual item in the src descriptor"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2463"}],"title":"4.3.3. Selecting items in the src"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2464"}],"title":"4.3.3.1. Local font fallback"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2465"},{"id":"ref-for-descdef-font-face-src\u2466"}],"title":"4.8.2. \nFont fetching requirements"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2467"}],"title":"7.3. \nFeature precedence examples"},{"refs":[{"id":"ref-for-descdef-font-face-src\u2468"}],"title":"11.1. Font tech"}],"url":"#descdef-font-face-src"}, "descdef-font-face-unicode-range": {"dfnID":"descdef-font-face-unicode-range","dfnText":"unicode-range","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-face-unicode-range"},{"id":"ref-for-descdef-font-face-unicode-range\u2460"},{"id":"ref-for-descdef-font-face-unicode-range\u2461"},{"id":"ref-for-descdef-font-face-unicode-range\u2462"}],"title":"4.5. \nCharacter range: the unicode-range descriptor"},{"refs":[{"id":"ref-for-descdef-font-face-unicode-range\u2463"},{"id":"ref-for-descdef-font-face-unicode-range\u2464"},{"id":"ref-for-descdef-font-face-unicode-range\u2465"},{"id":"ref-for-descdef-font-face-unicode-range\u2466"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-descdef-font-face-unicode-range\u2467"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"}],"url":"#descdef-font-face-unicode-range"}, "descdef-font-feature-values-font-display": {"dfnID":"descdef-font-feature-values-font-display","dfnText":"font-display","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-feature-values-font-display"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"},{"refs":[{"id":"ref-for-descdef-font-feature-values-font-display\u2460"},{"id":"ref-for-descdef-font-feature-values-font-display\u2461"}],"title":"4.9.1. \nControlling Font Display Per Font-Family via @font-feature-values"},{"refs":[{"id":"ref-for-descdef-font-feature-values-font-display\u2462"}],"title":"6.9.1. Basic syntax"}],"url":"#descdef-font-feature-values-font-display"}, "descdef-font-palette-values-base-palette": {"dfnID":"descdef-font-palette-values-base-palette","dfnText":"base-palette","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-palette-values-base-palette"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"},{"refs":[{"id":"ref-for-descdef-font-palette-values-base-palette\u2460"}],"title":"9.2.2. \nSpecifying the base palette: the base-palette descriptor"}],"url":"#descdef-font-palette-values-base-palette"}, "descdef-font-palette-values-font-family": {"dfnID":"descdef-font-palette-values-font-family","dfnText":"font-family","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-palette-values-font-family"}],"title":"9.2. \nUser-defined font color palettes: The @font-palette-values rule"},{"refs":[{"id":"ref-for-descdef-font-palette-values-font-family\u2460"}],"title":"9.2.1. \nFont family: the font-family descriptor"}],"url":"#descdef-font-palette-values-font-family"}, "descdef-font-palette-values-override-colors": {"dfnID":"descdef-font-palette-values-override-colors","dfnText":"override-colors","external":false,"refSections":[{"refs":[{"id":"ref-for-descdef-font-palette-values-override-colors"},{"id":"ref-for-descdef-font-palette-values-override-colors\u2460"}],"title":"9.2.3. \nOverriding a colors from a palette: The override-colors descriptor"}],"url":"#descdef-font-palette-values-override-colors"}, "discretionary-lig-values": {"dfnID":"discretionary-lig-values","dfnText":"<discretionary-lig-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-discretionary-lig-values"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#discretionary-lig-values"}, "dom-cssfontfacedescriptors-ascent-override": {"dfnID":"dom-cssfontfacedescriptors-ascent-override","dfnText":"ascent-override","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-ascent-override"}, "dom-cssfontfacedescriptors-ascentoverride": {"dfnID":"dom-cssfontfacedescriptors-ascentoverride","dfnText":"ascentOverride","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-ascentoverride"}, "dom-cssfontfacedescriptors-descent-override": {"dfnID":"dom-cssfontfacedescriptors-descent-override","dfnText":"descent-override","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-descent-override"}, "dom-cssfontfacedescriptors-descentoverride": {"dfnID":"dom-cssfontfacedescriptors-descentoverride","dfnText":"descentOverride","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-descentoverride"}, "dom-cssfontfacedescriptors-font-display": {"dfnID":"dom-cssfontfacedescriptors-font-display","dfnText":"font-display","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-display"}, "dom-cssfontfacedescriptors-font-family": {"dfnID":"dom-cssfontfacedescriptors-font-family","dfnText":"font-family","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-family"}, "dom-cssfontfacedescriptors-font-feature-settings": {"dfnID":"dom-cssfontfacedescriptors-font-feature-settings","dfnText":"font-feature-settings","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-feature-settings"}, "dom-cssfontfacedescriptors-font-language-override": {"dfnID":"dom-cssfontfacedescriptors-font-language-override","dfnText":"font-language-override","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-language-override"}, "dom-cssfontfacedescriptors-font-named-instance": {"dfnID":"dom-cssfontfacedescriptors-font-named-instance","dfnText":"font-named-instance","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-named-instance"}, "dom-cssfontfacedescriptors-font-stretch": {"dfnID":"dom-cssfontfacedescriptors-font-stretch","dfnText":"font-stretch","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-stretch"}, "dom-cssfontfacedescriptors-font-style": {"dfnID":"dom-cssfontfacedescriptors-font-style","dfnText":"font-style","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-style"}, "dom-cssfontfacedescriptors-font-variation-settings": {"dfnID":"dom-cssfontfacedescriptors-font-variation-settings","dfnText":"font-variation-settings","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-variation-settings"}, "dom-cssfontfacedescriptors-font-weight": {"dfnID":"dom-cssfontfacedescriptors-font-weight","dfnText":"font-weight","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-weight"}, "dom-cssfontfacedescriptors-font-width": {"dfnID":"dom-cssfontfacedescriptors-font-width","dfnText":"font-width","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-font-width"}, "dom-cssfontfacedescriptors-fontdisplay": {"dfnID":"dom-cssfontfacedescriptors-fontdisplay","dfnText":"fontDisplay","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontdisplay"}, "dom-cssfontfacedescriptors-fontfamily": {"dfnID":"dom-cssfontfacedescriptors-fontfamily","dfnText":"fontFamily","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontfamily"}, "dom-cssfontfacedescriptors-fontfeaturesettings": {"dfnID":"dom-cssfontfacedescriptors-fontfeaturesettings","dfnText":"fontFeatureSettings","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontfeaturesettings"}, "dom-cssfontfacedescriptors-fontlanguageoverride": {"dfnID":"dom-cssfontfacedescriptors-fontlanguageoverride","dfnText":"fontLanguageOverride","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontlanguageoverride"}, "dom-cssfontfacedescriptors-fontnamedinstance": {"dfnID":"dom-cssfontfacedescriptors-fontnamedinstance","dfnText":"fontNamedInstance","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontnamedinstance"}, "dom-cssfontfacedescriptors-fontstretch": {"dfnID":"dom-cssfontfacedescriptors-fontstretch","dfnText":"fontStretch","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontstretch"}, "dom-cssfontfacedescriptors-fontstyle": {"dfnID":"dom-cssfontfacedescriptors-fontstyle","dfnText":"fontStyle","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontstyle"}, "dom-cssfontfacedescriptors-fontvariationsettings": {"dfnID":"dom-cssfontfacedescriptors-fontvariationsettings","dfnText":"fontVariationSettings","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontvariationsettings"}, "dom-cssfontfacedescriptors-fontweight": {"dfnID":"dom-cssfontfacedescriptors-fontweight","dfnText":"fontWeight","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontweight"}, "dom-cssfontfacedescriptors-fontwidth": {"dfnID":"dom-cssfontfacedescriptors-fontwidth","dfnText":"fontWidth","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-fontwidth"}, "dom-cssfontfacedescriptors-line-gap-override": {"dfnID":"dom-cssfontfacedescriptors-line-gap-override","dfnText":"line-gap-override","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-line-gap-override"}, "dom-cssfontfacedescriptors-linegapoverride": {"dfnID":"dom-cssfontfacedescriptors-linegapoverride","dfnText":"lineGapOverride","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-linegapoverride"}, "dom-cssfontfacedescriptors-src": {"dfnID":"dom-cssfontfacedescriptors-src","dfnText":"src","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-src"}, "dom-cssfontfacedescriptors-unicode-range": {"dfnID":"dom-cssfontfacedescriptors-unicode-range","dfnText":"unicode-range","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-unicode-range"}, "dom-cssfontfacedescriptors-unicoderange": {"dfnID":"dom-cssfontfacedescriptors-unicoderange","dfnText":"unicodeRange","external":false,"refSections":[],"url":"#dom-cssfontfacedescriptors-unicoderange"}, "dom-cssfontfacerule-style": {"dfnID":"dom-cssfontfacerule-style","dfnText":"style","external":false,"refSections":[],"url":"#dom-cssfontfacerule-style"}, "dom-cssfontfeaturevaluesmap-set": {"dfnID":"dom-cssfontfeaturevaluesmap-set","dfnText":"set","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesmap-set"}, "dom-cssfontfeaturevaluesmap-set-featurevaluename-values-featurevaluename": {"dfnID":"dom-cssfontfeaturevaluesmap-set-featurevaluename-values-featurevaluename","dfnText":"featureValueName","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesmap-set-featurevaluename-values-featurevaluename"}, "dom-cssfontfeaturevaluesmap-set-featurevaluename-values-values": {"dfnID":"dom-cssfontfeaturevaluesmap-set-featurevaluename-values-values","dfnText":"values","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesmap-set-featurevaluename-values-values"}, "dom-cssfontfeaturevaluesrule-annotation": {"dfnID":"dom-cssfontfeaturevaluesrule-annotation","dfnText":"annotation","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-annotation"}, "dom-cssfontfeaturevaluesrule-charactervariant": {"dfnID":"dom-cssfontfeaturevaluesrule-charactervariant","dfnText":"characterVariant","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-charactervariant"}, "dom-cssfontfeaturevaluesrule-fontfamily": {"dfnID":"dom-cssfontfeaturevaluesrule-fontfamily","dfnText":"fontFamily","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-fontfamily"}, "dom-cssfontfeaturevaluesrule-historicalforms": {"dfnID":"dom-cssfontfeaturevaluesrule-historicalforms","dfnText":"historicalForms","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-historicalforms"}, "dom-cssfontfeaturevaluesrule-ornaments": {"dfnID":"dom-cssfontfeaturevaluesrule-ornaments","dfnText":"ornaments","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-ornaments"}, "dom-cssfontfeaturevaluesrule-styleset": {"dfnID":"dom-cssfontfeaturevaluesrule-styleset","dfnText":"styleset","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-styleset"}, "dom-cssfontfeaturevaluesrule-stylistic": {"dfnID":"dom-cssfontfeaturevaluesrule-stylistic","dfnText":"stylistic","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-stylistic"}, "dom-cssfontfeaturevaluesrule-swash": {"dfnID":"dom-cssfontfeaturevaluesrule-swash","dfnText":"swash","external":false,"refSections":[],"url":"#dom-cssfontfeaturevaluesrule-swash"}, "dom-cssfontpalettevaluesrule-basepalette": {"dfnID":"dom-cssfontpalettevaluesrule-basepalette","dfnText":"basePalette","external":false,"refSections":[],"url":"#dom-cssfontpalettevaluesrule-basepalette"}, "dom-cssfontpalettevaluesrule-fontfamily": {"dfnID":"dom-cssfontpalettevaluesrule-fontfamily","dfnText":"fontFamily","external":false,"refSections":[],"url":"#dom-cssfontpalettevaluesrule-fontfamily"}, "dom-cssfontpalettevaluesrule-name": {"dfnID":"dom-cssfontpalettevaluesrule-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-cssfontpalettevaluesrule-name"}, "dom-cssfontpalettevaluesrule-overridecolors": {"dfnID":"dom-cssfontpalettevaluesrule-overridecolors","dfnText":"overrideColors","external":false,"refSections":[],"url":"#dom-cssfontpalettevaluesrule-overridecolors"}, "dom-cssrule-font_feature_values_rule": {"dfnID":"dom-cssrule-font_feature_values_rule","dfnText":"FONT_FEATURE_VALUES_RULE","external":false,"refSections":[],"url":"#dom-cssrule-font_feature_values_rule"}, "e0ee1990": {"dfnID":"e0ee1990","dfnText":"ex","external":true,"refSections":[{"refs":[{"id":"ref-for-ex"}],"title":"5.2. Matching font styles"}],"url":"https://drafts.csswg.org/css-values-4/#ex"}, "e0f451e6": {"dfnID":"e0f451e6","dfnText":"sideways typesetting","external":true,"refSections":[{"refs":[{"id":"ref-for-typeset-sideways"}],"title":"6.3. \nKerning: the font-kerning property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways"}, "e274345c": {"dfnID":"e274345c","dfnText":"<custom-ident>","external":true,"refSections":[{"refs":[{"id":"ref-for-identifier-value"},{"id":"ref-for-identifier-value\u2460"}],"title":"2.1.1. \nSyntax of <family-name>\n"}],"url":"https://drafts.csswg.org/css-values-4/#identifier-value"}, "e2e08d07": {"dfnID":"e2e08d07","dfnText":"transform","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-transform"}],"title":"8.1. \nOptical sizing control: the font-optical-sizing property"}],"url":"https://drafts.csswg.org/css-transforms-1/#propdef-transform"}, "e4ffca7f": {"dfnID":"e4ffca7f","dfnText":"declarations","external":true,"refSections":[{"refs":[{"id":"ref-for-cssstyledeclaration-declarations"}],"title":"6.9.1. Basic syntax"}],"url":"https://drafts.csswg.org/cssom-1/#cssstyledeclaration-declarations"}, "e8bcf956": {"dfnID":"e8bcf956","dfnText":"rem","external":true,"refSections":[{"refs":[{"id":"ref-for-rem"}],"title":"2.5. \nFont size: the font-size property"}],"url":"https://drafts.csswg.org/css-values-4/#rem"}, "e8ff0bb4": {"dfnID":"e8ff0bb4","dfnText":"em","external":true,"refSections":[{"refs":[{"id":"ref-for-em"}],"title":"2.5. \nFont size: the font-size property"},{"refs":[{"id":"ref-for-em\u2460"}],"title":"5.2. Matching font styles"}],"url":"https://drafts.csswg.org/css-values-4/#em"}, "e97a9688": {"dfnID":"e97a9688","dfnText":"unsigned long","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-unsigned-long"},{"id":"ref-for-idl-unsigned-long\u2460"},{"id":"ref-for-idl-unsigned-long\u2461"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"}],"url":"https://webidl.spec.whatwg.org/#idl-unsigned-long"}, "ea663a43": {"dfnID":"ea663a43","dfnText":"containing block","external":true,"refSections":[{"refs":[{"id":"ref-for-containing-block"}],"title":"2.5. \nFont size: the font-size property"}],"url":"https://drafts.csswg.org/css-display-4/#containing-block"}, "east-asian-variant-values": {"dfnID":"east-asian-variant-values","dfnText":"<east-asian-variant-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-east-asian-variant-values"}],"title":"6.10. \nEast Asian text rendering: the font-variant-east-asian property"},{"refs":[{"id":"ref-for-east-asian-variant-values\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#east-asian-variant-values"}, "east-asian-width-values": {"dfnID":"east-asian-width-values","dfnText":"<east-asian-width-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-east-asian-width-values"}],"title":"6.10. \nEast Asian text rendering: the font-variant-east-asian property"},{"refs":[{"id":"ref-for-east-asian-width-values\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#east-asian-width-values"}, "ebaeb088": {"dfnID":"ebaeb088","dfnText":"CSSRule","external":true,"refSections":[{"refs":[{"id":"ref-for-cssrule"}],"title":"12.1. \nThe CSSFontFaceRule interface"},{"refs":[{"id":"ref-for-cssrule\u2460"},{"id":"ref-for-cssrule\u2461"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"},{"refs":[{"id":"ref-for-cssrule\u2462"}],"title":"12.3. \nThe CSSFontPaletteValuesRule interface"}],"url":"https://drafts.csswg.org/cssom-1/#cssrule"}, "ee30bd68": {"dfnID":"ee30bd68","dfnText":"fetch a style resource","external":true,"refSections":[{"refs":[{"id":"ref-for-fetch-a-style-resource"}],"title":"4.8.2. \nFont fetching requirements"}],"url":"https://drafts.csswg.org/css-values-4/#fetch-a-style-resource"}, "ee7bba09": {"dfnID":"ee7bba09","dfnText":"response","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-response"}],"title":"4.8.2. \nFont fetching requirements"}],"url":"https://fetch.spec.whatwg.org/#concept-response"}, "ef9a1f56": {"dfnID":"ef9a1f56","dfnText":"<unicode-range-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-unicode-range-token"},{"id":"ref-for-typedef-unicode-range-token\u2460"},{"id":"ref-for-typedef-unicode-range-token\u2461"}],"title":"4.5. \nCharacter range: the unicode-range descriptor"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-unicode-range-token"}, "effective-character-map": {"dfnID":"effective-character-map","dfnText":"effective character map","external":false,"refSections":[],"url":"#effective-character-map"}, "emoji-presentation-participating-code-points": {"dfnID":"emoji-presentation-participating-code-points","dfnText":"Emoji Presentation Participating Code Points","external":false,"refSections":[],"url":"#emoji-presentation-participating-code-points"}, "f0809abc": {"dfnID":"f0809abc","dfnText":"&&","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-all"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-all"}, "fa293cdd": {"dfnID":"fa293cdd","dfnText":"<url>","external":true,"refSections":[{"refs":[{"id":"ref-for-url-value"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-url-value\u2460"}],"title":"4.8.2. \nFont fetching requirements"}],"url":"https://drafts.csswg.org/css-values-4/#url-value"}, "family-name-value": {"dfnID":"family-name-value","dfnText":"<family-name>","external":false,"refSections":[{"refs":[{"id":"ref-for-family-name-value"},{"id":"ref-for-family-name-value\u2460"},{"id":"ref-for-family-name-value\u2461"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-family-name-value\u2462"},{"id":"ref-for-family-name-value\u2463"},{"id":"ref-for-family-name-value\u2464"},{"id":"ref-for-family-name-value\u2465"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-family-name-value\u2466"}],"title":"2.1.5. \nGeneric font families"},{"refs":[{"id":"ref-for-family-name-value\u2467"}],"title":"4.2. Font family: the font-family descriptor"},{"refs":[{"id":"ref-for-family-name-value\u2468"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-family-name-value\u2460\u24ea"}],"title":"4.3.3.1. Local font fallback"},{"refs":[{"id":"ref-for-family-name-value\u2460\u2460"},{"id":"ref-for-family-name-value\u2460\u2461"},{"id":"ref-for-family-name-value\u2460\u2462"},{"id":"ref-for-family-name-value\u2460\u2463"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-family-name-value\u2460\u2464"}],"title":"9.2.1. \nFont family: the font-family descriptor"}],"url":"#family-name-value"}, "fb12b38c": {"dfnID":"fb12b38c","dfnText":"typographic mode","external":true,"refSections":[{"refs":[{"id":"ref-for-typographic-mode"},{"id":"ref-for-typographic-mode\u2460"}],"title":"6.3. \nKerning: the font-kerning property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#typographic-mode"}, "feature-tag-value": {"dfnID":"feature-tag-value","dfnText":"<feature-tag-value>","external":false,"refSections":[],"url":"#feature-tag-value"}, "feature-value-name-value": {"dfnID":"feature-value-name-value","dfnText":"<feature-value-name>","external":false,"refSections":[{"refs":[{"id":"ref-for-feature-value-name-value"},{"id":"ref-for-feature-value-name-value\u2460"},{"id":"ref-for-feature-value-name-value\u2461"},{"id":"ref-for-feature-value-name-value\u2462"},{"id":"ref-for-feature-value-name-value\u2463"},{"id":"ref-for-feature-value-name-value\u2464"},{"id":"ref-for-feature-value-name-value\u2465"},{"id":"ref-for-feature-value-name-value\u2466"},{"id":"ref-for-feature-value-name-value\u2467"},{"id":"ref-for-feature-value-name-value\u2468"},{"id":"ref-for-feature-value-name-value\u2460\u24ea"},{"id":"ref-for-feature-value-name-value\u2460\u2460"},{"id":"ref-for-feature-value-name-value\u2460\u2461"},{"id":"ref-for-feature-value-name-value\u2460\u2462"},{"id":"ref-for-feature-value-name-value\u2460\u2463"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-feature-value-name-value\u2460\u2464"},{"id":"ref-for-feature-value-name-value\u2460\u2465"},{"id":"ref-for-feature-value-name-value\u2460\u2466"},{"id":"ref-for-feature-value-name-value\u2460\u2467"},{"id":"ref-for-feature-value-name-value\u2460\u2468"},{"id":"ref-for-feature-value-name-value\u2461\u24ea"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#feature-value-name-value"}, "fetch-a-font": {"dfnID":"fetch-a-font","dfnText":"fetch a font","external":false,"refSections":[],"url":"#fetch-a-font"}, "first-available-font": {"dfnID":"first-available-font","dfnText":"first available font","external":false,"refSections":[],"url":"#first-available-font"}, "font-block-period": {"dfnID":"font-block-period","dfnText":"font block period","external":false,"refSections":[{"refs":[{"id":"ref-for-font-block-period"},{"id":"ref-for-font-block-period\u2460"},{"id":"ref-for-font-block-period\u2461"}],"title":"3.2. \nThe Font Display Timeline"},{"refs":[{"id":"ref-for-font-block-period\u2462"},{"id":"ref-for-font-block-period\u2463"},{"id":"ref-for-font-block-period\u2464"},{"id":"ref-for-font-block-period\u2465"},{"id":"ref-for-font-block-period\u2466"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"}],"url":"#font-block-period"}, "font-download-timer": {"dfnID":"font-download-timer","dfnText":"font download timer","external":false,"refSections":[],"url":"#font-download-timer"}, "font-face-font-stretch": {"dfnID":"font-face-font-stretch","dfnText":"font-stretch","external":false,"refSections":[],"url":"#font-face-font-stretch"}, "font-failure-period": {"dfnID":"font-failure-period","dfnText":"font failure period","external":false,"refSections":[{"refs":[{"id":"ref-for-font-failure-period"}],"title":"3.2. \nThe Font Display Timeline"}],"url":"#font-failure-period"}, "font-feature-settings-normal-value": {"dfnID":"font-feature-settings-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-feature-settings-normal-value"}, "font-feature-value-declaration": {"dfnID":"font-feature-value-declaration","dfnText":"font feature value declarations","external":false,"refSections":[{"refs":[{"id":"ref-for-font-feature-value-declaration"},{"id":"ref-for-font-feature-value-declaration\u2460"}],"title":"6.9.1. Basic syntax"}],"url":"#font-feature-value-declaration"}, "font-feature-values-font-feature-value-type": {"dfnID":"font-feature-values-font-feature-value-type","dfnText":"font-feature-value-type","external":false,"refSections":[],"url":"#font-feature-values-font-feature-value-type"}, "font-features-tech-values": {"dfnID":"font-features-tech-values","dfnText":"<font-features-tech>","external":false,"refSections":[{"refs":[{"id":"ref-for-font-features-tech-values"}],"title":"4.3.1. Parsing the src descriptor"}],"url":"#font-features-tech-values"}, "font-format-values": {"dfnID":"font-format-values","dfnText":"<font-format>","external":false,"refSections":[{"refs":[{"id":"ref-for-font-format-values"}],"title":"4.3.1. Parsing the src descriptor"},{"refs":[{"id":"ref-for-font-format-values\u2460"}],"title":"11.2. Font formats"}],"url":"#font-format-values"}, "font-kerning-auto-value": {"dfnID":"font-kerning-auto-value","dfnText":"auto","external":false,"refSections":[],"url":"#font-kerning-auto-value"}, "font-kerning-none-value": {"dfnID":"font-kerning-none-value","dfnText":"none","external":false,"refSections":[],"url":"#font-kerning-none-value"}, "font-kerning-normal-value": {"dfnID":"font-kerning-normal-value","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-font-kerning-normal-value"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#font-kerning-normal-value"}, "font-language-override-normal-value": {"dfnID":"font-language-override-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-language-override-normal-value"}, "font-language-override-string-value": {"dfnID":"font-language-override-string-value","dfnText":"<string>","external":false,"refSections":[],"url":"#font-language-override-string-value"}, "font-optical-sizing-auto-value": {"dfnID":"font-optical-sizing-auto-value","dfnText":"auto","external":false,"refSections":[],"url":"#font-optical-sizing-auto-value"}, "font-optical-sizing-none-value": {"dfnID":"font-optical-sizing-none-value","dfnText":"none","external":false,"refSections":[],"url":"#font-optical-sizing-none-value"}, "font-size-adjust-none-value": {"dfnID":"font-size-adjust-none-value","dfnText":"none","external":false,"refSections":[{"refs":[{"id":"ref-for-font-size-adjust-none-value"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"}],"url":"#font-size-adjust-none-value"}, "font-specific": {"dfnID":"font-specific","dfnText":"font specific","external":false,"refSections":[],"url":"#font-specific"}, "font-swap-period": {"dfnID":"font-swap-period","dfnText":"font swap period","external":false,"refSections":[{"refs":[{"id":"ref-for-font-swap-period"},{"id":"ref-for-font-swap-period\u2460"},{"id":"ref-for-font-swap-period\u2461"}],"title":"3.2. \nThe Font Display Timeline"},{"refs":[{"id":"ref-for-font-swap-period\u2462"},{"id":"ref-for-font-swap-period\u2463"},{"id":"ref-for-font-swap-period\u2464"},{"id":"ref-for-font-swap-period\u2465"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"}],"url":"#font-swap-period"}, "font-tech-values": {"dfnID":"font-tech-values","dfnText":"<font-tech>","external":false,"refSections":[{"refs":[{"id":"ref-for-font-tech-values"}],"title":"4.3.1. Parsing the src descriptor"}],"url":"#font-tech-values"}, "font-variant-alternates-normal-value": {"dfnID":"font-variant-alternates-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-variant-alternates-normal-value"}, "font-variant-caps-normal-value": {"dfnID":"font-variant-caps-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-variant-caps-normal-value"}, "font-variant-css21-values": {"dfnID":"font-variant-css21-values","dfnText":"<font-variant-css2>","external":false,"refSections":[{"refs":[{"id":"ref-for-font-variant-css21-values"},{"id":"ref-for-font-variant-css21-values\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#font-variant-css21-values"}, "font-variant-east-asian-normal-value": {"dfnID":"font-variant-east-asian-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-variant-east-asian-normal-value"}, "font-variant-ligatures-none-value": {"dfnID":"font-variant-ligatures-none-value","dfnText":"none","external":false,"refSections":[{"refs":[{"id":"ref-for-font-variant-ligatures-none-value"}],"title":"6.4. \nLigatures: the font-variant-ligatures property"}],"url":"#font-variant-ligatures-none-value"}, "font-variant-ligatures-normal-value": {"dfnID":"font-variant-ligatures-normal-value","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-font-variant-ligatures-normal-value"}],"title":"4.11. \nDefault font metrics overriding:\nthe ascent-override,\ndescent-override and\nline-gap-override descriptors"},{"refs":[{"id":"ref-for-font-variant-ligatures-normal-value\u2460"}],"title":"6.4. \nLigatures: the font-variant-ligatures property"}],"url":"#font-variant-ligatures-normal-value"}, "font-variant-none-value": {"dfnID":"font-variant-none-value","dfnText":"none","external":false,"refSections":[{"refs":[{"id":"ref-for-font-variant-none-value"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#font-variant-none-value"}, "font-variant-normal-value": {"dfnID":"font-variant-normal-value","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-font-variant-normal-value"},{"id":"ref-for-font-variant-normal-value\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#font-variant-normal-value"}, "font-variant-numeric-normal-value": {"dfnID":"font-variant-numeric-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-variant-numeric-normal-value"}, "font-variant-position-normal-value": {"dfnID":"font-variant-position-normal-value","dfnText":"normal","external":false,"refSections":[],"url":"#font-variant-position-normal-value"}, "font-weight-absolute-values": {"dfnID":"font-weight-absolute-values","dfnText":"<font-weight-absolute>","external":false,"refSections":[{"refs":[{"id":"ref-for-font-weight-absolute-values"}],"title":"2.2. Font weight: the font-weight property"},{"refs":[{"id":"ref-for-font-weight-absolute-values\u2460"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"#font-weight-absolute-values"}, "font-width-css3-values": {"dfnID":"font-width-css3-values","dfnText":"<font-width-css3>","external":false,"refSections":[{"refs":[{"id":"ref-for-font-width-css3-values"},{"id":"ref-for-font-width-css3-values\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#font-width-css3-values"}, "funcdef-palette-mix": {"dfnID":"funcdef-palette-mix","dfnText":"palette-mix()","external":false,"refSections":[{"refs":[{"id":"ref-for-funcdef-palette-mix"},{"id":"ref-for-funcdef-palette-mix\u2460"},{"id":"ref-for-funcdef-palette-mix\u2461"},{"id":"ref-for-funcdef-palette-mix\u2462"},{"id":"ref-for-funcdef-palette-mix\u2463"},{"id":"ref-for-funcdef-palette-mix\u2464"},{"id":"ref-for-funcdef-palette-mix\u2465"},{"id":"ref-for-funcdef-palette-mix\u2466"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"#funcdef-palette-mix"}, "historical-lig-values": {"dfnID":"historical-lig-values","dfnText":"<historical-lig-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-historical-lig-values"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#historical-lig-values"}, "installed-font-fallback": {"dfnID":"installed-font-fallback","dfnText":"installed font\nfallback","external":false,"refSections":[{"refs":[{"id":"ref-for-installed-font-fallback"}],"title":"5.3. \nCluster matching"},{"refs":[{"id":"ref-for-installed-font-fallback\u2460"}],"title":"5.4. \nCharacter handling issues"}],"url":"#installed-font-fallback"}, "numeric-figure-values": {"dfnID":"numeric-figure-values","dfnText":"<numeric-figure-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-numeric-figure-values"}],"title":"6.7. \nNumerical formatting: the font-variant-numeric property"},{"refs":[{"id":"ref-for-numeric-figure-values\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#numeric-figure-values"}, "numeric-fraction-values": {"dfnID":"numeric-fraction-values","dfnText":"<numeric-fraction-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-numeric-fraction-values"}],"title":"6.7. \nNumerical formatting: the font-variant-numeric property"},{"refs":[{"id":"ref-for-numeric-fraction-values\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#numeric-fraction-values"}, "numeric-spacing-values": {"dfnID":"numeric-spacing-values","dfnText":"<numeric-spacing-values>","external":false,"refSections":[{"refs":[{"id":"ref-for-numeric-spacing-values"}],"title":"6.7. \nNumerical formatting: the font-variant-numeric property"},{"refs":[{"id":"ref-for-numeric-spacing-values\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"}],"url":"#numeric-spacing-values"}, "ornaments": {"dfnID":"ornaments","dfnText":"ornaments(<feature-value-name>)","external":false,"refSections":[{"refs":[{"id":"ref-for-ornaments"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-ornaments\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#ornaments"}, "propdef-font": {"dfnID":"propdef-font","dfnText":"font","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font"},{"id":"ref-for-propdef-font\u2460"},{"id":"ref-for-propdef-font\u2461"},{"id":"ref-for-propdef-font\u2462"},{"id":"ref-for-propdef-font\u2463"},{"id":"ref-for-propdef-font\u2464"},{"id":"ref-for-propdef-font\u2465"},{"id":"ref-for-propdef-font\u2466"},{"id":"ref-for-propdef-font\u2467"},{"id":"ref-for-propdef-font\u2468"},{"id":"ref-for-propdef-font\u2460\u24ea"},{"id":"ref-for-propdef-font\u2460\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font\u2460\u2461"}],"title":"7. \nFont Feature and Variation Resolution"}],"url":"#propdef-font"}, "propdef-font-family": {"dfnID":"propdef-font-family","dfnText":"font-family","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-family"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-propdef-font-family\u2460"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-propdef-font-family\u2461"},{"id":"ref-for-propdef-font-family\u2462"},{"id":"ref-for-propdef-font-family\u2463"},{"id":"ref-for-propdef-font-family\u2464"},{"id":"ref-for-propdef-font-family\u2465"},{"id":"ref-for-propdef-font-family\u2466"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-family\u2467"}],"title":"3.2. \nThe Font Display Timeline"},{"refs":[{"id":"ref-for-propdef-font-family\u2468"}],"title":"4.8.1. Font loading guidelines"},{"refs":[{"id":"ref-for-propdef-font-family\u2460\u24ea"}],"title":"5.1. Localized name matching"},{"refs":[{"id":"ref-for-propdef-font-family\u2460\u2460"},{"id":"ref-for-propdef-font-family\u2460\u2461"},{"id":"ref-for-propdef-font-family\u2460\u2462"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-propdef-font-family\u2460\u2463"},{"id":"ref-for-propdef-font-family\u2460\u2464"}],"title":"5.4. \nCharacter handling issues"},{"refs":[{"id":"ref-for-propdef-font-family\u2460\u2465"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-propdef-font-family\u2460\u2466"}],"title":"10.3. \nPreinstalled Fonts and User-Installed Fonts"}],"url":"#propdef-font-family"}, "propdef-font-feature-settings": {"dfnID":"propdef-font-feature-settings","dfnText":"font-feature-settings","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-feature-settings"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2460"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2461"}],"title":"6.6. \nCapitalization: the font-variant-caps property"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2462"},{"id":"ref-for-propdef-font-feature-settings\u2463"}],"title":"6.9. \nDefining font specific alternates: the @font-feature-values rule"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2464"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2465"},{"id":"ref-for-propdef-font-feature-settings\u2466"},{"id":"ref-for-propdef-font-feature-settings\u2467"},{"id":"ref-for-propdef-font-feature-settings\u2468"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2460\u24ea"}],"title":"7. \nFont Feature and Variation Resolution"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2460\u2460"}],"title":"7.1. \nDefault features"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2460\u2461"},{"id":"ref-for-propdef-font-feature-settings\u2460\u2462"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-propdef-font-feature-settings\u2460\u2463"},{"id":"ref-for-propdef-font-feature-settings\u2460\u2464"},{"id":"ref-for-propdef-font-feature-settings\u2460\u2465"}],"title":"7.3. \nFeature precedence examples"}],"url":"#propdef-font-feature-settings"}, "propdef-font-kerning": {"dfnID":"propdef-font-kerning","dfnText":"font-kerning","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-kerning"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-kerning\u2460"}],"title":"6.3. \nKerning: the font-kerning property"},{"refs":[{"id":"ref-for-propdef-font-kerning\u2461"},{"id":"ref-for-propdef-font-kerning\u2462"},{"id":"ref-for-propdef-font-kerning\u2463"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-propdef-font-kerning\u2464"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#propdef-font-kerning"}, "propdef-font-language-override": {"dfnID":"propdef-font-language-override","dfnText":"font-language-override","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-language-override\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-language-override\u2461"},{"id":"ref-for-propdef-font-language-override\u2462"}],"title":"4.10. \nDefault font language overriding: the font-language-override descriptor"},{"refs":[{"id":"ref-for-propdef-font-language-override\u2463"}],"title":"6.2. \nLanguage-specific display"},{"refs":[{"id":"ref-for-propdef-font-language-override\u2464"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-language-override\u2465"},{"id":"ref-for-propdef-font-language-override\u2466"},{"id":"ref-for-propdef-font-language-override\u2467"}],"title":"6.13. Font language override: the font-language-override property"},{"refs":[{"id":"ref-for-propdef-font-language-override\u2468"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#propdef-font-language-override"}, "propdef-font-optical-sizing": {"dfnID":"propdef-font-optical-sizing","dfnText":"font-optical-sizing","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-optical-sizing"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-optical-sizing\u2460"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-propdef-font-optical-sizing\u2461"},{"id":"ref-for-propdef-font-optical-sizing\u2462"},{"id":"ref-for-propdef-font-optical-sizing\u2463"}],"title":"8.1. \nOptical sizing control: the font-optical-sizing property"},{"refs":[{"id":"ref-for-propdef-font-optical-sizing\u2464"},{"id":"ref-for-propdef-font-optical-sizing\u2465"},{"id":"ref-for-propdef-font-optical-sizing\u2466"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"#propdef-font-optical-sizing"}, "propdef-font-palette": {"dfnID":"propdef-font-palette","dfnText":"font-palette","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-palette"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-palette\u2460"}],"title":"9. \nColor Font Support"},{"refs":[{"id":"ref-for-propdef-font-palette\u2461"},{"id":"ref-for-propdef-font-palette\u2462"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"},{"refs":[{"id":"ref-for-propdef-font-palette\u2463"}],"title":"9.2.3. \nOverriding a colors from a palette: The override-colors descriptor"},{"refs":[{"id":"ref-for-propdef-font-palette\u2464"}],"title":"18.1. Changes from the 21 December 2021 Working Draft "}],"url":"#propdef-font-palette"}, "propdef-font-size": {"dfnID":"propdef-font-size","dfnText":"font-size","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-size"},{"id":"ref-for-propdef-font-size\u2460"},{"id":"ref-for-propdef-font-size\u2461"},{"id":"ref-for-propdef-font-size\u2462"},{"id":"ref-for-propdef-font-size\u2463"},{"id":"ref-for-propdef-font-size\u2464"}],"title":"2.5. \nFont size: the font-size property"},{"refs":[{"id":"ref-for-propdef-font-size\u2465"},{"id":"ref-for-propdef-font-size\u2466"},{"id":"ref-for-propdef-font-size\u2467"},{"id":"ref-for-propdef-font-size\u2468"},{"id":"ref-for-propdef-font-size\u2460\u24ea"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"},{"refs":[{"id":"ref-for-propdef-font-size\u2460\u2460"},{"id":"ref-for-propdef-font-size\u2460\u2461"},{"id":"ref-for-propdef-font-size\u2460\u2462"},{"id":"ref-for-propdef-font-size\u2460\u2463"},{"id":"ref-for-propdef-font-size\u2460\u2464"},{"id":"ref-for-propdef-font-size\u2460\u2465"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-size\u2460\u2466"},{"id":"ref-for-propdef-font-size\u2460\u2467"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-propdef-font-size\u2460\u2468"},{"id":"ref-for-propdef-font-size\u2461\u24ea"},{"id":"ref-for-propdef-font-size\u2461\u2460"}],"title":"8.1. \nOptical sizing control: the font-optical-sizing property"},{"refs":[{"id":"ref-for-propdef-font-size\u2461\u2461"}],"title":"18.2. Changes from the 29 July 2021 Working Draft "}],"url":"#propdef-font-size"}, "propdef-font-size-adjust": {"dfnID":"propdef-font-size-adjust","dfnText":"font-size-adjust","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-size-adjust"},{"id":"ref-for-propdef-font-size-adjust\u2460"},{"id":"ref-for-propdef-font-size-adjust\u2461"}],"title":"2.5. \nFont size: the font-size property"},{"refs":[{"id":"ref-for-propdef-font-size-adjust\u2462"},{"id":"ref-for-propdef-font-size-adjust\u2463"},{"id":"ref-for-propdef-font-size-adjust\u2464"},{"id":"ref-for-propdef-font-size-adjust\u2465"},{"id":"ref-for-propdef-font-size-adjust\u2466"},{"id":"ref-for-propdef-font-size-adjust\u2467"},{"id":"ref-for-propdef-font-size-adjust\u2468"},{"id":"ref-for-propdef-font-size-adjust\u2460\u24ea"},{"id":"ref-for-propdef-font-size-adjust\u2460\u2460"},{"id":"ref-for-propdef-font-size-adjust\u2460\u2461"},{"id":"ref-for-propdef-font-size-adjust\u2460\u2462"},{"id":"ref-for-propdef-font-size-adjust\u2460\u2463"}],"title":"2.6. \nRelative sizing: the font-size-adjust property"},{"refs":[{"id":"ref-for-propdef-font-size-adjust\u2460\u2464"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-size-adjust\u2460\u2465"}],"title":"8.1. \nOptical sizing control: the font-optical-sizing property"},{"refs":[{"id":"ref-for-propdef-font-size-adjust\u2460\u2466"}],"title":"18.4. Changes from the 13 November 2019\n\tWorking Draft"}],"url":"#propdef-font-size-adjust"}, "propdef-font-stretch": {"dfnID":"propdef-font-stretch","dfnText":"font-stretch","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-stretch"},{"id":"ref-for-propdef-font-stretch\u2460"},{"id":"ref-for-propdef-font-stretch\u2461"}],"title":"2.3.1. \n\t\tFont width: the font-stretch legacy name alias"},{"refs":[{"id":"ref-for-propdef-font-stretch\u2462"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#propdef-font-stretch"}, "propdef-font-style": {"dfnID":"propdef-font-style","dfnText":"font-style","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-style"}],"title":"2.1.4. \nRelationship Between Faces and Families\n"},{"refs":[{"id":"ref-for-propdef-font-style\u2460"},{"id":"ref-for-propdef-font-style\u2461"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-propdef-font-style\u2462"},{"id":"ref-for-propdef-font-style\u2463"},{"id":"ref-for-propdef-font-style\u2464"},{"id":"ref-for-propdef-font-style\u2465"},{"id":"ref-for-propdef-font-style\u2466"},{"id":"ref-for-propdef-font-style\u2467"},{"id":"ref-for-propdef-font-style\u2468"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-style\u2460\u24ea"},{"id":"ref-for-propdef-font-style\u2460\u2460"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-propdef-font-style\u2460\u2461"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"},{"refs":[{"id":"ref-for-propdef-font-style\u2460\u2462"},{"id":"ref-for-propdef-font-style\u2460\u2463"},{"id":"ref-for-propdef-font-style\u2460\u2464"},{"id":"ref-for-propdef-font-style\u2460\u2465"},{"id":"ref-for-propdef-font-style\u2460\u2466"},{"id":"ref-for-propdef-font-style\u2460\u2467"},{"id":"ref-for-propdef-font-style\u2460\u2468"},{"id":"ref-for-propdef-font-style\u2461\u24ea"},{"id":"ref-for-propdef-font-style\u2461\u2460"},{"id":"ref-for-propdef-font-style\u2461\u2461"},{"id":"ref-for-propdef-font-style\u2461\u2462"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-propdef-font-style\u2461\u2463"},{"id":"ref-for-propdef-font-style\u2461\u2464"},{"id":"ref-for-propdef-font-style\u2461\u2465"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-propdef-font-style\u2461\u2466"},{"id":"ref-for-propdef-font-style\u2461\u2467"},{"id":"ref-for-propdef-font-style\u2461\u2468"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"#propdef-font-style"}, "propdef-font-synthesis": {"dfnID":"propdef-font-synthesis","dfnText":"font-synthesis","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-synthesis"}],"title":"2.2.2. \nMissing weights"},{"refs":[{"id":"ref-for-propdef-font-synthesis\u2460"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-propdef-font-synthesis\u2461"}],"title":"2.8. \nControlling synthetic faces"},{"refs":[{"id":"ref-for-propdef-font-synthesis\u2462"},{"id":"ref-for-propdef-font-synthesis\u2463"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"},{"refs":[{"id":"ref-for-propdef-font-synthesis\u2464"},{"id":"ref-for-propdef-font-synthesis\u2465"}],"title":"5.2. Matching font styles"}],"url":"#propdef-font-synthesis"}, "propdef-font-synthesis-position": {"dfnID":"propdef-font-synthesis-position","dfnText":"font-synthesis-position","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-synthesis-position"}],"title":"2.8.4. \nControlling synthesized super- and subscripts: The font-synthesis-position property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-position\u2460"},{"id":"ref-for-propdef-font-synthesis-position\u2461"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"}],"url":"#propdef-font-synthesis-position"}, "propdef-font-synthesis-small-caps": {"dfnID":"propdef-font-synthesis-small-caps","dfnText":"font-synthesis-small-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-synthesis-small-caps"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-small-caps\u2460"}],"title":"2.8.3. \nControlling synthesized small caps: The font-synthesis-small-caps property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-small-caps\u2461"},{"id":"ref-for-propdef-font-synthesis-small-caps\u2462"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"}],"url":"#propdef-font-synthesis-small-caps"}, "propdef-font-synthesis-style": {"dfnID":"propdef-font-synthesis-style","dfnText":"font-synthesis-style","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-synthesis-style"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-style\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-style\u2461"}],"title":"2.8.2. \nControlling synthesized oblique: The font-synthesis-style property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-style\u2462"},{"id":"ref-for-propdef-font-synthesis-style\u2463"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"},{"refs":[{"id":"ref-for-propdef-font-synthesis-style\u2464"},{"id":"ref-for-propdef-font-synthesis-style\u2465"}],"title":"5.2. Matching font styles"}],"url":"#propdef-font-synthesis-style"}, "propdef-font-synthesis-weight": {"dfnID":"propdef-font-synthesis-weight","dfnText":"font-synthesis-weight","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-synthesis-weight"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-weight\u2460"}],"title":"2.8.1. \nControlling synthesized bold: The font-synthesis-weight property"},{"refs":[{"id":"ref-for-propdef-font-synthesis-weight\u2461"},{"id":"ref-for-propdef-font-synthesis-weight\u2462"}],"title":"2.8.5. \nControlling synthetic faces: the font-synthesis shorthand"}],"url":"#propdef-font-synthesis-weight"}, "propdef-font-variant": {"dfnID":"propdef-font-variant","dfnText":"font-variant","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant"},{"id":"ref-for-propdef-font-variant\u2460"},{"id":"ref-for-propdef-font-variant\u2461"},{"id":"ref-for-propdef-font-variant\u2462"},{"id":"ref-for-propdef-font-variant\u2463"},{"id":"ref-for-propdef-font-variant\u2464"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant\u2465"}],"title":"6. \nFont Feature Properties"},{"refs":[{"id":"ref-for-propdef-font-variant\u2466"}],"title":"6.1. \nGlyph selection and positioning"},{"refs":[{"id":"ref-for-propdef-font-variant\u2467"},{"id":"ref-for-propdef-font-variant\u2468"},{"id":"ref-for-propdef-font-variant\u2460\u24ea"},{"id":"ref-for-propdef-font-variant\u2460\u2460"},{"id":"ref-for-propdef-font-variant\u2460\u2461"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant\u2460\u2462"}],"title":"7. \nFont Feature and Variation Resolution"},{"refs":[{"id":"ref-for-propdef-font-variant\u2460\u2463"}],"title":"7.1. \nDefault features"},{"refs":[{"id":"ref-for-propdef-font-variant\u2460\u2464"},{"id":"ref-for-propdef-font-variant\u2460\u2465"},{"id":"ref-for-propdef-font-variant\u2460\u2466"},{"id":"ref-for-propdef-font-variant\u2460\u2467"}],"title":"7.2. \nFeature and variation precedence"}],"url":"#propdef-font-variant"}, "propdef-font-variant-alternates": {"dfnID":"propdef-font-variant-alternates","dfnText":"font-variant-alternates","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-alternates"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2460"}],"title":"6.8. \nAlternates and swashes: the font-variant-alternates property"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2461"}],"title":"6.9. \nDefining font specific alternates: the @font-feature-values rule"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2462"}],"title":"6.9.1. Basic syntax"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2463"}],"title":"6.9.2. \nMulti-valued feature value definitions"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2464"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2465"},{"id":"ref-for-propdef-font-variant-alternates\u2466"},{"id":"ref-for-propdef-font-variant-alternates\u2467"},{"id":"ref-for-propdef-font-variant-alternates\u2468"},{"id":"ref-for-propdef-font-variant-alternates\u2460\u24ea"},{"id":"ref-for-propdef-font-variant-alternates\u2460\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-propdef-font-variant-alternates\u2460\u2461"}],"title":"12.2. \nThe CSSFontFeatureValuesRule interface"}],"url":"#propdef-font-variant-alternates"}, "propdef-font-variant-caps": {"dfnID":"propdef-font-variant-caps","dfnText":"font-variant-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-caps"},{"id":"ref-for-propdef-font-variant-caps\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-caps\u2461"}],"title":"6.6. \nCapitalization: the font-variant-caps property"},{"refs":[{"id":"ref-for-propdef-font-variant-caps\u2462"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-caps\u2463"},{"id":"ref-for-propdef-font-variant-caps\u2464"},{"id":"ref-for-propdef-font-variant-caps\u2465"},{"id":"ref-for-propdef-font-variant-caps\u2466"},{"id":"ref-for-propdef-font-variant-caps\u2467"},{"id":"ref-for-propdef-font-variant-caps\u2468"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#propdef-font-variant-caps"}, "propdef-font-variant-east-asian": {"dfnID":"propdef-font-variant-east-asian","dfnText":"font-variant-east-asian","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-east-asian"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-east-asian\u2460"}],"title":"6.10. \nEast Asian text rendering: the font-variant-east-asian property"},{"refs":[{"id":"ref-for-propdef-font-variant-east-asian\u2461"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-east-asian\u2462"},{"id":"ref-for-propdef-font-variant-east-asian\u2463"},{"id":"ref-for-propdef-font-variant-east-asian\u2464"},{"id":"ref-for-propdef-font-variant-east-asian\u2465"},{"id":"ref-for-propdef-font-variant-east-asian\u2466"},{"id":"ref-for-propdef-font-variant-east-asian\u2467"},{"id":"ref-for-propdef-font-variant-east-asian\u2468"},{"id":"ref-for-propdef-font-variant-east-asian\u2460\u24ea"},{"id":"ref-for-propdef-font-variant-east-asian\u2460\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#propdef-font-variant-east-asian"}, "propdef-font-variant-emoji": {"dfnID":"propdef-font-variant-emoji","dfnText":"font-variant-emoji","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-emoji"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-emoji\u2460"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-emoji\u2461"},{"id":"ref-for-propdef-font-variant-emoji\u2462"},{"id":"ref-for-propdef-font-variant-emoji\u2463"},{"id":"ref-for-propdef-font-variant-emoji\u2464"},{"id":"ref-for-propdef-font-variant-emoji\u2465"},{"id":"ref-for-propdef-font-variant-emoji\u2466"}],"title":"9.3. \nSelecting the text presentation style: The font-variant-emoji property"}],"url":"#propdef-font-variant-emoji"}, "propdef-font-variant-ligatures": {"dfnID":"propdef-font-variant-ligatures","dfnText":"font-variant-ligatures","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-ligatures"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-ligatures\u2460"}],"title":"6.4. \nLigatures: the font-variant-ligatures property"},{"refs":[{"id":"ref-for-propdef-font-variant-ligatures\u2461"},{"id":"ref-for-propdef-font-variant-ligatures\u2462"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-ligatures\u2463"},{"id":"ref-for-propdef-font-variant-ligatures\u2464"},{"id":"ref-for-propdef-font-variant-ligatures\u2465"},{"id":"ref-for-propdef-font-variant-ligatures\u2466"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-propdef-font-variant-ligatures\u2467"}],"title":"7.1. \nDefault features"},{"refs":[{"id":"ref-for-propdef-font-variant-ligatures\u2468"},{"id":"ref-for-propdef-font-variant-ligatures\u2460\u24ea"}],"title":"7.3. \nFeature precedence examples"}],"url":"#propdef-font-variant-ligatures"}, "propdef-font-variant-numeric": {"dfnID":"propdef-font-variant-numeric","dfnText":"font-variant-numeric","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-numeric"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-numeric\u2460"}],"title":"6.7. \nNumerical formatting: the font-variant-numeric property"},{"refs":[{"id":"ref-for-propdef-font-variant-numeric\u2461"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-numeric\u2462"},{"id":"ref-for-propdef-font-variant-numeric\u2463"},{"id":"ref-for-propdef-font-variant-numeric\u2464"},{"id":"ref-for-propdef-font-variant-numeric\u2465"},{"id":"ref-for-propdef-font-variant-numeric\u2466"},{"id":"ref-for-propdef-font-variant-numeric\u2467"},{"id":"ref-for-propdef-font-variant-numeric\u2468"},{"id":"ref-for-propdef-font-variant-numeric\u2460\u24ea"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#propdef-font-variant-numeric"}, "propdef-font-variant-position": {"dfnID":"propdef-font-variant-position","dfnText":"font-variant-position","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variant-position\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variant-position\u2461"}],"title":"2.8.4. \nControlling synthesized super- and subscripts: The font-synthesis-position property"},{"refs":[{"id":"ref-for-propdef-font-variant-position\u2462"},{"id":"ref-for-propdef-font-variant-position\u2463"},{"id":"ref-for-propdef-font-variant-position\u2464"},{"id":"ref-for-propdef-font-variant-position\u2465"},{"id":"ref-for-propdef-font-variant-position\u2466"}],"title":"6.5. \nSubscript and superscript forms: the font-variant-position property"},{"refs":[{"id":"ref-for-propdef-font-variant-position\u2467"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variant-position\u2468"},{"id":"ref-for-propdef-font-variant-position\u2460\u24ea"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#propdef-font-variant-position"}, "propdef-font-variation-settings": {"dfnID":"propdef-font-variation-settings","dfnText":"font-variation-settings","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-variation-settings"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-variation-settings\u2460"}],"title":"4.6. \nFont features and variations: the font-feature-settings and font-variation-settings descriptors"},{"refs":[{"id":"ref-for-propdef-font-variation-settings\u2461"}],"title":"6.11. \nOverall shorthand for font rendering: the font-variant property"},{"refs":[{"id":"ref-for-propdef-font-variation-settings\u2462"}],"title":"7. \nFont Feature and Variation Resolution"},{"refs":[{"id":"ref-for-propdef-font-variation-settings\u2463"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-propdef-font-variation-settings\u2464"},{"id":"ref-for-propdef-font-variation-settings\u2465"},{"id":"ref-for-propdef-font-variation-settings\u2466"},{"id":"ref-for-propdef-font-variation-settings\u2467"},{"id":"ref-for-propdef-font-variation-settings\u2468"},{"id":"ref-for-propdef-font-variation-settings\u2460\u24ea"},{"id":"ref-for-propdef-font-variation-settings\u2460\u2460"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"#propdef-font-variation-settings"}, "propdef-font-weight": {"dfnID":"propdef-font-weight","dfnText":"font-weight","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-weight"}],"title":"2.1.4. \nRelationship Between Faces and Families\n"},{"refs":[{"id":"ref-for-propdef-font-weight\u2460"},{"id":"ref-for-propdef-font-weight\u2461"}],"title":"2.2. Font weight: the font-weight property"},{"refs":[{"id":"ref-for-propdef-font-weight\u2462"}],"title":"2.2.1. \nRelative Weights"},{"refs":[{"id":"ref-for-propdef-font-weight\u2463"},{"id":"ref-for-propdef-font-weight\u2464"},{"id":"ref-for-propdef-font-weight\u2465"},{"id":"ref-for-propdef-font-weight\u2466"},{"id":"ref-for-propdef-font-weight\u2467"},{"id":"ref-for-propdef-font-weight\u2468"},{"id":"ref-for-propdef-font-weight\u2460\u24ea"},{"id":"ref-for-propdef-font-weight\u2460\u2460"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-weight\u2460\u2461"},{"id":"ref-for-propdef-font-weight\u2460\u2462"},{"id":"ref-for-propdef-font-weight\u2460\u2463"},{"id":"ref-for-propdef-font-weight\u2460\u2464"},{"id":"ref-for-propdef-font-weight\u2460\u2465"},{"id":"ref-for-propdef-font-weight\u2460\u2466"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-propdef-font-weight\u2460\u2467"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"},{"refs":[{"id":"ref-for-propdef-font-weight\u2460\u2468"},{"id":"ref-for-propdef-font-weight\u2461\u24ea"},{"id":"ref-for-propdef-font-weight\u2461\u2460"},{"id":"ref-for-propdef-font-weight\u2461\u2461"},{"id":"ref-for-propdef-font-weight\u2461\u2462"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-propdef-font-weight\u2461\u2463"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-propdef-font-weight\u2461\u2464"},{"id":"ref-for-propdef-font-weight\u2461\u2465"},{"id":"ref-for-propdef-font-weight\u2461\u2466"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"#propdef-font-weight"}, "propdef-font-width": {"dfnID":"propdef-font-width","dfnText":"font-width","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-font-width"}],"title":"2.1.4. \nRelationship Between Faces and Families\n"},{"refs":[{"id":"ref-for-propdef-font-width\u2460"},{"id":"ref-for-propdef-font-width\u2461"}],"title":"2.3. \nFont width: the font-width property"},{"refs":[{"id":"ref-for-propdef-font-width\u2462"},{"id":"ref-for-propdef-font-width\u2463"},{"id":"ref-for-propdef-font-width\u2464"}],"title":"2.3.1. \n\t\tFont width: the font-stretch legacy name alias"},{"refs":[{"id":"ref-for-propdef-font-width\u2465"},{"id":"ref-for-propdef-font-width\u2466"},{"id":"ref-for-propdef-font-width\u2467"},{"id":"ref-for-propdef-font-width\u2468"},{"id":"ref-for-propdef-font-width\u2460\u24ea"},{"id":"ref-for-propdef-font-width\u2460\u2460"},{"id":"ref-for-propdef-font-width\u2460\u2461"},{"id":"ref-for-propdef-font-width\u2460\u2462"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-propdef-font-width\u2460\u2463"},{"id":"ref-for-propdef-font-width\u2460\u2464"},{"id":"ref-for-propdef-font-width\u2460\u2465"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-propdef-font-width\u2460\u2466"}],"title":"4.7. Using named instances from variable fonts: the font-named-instance descriptor"},{"refs":[{"id":"ref-for-propdef-font-width\u2460\u2467"},{"id":"ref-for-propdef-font-width\u2460\u2468"},{"id":"ref-for-propdef-font-width\u2461\u24ea"},{"id":"ref-for-propdef-font-width\u2461\u2460"},{"id":"ref-for-propdef-font-width\u2461\u2461"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-propdef-font-width\u2461\u2462"}],"title":"7.2. \nFeature and variation precedence"},{"refs":[{"id":"ref-for-propdef-font-width\u2461\u2463"},{"id":"ref-for-propdef-font-width\u2461\u2464"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"#propdef-font-width"}, "render-with-a-fallback-font-face": {"dfnID":"render-with-a-fallback-font-face","dfnText":"render with a fallback font face","external":false,"refSections":[{"refs":[{"id":"ref-for-render-with-a-fallback-font-face"},{"id":"ref-for-render-with-a-fallback-font-face\u2460"}],"title":"3.2. \nThe Font Display Timeline"}],"url":"#render-with-a-fallback-font-face"}, "render-with-an-invisible-fallback-font-face": {"dfnID":"render-with-an-invisible-fallback-font-face","dfnText":"render with an invisible fallback font face","external":false,"refSections":[{"refs":[{"id":"ref-for-render-with-an-invisible-fallback-font-face"}],"title":"3.2. \nThe Font Display Timeline"}],"url":"#render-with-an-invisible-fallback-font-face"}, "reset-implicitly": {"dfnID":"reset-implicitly","dfnText":"Reset Implicitly","external":false,"refSections":[{"refs":[{"id":"ref-for-reset-implicitly"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#reset-implicitly"}, "set-explicitly": {"dfnID":"set-explicitly","dfnText":"Set Explicitly","external":false,"refSections":[{"refs":[{"id":"ref-for-set-explicitly"},{"id":"ref-for-set-explicitly\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#set-explicitly"}, "styleset": {"dfnID":"styleset","dfnText":"styleset(<feature-value-name>#)","external":false,"refSections":[{"refs":[{"id":"ref-for-styleset"}],"title":"6.9.2. \nMulti-valued feature value definitions"}],"url":"#styleset"}, "stylistic": {"dfnID":"stylistic","dfnText":"stylistic(<feature-value-name>)","external":false,"refSections":[{"refs":[{"id":"ref-for-stylistic"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#stylistic"}, "support": {"dfnID":"support","dfnText":"support","external":false,"refSections":[{"refs":[{"id":"ref-for-support"},{"id":"ref-for-support\u2460"},{"id":"ref-for-support\u2461"},{"id":"ref-for-support\u2462"}],"title":"5.3. \nCluster matching"}],"url":"#support"}, "swash": {"dfnID":"swash","dfnText":"swash(<feature-value-name>)","external":false,"refSections":[{"refs":[{"id":"ref-for-swash"}],"title":"6.9.2. \nMulti-valued feature value definitions"},{"refs":[{"id":"ref-for-swash\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#swash"}, "system-family-name-value": {"dfnID":"system-family-name-value","dfnText":"<system-family-name>","external":false,"refSections":[{"refs":[{"id":"ref-for-system-family-name-value"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-system-family-name-value\u2460"},{"id":"ref-for-system-family-name-value\u2461"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"},{"refs":[{"id":"ref-for-system-family-name-value\u2462"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#system-family-name-value"}, "typedef-base-palette-integer": {"dfnID":"typedef-base-palette-integer","dfnText":"<integer>","external":false,"refSections":[],"url":"#typedef-base-palette-integer"}, "typedef-font-palette-palette-identifier": {"dfnID":"typedef-font-palette-palette-identifier","dfnText":"<palette-identifier>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-font-palette-palette-identifier"},{"id":"ref-for-typedef-font-palette-palette-identifier\u2460"},{"id":"ref-for-typedef-font-palette-palette-identifier\u2461"},{"id":"ref-for-typedef-font-palette-palette-identifier\u2462"},{"id":"ref-for-typedef-font-palette-palette-identifier\u2463"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"#typedef-font-palette-palette-identifier"}, "typedef-font-palette-palette-mix": {"dfnID":"typedef-font-palette-palette-mix","dfnText":"<palette-mix()>","external":false,"refSections":[],"url":"#typedef-font-palette-palette-mix"}, "typedef-font-src": {"dfnID":"typedef-font-src","dfnText":"<font-src>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-font-src"}],"title":"4.3.1. Parsing the src descriptor"}],"url":"#typedef-font-src"}, "typedef-font-src-list": {"dfnID":"typedef-font-src-list","dfnText":"<font-src-list>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-font-src-list"}],"title":"4.3. Font reference: the src descriptor"},{"refs":[{"id":"ref-for-typedef-font-src-list\u2460"}],"title":"4.3.1. Parsing the src descriptor"}],"url":"#typedef-font-src-list"}, "typedef-generic-complete": {"dfnID":"typedef-generic-complete","dfnText":"<generic-complete>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-generic-complete"},{"id":"ref-for-typedef-generic-complete\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"}],"url":"#typedef-generic-complete"}, "typedef-generic-family": {"dfnID":"typedef-generic-family","dfnText":"<generic-family>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-generic-family"},{"id":"ref-for-typedef-generic-family\u2460"},{"id":"ref-for-typedef-generic-family\u2461"},{"id":"ref-for-typedef-generic-family\u2462"},{"id":"ref-for-typedef-generic-family\u2463"},{"id":"ref-for-typedef-generic-family\u2464"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-typedef-generic-family\u2465"},{"id":"ref-for-typedef-generic-family\u2466"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-typedef-generic-family\u2467"},{"id":"ref-for-typedef-generic-family\u2468"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-typedef-generic-family\u2460\u24ea"}],"title":"4.3.3.1. Local font fallback"}],"url":"#typedef-generic-family"}, "typedef-generic-incomplete": {"dfnID":"typedef-generic-incomplete","dfnText":"<generic-incomplete>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-generic-incomplete"},{"id":"ref-for-typedef-generic-incomplete\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"}],"url":"#typedef-generic-incomplete"}, "typedef-generic-script-specific": {"dfnID":"typedef-generic-script-specific","dfnText":"<generic-script-specific>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-generic-script-specific"},{"id":"ref-for-typedef-generic-script-specific\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"}],"url":"#typedef-generic-script-specific"}, "typedef-opentype-tag": {"dfnID":"typedef-opentype-tag","dfnText":"<opentype-tag>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-opentype-tag"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"},{"refs":[{"id":"ref-for-typedef-opentype-tag\u2460"},{"id":"ref-for-typedef-opentype-tag\u2461"}],"title":"8.2. \nLow-level font variation settings control: the font-variation-settings property"}],"url":"#typedef-opentype-tag"}, "valdef-base-palette-dark": {"dfnID":"valdef-base-palette-dark","dfnText":"dark","external":false,"refSections":[],"url":"#valdef-base-palette-dark"}, "valdef-base-palette-light": {"dfnID":"valdef-base-palette-light","dfnText":"light","external":false,"refSections":[],"url":"#valdef-base-palette-light"}, "valdef-font-caption": {"dfnID":"valdef-font-caption","dfnText":"caption","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-caption"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"},{"refs":[{"id":"ref-for-valdef-font-caption\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#valdef-font-caption"}, "valdef-font-face-font-display-auto": {"dfnID":"valdef-font-face-font-display-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-font-face-font-display-auto"}, "valdef-font-face-font-display-block": {"dfnID":"valdef-font-face-font-display-block","dfnText":"block","external":false,"refSections":[],"url":"#valdef-font-face-font-display-block"}, "valdef-font-face-font-display-fallback": {"dfnID":"valdef-font-face-font-display-fallback","dfnText":"fallback","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-face-font-display-fallback"}],"title":"3.2. \nThe Font Display Timeline"},{"refs":[{"id":"ref-for-valdef-font-face-font-display-fallback\u2460"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"}],"url":"#valdef-font-face-font-display-fallback"}, "valdef-font-face-font-display-optional": {"dfnID":"valdef-font-face-font-display-optional","dfnText":"optional","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-face-font-display-optional"}],"title":"3.2. \nThe Font Display Timeline"},{"refs":[{"id":"ref-for-valdef-font-face-font-display-optional\u2460"},{"id":"ref-for-valdef-font-face-font-display-optional\u2461"},{"id":"ref-for-valdef-font-face-font-display-optional\u2462"},{"id":"ref-for-valdef-font-face-font-display-optional\u2463"},{"id":"ref-for-valdef-font-face-font-display-optional\u2464"},{"id":"ref-for-valdef-font-face-font-display-optional\u2465"}],"title":"4.9. \nControlling Font Display Per Font-Face: the font-display descriptor"},{"refs":[{"id":"ref-for-valdef-font-face-font-display-optional\u2466"}],"title":"18.3. Changes from the 17 November 2020 Working Draft "}],"url":"#valdef-font-face-font-display-optional"}, "valdef-font-face-font-display-swap": {"dfnID":"valdef-font-face-font-display-swap","dfnText":"swap","external":false,"refSections":[],"url":"#valdef-font-face-font-display-swap"}, "valdef-font-family-cursive": {"dfnID":"valdef-font-family-cursive","dfnText":"cursive","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-cursive"}],"title":"2.1.2. \nSyntax of <generic-family>\n"}],"url":"#valdef-font-family-cursive"}, "valdef-font-family-fantasy": {"dfnID":"valdef-font-family-fantasy","dfnText":"fantasy","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-fantasy"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-fantasy\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#valdef-font-family-fantasy"}, "valdef-font-family-generic-fangsong": {"dfnID":"valdef-font-family-generic-fangsong","dfnText":"generic(fangsong)","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-generic-fangsong"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-valdef-font-family-generic-fangsong\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-generic-fangsong\u2461"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-generic-fangsong"}, "valdef-font-family-generic-kai": {"dfnID":"valdef-font-family-generic-kai","dfnText":"generic(kai)","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-generic-kai"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-generic-kai\u2460"},{"id":"ref-for-valdef-font-family-generic-kai\u2461"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-generic-kai"}, "valdef-font-family-generic-nastaliq": {"dfnID":"valdef-font-family-generic-nastaliq","dfnText":"generic(nastaliq)","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-generic-nastaliq"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-generic-nastaliq\u2460"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-generic-nastaliq"}, "valdef-font-family-math": {"dfnID":"valdef-font-family-math","dfnText":"math","external":false,"refSections":[],"url":"#valdef-font-family-math"}, "valdef-font-family-monospace": {"dfnID":"valdef-font-family-monospace","dfnText":"monospace","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-monospace"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-monospace\u2460"},{"id":"ref-for-valdef-font-family-monospace\u2461"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-monospace"}, "valdef-font-family-sans-serif": {"dfnID":"valdef-font-family-sans-serif","dfnText":"sans-serif","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-sans-serif"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-valdef-font-family-sans-serif\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-sans-serif\u2461"},{"id":"ref-for-valdef-font-family-sans-serif\u2462"},{"id":"ref-for-valdef-font-family-sans-serif\u2463"},{"id":"ref-for-valdef-font-family-sans-serif\u2464"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-sans-serif"}, "valdef-font-family-serif": {"dfnID":"valdef-font-family-serif","dfnText":"serif","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-serif"}],"title":"2.1.1. \nSyntax of <family-name>\n"},{"refs":[{"id":"ref-for-valdef-font-family-serif\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-serif\u2461"},{"id":"ref-for-valdef-font-family-serif\u2462"},{"id":"ref-for-valdef-font-family-serif\u2463"},{"id":"ref-for-valdef-font-family-serif\u2464"},{"id":"ref-for-valdef-font-family-serif\u2465"},{"id":"ref-for-valdef-font-family-serif\u2466"}],"title":"2.1.5. \nGeneric font families"},{"refs":[{"id":"ref-for-valdef-font-family-serif\u2467"}],"title":"4.3.3.1. Local font fallback"}],"url":"#valdef-font-family-serif"}, "valdef-font-family-system-ui": {"dfnID":"valdef-font-family-system-ui","dfnText":"system-ui","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-system-ui"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-system-ui\u2460"},{"id":"ref-for-valdef-font-family-system-ui\u2461"},{"id":"ref-for-valdef-font-family-system-ui\u2462"}],"title":"2.1.5. \nGeneric font families"},{"refs":[{"id":"ref-for-valdef-font-family-system-ui\u2463"}],"title":"10.4. \nSystem Font"},{"refs":[{"id":"ref-for-valdef-font-family-system-ui\u2464"}],"title":"15.6. What information from the underlying platform, e.g. configuration data, is exposed by this specification to an origin? "}],"url":"#valdef-font-family-system-ui"}, "valdef-font-family-ui-monospace": {"dfnID":"valdef-font-family-ui-monospace","dfnText":"ui-monospace","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-ui-monospace"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-ui-monospace\u2460"},{"id":"ref-for-valdef-font-family-ui-monospace\u2461"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-ui-monospace"}, "valdef-font-family-ui-rounded": {"dfnID":"valdef-font-family-ui-rounded","dfnText":"ui-rounded","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-ui-rounded"}],"title":"2.1. \nFont family: the font-family property"},{"refs":[{"id":"ref-for-valdef-font-family-ui-rounded\u2460"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-ui-rounded\u2461"},{"id":"ref-for-valdef-font-family-ui-rounded\u2462"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-ui-rounded"}, "valdef-font-family-ui-sans-serif": {"dfnID":"valdef-font-family-ui-sans-serif","dfnText":"ui-sans-serif","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-ui-sans-serif"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-ui-sans-serif\u2460"},{"id":"ref-for-valdef-font-family-ui-sans-serif\u2461"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-ui-sans-serif"}, "valdef-font-family-ui-serif": {"dfnID":"valdef-font-family-ui-serif","dfnText":"ui-serif","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-family-ui-serif"}],"title":"2.1.2. \nSyntax of <generic-family>\n"},{"refs":[{"id":"ref-for-valdef-font-family-ui-serif\u2460"},{"id":"ref-for-valdef-font-family-ui-serif\u2461"}],"title":"2.1.5. \nGeneric font families"}],"url":"#valdef-font-family-ui-serif"}, "valdef-font-icon": {"dfnID":"valdef-font-icon","dfnText":"icon","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-icon"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"}],"url":"#valdef-font-icon"}, "valdef-font-menu": {"dfnID":"valdef-font-menu","dfnText":"menu","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-menu"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"}],"url":"#valdef-font-menu"}, "valdef-font-message-box": {"dfnID":"valdef-font-message-box","dfnText":"message-box","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-message-box"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"}],"url":"#valdef-font-message-box"}, "valdef-font-palette-dark": {"dfnID":"valdef-font-palette-dark","dfnText":"dark","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-palette-dark"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"#valdef-font-palette-dark"}, "valdef-font-palette-light": {"dfnID":"valdef-font-palette-light","dfnText":"light","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-palette-light"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"#valdef-font-palette-light"}, "valdef-font-palette-normal": {"dfnID":"valdef-font-palette-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-palette-normal"},{"id":"ref-for-valdef-font-palette-normal\u2460"},{"id":"ref-for-valdef-font-palette-normal\u2461"},{"id":"ref-for-valdef-font-palette-normal\u2462"},{"id":"ref-for-valdef-font-palette-normal\u2463"}],"title":"9.1. \nControlling Color Font Palettes: The font-palette property"}],"url":"#valdef-font-palette-normal"}, "valdef-font-size-absolute-size": {"dfnID":"valdef-font-size-absolute-size","dfnText":"<absolute-size>","external":false,"refSections":[],"url":"#valdef-font-size-absolute-size"}, "valdef-font-size-length-percentage-0": {"dfnID":"valdef-font-size-length-percentage-0","dfnText":"<length-percentage [0,\u221e]>","external":false,"refSections":[],"url":"#valdef-font-size-length-percentage-0"}, "valdef-font-size-math": {"dfnID":"valdef-font-size-math","dfnText":"math","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-size-math"}],"title":"2.1.2. \nSyntax of <generic-family>\n"}],"url":"#valdef-font-size-math"}, "valdef-font-size-relative-size": {"dfnID":"valdef-font-size-relative-size","dfnText":"<relative-size>","external":false,"refSections":[],"url":"#valdef-font-size-relative-size"}, "valdef-font-small-caption": {"dfnID":"valdef-font-small-caption","dfnText":"small-caption","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-small-caption"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"},{"refs":[{"id":"ref-for-valdef-font-small-caption\u2460"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#valdef-font-small-caption"}, "valdef-font-status-bar": {"dfnID":"valdef-font-status-bar","dfnText":"status-bar","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-status-bar"}],"title":"2.1.3. \nSyntax of <system-family-name>\n"}],"url":"#valdef-font-status-bar"}, "valdef-font-style-italic": {"dfnID":"valdef-font-style-italic","dfnText":"italic","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-style-italic"},{"id":"ref-for-valdef-font-style-italic\u2460"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-valdef-font-style-italic\u2461"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-valdef-font-style-italic\u2462"},{"id":"ref-for-valdef-font-style-italic\u2463"}],"title":"5.2. Matching font styles"}],"url":"#valdef-font-style-italic"}, "valdef-font-style-normal": {"dfnID":"valdef-font-style-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-style-normal"}],"title":"2.4. \nFont style: the font-style property"},{"refs":[{"id":"ref-for-valdef-font-style-normal\u2460"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"},{"refs":[{"id":"ref-for-valdef-font-style-normal\u2461"}],"title":"5.2. Matching font styles"},{"refs":[{"id":"ref-for-valdef-font-style-normal\u2462"}],"title":"18.5. Changes from the 20 September 2018\n\tWorking Draft"}],"url":"#valdef-font-style-normal"}, "valdef-font-style-oblique-angle--90deg-90deg": {"dfnID":"valdef-font-style-oblique-angle--90deg-90deg","dfnText":"oblique <angle [-90deg,90deg]>?","external":false,"refSections":[],"url":"#valdef-font-style-oblique-angle--90deg-90deg"}, "valdef-font-synthesis-position-auto": {"dfnID":"valdef-font-synthesis-position-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-font-synthesis-position-auto"}, "valdef-font-synthesis-position-none": {"dfnID":"valdef-font-synthesis-position-none","dfnText":"none","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-synthesis-position-none"}],"title":"6.4. \nLigatures: the font-variant-ligatures property"}],"url":"#valdef-font-synthesis-position-none"}, "valdef-font-synthesis-small-caps-auto": {"dfnID":"valdef-font-synthesis-small-caps-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-font-synthesis-small-caps-auto"}, "valdef-font-synthesis-small-caps-none": {"dfnID":"valdef-font-synthesis-small-caps-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-font-synthesis-small-caps-none"}, "valdef-font-synthesis-style-auto": {"dfnID":"valdef-font-synthesis-style-auto","dfnText":"auto","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-synthesis-style-auto"},{"id":"ref-for-valdef-font-synthesis-style-auto\u2460"}],"title":"5.2. Matching font styles"}],"url":"#valdef-font-synthesis-style-auto"}, "valdef-font-synthesis-style-none": {"dfnID":"valdef-font-synthesis-style-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-font-synthesis-style-none"}, "valdef-font-synthesis-weight-auto": {"dfnID":"valdef-font-synthesis-weight-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-font-synthesis-weight-auto"}, "valdef-font-synthesis-weight-none": {"dfnID":"valdef-font-synthesis-weight-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-font-synthesis-weight-none"}, "valdef-font-variant-alternates-historical-forms": {"dfnID":"valdef-font-variant-alternates-historical-forms","dfnText":"historical-forms","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-alternates-historical-forms"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-alternates-historical-forms"}, "valdef-font-variant-caps-all-petite-caps": {"dfnID":"valdef-font-variant-caps-all-petite-caps","dfnText":"all-petite-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-caps-all-petite-caps"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-caps-all-petite-caps"}, "valdef-font-variant-caps-all-small-caps": {"dfnID":"valdef-font-variant-caps-all-small-caps","dfnText":"all-small-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-caps-all-small-caps"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-caps-all-small-caps"}, "valdef-font-variant-caps-petite-caps": {"dfnID":"valdef-font-variant-caps-petite-caps","dfnText":"petite-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-caps-petite-caps"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-caps-petite-caps"}, "valdef-font-variant-caps-small-caps": {"dfnID":"valdef-font-variant-caps-small-caps","dfnText":"small-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-caps-small-caps"}],"title":"2.7. \nShorthand font property: the font property"},{"refs":[{"id":"ref-for-valdef-font-variant-caps-small-caps\u2460"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-caps-small-caps"}, "valdef-font-variant-caps-titling-caps": {"dfnID":"valdef-font-variant-caps-titling-caps","dfnText":"titling-caps","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-caps-titling-caps"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-caps-titling-caps"}, "valdef-font-variant-caps-unicase": {"dfnID":"valdef-font-variant-caps-unicase","dfnText":"unicase","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-caps-unicase"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-caps-unicase"}, "valdef-font-variant-east-asian-full-width": {"dfnID":"valdef-font-variant-east-asian-full-width","dfnText":"full-width","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-full-width"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-full-width"}, "valdef-font-variant-east-asian-jis04": {"dfnID":"valdef-font-variant-east-asian-jis04","dfnText":"jis04","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-jis04"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-jis04"}, "valdef-font-variant-east-asian-jis78": {"dfnID":"valdef-font-variant-east-asian-jis78","dfnText":"jis78","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-jis78"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-jis78"}, "valdef-font-variant-east-asian-jis83": {"dfnID":"valdef-font-variant-east-asian-jis83","dfnText":"jis83","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-jis83"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-jis83"}, "valdef-font-variant-east-asian-jis90": {"dfnID":"valdef-font-variant-east-asian-jis90","dfnText":"jis90","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-jis90"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-jis90"}, "valdef-font-variant-east-asian-proportional-width": {"dfnID":"valdef-font-variant-east-asian-proportional-width","dfnText":"proportional-width","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-proportional-width"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-proportional-width"}, "valdef-font-variant-east-asian-ruby": {"dfnID":"valdef-font-variant-east-asian-ruby","dfnText":"ruby","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-ruby"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-ruby"}, "valdef-font-variant-east-asian-simplified": {"dfnID":"valdef-font-variant-east-asian-simplified","dfnText":"simplified","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-simplified"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-simplified"}, "valdef-font-variant-east-asian-traditional": {"dfnID":"valdef-font-variant-east-asian-traditional","dfnText":"traditional","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-east-asian-traditional"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-east-asian-traditional"}, "valdef-font-variant-emoji-emoji": {"dfnID":"valdef-font-variant-emoji-emoji","dfnText":"emoji","external":false,"refSections":[],"url":"#valdef-font-variant-emoji-emoji"}, "valdef-font-variant-emoji-normal": {"dfnID":"valdef-font-variant-emoji-normal","dfnText":"normal","external":false,"refSections":[],"url":"#valdef-font-variant-emoji-normal"}, "valdef-font-variant-emoji-text": {"dfnID":"valdef-font-variant-emoji-text","dfnText":"text","external":false,"refSections":[],"url":"#valdef-font-variant-emoji-text"}, "valdef-font-variant-emoji-unicode": {"dfnID":"valdef-font-variant-emoji-unicode","dfnText":"unicode","external":false,"refSections":[],"url":"#valdef-font-variant-emoji-unicode"}, "valdef-font-variant-ligatures-common-ligatures": {"dfnID":"valdef-font-variant-ligatures-common-ligatures","dfnText":"common-ligatures","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-ligatures-common-ligatures"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-ligatures-common-ligatures"}, "valdef-font-variant-ligatures-contextual": {"dfnID":"valdef-font-variant-ligatures-contextual","dfnText":"contextual","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-ligatures-contextual"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-ligatures-contextual"}, "valdef-font-variant-ligatures-discretionary-ligatures": {"dfnID":"valdef-font-variant-ligatures-discretionary-ligatures","dfnText":"discretionary-ligatures","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-ligatures-discretionary-ligatures"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-ligatures-discretionary-ligatures"}, "valdef-font-variant-ligatures-historical-ligatures": {"dfnID":"valdef-font-variant-ligatures-historical-ligatures","dfnText":"historical-ligatures","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-ligatures-historical-ligatures"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-ligatures-historical-ligatures"}, "valdef-font-variant-ligatures-no-common-ligatures": {"dfnID":"valdef-font-variant-ligatures-no-common-ligatures","dfnText":"no-common-ligatures","external":false,"refSections":[],"url":"#valdef-font-variant-ligatures-no-common-ligatures"}, "valdef-font-variant-ligatures-no-contextual": {"dfnID":"valdef-font-variant-ligatures-no-contextual","dfnText":"no-contextual","external":false,"refSections":[],"url":"#valdef-font-variant-ligatures-no-contextual"}, "valdef-font-variant-ligatures-no-discretionary-ligatures": {"dfnID":"valdef-font-variant-ligatures-no-discretionary-ligatures","dfnText":"no-discretionary-ligatures","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-ligatures-no-discretionary-ligatures"}],"title":"7.3. \nFeature precedence examples"}],"url":"#valdef-font-variant-ligatures-no-discretionary-ligatures"}, "valdef-font-variant-ligatures-no-historical-ligatures": {"dfnID":"valdef-font-variant-ligatures-no-historical-ligatures","dfnText":"no-historical-ligatures","external":false,"refSections":[],"url":"#valdef-font-variant-ligatures-no-historical-ligatures"}, "valdef-font-variant-numeric-diagonal-fractions": {"dfnID":"valdef-font-variant-numeric-diagonal-fractions","dfnText":"diagonal-fractions","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-diagonal-fractions"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-diagonal-fractions"}, "valdef-font-variant-numeric-lining-nums": {"dfnID":"valdef-font-variant-numeric-lining-nums","dfnText":"lining-nums","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-lining-nums"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-lining-nums"}, "valdef-font-variant-numeric-oldstyle-nums": {"dfnID":"valdef-font-variant-numeric-oldstyle-nums","dfnText":"oldstyle-nums","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-oldstyle-nums"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-oldstyle-nums"}, "valdef-font-variant-numeric-ordinal": {"dfnID":"valdef-font-variant-numeric-ordinal","dfnText":"ordinal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-ordinal"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-ordinal"}, "valdef-font-variant-numeric-proportional-nums": {"dfnID":"valdef-font-variant-numeric-proportional-nums","dfnText":"proportional-nums","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-proportional-nums"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-proportional-nums"}, "valdef-font-variant-numeric-slashed-zero": {"dfnID":"valdef-font-variant-numeric-slashed-zero","dfnText":"slashed-zero","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-slashed-zero"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-slashed-zero"}, "valdef-font-variant-numeric-stacked-fractions": {"dfnID":"valdef-font-variant-numeric-stacked-fractions","dfnText":"stacked-fractions","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-stacked-fractions"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-stacked-fractions"}, "valdef-font-variant-numeric-tabular-nums": {"dfnID":"valdef-font-variant-numeric-tabular-nums","dfnText":"tabular-nums","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-numeric-tabular-nums"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-numeric-tabular-nums"}, "valdef-font-variant-position-sub": {"dfnID":"valdef-font-variant-position-sub","dfnText":"sub","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-position-sub"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-position-sub"}, "valdef-font-variant-position-super": {"dfnID":"valdef-font-variant-position-super","dfnText":"super","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-variant-position-super"}],"title":"6.12. \nLow-level font feature settings control: the font-feature-settings property"}],"url":"#valdef-font-variant-position-super"}, "valdef-font-weight-bold": {"dfnID":"valdef-font-weight-bold","dfnText":"bold","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-weight-bold"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#valdef-font-weight-bold"}, "valdef-font-weight-bolder": {"dfnID":"valdef-font-weight-bolder","dfnText":"bolder","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-weight-bolder"}],"title":"2.2.1. \nRelative Weights"},{"refs":[{"id":"ref-for-valdef-font-weight-bolder\u2460"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"#valdef-font-weight-bolder"}, "valdef-font-weight-lighter": {"dfnID":"valdef-font-weight-lighter","dfnText":"lighter","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-weight-lighter"}],"title":"2.2.1. \nRelative Weights"},{"refs":[{"id":"ref-for-valdef-font-weight-lighter\u2460"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"#valdef-font-weight-lighter"}, "valdef-font-weight-normal": {"dfnID":"valdef-font-weight-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-weight-normal"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"#valdef-font-weight-normal"}, "valdef-font-weight-number-1-1000": {"dfnID":"valdef-font-weight-number-1-1000","dfnText":"<number [1,1000]>","external":false,"refSections":[],"url":"#valdef-font-weight-number-1-1000"}, "valdef-font-width-condensed": {"dfnID":"valdef-font-width-condensed","dfnText":"condensed","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-width-condensed"},{"id":"ref-for-valdef-font-width-condensed\u2460"}],"title":"2.3.1. \n\t\tFont width: the font-stretch legacy name alias"},{"refs":[{"id":"ref-for-valdef-font-width-condensed\u2461"}],"title":"2.7. \nShorthand font property: the font property"}],"url":"#valdef-font-width-condensed"}, "valdef-font-width-expanded": {"dfnID":"valdef-font-width-expanded","dfnText":"expanded","external":false,"refSections":[],"url":"#valdef-font-width-expanded"}, "valdef-font-width-extra-condensed": {"dfnID":"valdef-font-width-extra-condensed","dfnText":"extra-condensed","external":false,"refSections":[],"url":"#valdef-font-width-extra-condensed"}, "valdef-font-width-extra-expanded": {"dfnID":"valdef-font-width-extra-expanded","dfnText":"extra-expanded","external":false,"refSections":[],"url":"#valdef-font-width-extra-expanded"}, "valdef-font-width-normal": {"dfnID":"valdef-font-width-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-font-width-normal"}],"title":"4.4. \nFont property descriptors: the font-style, font-weight, and\nfont-width descriptors"}],"url":"#valdef-font-width-normal"}, "valdef-font-width-percentage-0": {"dfnID":"valdef-font-width-percentage-0","dfnText":"<percentage [0,\u221e]>","external":false,"refSections":[],"url":"#valdef-font-width-percentage-0"}, "valdef-font-width-semi-condensed": {"dfnID":"valdef-font-width-semi-condensed","dfnText":"semi-condensed","external":false,"refSections":[],"url":"#valdef-font-width-semi-condensed"}, "valdef-font-width-semi-expanded": {"dfnID":"valdef-font-width-semi-expanded","dfnText":"semi-expanded","external":false,"refSections":[],"url":"#valdef-font-width-semi-expanded"}, "valdef-font-width-ultra-condensed": {"dfnID":"valdef-font-width-ultra-condensed","dfnText":"ultra-condensed","external":false,"refSections":[],"url":"#valdef-font-width-ultra-condensed"}, "valdef-font-width-ultra-expanded": {"dfnID":"valdef-font-width-ultra-expanded","dfnText":"ultra-expanded","external":false,"refSections":[],"url":"#valdef-font-width-ultra-expanded"}, }; document.addEventListener("DOMContentLoaded", ()=>{ genAllDfnPanels(); document.body.addEventListener("click", (e) => { // If not handled already, just hide all dfn panels. hideAllDfnPanels(); }); }); window.addEventListener("resize", () => { // Pin any visible dfn panel queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>positionDfnPanel(el)); }); function genAllDfnPanels() { for(const panelData of Object.values(dfnPanelData)) { const dfnID = panelData.dfnID; const dfn = document.getElementById(dfnID); if(!dfn) { console.log(`Can't find dfn#${dfnID}.`, panelData); continue; } dfn.panelData = panelData; insertDfnPopupAction(dfn); } } function genDfnPanel(dfn, { dfnID, url, dfnText, refSections, external }) { const dfnPanel = mk.aside({ class: "dfn-panel on", id: `infopanel-for-${dfnID}`, "data-for": dfnID, "aria-labelled-by":`infopaneltitle-for-${dfnID}`, }, mk.span({id:`infopaneltitle-for-${dfnID}`, style:"display:none"}, `Info about the '${dfnText}' ${external?"external":""} reference.`), mk.a({href:url, class:"dfn-link"}, url), refSections.length == 0 ? [] : mk.b({}, "Referenced in:"), mk.ul({}, ...refSections.map(section=> mk.li({}, ...section.refs.map((ref, refI)=> [ mk.a({ href: `#${ref.id}` }, (refI == 0) ? section.title : `(${refI + 1})` ), " ", ] ), ), ), ), genLinkingSyntaxes(dfn), ); dfnPanel.addEventListener('click', (event) => { if (event.target.nodeName == 'A') { scrollToTargetAndHighlight(event); pinDfnPanel(dfnPanel); } event.stopPropagation(); refocusOnTarget(event); }); dfnPanel.addEventListener('keydown', (event) => { if(event.keyCode == 27) { // Escape key hideDfnPanel({dfnPanel}); event.stopPropagation(); event.preventDefault(); } }); dfnPanel.dfn = dfn; dfn.dfnPanel = dfnPanel; return dfnPanel; } function hideAllDfnPanels() { // Delete the currently-active dfn panel. queryAll(".dfn-panel").forEach(dfnPanel=>hideDfnPanel({dfnPanel})); } function showDfnPanel(dfn) { hideAllDfnPanels(); // Only display one at a time. dfn.setAttribute("aria-expanded", "true"); const dfnPanel = genDfnPanel(dfn, dfn.panelData); // Give the dfn a unique tabindex, and then // give all the tabbable panel bits successive indexes. let tabIndex = 100; dfn.tabIndex = tabIndex++; const tabbable = dfnPanel.querySelectorAll(":is(a, button)"); for (const el of tabbable) { el.tabIndex = tabIndex++; } append(document.body, dfnPanel); positionDfnPanel(dfnPanel); } function positionDfnPanel(dfnPanel) { const dfn = dfnPanel.dfn; const dfnPos = getBounds(dfn); dfnPanel.style.top = dfnPos.bottom + "px"; dfnPanel.style.left = dfnPos.left + "px"; const panelPos = dfnPanel.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, dfnPos.left - overflowAmount); dfnPanel.style.left = newLeft + "px"; } } function pinDfnPanel(dfnPanel) { // Switch it to "activated" state, which pins it. dfnPanel.classList.add("activated"); dfnPanel.style.position = "fixed"; dfnPanel.style.left = null; dfnPanel.style.top = null; } function hideDfnPanel({dfn, dfnPanel}) { if(!dfnPanel) dfnPanel = dfn.dfnPanel; if(!dfn) dfn = dfnPanel.dfn; dfn.dfnPanel = undefined; dfnPanel.dfn = undefined; dfn.setAttribute("aria-expanded", "false"); dfn.tabIndex = undefined; dfnPanel.remove() } function toggleDfnPanel(dfn) { if(dfn.dfnPanel) { hideDfnPanel(dfn); } else { showDfnPanel(dfn); } } function insertDfnPopupAction(dfn) { dfn.setAttribute('role', 'button'); dfn.setAttribute('aria-expanded', 'false') dfn.tabIndex = 0; dfn.classList.add('has-dfn-panel'); dfn.addEventListener('click', (event) => { toggleDfnPanel(dfn); event.stopPropagation(); }); dfn.addEventListener('keypress', (event) => { const kc = event.keyCode; // 32->Space, 13->Enter if(kc == 32 || kc == 13) { toggleDfnPanel(dfn); event.stopPropagation(); event.preventDefault(); } }); } function refocusOnTarget(event) { const target = event.target; setTimeout(() => { // Refocus on the event.target element. // This is needed after browser scrolls to the destination. target.focus(); }); } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function scrollToTargetAndHighlight(event) { let hash = event.target.hash; if (hash) { hash = decodeURIComponent(hash.substring(1)); const dest = document.getElementById(hash); if (dest) { dest.classList.add('highlighted'); setTimeout(() => dest.classList.remove('highlighted'), 1000); } } } // Functions, divided by link type, that wrap an autolink's // contents with the appropriate outer syntax. // Alternately, a string naming another type they format // the same as. function needsFor(type) { switch(type) { case "descriptor": case "value": case "element-attr": case "attr-value": case "element-state": case "method": case "constructor": case "argument": case "attribute": case "const": case "dict-member": case "event": case "enum-value": case "stringifier": case "serializer": case "iterator": case "maplike": case "setlike": case "state": case "mode": case "context": case "facet": return true; default: return false; } } function refusesFor(type) { switch(type) { case "property": case "element": case "interface": case "namespace": case "callback": case "dictionary": case "enum": case "exception": case "typedef": case "http-header": case "permission": return true; default: return false; } } function linkFormatterFromType(type) { switch(type) { case 'scheme': case 'permission': case 'dfn': return (text) => `[=${text}=]`; case 'abstract-op': return (text) => `[\$${text}\$]`; case 'function': case 'at-rule': case 'selector': case 'value': return (text) => `''${text}''`; case 'http-header': return (text) => `[:${text}:]`; case 'interface': case 'constructor': case 'method': case 'argument': case 'attribute': case 'callback': case 'dictionary': case 'dict-member': case 'enum': case 'enum-value': case 'exception': case 'const': case 'typedef': case 'stringifier': case 'serializer': case 'iterator': case 'maplike': case 'setlike': case 'extended-attribute': case 'event': case 'idl': return (text) => `{{${text}}}`; case 'element-state': case 'element-attr': case 'attr-value': case 'element': return (element) => `<{${element}}>`; case 'grammar': return (text) => `${text} (within a <pre class=prod>)`; case 'type': return (text)=> `<<${text}>>`; case 'descriptor': case 'property': return (text) => `'${text}'`; default: return; }; }; function genLinkingSyntaxes(dfn) { if(dfn.tagName != "DFN") return; const type = dfn.getAttribute('data-dfn-type'); if(!type) { console.log(`<dfn> doesn't have a data-dfn-type:`, dfn); return []; } // Return a function that wraps link text based on the type const linkFormatter = linkFormatterFromType(type); if(!linkFormatter) { console.log(`<dfn> has an unknown data-dfn-type:`, dfn); return []; } let ltAlts; if(dfn.hasAttribute('data-lt')) { ltAlts = dfn.getAttribute('data-lt') .split("|") .map(x=>x.trim()); } else { ltAlts = [dfn.textContent.trim()]; } if(type == "type") { // lt of "<foo>", but "foo" is the interior; // <<foo/bar>> is how you write it with a for, // not <foo/<bar>> or whatever. for(var i = 0; i < ltAlts.length; i++) { const lt = ltAlts[i]; const match = /<(.*)>/.exec(lt); if(match) { ltAlts[i] = match[1]; } } } let forAlts; if(dfn.hasAttribute('data-dfn-for')) { forAlts = dfn.getAttribute('data-dfn-for') .split(",") .map(x=>x.trim()); } else { forAlts = ['']; } let linkingSyntaxes = []; if(!needsFor(type)) { for(const lt of ltAlts) { linkingSyntaxes.push(linkFormatter(lt)); } } if(!refusesFor(type)) { for(const f of forAlts) { linkingSyntaxes.push(linkFormatter(`${f}/${ltAlts[0]}`)) } } return [ mk.b({}, 'Possible linking syntaxes:'), mk.ul({}, ...linkingSyntaxes.map(link => { const copyLink = async () => await navigator.clipboard.writeText(link); return mk.li({}, mk.div({ class: 'link-item' }, mk.button({ class: 'copy-icon', title: 'Copy', type: 'button', _onclick: copyLink, tabindex: 0, }, mk.span({ class: 'icon' }) ), mk.span({}, link) ) ); }) ) ]; } } </script> <script>/* Boilerplate: script-link-titles */ "use strict"; { let linkTitleData = { "#typedef-generic-family": "Expands to: cursive | fantasy | generic(fangsong) | generic(kai) | generic(nastaliq) | math | monospace | sans-serif | serif | system-ui | ui-monospace | ui-rounded | ui-sans-serif | ui-serif", "https://drafts.csswg.org/css-color-5/#typedef-color": "Expands to: <alpha-value> | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | currentcolor | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | none | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | transparent | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen", "https://drafts.csswg.org/css-values-4/#angle-value": "Expands to: deg | grad | rad | turn", "https://drafts.csswg.org/css-values-4/#url-value": "Expands to: local url flag", }; function setTypeTitles() { for(let el of document.querySelectorAll("a[href]")) { if(el.href in linkTitleData && !el.hasAttribute("title")) { el.setAttribute("title", linkTitleData[el.href]); } } } document.addEventListener("DOMContentLoaded", setTypeTitles); } </script> <script>/* Boilerplate: script-position-annos */ "use strict"; { function repositionAnnoPanels(){ const panels = [...document.querySelectorAll("[data-anno-for]")]; hydratePanels(panels); let vSoFar = 0; for(const panel of panels.sort(cmpTops)) { if(panel.top < vSoFar) { panel.top = vSoFar; panel.style.top = vSoFar + "px"; } vSoFar = panel.top + panel.height + 15; } } function hydratePanels(panels) { const main = document.querySelector("main"); let mainRect; if(main) mainRect = main.getBoundingClientRect(); // First display them all, if they're not already visible. for(const panel of panels) { panel.classList.remove("unpositioned"); } // Measure them all for(const panel of panels) { const dfn = document.getElementById(panel.getAttribute("data-anno-for")); if(!dfn) { console.log("Can't find the annotation panel target:", panel); continue; } panel.dfn = dfn; panel.top = window.scrollY + dfn.getBoundingClientRect().top; let panelRect = panel.getBoundingClientRect(); panel.height = panelRect.height; if(main) { panel.overlappingMain = panelRect.left < mainRect.right; } else { panel.overlappingMain = false; } } // And finally position them for(const panel of panels) { const dfn = panel.dfn; if(!dfn) continue; panel.style.top = panel.top + "px"; panel.classList.toggle("overlapping-main", panel.overlappingMain); } } function cmpTops(a,b) { return a.top - b.top; } window.addEventListener("load", repositionAnnoPanels); window.addEventListener("resize", repositionAnnoPanels); } </script> <script>/* Boilerplate: script-ref-hints */ "use strict"; { let refsData = { "#annotation": {"displayText":"annotation(<feature-value-name>)","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"annotation(<feature-value-name>)","type":"value","url":"#annotation"}, "#aspect-value": {"displayText":"aspect value","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"aspect value","type":"dfn","url":"#aspect-value"}, "#at-font-face-rule": {"displayText":"@font-face","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@font-face","type":"at-rule","url":"#at-font-face-rule"}, "#at-ruledef-font-feature-values": {"displayText":"@font-feature-values","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@font-feature-values","type":"at-rule","url":"#at-ruledef-font-feature-values"}, "#at-ruledef-font-feature-values-annotation": {"displayText":"@annotation","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@annotation","type":"at-rule","url":"#at-ruledef-font-feature-values-annotation"}, "#at-ruledef-font-feature-values-character-variant": {"displayText":"@character-variant","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@character-variant","type":"at-rule","url":"#at-ruledef-font-feature-values-character-variant"}, "#at-ruledef-font-feature-values-historical-forms": {"displayText":"@historical-forms","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@historical-forms","type":"at-rule","url":"#at-ruledef-font-feature-values-historical-forms"}, "#at-ruledef-font-feature-values-ornaments": {"displayText":"@ornaments","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@ornaments","type":"at-rule","url":"#at-ruledef-font-feature-values-ornaments"}, "#at-ruledef-font-feature-values-styleset": {"displayText":"@styleset","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@styleset","type":"at-rule","url":"#at-ruledef-font-feature-values-styleset"}, "#at-ruledef-font-feature-values-stylistic": {"displayText":"@stylistic","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@stylistic","type":"at-rule","url":"#at-ruledef-font-feature-values-stylistic"}, "#at-ruledef-font-feature-values-swash": {"displayText":"@swash","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@swash","type":"at-rule","url":"#at-ruledef-font-feature-values-swash"}, "#at-ruledef-font-palette-values": {"displayText":"@font-palette-values","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"@font-palette-values","type":"at-rule","url":"#at-ruledef-font-palette-values"}, "#character-map": {"displayText":"character map","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"character map","type":"dfn","url":"#character-map"}, "#character-variant": {"displayText":"character-variant(<feature-value-name>#)","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"character-variant(<feature-value-name>#)","type":"value","url":"#character-variant"}, "#color-font-tech-values": {"displayText":"<color-font-tech>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<color-font-tech>","type":"type","url":"#color-font-tech-values"}, "#common-lig-values": {"displayText":"<common-lig-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<common-lig-values>","type":"type","url":"#common-lig-values"}, "#contextual-alt-values": {"displayText":"<contextual-alt-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<contextual-alt-values>","type":"type","url":"#contextual-alt-values"}, "#cssfontfacedescriptors": {"displayText":"CSSFontFaceDescriptors","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"CSSFontFaceDescriptors","type":"interface","url":"#cssfontfacedescriptors"}, "#cssfontfeaturevaluesmap": {"displayText":"CSSFontFeatureValuesMap","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"CSSFontFeatureValuesMap","type":"interface","url":"#cssfontfeaturevaluesmap"}, "#descdef-font-face-ascent-override": {"displayText":"ascent-override","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ascent-override","type":"descriptor","url":"#descdef-font-face-ascent-override"}, "#descdef-font-face-descent-override": {"displayText":"descent-override","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"descent-override","type":"descriptor","url":"#descdef-font-face-descent-override"}, "#descdef-font-face-font-display": {"displayText":"font-display","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-display","type":"descriptor","url":"#descdef-font-face-font-display"}, "#descdef-font-face-font-family": {"displayText":"font-family","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-family","type":"descriptor","url":"#descdef-font-face-font-family"}, "#descdef-font-face-font-feature-settings": {"displayText":"font-feature-settings","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-feature-settings","type":"descriptor","url":"#descdef-font-face-font-feature-settings"}, "#descdef-font-face-font-language-override": {"displayText":"font-language-override","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-language-override","type":"descriptor","url":"#descdef-font-face-font-language-override"}, "#descdef-font-face-font-named-instance": {"displayText":"font-named-instance","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-named-instance","type":"descriptor","url":"#descdef-font-face-font-named-instance"}, "#descdef-font-face-font-style": {"displayText":"font-style","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-style","type":"descriptor","url":"#descdef-font-face-font-style"}, "#descdef-font-face-font-variation-settings": {"displayText":"font-variation-settings","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variation-settings","type":"descriptor","url":"#descdef-font-face-font-variation-settings"}, "#descdef-font-face-font-weight": {"displayText":"font-weight","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-weight","type":"descriptor","url":"#descdef-font-face-font-weight"}, "#descdef-font-face-font-width": {"displayText":"font-width","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-width","type":"descriptor","url":"#descdef-font-face-font-width"}, "#descdef-font-face-line-gap-override": {"displayText":"line-gap-override","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"line-gap-override","type":"descriptor","url":"#descdef-font-face-line-gap-override"}, "#descdef-font-face-src": {"displayText":"src","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"src","type":"descriptor","url":"#descdef-font-face-src"}, "#descdef-font-face-unicode-range": {"displayText":"unicode-range","export":true,"for_":["@font-face"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"unicode-range","type":"descriptor","url":"#descdef-font-face-unicode-range"}, "#descdef-font-feature-values-font-display": {"displayText":"font-display","export":true,"for_":["@font-feature-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-display","type":"descriptor","url":"#descdef-font-feature-values-font-display"}, "#descdef-font-palette-values-base-palette": {"displayText":"base-palette","export":true,"for_":["@font-palette-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"base-palette","type":"descriptor","url":"#descdef-font-palette-values-base-palette"}, "#descdef-font-palette-values-font-family": {"displayText":"font-family","export":true,"for_":["@font-palette-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-family","type":"descriptor","url":"#descdef-font-palette-values-font-family"}, "#descdef-font-palette-values-override-colors": {"displayText":"override-colors","export":true,"for_":["@font-palette-values"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"override-colors","type":"descriptor","url":"#descdef-font-palette-values-override-colors"}, "#discretionary-lig-values": {"displayText":"<discretionary-lig-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<discretionary-lig-values>","type":"type","url":"#discretionary-lig-values"}, "#east-asian-variant-values": {"displayText":"<east-asian-variant-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<east-asian-variant-values>","type":"type","url":"#east-asian-variant-values"}, "#east-asian-width-values": {"displayText":"<east-asian-width-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<east-asian-width-values>","type":"type","url":"#east-asian-width-values"}, "#family-name-value": {"displayText":"<family-name>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<family-name>","type":"type","url":"#family-name-value"}, "#feature-value-name-value": {"displayText":"<feature-value-name>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<feature-value-name>","type":"type","url":"#feature-value-name-value"}, "#font-block-period": {"displayText":"block period","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"block period","type":"dfn","url":"#font-block-period"}, "#font-failure-period": {"displayText":"failure period","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"failure period","type":"dfn","url":"#font-failure-period"}, "#font-feature-value-declaration": {"displayText":"font feature value declaration","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font feature value declaration","type":"dfn","url":"#font-feature-value-declaration"}, "#font-features-tech-values": {"displayText":"<font-features-tech>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-features-tech>","type":"type","url":"#font-features-tech-values"}, "#font-format-values": {"displayText":"<font-format>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-format>","type":"type","url":"#font-format-values"}, "#font-kerning-normal-value": {"displayText":"normal","export":true,"for_":["font-kerning"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#font-kerning-normal-value"}, "#font-size-adjust-none-value": {"displayText":"none","export":true,"for_":["font-size-adjust"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"none","type":"value","url":"#font-size-adjust-none-value"}, "#font-swap-period": {"displayText":"swap period","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"swap period","type":"dfn","url":"#font-swap-period"}, "#font-tech-values": {"displayText":"<font-tech>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-tech>","type":"type","url":"#font-tech-values"}, "#font-variant-css21-values": {"displayText":"<font-variant-css2>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-variant-css2>","type":"type","url":"#font-variant-css21-values"}, "#font-variant-ligatures-none-value": {"displayText":"none","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"none","type":"value","url":"#font-variant-ligatures-none-value"}, "#font-variant-ligatures-normal-value": {"displayText":"normal","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#font-variant-ligatures-normal-value"}, "#font-variant-none-value": {"displayText":"none","export":true,"for_":["font-variant"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"none","type":"value","url":"#font-variant-none-value"}, "#font-variant-normal-value": {"displayText":"normal","export":true,"for_":["font-variant"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#font-variant-normal-value"}, "#font-weight-absolute-values": {"displayText":"<font-weight-absolute>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-weight-absolute>","type":"type","url":"#font-weight-absolute-values"}, "#font-width-css3-values": {"displayText":"<font-width-css3>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-width-css3>","type":"type","url":"#font-width-css3-values"}, "#funcdef-palette-mix": {"displayText":"palette-mix()","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"palette-mix()","type":"function","url":"#funcdef-palette-mix"}, "#historical-lig-values": {"displayText":"<historical-lig-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<historical-lig-values>","type":"type","url":"#historical-lig-values"}, "#installed-font-fallback": {"displayText":"installed font fallback","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"installed font fallback","type":"dfn","url":"#installed-font-fallback"}, "#numeric-figure-values": {"displayText":"<numeric-figure-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<numeric-figure-values>","type":"type","url":"#numeric-figure-values"}, "#numeric-fraction-values": {"displayText":"<numeric-fraction-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<numeric-fraction-values>","type":"type","url":"#numeric-fraction-values"}, "#numeric-spacing-values": {"displayText":"<numeric-spacing-values>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<numeric-spacing-values>","type":"type","url":"#numeric-spacing-values"}, "#ornaments": {"displayText":"ornaments(<feature-value-name>)","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ornaments(<feature-value-name>)","type":"value","url":"#ornaments"}, "#propdef-font": {"displayText":"font","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font","type":"property","url":"#propdef-font"}, "#propdef-font-family": {"displayText":"font-family","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-family","type":"property","url":"#propdef-font-family"}, "#propdef-font-feature-settings": {"displayText":"font-feature-settings","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-feature-settings","type":"property","url":"#propdef-font-feature-settings"}, "#propdef-font-kerning": {"displayText":"font-kerning","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-kerning","type":"property","url":"#propdef-font-kerning"}, "#propdef-font-language-override": {"displayText":"font-language-override","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-language-override","type":"property","url":"#propdef-font-language-override"}, "#propdef-font-optical-sizing": {"displayText":"font-optical-sizing","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-optical-sizing","type":"property","url":"#propdef-font-optical-sizing"}, "#propdef-font-palette": {"displayText":"font-palette","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-palette","type":"property","url":"#propdef-font-palette"}, "#propdef-font-size": {"displayText":"font-size","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-size","type":"property","url":"#propdef-font-size"}, "#propdef-font-size-adjust": {"displayText":"font-size-adjust","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-size-adjust","type":"property","url":"#propdef-font-size-adjust"}, "#propdef-font-stretch": {"displayText":"font-stretch","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-stretch","type":"property","url":"#propdef-font-stretch"}, "#propdef-font-style": {"displayText":"font-style","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-style","type":"property","url":"#propdef-font-style"}, "#propdef-font-synthesis": {"displayText":"font-synthesis","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-synthesis","type":"property","url":"#propdef-font-synthesis"}, "#propdef-font-synthesis-position": {"displayText":"font-synthesis-position","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-synthesis-position","type":"property","url":"#propdef-font-synthesis-position"}, "#propdef-font-synthesis-small-caps": {"displayText":"font-synthesis-small-caps","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-synthesis-small-caps","type":"property","url":"#propdef-font-synthesis-small-caps"}, "#propdef-font-synthesis-style": {"displayText":"font-synthesis-style","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-synthesis-style","type":"property","url":"#propdef-font-synthesis-style"}, "#propdef-font-synthesis-weight": {"displayText":"font-synthesis-weight","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-synthesis-weight","type":"property","url":"#propdef-font-synthesis-weight"}, "#propdef-font-variant": {"displayText":"font-variant","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant","type":"property","url":"#propdef-font-variant"}, "#propdef-font-variant-alternates": {"displayText":"font-variant-alternates","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-alternates","type":"property","url":"#propdef-font-variant-alternates"}, "#propdef-font-variant-caps": {"displayText":"font-variant-caps","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-caps","type":"property","url":"#propdef-font-variant-caps"}, "#propdef-font-variant-east-asian": {"displayText":"font-variant-east-asian","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-east-asian","type":"property","url":"#propdef-font-variant-east-asian"}, "#propdef-font-variant-emoji": {"displayText":"font-variant-emoji","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-emoji","type":"property","url":"#propdef-font-variant-emoji"}, "#propdef-font-variant-ligatures": {"displayText":"font-variant-ligatures","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-ligatures","type":"property","url":"#propdef-font-variant-ligatures"}, "#propdef-font-variant-numeric": {"displayText":"font-variant-numeric","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-numeric","type":"property","url":"#propdef-font-variant-numeric"}, "#propdef-font-variant-position": {"displayText":"font-variant-position","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variant-position","type":"property","url":"#propdef-font-variant-position"}, "#propdef-font-variation-settings": {"displayText":"font-variation-settings","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-variation-settings","type":"property","url":"#propdef-font-variation-settings"}, "#propdef-font-weight": {"displayText":"font-weight","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-weight","type":"property","url":"#propdef-font-weight"}, "#propdef-font-width": {"displayText":"font-width","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"font-width","type":"property","url":"#propdef-font-width"}, "#render-with-a-fallback-font-face": {"displayText":"render with a fallback font face","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"render with a fallback font face","type":"dfn","url":"#render-with-a-fallback-font-face"}, "#render-with-an-invisible-fallback-font-face": {"displayText":"render with an invisible fallback font face","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"render with an invisible fallback font face","type":"dfn","url":"#render-with-an-invisible-fallback-font-face"}, "#reset-implicitly": {"displayText":"reset implicitly","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"reset implicitly","type":"dfn","url":"#reset-implicitly"}, "#set-explicitly": {"displayText":"set explicitly","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"set explicitly","type":"dfn","url":"#set-explicitly"}, "#styleset": {"displayText":"styleset(<feature-value-name>#)","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"styleset(<feature-value-name>#)","type":"value","url":"#styleset"}, "#stylistic": {"displayText":"stylistic(<feature-value-name>)","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"stylistic(<feature-value-name>)","type":"value","url":"#stylistic"}, "#support": {"displayText":"support","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"support","type":"dfn","url":"#support"}, "#swash": {"displayText":"swash(<feature-value-name>)","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"swash(<feature-value-name>)","type":"value","url":"#swash"}, "#system-family-name-value": {"displayText":"<system-family-name>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<system-family-name>","type":"type","url":"#system-family-name-value"}, "#typedef-font-palette-palette-identifier": {"displayText":"<palette-identifier>","export":true,"for_":["font-palette"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<palette-identifier>","type":"type","url":"#typedef-font-palette-palette-identifier"}, "#typedef-font-src": {"displayText":"<font-src>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-src>","type":"type","url":"#typedef-font-src"}, "#typedef-font-src-list": {"displayText":"<font-src-list>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<font-src-list>","type":"type","url":"#typedef-font-src-list"}, "#typedef-generic-complete": {"displayText":"<generic-complete>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<generic-complete>","type":"type","url":"#typedef-generic-complete"}, "#typedef-generic-family": {"displayText":"<generic-family>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<generic-family>","type":"type","url":"#typedef-generic-family"}, "#typedef-generic-incomplete": {"displayText":"<generic-incomplete>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<generic-incomplete>","type":"type","url":"#typedef-generic-incomplete"}, "#typedef-generic-script-specific": {"displayText":"<generic-script-specific>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<generic-script-specific>","type":"type","url":"#typedef-generic-script-specific"}, "#typedef-opentype-tag": {"displayText":"<opentype-tag>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"<opentype-tag>","type":"type","url":"#typedef-opentype-tag"}, "#valdef-font-caption": {"displayText":"caption","export":true,"for_":["font"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"caption","type":"value","url":"#valdef-font-caption"}, "#valdef-font-face-font-display-fallback": {"displayText":"fallback","export":true,"for_":["@font-face/font-display","font-display"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"fallback","type":"value","url":"#valdef-font-face-font-display-fallback"}, "#valdef-font-face-font-display-optional": {"displayText":"optional","export":true,"for_":["@font-face/font-display","font-display"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"optional","type":"value","url":"#valdef-font-face-font-display-optional"}, "#valdef-font-family-cursive": {"displayText":"cursive","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"cursive","type":"value","url":"#valdef-font-family-cursive"}, "#valdef-font-family-fantasy": {"displayText":"fantasy","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"fantasy","type":"value","url":"#valdef-font-family-fantasy"}, "#valdef-font-family-generic-fangsong": {"displayText":"generic(fangsong)","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"generic(fangsong)","type":"value","url":"#valdef-font-family-generic-fangsong"}, "#valdef-font-family-generic-kai": {"displayText":"generic(kai)","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"generic(kai)","type":"value","url":"#valdef-font-family-generic-kai"}, "#valdef-font-family-generic-nastaliq": {"displayText":"generic(nastaliq)","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"generic(nastaliq)","type":"value","url":"#valdef-font-family-generic-nastaliq"}, "#valdef-font-family-monospace": {"displayText":"monospace","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"monospace","type":"value","url":"#valdef-font-family-monospace"}, "#valdef-font-family-sans-serif": {"displayText":"sans-serif","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"sans-serif","type":"value","url":"#valdef-font-family-sans-serif"}, "#valdef-font-family-serif": {"displayText":"serif","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"serif","type":"value","url":"#valdef-font-family-serif"}, "#valdef-font-family-system-ui": {"displayText":"system-ui","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"system-ui","type":"value","url":"#valdef-font-family-system-ui"}, "#valdef-font-family-ui-monospace": {"displayText":"ui-monospace","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ui-monospace","type":"value","url":"#valdef-font-family-ui-monospace"}, "#valdef-font-family-ui-rounded": {"displayText":"ui-rounded","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ui-rounded","type":"value","url":"#valdef-font-family-ui-rounded"}, "#valdef-font-family-ui-sans-serif": {"displayText":"ui-sans-serif","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ui-sans-serif","type":"value","url":"#valdef-font-family-ui-sans-serif"}, "#valdef-font-family-ui-serif": {"displayText":"ui-serif","export":true,"for_":["<generic-family>","font-family"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ui-serif","type":"value","url":"#valdef-font-family-ui-serif"}, "#valdef-font-icon": {"displayText":"icon","export":true,"for_":["font"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"icon","type":"value","url":"#valdef-font-icon"}, "#valdef-font-menu": {"displayText":"menu","export":true,"for_":["font"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"menu","type":"value","url":"#valdef-font-menu"}, "#valdef-font-message-box": {"displayText":"message-box","export":true,"for_":["font"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"message-box","type":"value","url":"#valdef-font-message-box"}, "#valdef-font-palette-dark": {"displayText":"dark","export":true,"for_":["font-palette"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"dark","type":"value","url":"#valdef-font-palette-dark"}, "#valdef-font-palette-light": {"displayText":"light","export":true,"for_":["font-palette"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"light","type":"value","url":"#valdef-font-palette-light"}, "#valdef-font-palette-normal": {"displayText":"normal","export":true,"for_":["font-palette"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#valdef-font-palette-normal"}, "#valdef-font-size-math": {"displayText":"math","export":true,"for_":["font-size"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"math","type":"value","url":"#valdef-font-size-math"}, "#valdef-font-small-caption": {"displayText":"small-caption","export":true,"for_":["font"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"small-caption","type":"value","url":"#valdef-font-small-caption"}, "#valdef-font-status-bar": {"displayText":"status-bar","export":true,"for_":["font"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"status-bar","type":"value","url":"#valdef-font-status-bar"}, "#valdef-font-style-italic": {"displayText":"italic","export":true,"for_":["font-style"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"italic","type":"value","url":"#valdef-font-style-italic"}, "#valdef-font-style-normal": {"displayText":"normal","export":true,"for_":["font-style"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#valdef-font-style-normal"}, "#valdef-font-synthesis-position-none": {"displayText":"none","export":true,"for_":["font-synthesis-position"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"none","type":"value","url":"#valdef-font-synthesis-position-none"}, "#valdef-font-synthesis-style-auto": {"displayText":"auto","export":true,"for_":["font-synthesis-style"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"auto","type":"value","url":"#valdef-font-synthesis-style-auto"}, "#valdef-font-variant-alternates-historical-forms": {"displayText":"historical-forms","export":true,"for_":["font-variant-alternates"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"historical-forms","type":"value","url":"#valdef-font-variant-alternates-historical-forms"}, "#valdef-font-variant-caps-all-petite-caps": {"displayText":"all-petite-caps","export":true,"for_":["font-variant-caps"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"all-petite-caps","type":"value","url":"#valdef-font-variant-caps-all-petite-caps"}, "#valdef-font-variant-caps-all-small-caps": {"displayText":"all-small-caps","export":true,"for_":["font-variant-caps"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"all-small-caps","type":"value","url":"#valdef-font-variant-caps-all-small-caps"}, "#valdef-font-variant-caps-petite-caps": {"displayText":"petite-caps","export":true,"for_":["font-variant-caps"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"petite-caps","type":"value","url":"#valdef-font-variant-caps-petite-caps"}, "#valdef-font-variant-caps-small-caps": {"displayText":"small-caps","export":true,"for_":["font-variant-caps"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"small-caps","type":"value","url":"#valdef-font-variant-caps-small-caps"}, "#valdef-font-variant-caps-titling-caps": {"displayText":"titling-caps","export":true,"for_":["font-variant-caps"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"titling-caps","type":"value","url":"#valdef-font-variant-caps-titling-caps"}, "#valdef-font-variant-caps-unicase": {"displayText":"unicase","export":true,"for_":["font-variant-caps"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"unicase","type":"value","url":"#valdef-font-variant-caps-unicase"}, "#valdef-font-variant-east-asian-full-width": {"displayText":"full-width","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"full-width","type":"value","url":"#valdef-font-variant-east-asian-full-width"}, "#valdef-font-variant-east-asian-jis04": {"displayText":"jis04","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"jis04","type":"value","url":"#valdef-font-variant-east-asian-jis04"}, "#valdef-font-variant-east-asian-jis78": {"displayText":"jis78","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"jis78","type":"value","url":"#valdef-font-variant-east-asian-jis78"}, "#valdef-font-variant-east-asian-jis83": {"displayText":"jis83","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"jis83","type":"value","url":"#valdef-font-variant-east-asian-jis83"}, "#valdef-font-variant-east-asian-jis90": {"displayText":"jis90","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"jis90","type":"value","url":"#valdef-font-variant-east-asian-jis90"}, "#valdef-font-variant-east-asian-proportional-width": {"displayText":"proportional-width","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"proportional-width","type":"value","url":"#valdef-font-variant-east-asian-proportional-width"}, "#valdef-font-variant-east-asian-ruby": {"displayText":"ruby","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ruby","type":"value","url":"#valdef-font-variant-east-asian-ruby"}, "#valdef-font-variant-east-asian-simplified": {"displayText":"simplified","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"simplified","type":"value","url":"#valdef-font-variant-east-asian-simplified"}, "#valdef-font-variant-east-asian-traditional": {"displayText":"traditional","export":true,"for_":["font-variant-east-asian"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"traditional","type":"value","url":"#valdef-font-variant-east-asian-traditional"}, "#valdef-font-variant-ligatures-common-ligatures": {"displayText":"common-ligatures","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"common-ligatures","type":"value","url":"#valdef-font-variant-ligatures-common-ligatures"}, "#valdef-font-variant-ligatures-contextual": {"displayText":"contextual","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"contextual","type":"value","url":"#valdef-font-variant-ligatures-contextual"}, "#valdef-font-variant-ligatures-discretionary-ligatures": {"displayText":"discretionary-ligatures","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"discretionary-ligatures","type":"value","url":"#valdef-font-variant-ligatures-discretionary-ligatures"}, "#valdef-font-variant-ligatures-historical-ligatures": {"displayText":"historical-ligatures","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"historical-ligatures","type":"value","url":"#valdef-font-variant-ligatures-historical-ligatures"}, "#valdef-font-variant-ligatures-no-discretionary-ligatures": {"displayText":"no-discretionary-ligatures","export":true,"for_":["font-variant-ligatures"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"no-discretionary-ligatures","type":"value","url":"#valdef-font-variant-ligatures-no-discretionary-ligatures"}, "#valdef-font-variant-numeric-diagonal-fractions": {"displayText":"diagonal-fractions","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"diagonal-fractions","type":"value","url":"#valdef-font-variant-numeric-diagonal-fractions"}, "#valdef-font-variant-numeric-lining-nums": {"displayText":"lining-nums","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"lining-nums","type":"value","url":"#valdef-font-variant-numeric-lining-nums"}, "#valdef-font-variant-numeric-oldstyle-nums": {"displayText":"oldstyle-nums","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"oldstyle-nums","type":"value","url":"#valdef-font-variant-numeric-oldstyle-nums"}, "#valdef-font-variant-numeric-ordinal": {"displayText":"ordinal","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"ordinal","type":"value","url":"#valdef-font-variant-numeric-ordinal"}, "#valdef-font-variant-numeric-proportional-nums": {"displayText":"proportional-nums","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"proportional-nums","type":"value","url":"#valdef-font-variant-numeric-proportional-nums"}, "#valdef-font-variant-numeric-slashed-zero": {"displayText":"slashed-zero","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"slashed-zero","type":"value","url":"#valdef-font-variant-numeric-slashed-zero"}, "#valdef-font-variant-numeric-stacked-fractions": {"displayText":"stacked-fractions","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"stacked-fractions","type":"value","url":"#valdef-font-variant-numeric-stacked-fractions"}, "#valdef-font-variant-numeric-tabular-nums": {"displayText":"tabular-nums","export":true,"for_":["font-variant-numeric"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"tabular-nums","type":"value","url":"#valdef-font-variant-numeric-tabular-nums"}, "#valdef-font-variant-position-sub": {"displayText":"sub","export":true,"for_":["font-variant-position"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"sub","type":"value","url":"#valdef-font-variant-position-sub"}, "#valdef-font-variant-position-super": {"displayText":"super","export":true,"for_":["font-variant-position"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"super","type":"value","url":"#valdef-font-variant-position-super"}, "#valdef-font-weight-bold": {"displayText":"bold","export":true,"for_":["font-weight"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"bold","type":"value","url":"#valdef-font-weight-bold"}, "#valdef-font-weight-bolder": {"displayText":"bolder","export":true,"for_":["font-weight"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"bolder","type":"value","url":"#valdef-font-weight-bolder"}, "#valdef-font-weight-lighter": {"displayText":"lighter","export":true,"for_":["font-weight"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"lighter","type":"value","url":"#valdef-font-weight-lighter"}, "#valdef-font-weight-normal": {"displayText":"normal","export":true,"for_":["font-weight"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#valdef-font-weight-normal"}, "#valdef-font-width-condensed": {"displayText":"condensed","export":true,"for_":["font-width"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"condensed","type":"value","url":"#valdef-font-width-condensed"}, "#valdef-font-width-normal": {"displayText":"normal","export":true,"for_":["font-width"],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"local","text":"normal","type":"value","url":"#valdef-font-width-normal"}, "https://drafts.csswg.org/css-cascade-5/#legacy-name-alias": {"displayText":"legacy name alias","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"legacy name alias","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#legacy-name-alias"}, "https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit": {"displayText":"inherit","export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"inherit","type":"value","url":"https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit"}, "https://drafts.csswg.org/css-color-4/#propdef-color": {"displayText":"color","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"current","text":"color","type":"property","url":"https://drafts.csswg.org/css-color-4/#propdef-color"}, "https://drafts.csswg.org/css-color-5/#absolute-color": {"displayText":"absolute color","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-color","spec":"css-color-5","status":"current","text":"absolute color","type":"dfn","url":"https://drafts.csswg.org/css-color-5/#absolute-color"}, "https://drafts.csswg.org/css-color-5/#color-interpolation-method": {"displayText":"<color-interpolation-method>","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-color","spec":"css-color-5","status":"current","text":"<color-interpolation-method>","type":"type","url":"https://drafts.csswg.org/css-color-5/#color-interpolation-method"}, "https://drafts.csswg.org/css-color-5/#funcdef-color-mix": {"displayText":"color-mix()","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-color","spec":"css-color-5","status":"current","text":"color-mix()","type":"function","url":"https://drafts.csswg.org/css-color-5/#funcdef-color-mix"}, "https://drafts.csswg.org/css-color-5/#typedef-color": {"displayText":"<color>","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-color","spec":"css-color-5","status":"current","text":"<color>","type":"type","url":"https://drafts.csswg.org/css-color-5/#typedef-color"}, "https://drafts.csswg.org/css-color-adjust-1/#propdef-color-scheme": {"displayText":"color-scheme","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-color-adjust","spec":"css-color-adjust-1","status":"current","text":"color-scheme","type":"property","url":"https://drafts.csswg.org/css-color-adjust-1/#propdef-color-scheme"}, "https://drafts.csswg.org/css-color-adjust-1/#valdef-color-scheme-normal": {"displayText":"normal","export":true,"for_":["color-scheme"],"level":"1","normative":true,"shortname":"css-color-adjust","spec":"css-color-adjust-1","status":"current","text":"normal","type":"value","url":"https://drafts.csswg.org/css-color-adjust-1/#valdef-color-scheme-normal"}, "https://drafts.csswg.org/css-display-4/#containing-block": {"displayText":"containing block","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"containing block","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#containing-block"}, "https://drafts.csswg.org/css-display-4/#valdef-display-block": {"displayText":"block","export":true,"for_":["display","<display-outside>"],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"block","type":"value","url":"https://drafts.csswg.org/css-display-4/#valdef-display-block"}, "https://drafts.csswg.org/css-env-1/#funcdef-env": {"displayText":"env()","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-env","spec":"css-env-1","status":"current","text":"env()","type":"function","url":"https://drafts.csswg.org/css-env-1/#funcdef-env"}, "https://drafts.csswg.org/css-inline-3/#ascent-metric": {"displayText":"ascent metric","export":false,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"current","text":"ascent metric","type":"dfn","url":"https://drafts.csswg.org/css-inline-3/#ascent-metric"}, "https://drafts.csswg.org/css-inline-3/#descent-metric": {"displayText":"descent metric","export":false,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"current","text":"descent metric","type":"dfn","url":"https://drafts.csswg.org/css-inline-3/#descent-metric"}, "https://drafts.csswg.org/css-inline-3/#line-gap-metric": {"displayText":"line gap metric","export":false,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"current","text":"line gap metric","type":"dfn","url":"https://drafts.csswg.org/css-inline-3/#line-gap-metric"}, "https://drafts.csswg.org/css-overflow-3/#ink-overflow": {"displayText":"ink overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"current","text":"ink overflow","type":"dfn","url":"https://drafts.csswg.org/css-overflow-3/#ink-overflow"}, "https://drafts.csswg.org/css-syntax-3/#at-rule": {"displayText":"at-rule","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"at-rule","type":"dfn","url":"https://drafts.csswg.org/css-syntax-3/#at-rule"}, "https://drafts.csswg.org/css-syntax-3/#css-invalid": {"displayText":"invalid","export":true,"for_":["css"],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"invalid","type":"dfn","url":"https://drafts.csswg.org/css-syntax-3/#css-invalid"}, "https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar": {"displayText":"parse a list","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"parse a list","type":"dfn","url":"https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar"}, "https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list": {"displayText":"<declaration-list>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<declaration-list>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-declaration-list"}, "https://drafts.csswg.org/css-syntax-3/#typedef-declaration-rule-list": {"displayText":"<declaration-rule-list>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<declaration-rule-list>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-declaration-rule-list"}, "https://drafts.csswg.org/css-syntax-3/#typedef-unicode-range-token": {"displayText":"<unicode-range-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<unicode-range-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-unicode-range-token"}, "https://drafts.csswg.org/css-text-4/#content-language": {"displayText":"content language","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"current","text":"content language","type":"dfn","url":"https://drafts.csswg.org/css-text-4/#content-language"}, "https://drafts.csswg.org/css-text-4/#propdef-letter-spacing": {"displayText":"letter-spacing","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"current","text":"letter-spacing","type":"property","url":"https://drafts.csswg.org/css-text-4/#propdef-letter-spacing"}, "https://drafts.csswg.org/css-text-4/#propdef-text-transform": {"displayText":"text-transform","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"current","text":"text-transform","type":"property","url":"https://drafts.csswg.org/css-text-4/#propdef-text-transform"}, "https://drafts.csswg.org/css-transforms-1/#propdef-transform": {"displayText":"transform","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-transforms","spec":"css-transforms-1","status":"current","text":"transform","type":"property","url":"https://drafts.csswg.org/css-transforms-1/#propdef-transform"}, "https://drafts.csswg.org/css-values-4/#angle-value": {"displayText":"<angle>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<angle>","type":"type","url":"https://drafts.csswg.org/css-values-4/#angle-value"}, "https://drafts.csswg.org/css-values-4/#ch": {"displayText":"ch","export":true,"for_":["<length>"],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"ch","type":"value","url":"https://drafts.csswg.org/css-values-4/#ch"}, "https://drafts.csswg.org/css-values-4/#comb-all": {"displayText":"&&","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"&&","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-all"}, "https://drafts.csswg.org/css-values-4/#comb-any": {"displayText":"||","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"||","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-any"}, "https://drafts.csswg.org/css-values-4/#comb-comma": {"displayText":",","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":",","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-comma"}, "https://drafts.csswg.org/css-values-4/#comb-one": {"displayText":"|","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"|","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-one"}, "https://drafts.csswg.org/css-values-4/#css-css-identifier": {"displayText":"identifier","export":true,"for_":["CSS"],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"identifier","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#css-css-identifier"}, "https://drafts.csswg.org/css-values-4/#css-wide-keywords": {"displayText":"CSS-wide keywords","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"css-wide keywords","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#css-wide-keywords"}, "https://drafts.csswg.org/css-values-4/#em": {"displayText":"em","export":true,"for_":["<length>"],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"em","type":"value","url":"https://drafts.csswg.org/css-values-4/#em"}, "https://drafts.csswg.org/css-values-4/#ex": {"displayText":"ex","export":true,"for_":["<length>"],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"ex","type":"value","url":"https://drafts.csswg.org/css-values-4/#ex"}, "https://drafts.csswg.org/css-values-4/#fetch-a-style-resource": {"displayText":"fetch a style resource","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"fetch a style resource","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#fetch-a-style-resource"}, "https://drafts.csswg.org/css-values-4/#font-relative-length": {"displayText":"font-relative lengths","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"font-relative lengths","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#font-relative-length"}, "https://drafts.csswg.org/css-values-4/#funcdef-calc": {"displayText":"calc()","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"calc()","type":"function","url":"https://drafts.csswg.org/css-values-4/#funcdef-calc"}, "https://drafts.csswg.org/css-values-4/#identifier-value": {"displayText":"<custom-ident>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<custom-ident>","type":"type","url":"https://drafts.csswg.org/css-values-4/#identifier-value"}, "https://drafts.csswg.org/css-values-4/#math-function": {"displayText":"math function","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"math function","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#math-function"}, "https://drafts.csswg.org/css-values-4/#mult-comma": {"displayText":"#","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"#","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#mult-comma"}, "https://drafts.csswg.org/css-values-4/#mult-num-range": {"displayText":"{A,B}","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"{a,b}","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#mult-num-range"}, "https://drafts.csswg.org/css-values-4/#mult-one-plus": {"displayText":"+","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"+","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#mult-one-plus"}, "https://drafts.csswg.org/css-values-4/#mult-opt": {"displayText":"?","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"?","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#mult-opt"}, "https://drafts.csswg.org/css-values-4/#number-value": {"displayText":"<number>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<number>","type":"type","url":"https://drafts.csswg.org/css-values-4/#number-value"}, "https://drafts.csswg.org/css-values-4/#percentage-value": {"displayText":"<percentage>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<percentage>","type":"type","url":"https://drafts.csswg.org/css-values-4/#percentage-value"}, "https://drafts.csswg.org/css-values-4/#rem": {"displayText":"rem","export":true,"for_":["<length>"],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"rem","type":"value","url":"https://drafts.csswg.org/css-values-4/#rem"}, "https://drafts.csswg.org/css-values-4/#string-value": {"displayText":"<string>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<string>","type":"type","url":"https://drafts.csswg.org/css-values-4/#string-value"}, "https://drafts.csswg.org/css-values-4/#typedef-dashed-ident": {"displayText":"<dashed-ident>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<dashed-ident>","type":"type","url":"https://drafts.csswg.org/css-values-4/#typedef-dashed-ident"}, "https://drafts.csswg.org/css-values-4/#typedef-ident": {"displayText":"<ident>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<ident>","type":"type","url":"https://drafts.csswg.org/css-values-4/#typedef-ident"}, "https://drafts.csswg.org/css-values-4/#typedef-length-percentage": {"displayText":"<length-percentage>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<length-percentage>","type":"type","url":"https://drafts.csswg.org/css-values-4/#typedef-length-percentage"}, "https://drafts.csswg.org/css-values-4/#url-value": {"displayText":"<url>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<url>","type":"type","url":"https://drafts.csswg.org/css-values-4/#url-value"}, "https://drafts.csswg.org/css-variables-2/#funcdef-var": {"displayText":"var()","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-variables","spec":"css-variables-2","status":"current","text":"var()","type":"function","url":"https://drafts.csswg.org/css-variables-2/#funcdef-var"}, "https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode": {"displayText":"writing-mode","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"writing-mode","type":"property","url":"https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode"}, "https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways": {"displayText":"sideways typesetting","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"sideways typesetting","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways"}, "https://drafts.csswg.org/css-writing-modes-4/#typeset-upright": {"displayText":"upright typesetting","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"upright typesetting","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#typeset-upright"}, "https://drafts.csswg.org/css-writing-modes-4/#typographic-mode": {"displayText":"typographic mode","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"typographic mode","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#typographic-mode"}, "https://drafts.csswg.org/css-writing-modes-4/#vertical-typographic-mode": {"displayText":"vertical typographic mode","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"vertical typographic mode","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#vertical-typographic-mode"}, "https://drafts.csswg.org/css2/#propdef-line-height": {"displayText":"line-height","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"line-height","type":"property","url":"https://drafts.csswg.org/css2/#propdef-line-height"}, "https://drafts.csswg.org/css2/#valdef-font-size-medium": {"displayText":"medium","export":true,"for_":["font-size"],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"medium","type":"value","url":"https://drafts.csswg.org/css2/#valdef-font-size-medium"}, "https://drafts.csswg.org/css2/#valdef-font-style-oblique": {"displayText":"oblique","export":true,"for_":["font-style"],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"oblique","type":"value","url":"https://drafts.csswg.org/css2/#valdef-font-style-oblique"}, "https://drafts.csswg.org/css2/#value-def-absolute-size": {"displayText":"<absolute-size>","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"<absolute-size>","type":"type","url":"https://drafts.csswg.org/css2/#value-def-absolute-size"}, "https://drafts.csswg.org/css2/#value-def-relative-size": {"displayText":"<relative-size>","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"<relative-size>","type":"type","url":"https://drafts.csswg.org/css2/#value-def-relative-size"}, "https://drafts.csswg.org/cssom-1/#concept-css-rule-parent-css-style-sheet": {"displayText":"parent CSS style sheet","export":false,"for_":["CSSRule"],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"current","text":"parent css style sheet","type":"dfn","url":"https://drafts.csswg.org/cssom-1/#concept-css-rule-parent-css-style-sheet"}, "https://drafts.csswg.org/cssom-1/#cssomstring": {"displayText":"CSSOMString","export":true,"for_":[],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"current","text":"CSSOMString","type":"interface","url":"https://drafts.csswg.org/cssom-1/#cssomstring"}, "https://drafts.csswg.org/cssom-1/#cssrule": {"displayText":"CSSRule","export":true,"for_":[],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"current","text":"CSSRule","type":"interface","url":"https://drafts.csswg.org/cssom-1/#cssrule"}, "https://drafts.csswg.org/cssom-1/#cssstyledeclaration": {"displayText":"CSSStyleDeclaration","export":true,"for_":[],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"current","text":"CSSStyleDeclaration","type":"interface","url":"https://drafts.csswg.org/cssom-1/#cssstyledeclaration"}, "https://drafts.csswg.org/cssom-1/#cssstyledeclaration-declarations": {"displayText":"declarations","export":true,"for_":["CSSStyleDeclaration"],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"current","text":"declarations","type":"dfn","url":"https://drafts.csswg.org/cssom-1/#cssstyledeclaration-declarations"}, "https://drafts.csswg.org/cssom-1/#dom-window-getcomputedstyle": {"displayText":"getComputedStyle(elt)","export":true,"for_":["Window"],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"current","text":"getComputedStyle(elt)","type":"method","url":"https://drafts.csswg.org/cssom-1/#dom-window-getcomputedstyle"}, "https://fetch.spec.whatwg.org/#concept-fetch": {"displayText":"fetch","export":true,"for_":[],"level":"1","normative":true,"shortname":"fetch","spec":"fetch","status":"current","text":"fetch","type":"dfn","url":"https://fetch.spec.whatwg.org/#concept-fetch"}, "https://fetch.spec.whatwg.org/#concept-response": {"displayText":"response","export":true,"for_":[],"level":"1","normative":true,"shortname":"fetch","spec":"fetch","status":"current","text":"response","type":"dfn","url":"https://fetch.spec.whatwg.org/#concept-response"}, "https://html.spec.whatwg.org/multipage/obsolete.html#font": {"displayText":"font","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"font","type":"element","url":"https://html.spec.whatwg.org/multipage/obsolete.html#font"}, "https://infra.spec.whatwg.org/#code-unit": {"displayText":"code unit","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"code unit","type":"dfn","url":"https://infra.spec.whatwg.org/#code-unit"}, "https://infra.spec.whatwg.org/#tuple": {"displayText":"tuple","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"tuple","type":"dfn","url":"https://infra.spec.whatwg.org/#tuple"}, "https://w3c.github.io/i18n-glossary/#dfn-case-sensitive": {"displayText":"case-sensitive","export":true,"for_":[],"level":"1","normative":false,"shortname":"i18n-glossary","spec":"i18n-glossary","status":"current","text":"case-sensitive","type":"dfn","url":"https://w3c.github.io/i18n-glossary/#dfn-case-sensitive"}, "https://webidl.spec.whatwg.org/#Exposed": {"displayText":"Exposed","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"Exposed","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#Exposed"}, "https://webidl.spec.whatwg.org/#LegacyNullToEmptyString": {"displayText":"LegacyNullToEmptyString","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"LegacyNullToEmptyString","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#LegacyNullToEmptyString"}, "https://webidl.spec.whatwg.org/#PutForwards": {"displayText":"PutForwards","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"PutForwards","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#PutForwards"}, "https://webidl.spec.whatwg.org/#SameObject": {"displayText":"SameObject","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"SameObject","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#SameObject"}, "https://webidl.spec.whatwg.org/#idl-sequence": {"displayText":"sequence","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"sequence","type":"dfn","url":"https://webidl.spec.whatwg.org/#idl-sequence"}, "https://webidl.spec.whatwg.org/#idl-undefined": {"displayText":"undefined","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"undefined","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-undefined"}, "https://webidl.spec.whatwg.org/#idl-unsigned-long": {"displayText":"unsigned long","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"unsigned long","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-unsigned-long"}, "https://webidl.spec.whatwg.org/#idl-unsigned-short": {"displayText":"unsigned short","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"unsigned short","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-unsigned-short"}, }; function mkRefHint(link, ref) { const linkText = link.textContent; let dfnTextElements = ''; if (ref.displayText.toLowerCase() != linkText.toLowerCase()) { // Give the original term if it's being displayed in a different way. // But allow casing differences, they're insignificant. dfnTextElements = mk.li({}, mk.b({}, "Term: "), mk.span({}, ref.displayText) ); } const forList = ref.for_; let forListElements; if(forList.length == 0) { forListElements = []; } else if(forList.length == 1) { forListElements = mk.li({}, mk.b({}, "For: "), mk.span({}, forList[0]), ); } else { forListElements = mk.li({}, mk.b({}, "For: "), mk.ul({}, ...forList.map(forItem => mk.li({}, mk.span({}, forItem) ), ), ), ); } const url = ref.url; const safeUrl = encodeURIComponent(url); const hintPanel = mk.aside({ class: "ref-hint", id: `ref-hint-for-${safeUrl}`, "data-for": url, "aria-labelled-by": `ref-hint-for-${safeUrl}`, }, mk.ul({}, dfnTextElements, mk.li({}, mk.b({}, "URL: "), mk.a({ href: url, class: "ref" }, url), ), mk.li({}, mk.b({}, "Type: "), mk.span({}, `${ref.type}`), ), mk.li({}, mk.b({}, "Spec: "), mk.span({}, `${ref.spec ? ref.spec : ''}`), ), forListElements ), ); hintPanel.forLink = link; setupRefHintEventListeners(link, hintPanel); return hintPanel; } function hideAllRefHints() { queryAll(".ref-hint").forEach(el=>hideRefHint(el)); } function hideRefHint(refHint) { const link = refHint.forLink; link.setAttribute("aria-expanded", "false"); if(refHint.teardownEventListeners) { refHint.teardownEventListeners(); } refHint.remove(); } function showRefHint(link) { if(link.classList.contains("dfn-link")) return; const url = link.getAttribute("href"); const ref = refsData[url]; if(!ref) return; hideAllRefHints(); // Only display one at this time. const refHint = mkRefHint(link, ref); append(document.body, refHint); link.setAttribute("aria-expanded", "true"); positionRefHint(refHint); } function setupRefHintEventListeners(link, refHint) { if (refHint.teardownEventListeners) return; // Add event handlers to hide the refHint after the user moves away // from both the link and refHint, if not hovering either within one second. let timeout = null; const startHidingRefHint = (event) => { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { hideRefHint(refHint); }, 1000); } const resetHidingRefHint = (event) => { if (timeout) clearTimeout(timeout); timeout = null; }; link.addEventListener("mouseleave", startHidingRefHint); link.addEventListener("mouseenter", resetHidingRefHint); link.addEventListener("blur", startHidingRefHint); link.addEventListener("focus", resetHidingRefHint); refHint.addEventListener("mouseleave", startHidingRefHint); refHint.addEventListener("mouseenter", resetHidingRefHint); refHint.addEventListener("blur", startHidingRefHint); refHint.addEventListener("focus", resetHidingRefHint); refHint.teardownEventListeners = () => { // remove event listeners resetHidingRefHint(); link.removeEventListener("mouseleave", startHidingRefHint); link.removeEventListener("mouseenter", resetHidingRefHint); link.removeEventListener("blur", startHidingRefHint); link.removeEventListener("focus", resetHidingRefHint); refHint.removeEventListener("mouseleave", startHidingRefHint); refHint.removeEventListener("mouseenter", resetHidingRefHint); refHint.removeEventListener("blur", startHidingRefHint); refHint.removeEventListener("focus", resetHidingRefHint); }; } function positionRefHint(refHint) { const link = refHint.forLink; const linkPos = getBounds(link); refHint.style.top = linkPos.bottom + "px"; refHint.style.left = linkPos.left + "px"; const panelPos = refHint.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount); refHint.style.left = newLeft + "px"; } } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function showRefHintListener(e) { // If the target isn't in a link (or is a link), // just ignore it. let link = e.target.closest("a"); if(!link) return; // If the target is in a ref-hint panel // (aka a link in the already-open one), // also just ignore it. if(link.closest(".ref-hint")) return; // Otherwise, show the panel for the link. showRefHint(link); } function hideAllHintsListener(e) { // If the click is inside a ref-hint panel, ignore it. if(e.target.closest(".ref-hint")) return; // Otherwise, close all the current panels. hideAllRefHints(); } document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("mousedown", showRefHintListener); document.body.addEventListener("focus", showRefHintListener); document.body.addEventListener("click", hideAllHintsListener); }); window.addEventListener("resize", () => { // Hide any open ref hint. hideAllRefHints(); }); } </script> <script>/* Boilerplate: script-var-click-highlighting */ "use strict"; { /* Color-choosing design: * Colors are ordered by goodness. * On clicking a var, give it the earliest color with the lowest usage in the algorithm. * On re-clicking, re-use the var's most recent color if that's not currently being used elsewhere. */ const COLOR_COUNT = 7; document.addEventListener("click", e=>{ if(e.target.nodeName == "VAR") { highlightSameAlgoVars(e.target); } }); function highlightSameAlgoVars(v) { // Find the algorithm container. let algoContainer = findAlgoContainer(v); // Not highlighting document-global vars, // too likely to be unrelated. if(algoContainer == null) return; const varName = nameFromVar(v); if(!v.hasAttribute("data-var-color")) { const newColor = chooseHighlightColor(algoContainer, v); for(const el of algoContainer.querySelectorAll("var")) { if(nameFromVar(el) == varName) { el.setAttribute("data-var-color", newColor); el.setAttribute("data-var-last-color", newColor); } } } else { for(const el of algoContainer.querySelectorAll("var")) { if(nameFromVar(el) == varName) { el.removeAttribute("data-var-color"); } } } } function findAlgoContainer(el) { while(el != document.body) { if(el.hasAttribute("data-algorithm")) return el; el = el.parentNode; } return null; } function nameFromVar(el) { return el.textContent.replace(/(\s|\xa0)+/g, " ").trim(); } function colorCountsFromContainer(container) { const namesFromColor = Array.from({length:COLOR_COUNT}, x=>new Set()); for(let v of container.querySelectorAll("var[data-var-color]")) { let color = +v.getAttribute("data-var-color"); namesFromColor[color].add(nameFromVar(v)); } return namesFromColor.map(x=>x.size); } function leastUsedColor(colors) { // Find the earliest color with the lowest count. let minCount = Infinity; let minColor = null; for(var i = 0; i < colors.length; i++) { if(colors[i] < minCount) { minColor = i; minCount = colors[i]; } } return minColor; } function chooseHighlightColor(container, v) { const colorCounts = colorCountsFromContainer(container); if(v.hasAttribute("data-var-last-color")) { let color = +v.getAttribute("data-var-last-color"); if(colorCounts[color] == 0) return color; } return leastUsedColor(colorCounts); } } </script> <script>/* Boilerplate: script-wpt */ "use strict"; { let wptData = { "paths": ["/css/css-fonts/"], }; document.addEventListener("DOMContentLoaded", async ()=>{ if(wptData.paths.length == 0) return; const runsUrl = "https://wpt.fyi/api/runs?label=master&label=stable&max-count=1&product=chrome&product=firefox&product=safari&product=edge"; const runs = await (await fetch(runsUrl)).json(); let testResults = []; for(const pathPrefix of wptData.paths) { const pathResults = await (await fetch("https://wpt.fyi/api/search", { method:"POST", headers:{ "Content-Type":"application/json", }, body: JSON.stringify({ "run_ids": runs.map(x=>x.id), "query": {"path": pathPrefix}, }) })).json(); testResults = testResults.concat(pathResults.results); } const browsers = runs.map(x=>({name:x.browser_name, version:x.browser_version, passes:0, total: 0})); const resultsFromPath = new Map(testResults.map(result=>{ const testPath = result.test; const passes = result.legacy_status.map(x=>[x.passes, x.total]); return [testPath, passes]; })); const seenTests = new Set(); document.querySelectorAll(".wpt-name").forEach(nameEl=>{ const passData = resultsFromPath.get("/" + nameEl.getAttribute("title")); if(!passData) { console.log("Couldn't find test in results:", nameEl); return } const numTests = passData[0][1]; if(numTests > 1) { nameEl.insertAdjacentElement("beforeend", mk.small({}, ` (${numTests} tests)`)); } if(passData == undefined) return; const resultsEl = mk.span({"class":"wpt-results"}, ...passData.map((p,i) => mk.span( { "title": `${browsers[i].name} ${p[0]}/${p[1]}`, "class": "wpt-result", "style": `background: conic-gradient(forestgreen ${p[0]/p[1]*360}deg, darkred 0deg);`, })), ); nameEl.insertAdjacentElement("afterend", resultsEl); // Only update the summary pass/total count if we haven't seen this // test before, to support authors listing the same test multiple times // in a spec. if (!seenTests.has(nameEl.getAttribute("title"))) { seenTests.add(nameEl.getAttribute("title")); passData.forEach((p,i) => { browsers[i].passes += p[0]; browsers[i].total += p[1]; }); } }); const overview = document.querySelector(".wpt-overview"); if(overview) { overview.appendChild(mk.ul({}, ...browsers.map(formatWptResult))); document.head.appendChild(mk.style({}, `.wpt-overview ul { display: flex; flex-flow: row wrap; gap: .2em; justify-content: start; list-style: none; padding: 0; margin: 0;} .wpt-overview li { padding: .25em 1em; color: black; text-align: center; } .wpt-overview img { height: 1.5em; height: max(1.5em, 32px); background: transparent; } .wpt-overview .browser { font-weight: bold; } .wpt-overview .passes-none { background: #e57373; } .wpt-overview .passes-hardly { background: #ffb74d; } .wpt-overview .passes-a-few { background: #ffd54f; } .wpt-overview .passes-half { background: #fff176; } .wpt-overview .passes-lots { background: #dce775; } .wpt-overview .passes-most { background: #aed581; } .wpt-overview .passes-all { background: #81c784; }`)); } }); function formatWptResult({name, version, passes, total}) { const passRate = passes/total; let passClass = ""; if(passRate == 0) passClass = "passes-none"; else if(passRate < .2) passClass = "passes-hardly"; else if(passRate < .4) passClass = "passes-a-few"; else if(passRate < .6) passClass = "passes-half"; else if(passRate < .8) passClass = "passes-lots"; else if(passRate < 1) passClass = "passes-most"; else passClass = "passes-all"; name = name[0].toUpperCase() + name.slice(1); const shortVersion = /^\d+/.exec(version); const icon = [] if(name == "Chrome") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/chrome_64x64.png"})); if(name == "Edge") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/edge_64x64.png"})); if(name == "Safari") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/safari_64x64.png"})); if(name == "Firefox") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/firefox_64x64.png"})); return mk.li({"class":passClass}, mk.nobr({'class':'browser'}, ...icon, ` ${name} ${shortVersion}`), mk.br(), mk.nobr({'class':'pass-rate'}, `${passes}/${total}`) ); } } </script>

Pages: 1 2 3 4 5 6 7 8 9 10