You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The <code>match()</code> method</span><aclass=self-linkhref=#font-face-set-match></a></h3>
636
636
637
-
<p> The <adata-link-for=FontFaceSetdata-link-type=functionishhref=#dom-fontfaceset-matchfont-texttitle=match()>match()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> returns
637
+
<p> The <adata-link-for=FontFaceSetdata-link-type=functionishhref=#dom-fontfaceset-matchtitle=match()>match()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> returns
638
638
the subset of <adata-link-type=dfnhref=#available-font-facestitle="available font faces">available font faces</a>
639
639
that match a given <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-fonts-3/#propdef-fonttitle=font>font</a> specifier
640
640
and can render the given characters.
641
641
642
-
<p> When the <dfnclass=idl-codedata-dfn-for=FontFaceSetdata-dfn-type=methoddata-export="" id=dom-fontfaceset-matchfont-texttitle=match()>match(<dfnclass=idl-codedata-dfn-for="FontFaceSet/match() match()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetmatch-match-font>font<aclass=self-linkhref=#dom-fontfacesetmatch-match-font></a></dfn>, <dfnclass=idl-codedata-dfn-for="FontFaceSet/match() match()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetmatch-match-text>text<aclass=self-linkhref=#dom-fontfacesetmatch-match-text></a></dfn>)<aclass=self-linkhref=#dom-fontfaceset-matchfont-text></a></dfn> method is called,
642
+
<p> When the <dfnclass=idl-codedata-dfn-for=FontFaceSetdata-dfn-type=methoddata-export="" id=dom-fontfaceset-matchtitle=match()>match(<dfnclass=idl-codedata-dfn-for="FontFaceSet/match() match()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetmatch-match-font>font<aclass=self-linkhref=#dom-fontfacesetmatch-match-font></a></dfn>, <dfnclass=idl-codedata-dfn-for="FontFaceSet/match() match()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetmatch-match-text>text<aclass=self-linkhref=#dom-fontfacesetmatch-match-text></a></dfn>)<aclass=self-linkhref=#dom-fontfaceset-match></a></dfn> method is called,
The <code>load()</code> method</span><aclass=self-linkhref=#font-face-set-load></a></h3>
674
674
675
-
<p> The <adata-link-for=FontFaceSetdata-link-type=functionishhref=#dom-fontfaceset-loadfont-texttitle=load()>load()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> will determine whether all fonts in the given font list
675
+
<p> The <adata-link-for=FontFaceSetdata-link-type=functionishhref=#dom-fontfaceset-loadtitle=load()>load()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> will determine whether all fonts in the given font list
676
676
have been loaded and are available.
677
677
If any fonts are downloadable fonts and have not already been loaded,
678
678
the user agent will initiate the load of each of these fonts.
679
679
It returns a Promise,
680
680
which is fulfilled when all of the fonts are loaded and ready to be used,
681
681
or rejected if any font failed to load properly.
682
682
683
-
<p> When the <dfnclass=idl-codedata-dfn-for=FontFaceSetdata-dfn-type=methoddata-export="" id=dom-fontfaceset-loadfont-texttitle=load()>load(<dfnclass=idl-codedata-dfn-for="FontFaceSet/load() load()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetload-load-font>font<aclass=self-linkhref=#dom-fontfacesetload-load-font></a></dfn>, <dfnclass=idl-codedata-dfn-for="FontFaceSet/load() load()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetload-load-text>text<aclass=self-linkhref=#dom-fontfacesetload-load-text></a></dfn>)<aclass=self-linkhref=#dom-fontfaceset-loadfont-text></a></dfn> method is called,
683
+
<p> When the <dfnclass=idl-codedata-dfn-for=FontFaceSetdata-dfn-type=methoddata-export="" id=dom-fontfaceset-loadtitle=load()>load(<dfnclass=idl-codedata-dfn-for="FontFaceSet/load() load()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetload-load-font>font<aclass=self-linkhref=#dom-fontfacesetload-load-font></a></dfn>, <dfnclass=idl-codedata-dfn-for="FontFaceSet/load() load()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetload-load-text>text<aclass=self-linkhref=#dom-fontfacesetload-load-text></a></dfn>)<aclass=self-linkhref=#dom-fontfaceset-load></a></dfn> method is called,
Call <var>font face set’s</var><aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchfont-texttitle=match()>match()</a> method
696
+
Call <var>font face set’s</var><aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchtitle=match()>match()</a> method
697
697
with the same arguments as this method,
698
698
and let <var>font face list</var> be the return value.
699
-
If <aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchfont-texttitle=match()>match()</a> threw an exception,
699
+
If <aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchtitle=match()>match()</a> threw an exception,
700
700
reject <var>promise</var> with that same exception and terminate these steps.
The <code>check()</code> method</span><aclass=self-linkhref=#font-face-set-check></a></h3>
713
713
714
-
<p> The <adata-link-type=functionishhref=#dom-fontfaceset-checkfont-texttitle=check()>check()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> will determine whether all fonts in the given font list
714
+
<p> The <adata-link-type=functionishhref=#dom-fontfaceset-checktitle=check()>check()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> will determine whether all fonts in the given font list
715
715
have been loaded and are available.
716
716
If all fonts are available,
717
717
it returns true;
718
718
otherwise, it returns false.
719
719
720
-
<p> When the <dfnclass=idl-codedata-dfn-for=FontFaceSetdata-dfn-type=methoddata-export="" id=dom-fontfaceset-checkfont-texttitle=check()>check(<dfnclass=idl-codedata-dfn-for="FontFaceSet/check() check()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetcheck-check-font>font<aclass=self-linkhref=#dom-fontfacesetcheck-check-font></a></dfn>, <dfnclass=idl-codedata-dfn-for="FontFaceSet/check() check()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetcheck-check-text>text<aclass=self-linkhref=#dom-fontfacesetcheck-check-text></a></dfn>)<aclass=self-linkhref=#dom-fontfaceset-checkfont-text></a></dfn> method is called,
720
+
<p> When the <dfnclass=idl-codedata-dfn-for=FontFaceSetdata-dfn-type=methoddata-export="" id=dom-fontfaceset-checktitle=check()>check(<dfnclass=idl-codedata-dfn-for="FontFaceSet/check() check()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetcheck-check-font>font<aclass=self-linkhref=#dom-fontfacesetcheck-check-font></a></dfn>, <dfnclass=idl-codedata-dfn-for="FontFaceSet/check() check()" data-dfn-type=argumentdata-export="" id=dom-fontfacesetcheck-check-text>text<aclass=self-linkhref=#dom-fontfacesetcheck-check-text></a></dfn>)<aclass=self-linkhref=#dom-fontfaceset-check></a></dfn> method is called,
721
721
execute these steps:
722
722
723
723
<ol>
724
724
<li>
725
725
Let <var>font face set</var> be the <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacesettitle=fontfaceset>FontFaceSet</a> object this method was called on.
726
726
727
727
<li>
728
-
Call <var>font face set’s</var><aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchfont-texttitle=match()>match()</a> method
728
+
Call <var>font face set’s</var><aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchtitle=match()>match()</a> method
729
729
with the same arguments as this method,
730
730
and let <var>font face list</var> be the return value.
731
-
If <aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchfont-texttitle=match()>match()</a> threw an exception,
731
+
If <aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-matchtitle=match()>match()</a> threw an exception,
732
732
throw that same exception and terminate these steps.
0 commit comments