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>load()</code> method</span><aclass=self-linkhref=#font-face-load></a></h4>
347
347
348
+
<p> The <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-load>load()</a> method of <aclass=idl-codedata-link-type=interface>FontFace</a>
349
+
forces a url-based font face to request its font data and load.
350
+
For fonts constructed from binary data,
351
+
or fonts that are already loading or loaded,
352
+
it does nothing.
353
+
348
354
<p> When the <dfnclass=idl-codedata-dfn-for=FontFacedata-dfn-type=methoddata-export="" id=dom-fontface-load>load()<aclass=self-linkhref=#dom-fontface-load></a></dfn> method is called,
The <code>ready()</code> method</span><aclass=self-linkhref=#font-face-ready></a></h4>
390
396
397
+
<p> The <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-ready>ready()</a> method of <aclass=idl-codedata-link-type=interface>FontFace</a>
398
+
returns a Promise
399
+
which is fulfilled when the font face is successfully loaded,
400
+
or rejected when the font face fails to load or parse successfully.
401
+
391
402
<p> When the <dfnclass=idl-codedata-dfn-for=FontFacedata-dfn-type=methoddata-export="" id=dom-fontface-ready>ready()<aclass=self-linkhref=#dom-fontface-ready></a></dfn> method is called,
The <code>match()</code> method</span><aclass=self-linkhref=#font-face-match></a></h4>
404
415
416
+
<p> The <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-matchfontfacedescriptors-descriptors-optional-domstring-characters>match()</a> method of <aclass=idl-codedata-link-type=interface>FontFace</a> exposes the CSS font-matching algorithm
417
+
on a per-font basis,
418
+
allowing one to test individual fonts to see if they match a given <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-fonts-3/#propdef-fonttitle=font>font</a> value.
419
+
405
420
<p> When the <dfnclass=idl-codedata-dfn-for=FontFacedata-dfn-type=methoddata-export="" id=dom-fontface-matchfontfacedescriptors-descriptors-optional-domstring-characterstitle=match()>match(<aclass=idl-codedata-link-type=interface>FontFaceDescriptors</a><dfnclass=idl-codedata-dfn-for="FontFace/match() match()" data-dfn-type=argumentdata-export="" id=dom-fontfacematch-match-descriptors>descriptors<aclass=self-linkhref=#dom-fontfacematch-match-descriptors></a></dfn>, optional DOMString <dfnclass=idl-codedata-dfn-for="FontFace/match() match()" data-dfn-type=argumentdata-export="" id=dom-fontfacematch-match-characters>characters<aclass=self-linkhref=#dom-fontfacematch-match-characters></a></dfn>)<aclass=self-linkhref=#dom-fontface-matchfontfacedescriptors-descriptors-optional-domstring-characters></a></dfn> method is called,
Connection to CSS’s <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule>@font-face</a></span><aclass=self-linkhref=#font-face-css-connection></a></h4>
The <a>ready promise</a> is only fulfilled after layout operations complete
797
812
and no additional font loads are necessary.
798
813
814
+
<pclass=note> Note: Note that the Promise returned by this <aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-ready>ready()</a> method is only ever fulfilled,
815
+
never rejected,
816
+
unlike the Promise returned by the <aclass=idl-codedata-link-type=interface>FontFace</a><aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-ready>ready()</a> method.
The <amethodfor=FontFace>load()</a> method of <ainterface>FontFace</a>
270
+
forces a url-based font face to request its font data and load.
271
+
For fonts constructed from binary data,
272
+
or fonts that are already loading or loaded,
273
+
it does nothing.
274
+
269
275
When the <dfnmethodfor=FontFace>load()</dfn> method is called,
270
276
execute these steps:
271
277
@@ -309,6 +315,11 @@ <h4 id='font-face-load'>
309
315
<h4id='font-face-ready'>
310
316
The <code>ready()</code> method</h4>
311
317
318
+
The <amethodfor=FontFace>ready()</a> method of <ainterface>FontFace</a>
319
+
returns a Promise
320
+
which is fulfilled when the font face is successfully loaded,
321
+
or rejected when the font face fails to load or parse successfully.
322
+
312
323
When the <dfnmethodfor="FontFace">ready()</dfn> method is called,
313
324
execute these steps:
314
325
@@ -323,11 +334,15 @@ <h4 id='font-face-ready'>
323
334
<h4id='font-face-match'>
324
335
The <code>match()</code> method</h4>
325
336
337
+
The <amethodfor=FontFace>match()</a> method of <ainterface>FontFace</a> exposes the CSS font-matching algorithm
338
+
on a per-font basis,
339
+
allowing one to test individual fonts to see if they match a given 'font' value.
340
+
326
341
When the <dfnmethodfor="FontFace" title='match()'>match(<ainterface>FontFaceDescriptors</a><dfnargument>descriptors</dfn>, optional DOMString <dfnargument>characters</dfn>)</dfn> method is called,
327
342
execute these steps:
328
343
329
344
<pclass='issue'>
330
-
Refer to Font's font matching algorithm somehow.
345
+
Figure out how to run Font's font selection algorithm on a single face.
0 commit comments