Skip to content

Commit

Permalink
[css-fonts-4] Add note suggesting heuristics. #4108
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins committed Apr 2, 2021
1 parent 82fc7dd commit f2e3f00
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,25 @@ for example, forcing all fonts to have a ''0s'' <a>block period</a>.
but ''optional'' ensures they can actually <em>use</em> the site,
rather than quitting and going elsewhere because the site takes too long to load.
</div>

<div class=note>
To increase the chance that an ''optional'' font will be available
in time to use for rendering some text,
it is recommended that the user agent employ heuristics
to make it faster to access
or to judge when it would be worthwhile to delay rendering some text,
such as checking if the font is preloaded in HTML,
or moving the file from slower to faster in-memory caches
as soon as it is seen in a stylesheet
(before it's known whether it will be used on the page).

These heuristics cannot be relied upon by authors, however;
it must be understood that the ''optional'' value
can result in the font never being used.
If a somewhat higher assurance of the font being used is needed,
authors should consider using the ''fallback'' value.
</div>

</dl>


Expand Down

0 comments on commit f2e3f00

Please sign in to comment.