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
Create a fresh <a>FontFace</a> object, <var>font face.
290
+
Let <var>font face</var> be a fresh <a>FontFace</a> object.
286
291
Set <var>font face’s</var><ahref=#status0>status</a> argument to <code>"unloaded"</code>.
287
292
Set its internal <a>[[FontStatusPromise]]</a> attribute to a fresh pending <a>Promise</a> object.
288
293
289
-
</var><li>
294
+
<li>
290
295
Parse the <ahref=#family>family</a> argument,
291
296
and the members of the <a>descriptors</a> argument,
292
297
according to the grammars of the corresponding descriptors of the CSS <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule>@font-face</a> rule.
Create a fresh <a>FontFace</a> object, <var>font face</a>.
218
+
Let <var>font face</var> be a fresh <a>FontFace</a> object.
209
219
Set <var>font face's</var><a>status</a> argument to <code>"unloaded"</code>.
210
220
Set its internal <a>[[FontStatusPromise]]</a> attribute to a fresh pending <a>Promise</a> object.
211
221
@@ -322,6 +332,23 @@ <h4 id='font-face-match'>
322
332
<pclass='issue'>
323
333
Refer to Font's font matching algorithm somehow.
324
334
335
+
<h4id='font-face-css-connection'>
336
+
Connection to CSS's ''@font-face''</h4>
337
+
338
+
A CSS ''@font-face'' rule automatically defines a corresponding <ainterface>FontFace</a> object,
339
+
which is automatically placed in the document's <aattribute>fonts</a> attribute.
340
+
341
+
The <ainterface>FontFace</a> object corresponding to a ''@font-face'' rule
342
+
has its <aattribute>family</a>, <aattribute>style</a>, <aattribute>weight</a>, <aattribute>stretch</a>, <aattribute>unicodeRange</a>, <aattribute>variant</a>, and <aattribute>featureSettings</a> attributes set to the same value as the corresponding descriptors in the ''@font-face'' rule.
343
+
There is a two-way connection between the two:
344
+
any change made to a ''@font-face'' descriptor is immediately reflected in the corresponding <ainterface>FontFace</a> attribute,
345
+
and vice versa.
346
+
347
+
The internal <aattribute>[[CSSUrl]]</a> attribute of the <ainterface>FontFace</a> object is set to the value of the ''@font-face'' rule's 'src' descriptor,
348
+
and reflects any changes made to the 'src' descriptor.
349
+
350
+
Otherwise, a <ainterface>FontFace</a> object created by a CSS ''@font-face'' rule is identical to one created manually.
0 commit comments