Skip to content

Commit 97238a7

Browse files
committed
[css-font-loading] Switch to using the attribute-info element.
--HG-- extra : rebase_source : d45b2dd25851da008fbf060639d19ceea0f458b2
1 parent 1656f82 commit 97238a7

2 files changed

Lines changed: 41 additions & 37 deletions

File tree

css-font-loading/Overview.bs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ The <code>FontFace</code> Interface</h2>
8181
</pre>
8282

8383
<dl dfn-type=attribute dfn-for=FontFace>
84-
<dt><dfn>family</dfn>, of type <a interface>DOMString</a>
85-
<dt><dfn>style</dfn>, of type <a interface>DOMString</a>
86-
<dt><dfn>weight</dfn>, of type <a interface>DOMString</a>
87-
<dt><dfn>stretch</dfn>, of type <a interface>DOMString</a>
88-
<dt><dfn>unicodeRange</dfn>, of type <a interface>DOMString</a>
84+
<dt><dfn>family</dfn>, <span attribute-info for=family></span>
85+
<dt><dfn>style</dfn>, <span attribute-info for=style></span>
86+
<dt><dfn>weight</dfn>, <span attribute-info for=weight></span>
87+
<dt><dfn>stretch</dfn>, <span attribute-info for=stretch></span>
88+
<dt><dfn>unicodeRange</dfn>, <span attribute-info for=unicodeRange></span>
8989
<dd>
9090
These attributes all represent the corresponding aspects of a font face,
9191
as defined by the descriptors defined in the CSS ''@font-face'' rule.
@@ -97,8 +97,8 @@ The <code>FontFace</code> Interface</h2>
9797
<em>represents</em> an italic font face;
9898
it does not <strong>make</strong> the font face italic.
9999

100-
<dt><dfn>variant</dfn>, of type <a interface>DOMString</a>
101-
<dt><dfn>featureSettings</dfn>, of type <a interface>DOMString</a>
100+
<dt><dfn>variant</dfn>, <span attribute-info for=variant></span>
101+
<dt><dfn>featureSettings</dfn>, <span attribute-info for=featureSettings></span>
102102
<dd>
103103
These attributes have the same meaning,
104104
and are parsed the same as,
@@ -108,7 +108,7 @@ The <code>FontFace</code> Interface</h2>
108108
Unlike the previous attributes,
109109
these attributes actually affect the font face.
110110

111-
<dt><dfn>status</dfn>, of type <a enum>FontFaceLoadStatus</a>
111+
<dt><dfn>status</dfn>, <span attribute-info for=FontFace/status></span>
112112
<dd>
113113
This attribute reflects the current status of the font face.
114114
It must be "unloaded" for a newly-created <a interface>FontFace</a>.
@@ -118,7 +118,7 @@ The <code>FontFace</code> Interface</h2>
118118
or implicitly by the user agent,
119119
due to it detecting that the font face is needed to draw some text on the screen.
120120

121-
<dt><dfn>loaded</dfn>, of type <a interface>Promise</a>
121+
<dt><dfn>loaded</dfn>, <span attribute-info for=loaded></span>
122122
<dd>
123123
This attribute reflects the <a idl>[<!---->[FontStatusPromise]]</a> of the font face.
124124
</dl>

css-font-loading/Overview.html

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body class=h-entry>
99
<div class=head>
1010
<p data-fill-with=logo><a class=logo href=http://www.w3.org/>
11-
<img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72>
11+
<img alt=W3C height=48 src=https://www.w3.org/Icons/w3c_home width=72>
1212
</a>
1313
</p>
1414
<h1 class="p-name no-ref" id=title>CSS Font Loading Module Level 3</h1>
@@ -179,24 +179,24 @@ <h2 class="heading settled heading" data-level=2 id=fontface-interface><span cla
179179
</pre>
180180

