Skip to content

Commit 3db9186

Browse files
Add notes for system-ui (#12831)
1 parent df23a67 commit 3db9186

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

css-fonts-4/Overview.bs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,12 @@ Generic font families</h4>
577577
<dt id="system-ui-def"><dfn>system-ui</dfn>
578578
<dd>
579579
This generic font family lets text render with the default user interface font
580-
(which, as with all [[#generic-font-families]] may be a composite font)
580+
(which, as with all [[#generic-font-families]], may be a composite font)
581581
on the platform on which the UA is running.
582582
A cross-platform UA should use different fonts on its different supported platforms.
583583
The purpose of ''system-ui'' is to allow web content
584584
to integrate with the look and feel of the native OS.
585+
This is useful for hybrid, web or cross-platform applications.
585586

586587
<wpt>
587588
system-ui-ar.html
@@ -594,9 +595,11 @@ Generic font families</h4>
594595
system-ui.html
595596
</wpt>
596597

597-
The precise font used will depend on factors such as
598-
Unicode coverage
599-
and the content language.
598+
The precise font(s) used will depend on factors such as
599+
platform support, platform language, locale settings,
600+
user settings, Unicode coverage and the content language.
601+
UA may optionally choose to use the text rendering engine provided by the platform when using
602+
''system-ui'' to match the appearance of the default user interface more closely.
600603

601604
<div class="example" id="ex-system-ui-opaque">
602605
As with other generic font families,
@@ -614,6 +617,16 @@ Generic font families</h4>
614617
In particular, the above script should yield a result of "system-ui" on every platform.
615618
</div>
616619

620+
Note: ''system-ui'' is highly dependent on the platform environment as multiple factors may
621+
affect the default user interface font, and may have verying level of text rendering support.
622+
This may cause the displayed typeface to be undesirable for some end users
623+
(e.g. Simplified Chinese users might get a monospaced serif font on older version of Windows;
624+
''lang'' attribute might not affect displayed font in cases like ''lang="uk"'' in Russian locale
625+
or ''lang="ja"'' in Chinese locale).
626+
Some operating system vendors does not offer means to customise ''system-ui'',
627+
unlike UAs that generally allow users to customise the generic ''sans-serif'' or ''serif'' font family.
628+
As the name implies, ''system-ui'' is intended for use with UI elements in web application, and not for large paragraphs of text or articles.
629+
617630
<dt id="math-def"><dfn>math</dfn>
618631
<dd>
619632
This font family is intended for use with mathematical expressions.

0 commit comments

Comments
 (0)