Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ Font family: the 'font-family!!property' property</h3>

<pre class="propdef">
Name: font-family
Value: [ <<family-name>> | <<generic-family>> ]#
Value: [ <<font-family-name>> | <<generic-font-family>> ]#
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 <<generic-family>> keywords
Computed value: list, each item a string and/or <<generic-font-family>> keywords
Animation type: discrete
</pre>

Expand Down Expand Up @@ -212,19 +212,19 @@ Font family: the 'font-family!!property' property</h3>
There are three types of font family names, two of which may be used with this property:

<dl>
<dt><dfn id="family-name-value"><<family-name>></dfn>
<dt><dfn id="font-family-name-value"><<font-family-name>></dfn>
<dd>
The name of a font family, such as Helvetica or Verdana in the previous example.

This might be a locally-instaled font, or might be a web font.

<dt><<generic-family>>
<dt><<generic-font-family>>
<dd>
Each <<generic-family>> keyword represents
Each <<generic-font-family>> 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 <<generic-family>> can thus be used as a fallback
A <<generic-font-family>> can thus be used as a fallback
for when an author's more specific font choices are not available.

There are three types of generic family:
Expand All @@ -249,12 +249,12 @@ Font family: the 'font-family!!property' property</h3>
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.

Note that <<generic-family>> keywords cannot be quoted
(otherwise they are interpreted as a <<family-name>>).
Note that <<generic-font-family>> keywords cannot be quoted
(otherwise they are interpreted as a <<font-family-name>>).

The set of generic family keywords is defined in [[#generic-font-families]].

<dt><dfn id="system-family-name-value"><<system-family-name>></dfn>
<dt><dfn id="system-font-family-name-value"><<system-font-family-name>></dfn>
<dd>
A locally installed system font, whose use is subject to certain constraints.
In particular, it may not be used with the ''font-family'' property,
Expand Down Expand Up @@ -284,11 +284,11 @@ Font family: the 'font-family!!property' property</h3>

</dl>

<h4 id="family-name-syntax">
Syntax of <<family-name>>
<h4 id="font-family-name-syntax">
Syntax of <<font-family-name>>
</h4>

<pre class=prod><l><<family-name>></l> = <<string>> | <<custom-ident>>+</pre>
<pre class=prod><l><<font-family-name>></l> = <<string>> | <<custom-ident>>+</pre>

Font family names other than generic families or system font families
must either be given quoted as <<string>>s,
Expand Down Expand Up @@ -318,7 +318,7 @@ Syntax of <<family-name>>

Note: this means that if you really have a font
whose name
is the same as one of the <<generic-family>> names,
is the same as one of the <<generic-font-family>> names,
or the system font names,
or the [=CSS-wide keywords=],
it <em>must</em> be quoted.
Expand All @@ -336,7 +336,7 @@ Syntax of <<family-name>>
</pre>
</div>

If a sequence of identifiers is given as a <<family-name>>,
If a sequence of identifiers is given as a <<font-family-name>>,
the computed value is the name
converted to a string
by joining all the identifiers in the sequence by single spaces.
Expand All @@ -358,27 +358,27 @@ Syntax of <<family-name>>
Font family <em>names</em> that happen to be the same as
a 'font-family!!property' keyword value
(e.g. <a>CSS-wide keywords</a> such as ''inherit'', or
<<generic-family>> keywords such as ''serif'')
<<generic-font-family>> keywords such as ''serif'')
must be quoted to prevent confusion
with the keywords of the same names.
UAs must not consider these keywords as matching the <<family-name>> type.
UAs must not consider these keywords as matching the <<font-family-name>> type.

<h4 id="generic-family-name-syntax">
Syntax of <<generic-family>>
Syntax of <<generic-font-family>>
</h4>

<!-- <pre class=prod>
<dfn><<generic-family>></dfn> = generic(<<generic-script-specific>>) | <<generic-complete>> | <<generic-incomplete>>
<dfn><<generic-script-specific>></dfn> = <a href="">kai</a> | fangsong | nastaliq
<dfn><<generic-complete>></dfn> = serif | sans-serif | system-ui | cursive | fantasy | math | monospace
<dfn><<generic-incomplete>></dfn> = ui-serif | ui-sans-serif | ui-monospace | ui-rounded
<dfn><<generic-font-family>></dfn> = generic(<<generic-font-script-specific>>) | <<generic-font-complete>> | <<generic-font-incomplete>>
<dfn><<generic-font-script-specific>></dfn> = <a href="">kai</a> | fangsong | nastaliq
<dfn><<generic-font-complete>></dfn> = serif | sans-serif | system-ui | cursive | fantasy | math | monospace
<dfn><<generic-font-incomplete>></dfn> = ui-serif | ui-sans-serif | ui-monospace | ui-rounded
</pre> -->

<pre class=prod>
<dfn><<generic-family>></dfn> = <<generic-script-specific>>| <<generic-complete>> | <<generic-incomplete>>
<dfn><<generic-script-specific>></dfn> = <l>''generic(fangsong)''</l> | <l>''generic(kai)''</l> | <l>''generic(khmer-mul)''</l> | <l>''generic(nastaliq)''</l>
<dfn><<generic-complete>></dfn> = <l>''serif''</l> | <l>''sans-serif''</l> | <l>''system-ui''</l> | <l>''cursive''</l> | <l>''fantasy''</l> | <l>''math''</l> | <l>''monospace''</l>
<dfn><<generic-incomplete>></dfn> = <l>''ui-serif''</l> | <l>''ui-sans-serif''</l> | <l>''ui-monospace''</l> | <l>''ui-rounded''</l>
<dfn><<generic-font-family>></dfn> = <<generic-font-script-specific>>| <<generic-font-complete>> | <<generic-font-incomplete>>
<dfn><<generic-font-script-specific>></dfn> = <l>''generic(fangsong)''</l> | <l>''generic(kai)''</l> | <l>''generic(khmer-mul)''</l> | <l>''generic(nastaliq)''</l>
<dfn><<generic-font-complete>></dfn> = <l>''serif''</l> | <l>''sans-serif''</l> | <l>''system-ui''</l> | <l>''cursive''</l> | <l>''fantasy''</l> | <l>''math''</l> | <l>''monospace''</l>
<dfn><<generic-font-incomplete>></dfn> = <l>''ui-serif''</l> | <l>''ui-sans-serif''</l> | <l>''ui-monospace''</l> | <l>''ui-rounded''</l>
</pre>

To make the syntax less succeptible to clashes, more recently defined generic font families are identified using a functional syntax.
Expand All @@ -397,11 +397,11 @@ Syntax of <<generic-family>>
</div>

<h4 id="system">
Syntax of <<system-family-name>>
Syntax of <<system-font-family-name>>
</h4>

<pre class="prod">
<l><<system-family-name>></l> = <l>''caption''</l> | <l>''icon''</l> | <l>''menu''</l> | <l>''message-box''</l> | <l>''small-caption''</l> | <l>''status-bar''</l>
<l><<system-font-family-name>></l> = <l>''caption''</l> | <l>''icon''</l> | <l>''menu''</l> | <l>''message-box''</l> | <l>''small-caption''</l> | <l>''status-bar''</l>
</pre>

<h4 id="font-families">
Expand Down Expand Up @@ -461,14 +461,14 @@ Generic font families</h4>
generic-family-keywords-002.html
</wpt>

Note: Generic font families are intended to be widely implemented on many platforms, unlike arbitrary <<family-name>>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.
Note: Generic font families are intended to be widely implemented on many platforms, unlike arbitrary <<font-family-name>>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.

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.

<dl dfn-for="font-family,<generic-family>" dfn-type=value>
<dl dfn-for="font-family,<generic-font-family>" dfn-type=value>
<dt id="serif-def"><dfn>serif</dfn>
<dd>
Serif fonts represent
Expand Down Expand Up @@ -1782,7 +1782,7 @@ Shorthand font property: the 'font' property</h3>
<<'font-weight'>> ||
<<font-width-css3>> ]? <<'font-size'>> [ / <<'line-height'>> ]?
<<'font-family'>># ] |
<<system-family-name>>
<<system-font-family-name>>
Initial: see individual properties
Applies to: all elements and text
Inherited: yes
Expand Down Expand Up @@ -2691,7 +2691,7 @@ The <dfn id="at-font-face-rule">''@font-face''</dfn> rule</h3>

