Skip to content

Commit 93c087a

Browse files
committed
[[css-fonts-4] Define separate third type, system-font-family #9292
1 parent 9d5316e commit 93c087a

File tree

1 file changed

+45
-26
lines changed

1 file changed

+45
-26
lines changed

css-fonts-4/Overview.bs

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Font family: the 'font-family!!property' property</h3>
209209
then the generic font-family ''sans-serif'' font will be used.
210210
</div>
211211

212-
There are two types of font family names:
212+
There are three types of font family names, two of which may be used with this property:
213213

214214
<dl>
215215
<dt><dfn id="family-name-value"><<family-name>></dfn>
@@ -254,6 +254,34 @@ Font family: the 'font-family!!property' property</h3>
254254

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

257+
<dt><dfn id="system-family-name-value"><<system-family-name>></dfn>
258+
<dd>
259+
A locally installed system font, whose use is subject to certain constraints.
260+
In particular, it may not be used with the ''font-family'' property,
261+
but can be used with the ''font'' shorthand.
262+
263+
The following values refer to system fonts:
264+
265+
<dl dfn-type=value dfn-for=font>
266+
<dt><dfn>caption</dfn>
267+
<dd>The font used for captioned controls (e.g., buttons, drop-downs, etc.).
268+
<dt><dfn>icon</dfn>
269+
<dd>The font used to label icons.
270+
<dt><dfn>menu</dfn>
271+
<dd>The font used in menus (e.g., dropdown menus and menu lists).
272+
<dt><dfn>message-box</dfn>
273+
<dd>The font used in dialog boxes.
274+
<dt><dfn>small-caption</dfn>
275+
<dd>The font used for labeling small controls.
276+
<dt><dfn>status-bar</dfn>
277+
<dd>The font used in window status bars.
278+
</dl>
279+
280+
<wpt>
281+
system-fonts-serialization.tentative.html
282+
</wpt>
283+
</dd>
284+
257285
</dl>
258286

259287
<h4 id="family-name-syntax">
@@ -262,13 +290,14 @@ Syntax of <<family-name>>
262290

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

265-
Font family names other than generic families must either be given quoted as <<string>>s,
293+
Font family names other than generic families or system font families
294+
must either be given quoted as <<string>>s,
266295
or unquoted as a sequence of one or more <<custom-ident>>.
267296

268297
Note: This means most punctuation characters and digits at the start of
269298
each token must be escaped in unquoted font family names.
270299

271-
<div class="example" id="ex-no-unquoted-punctuation">
300+
<div class="example invalid" id="ex-no-unquoted-punctuation">
272301
To illustrate this, the following declarations are invalid:
273302

274303
<pre>
@@ -290,8 +319,9 @@ Syntax of <<family-name>>
290319
Note: this means that if you really have a font
291320
whose name
292321
is the same as one of the <<generic-family>> names,
322+
or the system font names,
293323
or the [=CSS-wide keywords=],
294-
it must be quoted.
324+
it <em>must</em> be quoted.
295325

296326
<div class="example" id="ex-valid-unusual-generic-like">
297327
To illustrate this,
@@ -354,6 +384,14 @@ Syntax of <<generic-family>>
354384
The third is a generic font, which is guaranteed to match on all systems.
355385
</div>
356386

387+
<h4 id="system">
388+
Syntax of <<system-family-name>>
389+
</h4>
390+
391+
<pre class="prod">
392+
<l><<system-family-name>></l> = caption | icon | menu | message-box | small-caption | status-bar
393+
</pre>
394+
357395
<h4 id="font-families">
358396
Relationship Between Faces and Families
359397
</h4>
@@ -1542,8 +1580,9 @@ Shorthand font property: the 'font' property</h3>
15421580
Value: [ [ <<'font-style'>> ||
15431581
<<font-variant-css2>> ||
15441582
<<'font-weight'>> ||
1545-
<<font-stretch-css3>> ]? <<'font-size'>> [ / <<'line-height'>> ]? <<'font-family'>> ] |
1546-
caption | icon | menu | message-box | small-caption | status-bar
1583+
<<font-stretch-css3>> ]? <<'font-size'>> [ / <<'line-height'>> ]?
1584+
<<'font-family'>> ] |
1585+
<<'system-family-name'>>
15471586
Initial: see individual properties
15481587
Applies to: all elements and text
15491588
Inherited: yes
@@ -1718,26 +1757,6 @@ Shorthand font property: the 'font' property</h3>
17181757
}
17191758
</pre>
17201759

1721-
The following values refer to system fonts:
1722-
1723-
<dl dfn-type=value dfn-for=font>
1724-
<dt><dfn>caption</dfn>
1725-
<dd>The font used for captioned controls (e.g., buttons, drop-downs, etc.).
1726-
<dt><dfn>icon</dfn>
1727-
<dd>The font used to label icons.
1728-
<dt><dfn>menu</dfn>
1729-
<dd>The font used in menus (e.g., dropdown menus and menu lists).
1730-
<dt><dfn>message-box</dfn>
1731-
<dd>The font used in dialog boxes.
1732-
<dt><dfn>small-caption</dfn>
1733-
<dd>The font used for labeling small controls.
1734-
<dt><dfn>status-bar</dfn>
1735-
<dd>The font used in window status bars.
1736-
</dl>
1737-
1738-
<wpt>
1739-
system-fonts-serialization.tentative.html
1740-
</wpt>
17411760

17421761
System fonts can only be set as a whole;
17431762
that is, the font family, size, weight, style, etc.

0 commit comments

Comments
 (0)