Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Update font-related terminology.
Affected topics: Canvas, HTML, HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@7587 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 17, 2012
1 parent c7b9ee9 commit 009df1f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 92 deletions.
51 changes: 20 additions & 31 deletions complete.html
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 14 December 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 17 December 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -15560,14 +15560,11 @@ <h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</co
<code><a href=#document>Document</a></code>. Any '@page' rules in scoped CSS resources
must be ignored.</p>

<p class=example>For example, an '@font-face' rule defined in a
scoped style sheet would only define the font for the purposes of
elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree
that refer to font names declared in '@font-face' rules in a scoped
section, when those rules are inherited by nodes in the scoped
section, would end up referring to the fonts declared in that
section.</p>
<p class=example>For example, an '@font-face' rule defined in a scoped style sheet would only
define the font for the purposes of elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree that refer to font family names
declared in '@font-face' rules in a scoped section, when those rules are inherited by nodes in the
scoped section, would end up referring to the fonts declared in that section.</p>

<hr></div>

Expand Down Expand Up @@ -36192,17 +36189,12 @@ <h6 id=text-styles><span class=secno>4.8.11.2.5 </span>Text styles</h6>
'initial'), then it must be ignored, without assigning a new font
value. <a href=#refsCSS>[CSS]</a></p>

<p>Font names must be interpreted in the context of the <a href=#font-style-source-object>font style source object</a> when
the font is to be used; any fonts embedded using <code title="">@font-face</code> or loaded using
the <code><a href=#fontloader>FontLoader</a></code> that are visible to the <a href=#font-style-source-object>font style source object</a> must
therefore be available once they are loaded. If a font is used before it is fully loaded, or if
the <a href=#font-style-source-object>font style source object</a> does not have that font in scope at the time the font is
to be used, then it must be treated as if it was an unknown font, falling back to another as
described by the relevant CSS specifications. <a href=#refsCSSFONTS>[CSSFONTS]</a></p>

<p>Only vector fonts should be used by the user agent; if a user
agent were to use bitmap fonts then transformations would likely
make the font look very ugly.</p>
<p>Font family names must be interpreted in the context of the <a href=#font-style-source-object>font style source
object</a> when the font is to be used; any fonts embedded using <code title="">@font-face</code> or loaded using the <code><a href=#fontloader>FontLoader</a></code> that are visible to the
<a href=#font-style-source-object>font style source object</a> must therefore be available once they are loaded. If a font
is used before it is fully loaded, or if the <a href=#font-style-source-object>font style source object</a> does not have
that font in scope at the time the font is to be used, then it must be treated as if it was an
unknown font, falling back to another as described by the relevant CSS specifications. <a href=#refsCSSFONTS>[CSSFONTS]</a></p>

<p>On getting, the <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>
attribute must return the <a href=#serializing-a-css-value title="serializing a CSS
Expand Down Expand Up @@ -94636,17 +94628,13 @@ <h3 id=serializing-html-fragments><span class=secno>12.3 </span>Serializing HTML
element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> would
imply the end tag for the <code><a href=#the-p-element>p</a></code>).</p>

<p>This can enable cross-site scripting attacks. An example of this
would be a page that lets the user enter some font names that are
then inserted into a CSS <code><a href=#the-style-element>style</a></code> block via the DOM and
which then uses the <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code>
IDL attribute to get the HTML serialization of that
<code><a href=#the-style-element>style</a></code> element: if the user enters
"<code>&lt;/style&gt;&lt;script&gt;attack&lt;/script&gt;</code>" as a font
name, <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> will return
markup that, if parsed in a different context, would contain a
<code><a href=#the-script-element>script</a></code> node, even though no <code><a href=#the-script-element>script</a></code> node
existed in the original DOM.</p>
<p>This can enable cross-site scripting attacks. An example of this would be a page that lets the
user enter some font family names that are then inserted into a CSS <code><a href=#the-style-element>style</a></code> block via
the DOM and which then uses the <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> IDL attribute to get
the HTML serialization of that <code><a href=#the-style-element>style</a></code> element: if the user enters
"<code>&lt;/style&gt;&lt;script&gt;attack&lt;/script&gt;</code>" as a font family name, <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> will return markup that, if parsed in a different context,
would contain a <code><a href=#the-script-element>script</a></code> node, even though no <code><a href=#the-script-element>script</a></code> node existed in the
original DOM.</p>

</div>