<pre class='descdef'>
Name: font-family
Value: <<family-name>>
Value: <<font-family-name>>
For: @font-face
Initial: N/A
</pre>
Expand Down Expand Up @@ -2755,7 +2755,7 @@ The <dfn id="at-font-face-rule">''@font-face''</dfn> rule</h3>

To parse a <dfn><<font-src-list>></dfn> production, [=parse a list=] of <<font-src>>s.

<pre class="prod"><dfn>&lt;font-src></dfn> = <<url>> [ format(<<font-format>>)]? [ tech( <<font-tech>>#)]? | local(<<family-name>>)</pre>
<pre class="prod"><dfn>&lt;font-src></dfn> = <<url>> [ format(<<font-format>>)]? [ tech( <<font-tech>>#)]? | local(<<font-family-name>>)</pre>

<pre class="prod"><dfn id="font-format-values">&lt;font-format&gt;</dfn>
= [<<string>> | collection | embedded-opentype | opentype
Expand Down Expand Up @@ -2941,7 +2941,7 @@ or font format.
a locally available copy of a given font
and download it if it's not,
<code>local()</code> can be used.
The locally-installed <<family-name>> argument to <code>local()</code>
The locally-installed <<font-family-name>> argument to <code>local()</code>
is a format-specific string
that uniquely identifies a single font face
within a larger family.
Expand All @@ -2956,7 +2956,7 @@ or font format.
separated by a single space;
and thus,
<a>CSS-wide keywords</a> such as ''inherit'', and
<<generic-family>> keywords such as ''serif''
<<generic-font-family>> keywords such as ''serif''
are not allowed inside <code>local()</code>.


Expand Down Expand Up @@ -6018,7 +6018,7 @@ Each <<font-feature-value>> has the same meaning
as the corresponding value of the 'font-variant-alternates' property.

<pre class=prod export>
@font-feature-values = @font-feature-values <<family-name>># { <<declaration-rule-list>> }
@font-feature-values = @font-feature-values <<font-family-name>># { <<declaration-rule-list>> }

<dfn for="@font-feature-values">font-feature-value-type</dfn> = <<@stylistic>> | <<@historical-forms>> | <<@styleset>> | <<@character-variant>>
| <<@swash>> | <<@ornaments>> | <<@annotation>>
Expand All @@ -6038,13 +6038,13 @@ as the corresponding value of the 'font-variant-alternates' property.
</wpt>

The ''@font-feature-values'' prelude
is a comma-delimited list of font family names that match the definition of <<family-name>>
is a comma-delimited list of font family names that match the definition of <<font-family-name>>
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 <<family-name>> list,
If syntax errors occur within the <<font-family-name>> list,
the entire rule ''@font-feature-values'' rule is invalid
and must be ignored.

Expand Down Expand Up @@ -6079,7 +6079,7 @@ Between different <<feature-value-block>>s,
or the same type of <<feature-value-block>>s in separate ''@font-feature-values'' rules,
names can be reused without colliding.

For each <<family-name>> in the ''@font-feature-values'' prelude,
For each <<font-family-name>> 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.
Expand Down Expand Up @@ -7833,7 +7833,7 @@ Font family: the '@font-palette-values/font-family' descriptor</h4>

<pre class='descdef'>
Name: font-family
Value: <<family-name>>#
Value: <<font-family-name>>#
For: @font-palette-values
Initial: N/A
</pre>
Expand Down
4 changes: 2 additions & 2 deletions css-fonts-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ in CSS Fonts Level 4, the following new generic font families are also defined.

Issue(4910):

<dl dfn-for="font-family,<generic-family>" dfn-type=value>
<dl dfn-for="font-family,<generic-font-family>" dfn-type=value>
<dt id="xxx-def"><dfn>xxx</dfn>
<dd>
Placeholder text for the xxx generic font family.
Expand Down Expand Up @@ -508,7 +508,7 @@ according to section [[css-syntax#parse-comma-separated-list-of-component-values
Then each component value is parsed according to this grammar:


<pre><<url>> [ format(<<font-format>>)]? [ tech( <<font-tech>>#)]? | local(<<family-name>>)</pre>
<pre><<url>> [ format(<<font-format>>)]? [ tech( <<font-tech>>#)]? | local(<<font-family-name>>)</pre>

<pre class="prod"><dfn id="font-format-values">&lt;font-format&gt;</dfn>
= [<<string>> | collection | embedded-opentype | opentype
Expand Down
4 changes: 2 additions & 2 deletions css-print/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ small-caption | status-bar | inherit</td>
<td>'font-family'</td>
<td><em title="MUST In The RFC 2119 Context" class="RFC2119">MUST</em><a href="#table_note_1">*</a></td>
<td><em title="MUST In The RFC 2119 Context" class="RFC2119">MUST</em><a href="#table_note_1">*</a></td>
<td>[[ &lt;family-name&gt; | &lt;generic-family&gt; ],]* [
&lt;family-name&gt; | &lt;generic-family&gt; ] | inherit</td>
<td>[[ &lt;font-family-name&gt; | &lt;generic-font-family&gt; ],]* [
&lt;font-family-name&gt; | &lt;generic-font-family&gt; ] | inherit</td>
<td>depends on user agent</td></tr>
<tr class="yes">
<td>'font-size'</td>
Expand Down
2 changes: 1 addition & 1 deletion css-values-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Property Value Examples</h3>
<td>''overline underline''
<tr>
<td><a property>font-family</a>
<td>[ &lt;family-name> | &lt;generic-family> ]#
<td>[ &lt;font-family-name> | &lt;generic-font-family> ]#
<td>''"Gill Sans", Futura, sans-serif''
<tr>
<td>'border-width'
Expand Down
2 changes: 1 addition & 1 deletion css-values-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ Property Value Examples</h3>
<td>''overline underline''
<tr>
<td><a property>font-family</a>
<td>[ &lt;family-name> | &lt;generic-family> ]#
<td>[ &lt;font-family-name> | &lt;generic-font-family> ]#
<td>''"Gill Sans", Futura, sans-serif''
<tr>
<td>'border-width'
Expand Down
4 changes: 2 additions & 2 deletions cssom-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3215,7 +3215,7 @@ For other color functions, see


<dt><<string>>
<dt><<family-name>>
<dt><<font-family-name>>
<dd>The string
<a lt="serialize a string">serialized as a string</a>.

Expand All @@ -3235,7 +3235,7 @@ For other color functions, see
&lt;border-width>,
&lt;border-style>,
&lt;bottom>,
&lt;generic-family>,
&lt;generic-font-family>,
&lt;generic-voice>,
&lt;left>,
&lt;margin-width>,
Expand Down