181181
<dl data-dfn-for=FontFace data-dfn-type=attribute>
182-
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-family>family<a class=self-link href=#dom-fontface-family></a></dfn>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
183-
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-style>style<a class=self-link href=#dom-fontface-style></a></dfn>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
184-
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-weight>weight<a class=self-link href=#dom-fontface-weight></a></dfn>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
185-
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-stretch>stretch<a class=self-link href=#dom-fontface-stretch></a></dfn>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
186-
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-unicoderange>unicodeRange<a class=self-link href=#dom-fontface-unicoderange></a></dfn>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
182+
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-family>family<a class=self-link href=#dom-fontface-family></a></dfn>, <span data-attribute-info="" for=family> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
183+
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-style>style<a class=self-link href=#dom-fontface-style></a></dfn>, <span data-attribute-info="" for=style> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
184+
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-weight>weight<a class=self-link href=#dom-fontface-weight></a></dfn>, <span data-attribute-info="" for=weight> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
185+
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-stretch>stretch<a class=self-link href=#dom-fontface-stretch></a></dfn>, <span data-attribute-info="" for=stretch> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
186+
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-unicoderange>unicodeRange<a class=self-link href=#dom-fontface-unicoderange></a></dfn>, <span data-attribute-info="" for=unicodeRange> of type <a data-link-type=idl-name title=domstring>DOMString</a></span>
187187
<dd>
188188
These attributes all represent the corresponding aspects of a font face,
189189
as defined by the descriptors defined in the CSS <a class=css data-link-type=maybe href=http://www.w3.org/TR/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> rule.
190190
They are parsed the same as the corresponding <a class=css data-link-type=maybe href=http://www.w3.org/TR/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> descriptors.
191191
They are used by the font matching algorithm,
192192
but otherwise have no effect.
193193

194-
For example, a <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> with a <a class=idl-code data-link-type=attribute href=#dom-fontface-style title=style>style</a> of <code>"italic"</code>
194+
<p>For example, a <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> with a <a class=idl-code data-link-type=attribute href=#dom-fontface-style title=style>style</a> of <code>"italic"</code>
195195
<em>represents</em> an italic font face;
196-
it does not <strong>make</strong> the font face italic.
196+
it does not <strong>make</strong> the font face italic.</p>
197197

198-
<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>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
199-
<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>, of type <a class=idl-code data-link-type=interface title=domstring>DOMString</a>
198+
<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>
199+
<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>
200200
<dd>
201201
These attributes have the same meaning,
202202
and are parsed the same as,
@@ -206,7 +206,7 @@ <h2 class="heading settled heading" data-level=2 id=fontface-interface><span cla
206206
Unlike the previous attributes,
207207
these attributes actually affect the font face.</p>
208208

209-
<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>, of type <a class=idl-code data-link-type=enum href=#enumdef-fontfaceloadstatus title=fontfaceloadstatus>FontFaceLoadStatus</a>
209+
<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>
210210
<dd>
211211
This attribute reflects the current status of the font face.
212212
It must be "unloaded" for a newly-created <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a>.
@@ -216,7 +216,7 @@ <h2 class="heading settled heading" data-level=2 id=fontface-interface><span cla
216216
or implicitly by the user agent,
217217
due to it detecting that the font face is needed to draw some text on the screen.</p>
218218

219-
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-loaded>loaded<a class=self-link href=#dom-fontface-loaded></a></dfn>, of type <a class=idl-code data-link-type=interface href=#dom-promise title=promise>Promise</a>
219+
<dt><dfn class=idl-code data-dfn-for=FontFace data-dfn-type=attribute data-export="" id=dom-fontface-loaded>loaded<a class=self-link href=#dom-fontface-loaded></a></dfn>, <span data-attribute-info="" for=loaded> of type <a data-link-type=idl-name href=#dom-promise title=promise>Promise<boolean></boolean></a></span>
220220
<dd>
221221
This attribute reflects the <a data-link-type=idl href=#dom-fontface-fontstatuspromise title=[[fontstatuspromise]]>[[FontStatusPromise]]</a> of the font face.
222222
</dl>
@@ -325,7 +325,7 @@ <h3 class="heading settled heading" data-level=2.2 id=font-face-load><span class
325325

326326
<li>
327327
Using the value of <var>font face’s <a data-link-type=idl href=#dom-fontface-urls title=[[urls]]>[[Urls]]</a> slot,
328-
attempt to load a font as defined in <a data-biblio-type=normative data-link-type=biblio href=#css3-fonts title=css3-fonts>[CSS3-FONTS]</a>,
328+
attempt to load a font as defined in <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-fonts title=biblio-css3-fonts>[CSS3-FONTS]</a>,
329329
as if it was the value of a <a class=css data-link-type=maybe href=http://www.w3.org/TR/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> rule’s <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css-fonts-3/#descdef-src title=src>src</a> descriptor.
330330

