Skip to content

Commit 6e64bc7

Browse files
author
litherum
committed
[css-fonts-4] Expand generic font family list to include new generic font families
1 parent 9d1db6c commit 6e64bc7

1 file changed

Lines changed: 32 additions & 23 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,38 @@ other.</p>
249249

250250
<div class="figure"><img alt="sample monospace fonts" src="monospaceexamples.png" /><p class="caption">Sample monospace fonts</p></div>
251251

252+
<h5 class="no-num no-toc"> <span class="index-def" title="system-ui, definition of">
253+
<a name="system-ui-def"><dfn>system-ui</dfn></a></span></h5>
254+
255+
This generic font family is intended to let text render with the default user interface font on the platform on which the UA is running. A cross-platform UA should use different fonts on its different supported platforms. The purpose of 'system-ui' is to allow web content to integrate with the look and feel of a native app. On platforms which have a collection of system user interface fonts (e.g. for different languages), user agents may treat 'system-ui' as a virtual font which encompasses all the platform user interface fonts. However, if this is done, the details of the virtual font must not be visible or detectable.
256+
257+
<div class="example">
258+
<pre>
259+
&lt;div id="system-text" style="font-family: system-ui"&gt;&lt;/div&gt;
260+
...
261+
window.getComputedStyle(document.getElementById("system-text")).getPropertyValue("font-family");
262+
</pre>
263+
The script above should not have any knowledge if 'system-ui' is expanded to include a collection of system user interface fonts. In particular, the above script should yield a result of "system-ui" on every platform.
264+
</div>
265+
266+
Issue: Add ''system-ui'' fingerprinting issue to Security and Privacy Considerations section
267+
per <a href="https://lists.w3.org/Archives/Public/www-style/2015Aug/0051.html">discussion</a>.
268+
269+
<h5 class="no-num no-toc"> <span class="index-def" title="emoji, definition of">
270+
<a name="emoji-def"><dfn>emoji</dfn></a></span></h5>
271+
272+
This font family is intended for use with emoji characters.
273+
274+
<h5 class="no-num no-toc"> <span class="index-def" title="math, definition of">
275+
<a name="math-def"><dfn>math</dfn></a></span></h5>
276+
277+
This font family is intended for use with mathematical expressions.
278+
279+
<h5 class="no-num no-toc"> <span class="index-def" title="fangsong, definition of">
280+
<a name="math-def"><dfn>fangsong</dfn></a></span></h5>
281+
282+
This font family is used for fang song typefaces in Chinese.
283+
252284
<h3 id="font-weight-prop">Font weight: the 'font-weight' property</h3>
253285

254286
<pre class="propdef">
@@ -1726,29 +1758,6 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
17261758
<p>Define new properties to control the minimum and maximum font-size,
17271759
<code>min-font-size</code> and <code>max-font-size</code>.</p>
17281760

1729-
<h2 id="extended-generics">New generic font families</h2>
1730-
1731-
<p>For most languages and scripts, existing generics can be mapped to
1732-
something comparable to that script. That's useful for the web so that
1733-
generics like <code>serif</code> and <code>sans-serif</code> map to
1734-
something reasonable independent of the language of the content. But
1735-
typographic traditions vary widely across the world and many scripts
1736-
have a variety of common typeface designs that don't map cleanly
1737-
into these existing generics. In situations where a similar typeface is
1738-
used across a wide variety of platforms, it's useful to extend the set
1739-
of predefined CSS generic font families to cover these type styles.</p>
1740-
1741-
<p>Add new generic font families for:</p>
1742-
<ul dfn-for=font-family dfn-type=value>
1743-
<li><dfn>system-ui</dfn> font family representing the default UI font on a given platform</li>
1744-
<li><dfn>emoji</dfn> font family for emoji characters</li>
1745-
<li><dfn>math</dfn> font family used for rendering mathematical expressions</li>
1746-
<li><dfn>fangsong</dfn> font family used for <em>fang song</em> typefaces in Chinese</li>
1747-
</ul>
1748-
1749-
Issue: Add ''system-ui'' fingerprinting issue to Security and Privacy Considerations section
1750-
per <a href="https://lists.w3.org/Archives/Public/www-style/2015Aug/0051.html">discussion</a>.
1751-
17521761
<h2 id="emoji-fallback">Font fallback for emoji codepoints</h2>
17531762

17541763
<p>Many codepoints supported by emoji fonts overlap with codepoints supported

0 commit comments

Comments
 (0)