diff --git a/css-fonts-4/Overview.bs b/css-fonts-4/Overview.bs index f15a64cded0d..4e3b78307082 100644 --- a/css-fonts-4/Overview.bs +++ b/css-fonts-4/Overview.bs @@ -120,12 +120,12 @@ Font family: the 'font-family!!property' property
Name: font-family - Value: [ <@@ -214,20 +214,20 @@ Font family: the 'font-family!!property' property There are three types of font family names, two of which may be used with this property:> | < > ]# + Value: [ < > | < > ]# Initial: depends on user agent Applies to: all elements and text Inherited: yes Percentages: n/a - Computed value: list, each item a string and/or < > keywords + Computed value: list, each item a string and/or < > keywords Animation type: discrete
+< = <> > | < >+
Font family names other than generic families or system font families must either be given quoted as << = <> > | < >+
- <+ <> = <>| < > | < > - < > =''font-family/generic(fangsong)'' |''font-family/generic(kai)'' |''font-family/generic(khmer-mul)'' |''font-family/generic(nastaliq)'' - <> =''font-family/serif'' |''font-family/sans-serif'' |''font-family/system-ui'' |''font-family/cursive'' |''font-family/fantasy'' |''font-family/math'' |''font-family/monospace'' - <> =''font-family/ui-serif'' |''font-family/ui-sans-serif'' |''font-family/ui-monospace'' |''font-family/ui-rounded'' -
+ <To make the syntax less succeptible to clashes, more recently defined generic font families are identified using a functional syntax. @@ -400,11 +400,11 @@ Syntax of <> = <>| < > | < > + < > =''generic(fangsong)'' |''generic(kai)'' |''generic(khmer-mul)'' |''generic(nastaliq)'' + <> =''serif'' |''sans-serif'' |''system-ui'' |''cursive'' |''fantasy'' |''math'' |''monospace'' + <> =''ui-serif'' |''ui-sans-serif'' |''ui-monospace'' |''ui-rounded'' +
-< => ''caption'' |''icon'' |''menu'' |''message-box'' |''small-caption'' |''status-bar'' +< => ''caption'' |''icon'' |''menu'' |''message-box'' |''small-caption'' |''status-bar''
Name: font-family - Value: <@@ -2757,6 +2757,13 @@ The ''@font-face'' rule> + Value: < > For: @font-face Initial: N/A
<font-src> = <+ +> [ format(< >)]? [ tech( < >#)]? | local(< >)
<font-format> + = [<To parse a <> | collection | embedded-opentype | opentype + | svg | truetype | woff | woff2 ]
@@ -2949,7 +2956,7 @@ The ''@font-face'' rule a locally available copy of a given font and download it if it's not,local()can be used. - The locally-installed <> argument to local()+ The locally-installed <> argument to local()is a format-specific string that uniquely identifies a single font face within a larger family. @@ -2964,7 +2971,7 @@ The ''@font-face'' rule separated by a single space; and thus, CSS-wide keywords such as ''inherit'', and - <> keywords such as ''serif'' + < > keywords such as ''serif'' are not allowed inside local().@@ -6047,6 +6054,32 @@ Defining font specific alternates: the @font-feature-values ruleBasic syntax
+An ''@font-feature-values'' rule's prelude +contains a list of font family names, +followed by a block containing multiple ''feature-value-block''s, +a special type of subsidiary at-rule. +Each ''feature-value-block''' contains declarations +mapping author-chosen human-friendly names +(such as "flowing") +to feature indexes for the associated feature. + +Each <> has the same meaning +as the corresponding value of the 'font-variant-alternates' property. + + +@font-feature-values = @font-feature-values <An ''@font-feature-values'' rule's prelude contains a list of font family names, followed by a block containing multiple feature value blocks, @@ -6079,6 +6112,58 @@ Defining font specific alternates: the @font-feature-values rule test_font_feature_values_parsing.html +The ''@font-feature-values'' prelude +is a comma-delimited list of font family names that match the definition of <># { < > } + +font-feature-value-type = <<@stylistic>> | <<@historical-forms>> | <<@styleset>> | <<@character-variant>> + | <<@swash>> | <<@ornaments>> | <<@annotation>> + +@stylistic = @stylistic { < > } +@historical-forms = @historical-forms { < > } +@styleset = @styleset { < > } +@character-variant = @character-variant { < > } +@swash = @swash { < > } +@ornaments = @ornaments { < > } +@annotation = @annotation { < > } + > +for the 'font-family!!property' 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 < > list, +the entire rule ''@font-feature-values'' rule is invalid +and must be ignored. + +The ''@font-feature-values'' block accepts < > as its contents; +these list items are either: + +- [=at-rules=] named by one of the < > at-keyword tokens + +or + +- the '@font-feature-values/font-display' descriptor. + + + +Specifying the same < > more than once is valid; +their contents are cascaded together. +Each < > accepts a list of [=declarations=], +the font feature value declarations, +where the declaration's name can be any [=identifier=], +and the value must be a list of one or more non-negative < >s. + +The < >s accept any declaration name; +these names must be identifiers, +per standard CSS syntax rules, +and are [=case-sensitive=] +(so ''foo: 1;'' and ''FOO: 2'' define two different features). +Each declaration's value must match the grammar ''< >+'', +or else the declaration is invalid and must be ignored. + +Note: Each feature name is unique only within a single < >. +Between different < >s, +or the same type of < >s in separate ''@font-feature-values'' rules, +names can be reused without colliding. + +For each < > in the ''@font-feature-values'' prelude, +each [=font feature value declaration=] defines a mapping between a +(family name, feature block name, declaration name) [=tuple=] +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. + + + For example, the following all define the exact same set of font feature values: The ''@font-feature-values'' prelude is a comma-delimited list of font family names that match the definition of <> for the 'font-family!!property' property. @@ -7881,7 +7966,7 @@ Font family: the '@font-palette-values/font-family' descriptor Name: font-family - Value: <diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 75b76e7503f1..dc672f4ecf35 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -212,7 +212,7 @@ in CSS Fonts Level 4, the following new generic font families are also defined. Issue(4910): -># + Value: < ># For: @font-palette-values Initial: N/A +
- xxx
- Placeholder text for the xxx generic font family. @@ -509,7 +509,7 @@ according to section [[css-syntax#parse-comma-separated-list-of-component-values Then each component value is parsed according to this grammar: -
<+> [ format(< >)]? [ tech( < >#)]? | local(< >) <> [ format(< >)]? [ tech( < >#)]? | local(< >) <font-format> = [<> | collection | embedded-opentype | opentype diff --git a/css-print/Overview.bs b/css-print/Overview.bs index 32f8c5253068..5cecb324cabe 100644 --- a/css-print/Overview.bs +++ b/css-print/Overview.bs @@ -574,8 +574,8 @@ small-caption | status-bar | inherit 'font-family' MUST* MUST* -[[ <family-name> | <generic-family> ],]* [ -<family-name> | <generic-family> ] | inherit +[[ <font-family-name> | <generic-font-family> ],]* [ +<font-family-name> | <generic-font-family> ] | inherit depends on user agent 'font-size' diff --git a/css-values-3/Overview.bs b/css-values-3/Overview.bs index 12dd0cb8475c..c0587823e447 100644 --- a/css-values-3/Overview.bs +++ b/css-values-3/Overview.bs @@ -418,7 +418,7 @@ Property Value Examples''overline underline'' font-family - [ <family-name> | <generic-family> ]# + [ <font-family-name> | <generic-font-family> ]# ''"Gill Sans", Futura, sans-serif'' 'border-width' diff --git a/css-values-4/Overview.bs b/css-values-4/Overview.bs index a200cd66c655..8c122f39528c 100644 --- a/css-values-4/Overview.bs +++ b/css-values-4/Overview.bs @@ -490,7 +490,7 @@ Property Value Examples ''overline underline'' font-family - [ <family-name> | <generic-family> ]# + [ <font-family-name> | <generic-font-family> ]# ''"Gill Sans", Futura, sans-serif'' 'border-width' diff --git a/cssom-1/Overview.bs b/cssom-1/Overview.bs index f573b05291bf..63b58abcb706 100644 --- a/cssom-1/Overview.bs +++ b/cssom-1/Overview.bs @@ -3215,7 +3215,7 @@ For other color functions, see - <
> - - <
> + - <
> - The string serialized as a string. @@ -3235,7 +3235,7 @@ For other color functions, see <border-width>, <border-style>, <bottom>, - <generic-family>, + <generic-font-family>, <generic-voice>, <left>, <margin-width>,