Skip to content

Commit fea5cc8

Browse files
committed
[css-font-loading] Allow system fonts to return true in check().
1 parent 6108937 commit fea5cc8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

css-font-loading/Overview.bs

+6-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ Events</h3>
559559
If asked to <dfn export>find the matching font faces</dfn>
560560
from a FontFaceSet <var>source</var>,
561561
for a given font string <var>font</var>
562-
and optionally some sample text <var>text</var>,
562+
optionally some sample text <var>text</var>,
563+
and optionally an <var>allow system fonts</var> flag,
563564
run the following steps:
564565

565566
<ol>
@@ -579,6 +580,8 @@ Events</h3>
579580

580581
<li>
581582
Let <var>available font faces</var> be the font faces within <var>source</var>.
583+
If the <var>allow system fonts</var> flag is specified,
584+
add all system fonts to <var>available font faces</var>.
582585

583586
<li>
584587
Let <var>matched font faces</var> initially be an empty list.
@@ -684,6 +687,7 @@ The <code>check()</code> method</h3>
684687
<li>
685688
<a>Find the matching font faces</a> from <var>font face set</var>
686689
using the <a argument for="FontFaceSet/check()">font</a> and <a argument for="FontFaceSet/check()">text</a> arguments passed to the function,
690+
and including system fonts,
687691
and let <var>font face list</var> be the return value.
688692
If a syntax error was returned,
689693
throw a SyntaxError exception
@@ -695,6 +699,7 @@ The <code>check()</code> method</h3>
695699

696700
<li>
697701
If all fonts in the <var>font face list</var> have a <a attribute for=FontFace>status</a> attribute of "loaded",
702+
or are system fonts,
698703
return <code>true</code>.
699704
Otherwise, return <code>false</code>.
700705
</ol>

css-font-loading/Overview.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ <h3 class="heading settled heading" data-level=3.2 id=FontFaceSet-events><span c
614614
<p>If asked to <dfn data-dfn-type=dfn data-export="" id=find-the-matching-font-faces>find the matching font faces<a class=self-link href=#find-the-matching-font-faces></a></dfn>
615615
from a FontFaceSet <var>source</var>,
616616
for a given font string <var>font</var>
617-
and optionally some sample text <var>text</var>,
617+
optionally some sample text <var>text</var>,
618+
and optionally an <var>allow system fonts</var> flag,
618619
run the following steps:</p>
619620

620621
<ol>
@@ -634,6 +635,8 @@ <h3 class="heading settled heading" data-level=3.2 id=FontFaceSet-events><span c
634635

635636
<li>
636637
Let <var>available font faces</var> be the font faces within <var>source</var>.
638+
If the <var>allow system fonts</var> flag is specified,
639+
add all system fonts to <var>available font faces</var>.
637640

638641
<li>
639642
Let <var>matched font faces</var> initially be an empty list.
@@ -723,6 +726,7 @@ <h3 class="heading settled heading" data-level=3.4 id=font-face-set-check><span
723726
<li>
724727
<a data-link-type=dfn href=#find-the-matching-font-faces title="find the matching font faces">Find the matching font faces</a> from <var>font face set</var>
725728
using the <a class=idl-code data-link-for=FontFaceSet/check() data-link-type=argument href=#dom-fontfacesetcheck-font title=font>font</a> and <a class=idl-code data-link-for=FontFaceSet/check() data-link-type=argument href=#dom-fontfacesetcheck-text title=text>text</a> arguments passed to the function,
729+
and including system fonts,
726730
and let <var>font face list</var> be the return value.
727731
If a syntax error was returned,
728732
throw a SyntaxError exception
@@ -734,6 +738,7 @@ <h3 class="heading settled heading" data-level=3.4 id=font-face-set-check><span
734738

735739
<li>
736740
If all fonts in the <var>font face list</var> have a <a class=idl-code data-link-for=FontFace data-link-type=attribute href=#dom-fontface-status title=status>status</a> attribute of "loaded",
741+
or are system fonts,
737742
return <code>true</code>.
738743
Otherwise, return <code>false</code>.
739744
</ol>

0 commit comments

Comments
 (0)