@@ -203,14 +203,7 @@ The Constructor</h3>
203
203
from a URL pointing to a font face file,
204
204
or from an {{ArrayBuffer}} (or {{ArrayBufferView}} ) containing the binary representation of a font face.
205
205
206
- When the <dfn constructor lt='FontFace()' for=FontFace>FontFace</dfn> (
207
- <span dfn-for="FontFace/FontFace(family, source, descriptors)">
208
- CSSOMString <dfn argument>family</dfn> ,
209
- (CSSOMString or {{/BinaryData}} ) <dfn argument>source</dfn> ,
210
- {{/FontFaceDescriptors}} <dfn argument>descriptors</dfn>
211
- </span>
212
- )
213
- method is called,
206
+ When the <dfn constructor for=FontFace>FontFace(family, source, descriptors)</dfn> method is called,
214
207
execute these steps:
215
208
216
209
1. Let <var> font face</var> be a fresh {{FontFace}} object.
@@ -490,10 +483,10 @@ The <code>FontFaceSet</code> Interface</h2>
490
483
491
484
See [[#font-face-set-ready]] for more details on this {{Promise}} and its use.
492
485
493
- : <dfn constructor lt="FontFaceSet()" >FontFaceSet</dfn> (sequence< {{FontFace}} > <dfn argument for="FontFaceSet/FontFaceSet()"> initialFaces</dfn>)
486
+ : <dfn constructor>FontFaceSet( initialFaces) </dfn>
494
487
:: The {{FontFaceSet}} constructor, when called,
495
488
must iterate its {{initialFaces}} argument
496
- and add each value to its <a> set entries</a> .
489
+ and add each value to its [=FontFaceSet/ set entries=] .
497
490
498
491
: <dfn dfn>iteration order</dfn>
499
492
:: When iterated over,
@@ -513,12 +506,12 @@ The <code>FontFaceSet</code> Interface</h2>
513
506
When the {{add()}} method is called,
514
507
execute the following steps:
515
508
516
- 1. If <var> font</var> is already in the {{FontFaceSet}} ’s <a> set entries</a> ,
509
+ 1. If <var> font</var> is already in the {{FontFaceSet}} ’s [=FontFaceSet/ set entries=] ,
517
510
skip to the last step of this algorithm immediately.
518
511
2. If <var> font</var> is <a>CSS-connected</a> ,
519
512
throw an {{InvalidModificationError}} exception
520
513
and exit this algorithm immediately.
521
- 3. Add the <var> font</var> argument to the {{FontFaceSet}} ’s <a> set entries</a> .
514
+ 3. Add the <var> font</var> argument to the {{FontFaceSet}} ’s [=FontFaceSet/ set entries=] .
522
515
2. If <var> font</var> ’s {{FontFace/status}} attribute is "loading":
523
516
1. If the {{FontFaceSet}} ’s {{[[LoadingFonts]]}} list is empty,
524
517
<a>switch the FontFaceSet to loading</a> .
@@ -533,7 +526,7 @@ The <code>FontFaceSet</code> Interface</h2>
533
526
1. If <var> font</var> is <a>CSS-connected</a> ,
534
527
return <code class='lang-javascript'> false</code>
535
528
and exit this algorithm immediately.
536
- 2. Let <var> deleted</var> be the result of removing <var> font</var> from the {{FontFaceSet}} ’s <a> set entries</a> .
529
+ 2. Let <var> deleted</var> be the result of removing <var> font</var> from the {{FontFaceSet}} ’s [=FontFaceSet/ set entries=] .
537
530
3. If <var> font</var> is present in the {{FontFaceSet}} ’s {{[[LoadedFonts]]}} , or {{[[FailedFonts]]}} lists,
538
531
remove it.
539
532
4. If <var> font</var> is present in the {{FontFaceSet}} ’s {{[[LoadingFonts]]}} list,
@@ -548,7 +541,7 @@ The <code>FontFaceSet</code> Interface</h2>
548
541
When the {{clear()}} method is called,
549
542
execute the following steps:
550
543
551
- 1. Remove all items from the {{FontFaceSet}} ’s <a> set entries</a> ,
544
+ 1. Remove all items from the {{FontFaceSet}} ’s [=FontFaceSet/ set entries=] ,
552
545
its {{[[LoadedFonts]]}} list,
553
546
and its {{[[FailedFonts]]}} list.
554
547
2. If the {{FontFaceSet}} ’s {{[[LoadingFonts]]}} list is non-empty,
@@ -617,7 +610,7 @@ Events</h3>
617
610
<tbody>
618
611
<tr>
619
612
<th> {{onloading}}
620
- <td> {{loading}}
613
+ <td> {{loading!!event }}
621
614
<tr>
622
615
<th> {{onloadingdone}}
623
616
<td> {{loadingdone}}
@@ -654,7 +647,7 @@ Events</h3>
654
647
replace it with a fresh pending promise.
655
648
656
649
<li>
657
- Queue a task to <a>fire a font load event</a> named {{loading}} at <var> font face set</var> .
650
+ Queue a task to <a>fire a font load event</a> named {{loading!!event }} at <var> font face set</var> .
658
651
</ol>
659
652
660
653
When asked to <dfn>switch the FontFaceSet to loaded</dfn> for a given {{FontFaceSet}} ,
@@ -1031,7 +1024,7 @@ Worker FontFaceSources</h3>
1031
1024
<h3 id="document-font-face-set">
1032
1025
Interaction with CSS’s ''@font-face'' Rule</h3>
1033
1026
1034
- The set entries for a document's <a>font source</a>
1027
+ The [=FontFaceSet/ set entries=] for a document's <a>font source</a>
1035
1028
must be initially populated with all the <a>CSS-connected</a> {{FontFace}} objects
1036
1029
from all of the CSS ''@font-face'' rules in the document's stylesheets,
1037
1030
in document order.
@@ -1176,3 +1169,13 @@ Acknowledgments</h2>
1176
1169
1177
1170
Several members of the Google Fonts team provided helpful feedback on font load events,
1178
1171
as did Boris Zbarsky, Jonas Sicking and ms2ger.
1172
+
1173
+ <h2 class=no-num id=priv-sec>
1174
+ Privacy & Security Considerations</h2>
1175
+
1176
+ The {{FontFaceSet}} object leaks information about the user's installed fonts,
1177
+ but in the exact same way as the existing ''@font-face'' rule;
1178
+ no new information is leaked,
1179
+ or in any appreciable easier manner.
1180
+
1181
+ This specification introduces no new security considerations.
0 commit comments