@@ -2066,18 +2066,19 @@ <h3 id=font-face-rule><span class=secno>4.1 </span>The
20662066 < code > @font-face</ code > rule</ h3 >
20672067
20682068 < p > The < code > @font-face</ code > rule allows for linking to fonts that are
2069- automatically activated when needed. This allows authors to select a font
2070- that closely matches the design goals for a given page rather than
2071- limiting the font choice to a set of fonts available on all platforms. A
2072- set of font descriptors define the location of a font resource, either
2073- locally or externally, along with the style characteristics of an
2074- individual face. Multiple < code > @font-face</ code > rules can be used to
2075- construct font families with a variety of faces. Using CSS font matching
2076- rules, a user agent can selectively download only those faces that are
2077- needed for a given piece of text.
2078-
2079- < p > In terms of the grammar, this specification defines the following
2080- productions:
2069+ automatically fetched and activated when needed. This allows authors to
2070+ select a font that closely matches the design goals for a given page
2071+ rather than limiting the font choice to a set of fonts available on all
2072+ platforms. A set of font descriptors define the location of a font
2073+ resource, either locally or externally, along with the style
2074+ characteristics of an individual face. Multiple < code > @font-face</ code >
2075+ rules can be used to construct font families with a variety of faces.
2076+ Using CSS font matching rules, a user agent can selectively download only
2077+ those faces that are needed for a given piece of text.
2078+
2079+ < p > The @font-face rule consists of the @font-face at-keyword followed by a
2080+ block of descriptor declarations. In terms of the grammar, this
2081+ specification defines the following productions:
20812082
20822083 < pre > < dfn id =fontfacerule > font_face_rule</ dfn >
20832084 : FONT_FACE_SYM S* '{' S* descriptor_declaration? [ ';' S* descriptor_declaration? ]* '}' S*
@@ -2105,8 +2106,9 @@ <h3 id=font-face-rule><span class=secno>4.1 </span>The
21052106 and do not apply to document language elements. There is no notion of
21062107 which elements the descriptors apply to or whether the values are
21072108 inherited by child elements. When a given descriptor occurs multiple times
2108- in a given < code > @font-face</ code > rule, only the last specified value is
2109- used, all prior values for that descriptor are ignored.
2109+ in a given < code > @font-face</ code > rule, only the last descriptor
2110+ declaration is used and all prior declarations for that descriptor are
2111+ ignored.
21102112
21112113 < div class =example >
21122114 < p > To use a downloadable font called Gentium:</ p >
@@ -2126,30 +2128,27 @@ <h3 id=font-face-rule><span class=secno>4.1 </span>The
21262128 </ div >
21272129
21282130 < p > A given set of < code > @font-face</ code > rules define a set of fonts
2129- available to containing documents. Multiple rules can be used to define a
2130- family with a large set of faces. When font matching is done fonts defined
2131- using these rules are considered before other available fonts on a system.
2132-
2131+ available for use within the documents that contain these rules. When font
2132+ matching is done, fonts defined using these rules are considered before
2133+ other available fonts on a system.
21332134
2134- < p > Downloaded fonts are only available to documents that reference them,
2135- the process of activating these fonts should not make them available to
2135+ < p > Downloaded fonts are only available to documents that reference them.
2136+ The process of activating these fonts must not make them available to
21362137 other applications or to documents that don't directly link to the same
21372138 font. User agent implementers might consider it convenient to use
21382139 downloaded fonts when rendering characters in other documents for which no
21392140 other available font exists as part of the system font fallback procedure.
2140- This would cause a security leak since the contents of one page would be
2141- able to affect other pages, something an attacker could use as an attack
2142- vector. These restrictions do not affect caching behavior, fonts are
2143- cached the same way other web resources are cached.
2144-
2145- < p > User agents which do not understand the < code > @font-face</ code > rule
2146- encounter the opening curly bracket and ignore forward until the closing
2147- curly bracket. This at-rule conforms with the forward-compatible parsing
2148- requirement of CSS, parsers may ignore these rules without error. Any
2149- descriptors that are not recognized or implemented by a given user agent
2150- must be ignored. < code > @font-face</ code > rules require a font-family and
2151- src descriptor, if either of these are missing the < code > @font-face</ code >
2152- must be ignored.
2141+ However, this would cause a security leak since the contents of one page
2142+ would be able to affect other pages, something an attacker could use as an
2143+ attack vector. These restrictions do not affect caching behavior, fonts
2144+ are cached the same way other web resources are cached.
2145+
2146+ < p > This at-rule follows the forward-compatible parsing rules of CSS. Like
2147+ properties in a declaration block, declarations of any descriptors that
2148+ are not supported by the user agent must be ignored.
2149+ < code > @font-face</ code > rules require a font-family and src descriptor; if
2150+ either of these are missing, the < code > @font-face</ code > rule is invalid
2151+ and must be ignored entirely.
21532152
21542153 < p > In cases where user agents have limited platform resources or implement
21552154 the ability to disable downloadable font resources,
@@ -2179,15 +2178,14 @@ <h3 id=font-family-desc><span class=secno>4.2 </span>Font family: the <a
21792178 </ table >
21802179
21812180 < p > This descriptor defines the font family name that will be used in all
2182- CSS font family name matching, overriding font family names contained in
2183- the underlying font data. If the font family name is the same as a font
2184- family available in a given user's environment, it effectively hides the
2185- underlying font for documents that use the stylesheet. This permits a web
2186- author to freely choose font-family names without worrying about conflicts
2187- with font family names present in a given user's environment. Errors
2188- loading font data do not affect font name matching behavior. User agents
2189- that apply platform font aliasing rules to font family names defined via
2190- < code > @font-face</ code > rules are considered non-conformant.
2181+ CSS font family name matching. It is required for the @font-face rule to
2182+ be valid. It overrides the font family names contained in the underlying
2183+ font data. If the font family name is the same as a font family available
2184+ in a given user's environment, it effectively hides the underlying font
2185+ for documents that use the stylesheet. This permits a web author to freely
2186+ choose font-family names without worrying about conflicts with font family
2187+ names present in a given user's environment. Likewise, platform
2188+ substitutions for a given font family name must not be used.
21912189
21922190 < h3 id =src-desc > < span class =secno > 4.3 </ span > Font reference: the < a
21932191 href ="#descdef-src "> src</ a > descriptor</ h3 >
@@ -2202,7 +2200,7 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
22022200 < tr >
22032201 < td > Value:
22042202
2205- < td > [ <uri > [format(<string> #)]? | <font-face-name> ]#
2203+ < td > [ <url > [format(<string> #)]? | <font-face-name> ]#
22062204
22072205 < tr >
22082206 < td > < em > Initial:</ em >
@@ -2211,15 +2209,14 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
22112209 </ table >
22122210
22132211 < p > This descriptor specifies the resource containing font data. It is
2214- required, whether the font is downloadable or locally installed . Its value
2215- is a prioritized, comma-separated list of external references or locally
2212+ required for the < code > @ font-face </ code > rule to be valid . Its value is a
2213+ prioritized, comma-separated list of external references or locally
22162214 installed font face names. When a font is needed the user agent iterates
22172215 over the set of references listed, using the first one it can successfully
22182216 activate. Fonts containing invalid data or local font faces that are not
2219- found are ignored and the user agent loads the next font in the list
2220- (platform substitutions for a given font must not be used).
2217+ found are ignored and the user agent loads the next font in the list.
22212218
2222- < p > As with other URIs in CSS, the URI may be partial, in which case it is
2219+ < p > As with other URLs in CSS, the URL may be partial, in which case it is
22232220 resolved relative to the location of the style sheet containing the < span
22242221 class =index-inst id =font-face0
22252222 title ="@font-face "> < code > @font-face</ code > </ span > rule. In the case of SVG
@@ -2239,8 +2236,8 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
22392236src: url(fonts.svg#simple); /* load SVG font with id 'simple' */
22402237</ pre >
22412238
2242- < p > External references consist of a URI , followed by an optional hint
2243- describing the format of the font resource referenced by that URI . The
2239+ < p > External references consist of a URL , followed by an optional hint
2240+ describing the format of the font resource referenced by that URL . The
22442241 format hint contains a comma-separated list of format strings that denote
22452242 well-known font formats. Conformant user agents must skip downloading a
22462243 font resource if the format hints indicate only unsupported or unknown
@@ -2316,13 +2313,13 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
23162313 this).
23172314
23182315 < p > When authors would prefer to use a locally available copy of a given
2319- font and download it if it's not, local() can be used. The locally
2320- installed < span class =index-def id =ltfont-face-namegt
2316+ font and download it if it's not, < code > local()</ code > can be used. The
2317+ locally- installed < span class =index-def id =ltfont-face-namegt
23212318 title ="<font-face-name> "> < a
2322- name =value-def-font-face-name > <font-face-name></ a > </ span > is a
2323- format-specific string that uniquely identifies a single font face within
2324- a larger family. The syntax for a <font-face-name> is a unique font
2325- face name enclosed by "local(" and ")".
2319+ name =value-def-font-face-name > <font-face-name></ a > </ span > argument
2320+ is a format-specific string that uniquely identifies a single font face
2321+ within a larger family. The syntax for a <font-face-name> is a
2322+ unique font face name enclosed by "local(" and ")".
23262323
23272324 < pre >
23282325/* regular face of Gentium */
@@ -2337,7 +2334,8 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
23372334 fonts, this string is used to match only the Postscript name or the full
23382335 font name in the name table of locally available fonts. Which is used
23392336 varies by platform and font, so authors should include both of these names
2340- to assure proper matching across platforms.
2337+ to assure proper matching across platforms. Platform substitutions for a
2338+ given font name must not be used.
23412339
23422340 < pre >
23432341/* bold face of Gentium */
@@ -2351,9 +2349,10 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
23512349</ pre >
23522350
23532351 < p > Just as a < code > @font-face</ code > rule specifies the characteristics of
2354- a single font within a family, the unique name used with local() specifies
2355- a single font, not an entire font family. Defined in terms of OpenType
2356- font data, the Postscript name is found in the font's < a
2352+ a single font within a family, the unique name used with
2353+ < code > local()</ code > specifies a single font, not an entire font family.
2354+ Defined in terms of OpenType font data, the Postscript name is found in
2355+ the font's < a
23572356 href ="http://www.microsoft.com/typography/otspec/name.htm "> name table</ a > ,
23582357 in the name record with nameID = 6 (see < a href ="#OPENTYPE "
23592358 rel =biblioentry > [OPENTYPE]<!--{{!OPENTYPE}}--> </ a > for more details). The
@@ -2409,10 +2408,9 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
24092408}
24102409</ pre >
24112410
2412- < p > Since localized fullnames should never match, a document with the
2413- header style rules below would always render using the default serif
2414- font, regardless whether a particular system locale parameter is set to
2415- Finnish or not:</ p >
2411+ < p > Since localized fullnames never match, a document with the header style
2412+ rules below would always render using the default serif font, regardless
2413+ whether a particular system locale parameter is set to Finnish or not:</ p >
24162414
24172415 < pre >
24182416@font-face {
@@ -2424,7 +2422,7 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
24242422h2 { font-family: SectionHeader, serif; }
24252423</ pre >
24262424
2427- < p > A conformant user agent should never load the font ‘< code
2425+ < p > A conformant user agent would never load the font ‘< code
24282426 class =css > gentium.eot</ code > ’ in the example below, since it is
24292427 included in the first definition of the ‘< a href ="#descdef-src "> < code
24302428 class =property > src</ code > </ a > ’ descriptor which is overridden by the
@@ -5183,9 +5181,9 @@ <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
51835181
51845182 < div class =example >
51855183 < p > The < code > @font-face</ code > rule can also be used to access font
5186- features in locally available fonts via the use of local() in the ‘ < a
5187- href ="#descdef-src "> < code class =property > src</ code > </ a > ’ descriptor of
5188- the < code > @font-face</ code > definition:</ p >
5184+ features in locally available fonts via the use of < code > local()</ code >
5185+ in the ‘ < a href ="#descdef-src "> < code class =property > src</ code > </ a > ’
5186+ descriptor of the < code > @font-face</ code > definition:</ p >
51895187
51905188 < pre > @font-face {
51915189 font-family: BodyText;
@@ -6535,7 +6533,7 @@ <h2 class=no-num id=property-index>Property index</h2>
65356533 < tr >
65366534 < th > < a class =property href ="#descdef-src "> src</ a >
65376535
6538- < td > [ <uri > [format(<string> #)]? | <font-face-name> ]#
6536+ < td > [ <url > [format(<string> #)]? | <font-face-name> ]#
65396537
65406538 < td > N/A
65416539
0 commit comments