331331
</var><li>
@@ -463,13 +463,13 @@ <h2 class="heading settled heading" data-level=3 id=FontFaceSet-interface><span
463463
<h3 class="heading settled heading" data-level=3.1 id=set-modifications><span class=secno>3.1 </span><span class=content>
464464
Modifications of normal Set methods</span><a class=self-link href=#set-modifications></a></h3>
465465

466-
The <a class=idl-code data-link-type=interface href=#dom-fontfaceset title=fontfaceset>FontFaceSet</a> methods <code>add()</code> and <code>delete()</code>
466+
<p>The <a class=idl-code data-link-type=interface href=#dom-fontfaceset title=fontfaceset>FontFaceSet</a> methods <code>add()</code> and <code>delete()</code>
467467
must throw an InvalidModificationError exception
468-
if their argument is a <a data-link-type=dfn href=#css-connected title=css-connected>CSS-connected</a> <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> object.
468+
if their argument is a <a data-link-type=dfn href=#css-connected title=css-connected>CSS-connected</a> <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> object.</p>
469469

470-
The <a class=idl-code data-link-type=interface href=#dom-fontfaceset title=fontfaceset>FontFaceSet</a> method <code>clear()</code>
470+
<p>The <a class=idl-code data-link-type=interface href=#dom-fontfaceset title=fontfaceset>FontFaceSet</a> method <code>clear()</code>
471471
must only remove the manually-added <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> objects;
472-
the <a data-link-type=dfn href=#css-connected title=css-connected>CSS-connected</a> <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> objects are unaffected.
472+
the <a data-link-type=dfn href=#css-connected title=css-connected>CSS-connected</a> <a class=idl-code data-link-type=interface href=#dom-fontface title=fontface>FontFace</a> objects are unaffected.</p>
473473

474474

475475
<h3 class="heading settled heading" data-level=3.2 id=FontFaceSet-events><span class=secno>3.2 </span><span class=content>
@@ -756,7 +756,7 @@ <h3 class="heading settled heading" data-level=3.5 id=font-face-set-ready><span
756756
<h3 class="heading settled heading" data-level=3.6 id=font-face-set-css><span class=secno>3.6 </span><span class=content>
757757
Interaction with CSS Font Loading and Matching</span><a class=self-link href=#font-face-set-css></a></h3>
758758

759-
<p>When the font matching algorithm in <a data-biblio-type=informative data-link-type=biblio href=#css3-fonts title=css3-fonts>[CSS3-FONTS]</a> is run automatically by the user-agent,
759+
<p>When the font matching algorithm in <a data-biblio-type=informative data-link-type=biblio href=#biblio-css3-fonts title=biblio-css3-fonts>[CSS3-FONTS]</a> is run automatically by the user-agent,
760760
the set of font faces it matches over must be precisely the set of fonts in the <a data-link-type=dfn href=#font-source title="font source">font source</a> for the document,
761761
plus any local font faces.</p>
762762

@@ -779,7 +779,7 @@ <h3 class="heading settled heading" data-level=3.6 id=font-face-set-css><span cl
779779
document.body.style.fontFamily = "newfont, serif";
780780
</pre>
781781

782-
Constructing a new <a data-link-type=idl href=#dom-fontface title=fontface>FontFace</a> object and adding it to <code>document.fonts</code>:
782+
<p>Constructing a new <a data-link-type=idl href=#dom-fontface title=fontface>FontFace</a> object and adding it to <code>document.fonts</code>:</p>
783783

784784
<pre>var f = new FontFace("newfont", "url(newfont.woff)");
785785
document.fonts.add(f);
@@ -789,8 +789,8 @@ <h3 class="heading settled heading" data-level=3.6 id=font-face-set-css><span cl
789789
<p>In both cases, the loading of the font resource “newfont.woff” will be initiated by the layout engine,
790790
just as other <a class=css data-link-type=maybe href=http://www.w3.org/TR/css-fonts-3/#at-font-face-rule title=@font-face>@font-face</a> rule fonts are loaded.</p>
791791

792-
Omitting the addition to <code>document.fonts</code> means the font would never be loaded
793-
and text would be displayed in the default serif font:
792+
<p>Omitting the addition to <code>document.fonts</code> means the font would never be loaded
793+
and text would be displayed in the default serif font:</p>
794794

