111111
112112 < h1 > CSS Fonts Module Level 3</ h1 >
113113
114- < h2 class ="no-num no-toc " id =editors > Editor's Draft 29 September 2011</ h2 >
114+ < h2 class ="no-num no-toc " id =editors > Editor's Draft 4 October 2011</ h2 >
115115
116116 < dl id =authors >
117117 < dt > This version:
118118
119119 < dd > < a
120120 href ="http://dev.w3.org/csswg/css3-fonts/ "> http://dev.w3.org/csswg/css3-fonts/</ a >
121- <!-- <dd><a href="http://www.w3.org/TR/2011/ED-css3-fonts-20110929 /">http://www.w3.org/TR/2011/ED-css3-fonts-20110929 /</a> -->
121+ <!-- <dd><a href="http://www.w3.org/TR/2011/ED-css3-fonts-20111004 /">http://www.w3.org/TR/2011/ED-css3-fonts-20111004 /</a> -->
122122
123123
124124 < dt > Latest version:
@@ -3077,7 +3077,7 @@ <h3 id=glyph-selection-positioning><span class=secno>6.1 </span>Glyph
30773077
30783078<p>Like other font properties, font feature properties apply independent
30793079of the font specified. In some cases, font feature settings are
3080- font- specific, such as when specifying swash characters or stylistic
3080+ font specific, such as when specifying swash characters or stylistic
30813081alternates. In these situations, the ‘<code class=property>font-variant</code>’ descriptor of the
30823082@font-face rule described below can be used to specify font features
30833083that only apply to a given font and not to other fonts when fallback
@@ -3967,8 +3967,8 @@ <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
39673967
39683968 < pre >
39693969@font-feature-values <font-family> [, <font-family> ]* {
3970- <font-variant-value-definition >;
3971- <font-variant-value-definition >;
3970+ <font-feature-values-declaration >;
3971+ <font-feature-values-declaration >;
39723972 .
39733973 .
39743974}
@@ -3977,22 +3977,22 @@ <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
39773977 < p > where:
39783978
39793979 < pre
3980- class =prod > < dfn id =ltfont-variant-value-definitiongt > < var > <font-variant-value-definition ></ var > </ dfn > = @<font-variant-value> <feature-value-list> [, <feature-value-list> ]*</ pre >
3980+ class =prod > < dfn id =ltfont-feature-values-declarationgt > < var > <font-feature-values-declaration ></ var > </ dfn > = @<font-variant-property -value> <feature-value-list> [, <feature-value-list> ]*</ pre >
39813981
39823982 < pre
3983- class =prod > < dfn id =ltfont-familygt > < var > <font-family></ var > </ dfn > = font family name, quoted or unquoted, using the same quoting rules that apply within style rules </ pre >
3983+ class =prod > < dfn id =ltfont-familygt > < var > <font-family></ var > </ dfn > = font family name, same syntax as font-family property </ pre >
39843984
39853985 < pre
3986- class =prod > < dfn id =ltfont-variant-valuegt > < var > <font-variant-value></ var > </ dfn > = the name of one of the font- specific font-variant values (e.g. swash, styleset, annotation)</ pre >
3986+ class =prod > < dfn id =ltfont-variant-property- valuegt > < var > <font-variant-property- value></ var > </ dfn > = the name of one of the font specific font-variant property values (e.g. swash, styleset, annotation)</ pre >
39873987
39883988 < pre
3989- class =prod > < dfn id =ltfeature-value-listgt > < var > <feature-value-list></ var > </ dfn > = <feature-value-name> <feature-index> +</ pre >
3989+ class =prod > < dfn id =ltfeature-value-listgt > < var > <feature-value-list></ var > </ dfn > = <feature-value-name> <feature-index> +</ pre >
39903990
39913991 < pre
3992- class =prod > < dfn id =ltfeature-value-namegt > < var > <feature-value-name></ var > </ dfn > = a user-defined identifier used to describe the index</ pre >
3992+ class =prod > < dfn id =ltfeature-value-namegt > < var > <feature-value-name></ var > </ dfn > = a user-defined identifier used to describe the index</ pre >
39933993
39943994 < pre
3995- class =prod > < dfn id =ltfeature-indexgt > < var > <feature-index></ var > </ dfn > = an integer value greater than 0 specific to a given font or set of fonts</ pre >
3995+ class =prod > < dfn id =ltfeature-indexgt > < var > <feature-index></ var > </ dfn > = an integer value greater than 0 specific to a given font or set of fonts</ pre >
39963996
39973997 < p > These @font-feature-values rules can appear anywhere within a stylesheet
39983998 and are exposed bidirectionally across @import boundaries. If multiple
@@ -4023,20 +4023,21 @@ <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
40234023 font-variant-alternates: styleset(stacked-g, geometric-m);
40244024 }</ pre >
40254025
4026- < p > Only named font families are allowed for <font-family>, rules
4027- defined for generic and system fonts must be ignored. However, if a user
4028- agent defines a generic font to be a specific named font (e.g. Helvetica),
4029- the settings associated with that family name will be used.
4026+ < p > Only named font families are allowed for <font-family>, rules that
4027+ include generic or system fonts in the list of font families are
4028+ considered syntax errors and ignored. However, if a user agent defines a
4029+ generic font to be a specific named font (e.g. Helvetica), the settings
4030+ associated with that family name will be used.
40304031
4031- < p > For font-variant-value, only font- specific value names supported by the
4032- ‘< code class =property > < a
4032+ < p > For < font-variant-property- value> , only font specific property value
4033+ names supported by the ‘< code class =property > < a
40334034 href ="#propdef-font-variant "> font-variant</ a > </ code > ’ property are
4034- recognized, definitions for other value names are a syntax error and
4035- ignored. Each value that is font specific is clearly marked as such.
4036- Feature value names follow the rules of CSS identifiers and are unique
4037- only for a given set of font families and font variant value; the same
4038- identifier used with a different font variant value is treated as a
4039- distinct value.
4035+ recognized, definitions for other value names cause a syntax error and are
4036+ ignored. Each property value that is font specific is clearly marked as
4037+ such. Feature value names follow the rules of CSS identifiers and are case
4038+ insensitive. They are unique only for a given set of font families and
4039+ font- variant property value; the same identifier used with a different
4040+ font-variant property value is treated as a separate and distinct value.
40404041
40414042 < p > Using a commonly named value allows authors to use a single style rule
40424043 to cover a set of fonts for which the underlying selector is different for
@@ -4057,18 +4058,23 @@ <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
40574058 font-variant: annotation(circled);
40584059}</ pre >
40594060
4060- < p > Most font-specific font-variant values take a single value (e.g. swash).
4061- If multiple values are assigned to a given name a syntax error occurs and
4062- the entire <font-variant-value-definition> is ignored. For the
4063- styleset value, multiple values can be assigned to a given name. Multiple
4064- values indicate the style sets to be enabled. Values between 1 and 20
4065- enable OpenType features ‘< code class =css > ss01</ code > ’ through
4066- ‘< code class =css > ss20</ code > ’. Values greater than 20 are ignored.
4061+ < p > Most font specific font-variant property values take a single value
4062+ (e.g. swash). The character-variant property value allows two values and
4063+ styleset allows an unlimited number. If a larger number of values are
4064+ assigned to a given name, a syntax error occurs and the entire
4065+ <font-feature-values-declaration> is ignored.
4066+
4067+ < p > For the styleset property value, multiple values indicate the style sets
4068+ to be enabled. Values between 1 and 20 enable OpenType features ‘< code
4069+ class =css > ss01</ code > ’ through ‘< code class =css > ss20</ code > ’. For
4070+ OpenType fonts, values greater than 20 are ignored.
40674071
40684072 < pre > @font-feature-values Mars Serif {
40694073 @styleset alt-g 1, /* implies ss01 = 1 */
40704074 curly-quotes 3, /* implies ss03 = 1 */
40714075 code 4 5; /* implies ss04 = 1, ss05 = 1 */
4076+ @styleset dumb 25; /* >20, ignored */
4077+ @swash swishy 3 5; /* more than 1 value for swash, syntax error */
40724078}
40734079
40744080p.codeblock {
@@ -4078,23 +4084,36 @@ <h3 id=font-feature-values><span class=secno>6.9 </span>Defining font
40784084
40794085 < p > For character-variant, a single value between 1 and 99 indicates the
40804086 enabling of OpenType feature ‘< code class =css > cv01</ code > ’ through
4081- ‘< code class =css > cv99</ code > ’. Values greater than 99 are ignored.
4082- When two values are listed, the first value indicates the feature used and
4083- the second the value passed for that feature. Values beyond the first two
4084- are ignored.
4087+ ‘< code class =css > cv99</ code > ’. For OpenType fonts, values greater than
4088+ 99 are ignored. When two values are listed, the first value indicates the
4089+ feature used and the second the value passed for that feature. When two
4090+ value names imply different settings for the same underlying feature the
4091+ last setting is used.
40854092
40864093 < pre > @font-feature-values MM Greek {
4087- @character-variant alpha-2 1 2; /* implies cv01 = 2 */
4088- @character-variant beta-3 2 3; /* implies cv02 = 3 */
4089- @character-variant gamma 12; /* implies cv12 = 1 */
4090- @character-variant zeta 20 3 2; /* implies cv20 = 3, '2' is ignored */
4091- @character-variant silly 105; /* >99, ignored */
4092- @character-variant dumb 323 3; /* >99, ignored */
4094+ @character-variant alpha-2 1 2; /* implies cv01 = 2 */
4095+ @character-variant beta-3 2 3; /* implies cv02 = 3 */
4096+ @character-variant epsilon 5 3 6; /* more than 2 values, syntax error, ignored */
4097+ @character-variant gamma 12; /* implies cv12 = 1 */
4098+ @character-variant zeta 20 3; /* implies cv20 = 3 */
4099+ @character-variant zeta-2 20 2; /* implies cv20 = 2 */
4100+ @character-variant silly 105; /* >99, ignored */
4101+ @character-variant dumb 323 3; /* >99, ignored */
40934102}
40944103
40954104#title {
40964105 /* use the third alternate beta, first alternate gamma */
40974106 font-variant-alternates: character-variant(beta-3, gamma);
4107+ }
4108+
4109+ p {
4110+ /* zeta-2 follows zeta, implies cv20 = 2 */
4111+ font-variant-alternates: character-variant(zeta, zeta-2);
4112+ }
4113+
4114+ .special {
4115+ /* zeta follows zeta-2, implies cv20 = 3 */
4116+ font-variant-alternates: character-variant(zeta-2, zeta);
40984117}</ pre >
40994118
41004119 < p > See < a href ="#font-feature-values-DOM "> Appendix C</ a > for a description
@@ -4541,7 +4560,7 @@ <h3 id=font-language-override-prop><span class=secno>6.13 </span>Font
45414560 < h2 id =rendering-considerations > < span class =secno > 7 </ span > Resolving font
45424561 feature settings</ h2 >
45434562
4544- < p > General and font- specific font feature property settings are resolved in
4563+ < p > General and font specific font feature property settings are resolved in
45454564 the order below, in low to high precedence. This ordering is used to
45464565 construct a combined list of font features that affect a given text run.
45474566 These features are applied on top of layout engine defaults.
@@ -5264,6 +5283,10 @@ <h2 class=no-num id=index>Index</h2>
52645283 href ="#propdef-font-feature-settings "
52655284 title =font-feature-settings > < strong > 6.12</ strong > </ a >
52665285
5286+ < li > < var > <font-feature-values-declaration></ var > , < a
5287+ href ="#ltfont-feature-values-declarationgt "
5288+ title ="<font-feature-values-declaration> "> < strong > 6.9</ strong > </ a >
5289+
52675290 < li > font-kerning, < a href ="#propdef-font-kerning "
52685291 title =font-kerning > < strong > 6.3</ strong > </ a >
52695292
@@ -5314,13 +5337,9 @@ <h2 class=no-num id=index>Index</h2>
53145337 < li > font-variant-position, < a href ="#propdef-font-variant-position "
53155338 title =font-variant-position > < strong > 6.4</ strong > </ a >
53165339
5317- < li > < var > <font-variant-value></ var > , < a
5318- href ="#ltfont-variant-valuegt "
5319- title ="<font-variant-value> "> < strong > 6.9</ strong > </ a >
5320-
5321- < li > < var > <font-variant-value-definition></ var > , < a
5322- href ="#ltfont-variant-value-definitiongt "
5323- title ="<font-variant-value-definition> "> < strong > 6.9</ strong > </ a >
5340+ < li > < var > <font-variant-property-value></ var > , < a
5341+ href ="#ltfont-variant-property-valuegt "
5342+ title ="<font-variant-property-value> "> < strong > 6.9</ strong > </ a >
53245343
53255344 < li > font-weight, < a href ="#descdef-font-weight "
53265345 title =font-weight > < strong > 4.4</ strong > </ a > , < a
0 commit comments