Expand Down Expand Up @@ -104324,6 +104312,7 @@ <h2 class=no-num id=references>References</h2><!--REFS-->
John Boyer,
John Bussjaeger,
John Carpenter,
John Daggett,
John Fallows,
John Foliot,
John Harding,
Expand Down
51 changes: 20 additions & 31 deletions index
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 14 December 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 17 December 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -15560,14 +15560,11 @@ people expect to have work and what is necessary.
<code><a href=#document>Document</a></code>. Any '@page' rules in scoped CSS resources
must be ignored.</p>

<p class=example>For example, an '@font-face' rule defined in a
scoped style sheet would only define the font for the purposes of
elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree
that refer to font names declared in '@font-face' rules in a scoped
section, when those rules are inherited by nodes in the scoped
section, would end up referring to the fonts declared in that
section.</p>
<p class=example>For example, an '@font-face' rule defined in a scoped style sheet would only
define the font for the purposes of elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree that refer to font family names
declared in '@font-face' rules in a scoped section, when those rules are inherited by nodes in the
scoped section, would end up referring to the fonts declared in that section.</p>

<hr></div>

Expand Down Expand Up @@ -36192,17 +36189,12 @@ hairline width with transform. ack Shaun Morris. --></div>
'initial'), then it must be ignored, without assigning a new font
value. <a href=#refsCSS>[CSS]</a></p>

<p>Font names must be interpreted in the context of the <a href=#font-style-source-object>font style source object</a> when
the font is to be used; any fonts embedded using <code title="">@font-face</code> or loaded using
the <code><a href=#fontloader>FontLoader</a></code> that are visible to the <a href=#font-style-source-object>font style source object</a> must
therefore be available once they are loaded. If a font is used before it is fully loaded, or if
the <a href=#font-style-source-object>font style source object</a> does not have that font in scope at the time the font is
to be used, then it must be treated as if it was an unknown font, falling back to another as
described by the relevant CSS specifications. <a href=#refsCSSFONTS>[CSSFONTS]</a></p>

<p>Only vector fonts should be used by the user agent; if a user
agent were to use bitmap fonts then transformations would likely
make the font look very ugly.</p>
<p>Font family names must be interpreted in the context of the <a href=#font-style-source-object>font style source
object</a> when the font is to be used; any fonts embedded using <code title="">@font-face</code> or loaded using the <code><a href=#fontloader>FontLoader</a></code> that are visible to the
<a href=#font-style-source-object>font style source object</a> must therefore be available once they are loaded. If a font
is used before it is fully loaded, or if the <a href=#font-style-source-object>font style source object</a> does not have
that font in scope at the time the font is to be used, then it must be treated as if it was an
unknown font, falling back to another as described by the relevant CSS specifications. <a href=#refsCSSFONTS>[CSSFONTS]</a></p>

<p>On getting, the <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>
attribute must return the <a href=#serializing-a-css-value title="serializing a CSS
Expand Down Expand Up @@ -94636,17 +94628,13 @@ document.body.appendChild(text);
element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> would
imply the end tag for the <code><a href=#the-p-element>p</a></code>).</p>

<p>This can enable cross-site scripting attacks. An example of this
would be a page that lets the user enter some font names that are
then inserted into a CSS <code><a href=#the-style-element>style</a></code> block via the DOM and
which then uses the <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code>
IDL attribute to get the HTML serialization of that
<code><a href=#the-style-element>style</a></code> element: if the user enters
"<code>&lt;/style&gt;&lt;script&gt;attack&lt;/script&gt;</code>" as a font
name, <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> will return
markup that, if parsed in a different context, would contain a
<code><a href=#the-script-element>script</a></code> node, even though no <code><a href=#the-script-element>script</a></code> node
existed in the original DOM.</p>
<p>This can enable cross-site scripting attacks. An example of this would be a page that lets the
user enter some font family names that are then inserted into a CSS <code><a href=#the-style-element>style</a></code> block via
the DOM and which then uses the <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> IDL attribute to get
the HTML serialization of that <code><a href=#the-style-element>style</a></code> element: if the user enters
"<code>&lt;/style&gt;&lt;script&gt;attack&lt;/script&gt;</code>" as a font family name, <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> will return markup that, if parsed in a different context,
would contain a <code><a href=#the-script-element>script</a></code> node, even though no <code><a href=#the-script-element>script</a></code> node existed in the
original DOM.</p>