795795
<pre>var f = new FontFace("newfont", "url(newtest.woff)", {});
796796

@@ -814,8 +814,8 @@ <h3 class="heading settled heading" data-level=3.6 id=font-face-set-css><span cl
814814
Once the download completes,
815815
the font is added to the document’s <a data-link-type=idl href=#dom-fontfaceset title=fontfaceset>FontFaceSet</a>,
816816
the body font is changed,
817-
and the layout engine uses the new font resource.
818-
</div><p></p>
817+
and the layout engine uses the new font resource.</p>
818+
</div>
819819

820820
<h2 class="heading settled heading" data-level=4 id=font-face-source><span class=secno>4 </span><span class=content>
821821
The <code>FontFaceSource</code> interface</span><a class=self-link href=#font-face-source></a></h2>
@@ -947,8 +947,8 @@ <h2 class="heading settled heading" data-level=5 id=font-load-event-examples><sp
947947
<p>The "unused" font isn’t loaded,
948948
but no text is using it,
949949
so the UA isn’t even <em>trying</em> to load it.
950-
It doesn’t interfere with the <a class=idl-code data-link-type=event href=#dom-fontfaceset-loadingdone title=loadingdone>loadingdone</a> event.
951-
</div><p></p>
950+
It doesn’t interfere with the <a class=idl-code data-link-type=event href=#dom-fontfaceset-loadingdone title=loadingdone>loadingdone</a> event.</p>
951+
</div>
952952

953953

954954
<h2 class="no-num heading settled heading" id=changes><span class=content>Changes</span><a class=self-link href=#changes></a></h2>
@@ -991,7 +991,7 @@ <h3 class="no-ref heading settled heading" id=conventions><span class=content>
991991
letters in this specification.
992992

993993
<p>All of the text of this specification is normative except sections
994-
explicitly marked as non-normative, examples, and notes. <a data-biblio-type=normative data-link-type=biblio href=#rfc2119 title=rfc2119>[RFC2119]</a></p>
994+
explicitly marked as non-normative, examples, and notes. <a data-biblio-type=normative data-link-type=biblio href=#biblio-rfc2119 title=biblio-rfc2119>[RFC2119]</a></p>
995995

996996
<p>Examples in this specification are introduced with the words "for example"
997997
or are set apart from the normative text with <code>class="example"</code>,
@@ -1101,11 +1101,15 @@ <h2 class="no-num no-ref heading settled heading" id=references><span class=cont
11011101

11021102
<h3 class="no-num no-ref heading settled heading" id=normative><span class=content>
11031103
Normative References</span><a class=self-link href=#normative></a></h3>
1104-
<div data-fill-with=normative-references><dl><dt id=css3-fonts title=CSS3-FONTS><a class=self-link href=#css3-fonts></a>[CSS3-FONTS]<dd>John Daggett. <a href=http://www.w3.org/TR/2013/WD-css3-fonts-20130212/>CSS Fonts Module Level 3</a>. 12 February 2013. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2013/WD-css3-fonts-20130212/>http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</a><dt id=rfc2119 title=RFC2119><a class=self-link href=#rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a></dl></div>
1104+
<div data-fill-with=normative-references><dl>
1105+
<dt id=biblio-css3-fonts title=CSS3-FONTS><a class=self-link href=#biblio-css3-fonts></a>[CSS3-FONTS]<dd>John Daggett. <a href=http://www.w3.org/TR/2013/WD-css3-fonts-20130212/>CSS Fonts Module Level 3</a>. 12 February 2013. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2013/WD-css3-fonts-20130212/>http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</a></dd>
1106+
<dt id=biblio-rfc2119 title=RFC2119><a class=self-link href=#biblio-rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a></dd>
1107+
</dl></div>
11051108

11061109
<h3 class="no-num no-ref heading settled heading" id=informative><span class=content>
11071110
Informative References</span><a class=self-link href=#informative></a></h3>
1108-
<div data-fill-with=informative-references><dl></dl></div>
1111+
<div data-fill-with=informative-references><dl>
1112+
</dl></div>
11091113

11101114
<h2 class="no-num no-ref heading settled heading" id=index><span class=content>
11111115
Index</span><a class=self-link href=#index></a></h2>

0 commit comments

Comments
 (0)