Skip to content

Commit

Permalink
[css-fonts-4] Add generic functional notation, fix #6770
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Sep 16, 2023
1 parent 9630076 commit 8a4c1ac
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,26 @@ Syntax of <<family-name>>
with the keywords of the same names.
UAs must not consider these keywords as matching the <<family-name>> type.

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

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

<div class="example" id="ex-generic-functional">
More recently defined generic font families are identified using a functional syntax:

<pre>
body { font-family: "Adobe Fangsong Std R", generic(fangsong), serif}
</pre>

The first choice in this example is a specific font in fangsong style.
The family name is enclosed in quotes as it contains space characters.
The second is a recently added generic font; it is unicode-range specific
and so may not match to an actual installed font on some systems.
The third is a generic font, which is guaranteed to match on all systems.
</div>

<h4 id="font-families">
Relationship Between Faces and Families
</h4>
Expand Down

0 comments on commit 8a4c1ac

Please sign in to comment.