Skip to content

Commit c3159c2

Browse files
committed
[css-font-loading] Actually specify how to parse the FontFace descriptors.
1 parent 1f9e569 commit c3159c2

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

css-font-loading/Overview.bs

+14
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ The <code>FontFace</code> Interface</h2>
107107
<em>represents</em> an italic font face;
108108
it does not <strong>make</strong> the font face italic.
109109

110+
On getting, return the string associated with this attribute.
111+
112+
On setting, parse the string according to the grammar for the CSS ''@font-face'' rule.
113+
If it does not match the grammar,
114+
throw a TypeError;
115+
otherwise, set the attribute to the provided string.
116+
110117
<dt><dfn>variant</dfn>, <span attribute-info for=variant></span>
111118
<dt><dfn>featureSettings</dfn>, <span attribute-info for=featureSettings></span>
112119
<dd>
@@ -118,6 +125,13 @@ The <code>FontFace</code> Interface</h2>
118125
Unlike the previous attributes,
119126
these attributes actually affect the font face.
120127

128+
On getting, return the string associated with this attribute.
129+
130+
On setting, parse the string according to the grammar for the CSS ''@font-face'' rule.
131+
If it does not match the grammar,
132+
throw a TypeError;
133+
otherwise, set the attribute to the provided string.
134+
121135
<dt><dfn>status</dfn>, <span attribute-info for=FontFace/status></span>
122136
<dd>
123137
This attribute reflects the current status of the font face.

css-font-loading/Overview.html

+19-4
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
</p>
5555
<h1 class="p-name no-ref" id=title>CSS Font Loading Module Level 3</h1>
5656
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
57-
<span class=dt-updated><span class=value-title title=20140616>16 June 2014</span></span></span></h2>
58-
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-font-loading/>http://dev.w3.org/csswg/css-font-loading/</a><dt>Latest version:<dd><a href=http://w3.org/TR/css-font-loading/>http://w3.org/TR/css-font-loading/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-font-loading/>http://dev.w3.org/csswg/css-font-loading/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2014/WD-css-font-loading-3-20140522/ rel=previous>http://www.w3.org/TR/2014/WD-css-font-loading-3-20140522/</a>
57+
<span class=dt-updated><span class=value-title title=20140622>22 June 2014</span></span></span></h2>
58+
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-font-loading/>http://dev.w3.org/csswg/css-font-loading/</a><dt>Latest version:<dd><a href=http://w3.org/TR/css-font-loading/>http://w3.org/TR/css-font-loading/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2014/WD-css-font-loading-3-20140522/ rel=previous>http://www.w3.org/TR/2014/WD-css-font-loading-3-20140522/</a>
5959
<dt>Feedback:</dt>
6060
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-font-loading%5D%20feedback">www-style@w3.org</a>
6161
with subject line
62-
<kbd>[css-font-loading] <var>… message topic …</var></kbd>”(<a href=http://lists.w3.org/Archives/Public/www-style/ rel=discussion>archives</a>)<dt>Test Suite:<dd>None Yet<dt>Editors:
62+
<kbd>[css-font-loading] <var>… message topic …</var></kbd>”(<a href=http://lists.w3.org/Archives/Public/www-style/ rel=discussion>archives</a>)<dt>Editors:
6363
<dd class="p-author h-card vcard"><a class="p-name fn u-url url" href=http://xanthir.com/contact/>Tab Atkins Jr.</a> (<span class="p-org org">Google</span>)<dt>Former Editors:
6464
<dd class="p-author h-card vcard"><a class="p-name fn u-email email" href=mailto:jdaggett@mozilla.com>John Daggett</a> (<span class="p-org org">Mozilla</span>)</dl></div>
6565
<div data-fill-with=warning></div>
@@ -69,7 +69,8 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class
6969
</div>
7070

7171
<h2 class="no-num no-toc no-ref heading settled heading" id=abstract><span class=content>Abstract</span></h2>
72-
<p class=p-summary data-fill-with=abstract>This CSS module describes events and interfaces used for dynamically loading font resources.
72+
<p class=p-summary data-fill-with=abstract><p>This CSS module describes events and interfaces used for dynamically loading font resources.</p>
73+
7374
<a href=http://www.w3.org/TR/CSS/>CSS</a> is a language for describing the rendering of structured documents
7475
(such as HTML and XML)
7576
on screen, on paper, in speech, etc.</p>
@@ -231,6 +232,13 @@ <h2 class="heading settled heading" data-level=2 id=fontface-interface><span cla
231232
<em>represents</em> an italic font face;
232233
it does not <strong>make</strong> the font face italic.</p>
233234

235+
<p>On getting, return the string associated with this attribute.</p>
236+
237+
<p>On setting, parse the string according to the grammar for the CSS <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> rule.
238+
If it does not match the grammar,
239+
throw a TypeError;
240+
otherwise, set the attribute to the provided string.</p>
241+
234242
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-variant>variant<a class=self-link href=#dom-fontface-variant></a></dfn>, <span data-attribute-info="" for=variant> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
235243
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-featuresettings>featureSettings<a class=self-link href=#dom-fontface-featuresettings></a></dfn>, <span data-attribute-info="" for=featureSettings> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
236244
<dd>
@@ -242,6 +250,13 @@ <h2 class="heading settled heading" data-level=2 id=fontface-interface><span cla
242250
Unlike the previous attributes,
243251
these attributes actually affect the font face.</p>
244252

253+
<p>On getting, return the string associated with this attribute.</p>
254+
255+
<p>On setting, parse the string according to the grammar for the CSS <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> rule.
256+
If it does not match the grammar,
257+
throw a TypeError;
258+
otherwise, set the attribute to the provided string.</p>
259+
245260
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-status>status<a class=self-link href=#dom-fontface-status></a></dfn>, <span data-attribute-info="" for=FontFace/status> of type <a data-link-type=idl-name href=#enumdef-fontfaceloadstatus title=fontfaceloadstatus>FontFaceLoadStatus</a>, readonly</span>
246261
<dd>
247262
This attribute reflects the current status of the font face.

0 commit comments

Comments
 (0)