Skip to content

Commit 02011a6

Browse files
committed
[css-font-loading] Harmonize FontFace with @font-face, adding variationSettings and fontDisplay.
1 parent ae7f60f commit 02011a6

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

css-font-loading-3/Overview.bs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ The <code>FontFace</code> Interface</h2>
8686
CSSOMString unicodeRange = "U+0-10FFFF";
8787
CSSOMString variant = "normal";
8888
CSSOMString featureSettings = "normal";
89+
CSSOMString variationSettings = "normal";
90+
CSSOMString fontDisplay = "auto";
8991
};
9092

9193
enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
@@ -101,6 +103,8 @@ The <code>FontFace</code> Interface</h2>
101103
attribute CSSOMString unicodeRange;
102104
attribute CSSOMString variant;
103105
attribute CSSOMString featureSettings;
106+
attribute CSSOMString variationSettings;
107+
attribute CSSOMString fontDisplay;
104108

105109
readonly attribute FontFaceLoadStatus status;
106110

@@ -137,13 +141,15 @@ The <code>FontFace</code> Interface</h2>
137141

138142
On getting, return the string associated with this attribute.
139143

140-
On setting, parse the string according to the grammar for the CSS ''@font-face'' rule.
144+
On setting, [=CSS/parse=] the string according to the grammar for the corresponding ''@font-face'' descriptor.
141145
If it does not match the grammar,
142-
throw a SyntaxError;
146+
throw a {{SyntaxError}};
143147
otherwise, set the attribute to the serialization of the parsed value.
144148

145149
: <dfn>variant</dfn>
146150
: <dfn>featureSettings</dfn>
151+
: <dfn>variationSettings</dfn>
152+
: <dfn>fontDisplay</dfn>
147153
::
148154
These attributes have the same meaning,
149155
and are parsed the same as,
@@ -155,9 +161,9 @@ The <code>FontFace</code> Interface</h2>
155161

156162
On getting, return the string associated with this attribute.
157163

158-
On setting, parse the string according to the grammar for the CSS ''@font-face'' rule.
164+
On setting, [=CSS/parse=] the string according to the grammar for the corresponding ''@font-face'' descriptor.
159165
If it does not match the grammar,
160-
throw a SyntaxError;
166+
throw a {{SyntaxError}};
161167
otherwise, set the attribute to the serialization of the parsed value.
162168

163169
: <dfn>status</dfn>
@@ -217,7 +223,7 @@ The Constructor</h3>
217223
Set <var>font face's</var> {{FontFace/status}} attribute to <code>"unloaded"</code>,
218224
Set its internal {{[[FontStatusPromise]]}} slot to a fresh pending {{Promise}} object.
219225

220-
Parse the {{family!!argument}} argument,
226+
[=CSS/Parse=] the {{family!!argument}} argument,
221227
and the members of the {{descriptors!!argument}} argument,
222228
according to the grammars of the corresponding descriptors of the CSS ''@font-face'' rule.
223229
If the {{source!!argument}} argument is a {{CSSOMString}},

0 commit comments

Comments
 (0)