Skip to content

Commit 79edf54

Browse files
committed
[css-font-loading] Add a note to the FontFace constructor saying that it doesn't automatically add anything to the font source.
1 parent fb3052c commit 79edf54

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

css-font-loading/Overview.bs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ The Constructor</h3>
182182
and set <var>font face's</var> <a for=FontFace>status</a> attribute to "error".
183183
</ol>
184184

185+
Note: Note that constructing a <a idl>FontFace</a> object <strong>does not</strong> automatically add it to the document's <a>font source</a>.
186+
If it's desired that the newly-constructed <a idl>FontFace</a> object is usable from CSS/etc,
187+
it must be explicitly added to the <a>font source</a>.
188+
185189
<h3 id='font-face-load'>
186190
The <code>load()</code> method</h3>
187191

css-font-loading/Overview.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ <h3 class="heading settled heading" data-level=2.1 id=font-face-constructor><spa
276276
and set <var>font face’s</var> <a data-link-for=FontFace data-link-type=idl href=#dom-fontface-status title=status>status</a> attribute to "error".
277277
</ol>
278278

279+
<p class=note> Note: Note that constructing a <a data-link-type=idl href=#dom-fontface title=fontface>FontFace</a> object <strong>does not</strong> automatically add it to the document’s <a data-link-type=dfn href=#font-source title="font source">font source</a>.
280+
If it’s desired that the newly-constructed <a data-link-type=idl href=#dom-fontface title=fontface>FontFace</a> object is usable from CSS/etc,
281+
it must be explicitly added to the <a data-link-type=dfn href=#font-source title="font source">font source</a>.
282+
279283
<h3 class="heading settled heading" data-level=2.2 id=font-face-load><span class=secno>2.2 </span><span class=content>
280284
The <code>load()</code> method</span><a class=self-link href=#font-face-load></a></h3>
281285

0 commit comments

Comments
 (0)