</div>

Expand Down Expand Up @@ -104324,6 +104312,7 @@ if (s = prompt('What is your name?')) {
John Boyer,
John Bussjaeger,
John Carpenter,
John Daggett,
John Fallows,
John Foliot,
John Harding,
Expand Down
52 changes: 22 additions & 30 deletions source
Expand Up @@ -16341,14 +16341,11 @@ people expect to have work and what is necessary.
<code>Document</code>. Any '@page' rules in scoped CSS resources
must be ignored.</p>

<p class="example">For example, an '@font-face' rule defined in a
scoped style sheet would only define the font for the purposes of
elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree
that refer to font names declared in '@font-face' rules in a scoped
section, when those rules are inherited by nodes in the scoped
section, would end up referring to the fonts declared in that
section.</p>
<p class="example">For example, an '@font-face' rule defined in a scoped style sheet would only
define the font for the purposes of elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree that refer to font family names
declared in '@font-face' rules in a scoped section, when those rules are inherited by nodes in the
scoped section, would end up referring to the fonts declared in that section.</p>

<hr>

Expand Down Expand Up @@ -42189,17 +42186,14 @@ hairline width with transform. ack Shaun Morris. -->
'initial'), then it must be ignored, without assigning a new font
value. <a href="#refsCSS">[CSS]</a></p>

<p>Font names must be interpreted in the context of the <span>font style source object</span> when
the font is to be used; any fonts embedded using <code title="">@font-face</code> or loaded using
the <code>FontLoader</code> that are visible to the <span>font style source object</span> must
therefore be available once they are loaded. If a font is used before it is fully loaded, or if
the <span>font style source object</span> does not have that font in scope at the time the font is
to be used, then it must be treated as if it was an unknown font, falling back to another as
described by the relevant CSS specifications. <a href="#refsCSSFONTS">[CSSFONTS]</a></p>

<p>Only vector fonts should be used by the user agent; if a user
agent were to use bitmap fonts then transformations would likely
make the font look very ugly.</p>
<p>Font family names must be interpreted in the context of the <span>font style source
object</span> when the font is to be used; any fonts embedded using <code
title="">@font-face</code> or loaded using the <code>FontLoader</code> that are visible to the
<span>font style source object</span> must therefore be available once they are loaded. If a font
is used before it is fully loaded, or if the <span>font style source object</span> does not have
that font in scope at the time the font is to be used, then it must be treated as if it was an
unknown font, falling back to another as described by the relevant CSS specifications. <a
href="#refsCSSFONTS">[CSSFONTS]</a></p>

<p>On getting, the <code title="dom-context-2d-font">font</code>
attribute must return the <span title="serializing a CSS
Expand Down Expand Up @@ -109581,17 +109575,14 @@ document.body.appendChild(text);
element's <span title="syntax-start-tag">start tag</span> would
imply the end tag for the <code>p</code>).</p>

<p>This can enable cross-site scripting attacks. An example of this
would be a page that lets the user enter some font names that are
then inserted into a CSS <code>style</code> block via the DOM and
which then uses the <code title="dom-innerHTML">innerHTML</code>
IDL attribute to get the HTML serialization of that
<code>style</code> element: if the user enters
"<code>&lt;/style>&lt;script>attack&lt;/script></code>" as a font
name, <code title="dom-innerHTML">innerHTML</code> will return
markup that, if parsed in a different context, would contain a
<code>script</code> node, even though no <code>script</code> node
existed in the original DOM.</p>
<p>This can enable cross-site scripting attacks. An example of this would be a page that lets the
user enter some font family names that are then inserted into a CSS <code>style</code> block via
the DOM and which then uses the <code title="dom-innerHTML">innerHTML</code> IDL attribute to get
the HTML serialization of that <code>style</code> element: if the user enters
"<code>&lt;/style>&lt;script>attack&lt;/script></code>" as a font family name, <code
title="dom-innerHTML">innerHTML</code> will return markup that, if parsed in a different context,
would contain a <code>script</code> node, even though no <code>script</code> node existed in the
original DOM.</p>

</div>

Expand Down Expand Up @@ -122098,6 +122089,7 @@ if (s = prompt('What is your name?')) {
John Boyer,
John Bussjaeger,
John Carpenter,
John Daggett,
John Fallows,
John Foliot,
John Harding,
Expand Down

0 comments on commit 009df1f

Please sign in to comment.