html5/2dcontext Overview.html,1.187,1.188

Update of /sources/public/html5/2dcontext
In directory hutz:/tmp/cvs-serv28541

Modified Files:
	Overview.html 
Log Message:
commit 54ed0345600bb855d8ca966c1262922b69af9f17
Author: Jay Munro <jaymunro@microsoft.com>
Date:   Thu Oct 18 15:27:15 2012 -0700

    Returned textmetrics per issue-201


Index: Overview.html
===================================================================
RCS file: /sources/public/html5/2dcontext/Overview.html,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- Overview.html	18 Oct 2012 22:13:17 -0000	1.187
+++ Overview.html	18 Oct 2012 22:43:10 -0000	1.188
@@ -772,6 +772,20 @@
 interface <dfn id="textmetrics">TextMetrics</dfn> {
   // x-direction
   readonly attribute double <a href="#dom-textmetrics-width" title="dom-textmetrics-width">width</a>;
+  readonly attribute double <a href="#dom-textmetrics-actualboundingboxleft" title="dom-textmetrics-actualBoundingBoxLeft">actualBoundingBoxLeft</a>;
+  readonly attribute double <a href="#dom-textmetrics-actualboundingboxright" title="dom-textmetrics-actualBoundingBoxRight">actualBoundingBoxRight</a>;
+
+  // y-direction
+  readonly attribute double <a href="#dom-textmetrics-fontboundingboxascent" title="dom-textmetrics-fontBoundingBoxAscent">fontBoundingBoxAscent</a>;
+  readonly attribute double <a href="#dom-textmetrics-fontboundingboxdescent" title="dom-textmetrics-fontBoundingBoxDescent">fontBoundingBoxDescent</a>;
+  readonly attribute double <a href="#dom-textmetrics-actualboundingboxascent" title="dom-textmetrics-actualBoundingBoxAscent">actualBoundingBoxAscent</a>;
+  readonly attribute double <a href="#dom-textmetrics-actualboundingboxdescent" title="dom-textmetrics-actualBoundingBoxDescent">actualBoundingBoxDescent</a>;
+  readonly attribute double <a href="#dom-textmetrics-emheightascent" title="dom-textmetrics-emHeightAscent">emHeightAscent</a>;
+  readonly attribute double <a href="#dom-textmetrics-emheightdescent" title="dom-textmetrics-emHeightDescent">emHeightDescent</a>;
+  readonly attribute double <a href="#dom-textmetrics-hangingbaseline" title="dom-textmetrics-hangingBaseline">hangingBaseline</a>;
+  readonly attribute double <a href="#dom-textmetrics-alphabeticbaseline" title="dom-textmetrics-alphabeticBaseline">alphabeticBaseline</a>;
+  readonly attribute double <a href="#dom-textmetrics-ideographicbaseline" title="dom-textmetrics-ideographicBaseline">ideographicBaseline</a>;
+  
 };
 
 dictionary <dfn id="hitregionoptions">HitRegionOptions</dfn> {
@@ -3254,7 +3268,17 @@
    </dd>
 
    <dt><var title="">metrics</var> . <code title="dom-textmetrics-width"><a href="#dom-textmetrics-width">width</a></code></dt>
-
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-actualBoundingBoxLeft"><a href="#dom-textmetrics-actualboundingboxleft">actualBoundingBoxLeft</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-actualBoundingBoxRight"><a href="#dom-textmetrics-actualboundingboxright">actualBoundingBoxRight</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-fontBoundingBoxAscent"><a href="#dom-textmetrics-fontboundingboxascent">fontBoundingBoxAscent</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-fontBoundingBoxDescent"><a href="#dom-textmetrics-fontboundingboxdescent">fontBoundingBoxDescent</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-actualBoundingBoxAscent"><a href="#dom-textmetrics-actualboundingboxascent">actualBoundingBoxAscent</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-actualBoundingBoxDescent"><a href="#dom-textmetrics-actualboundingboxdescent">actualBoundingBoxDescent</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-emHeightAscent"><a href="#dom-textmetrics-emheightascent">emHeightAscent</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-emHeightDescent"><a href="#dom-textmetrics-emheightdescent">emHeightDescent</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-hangingBaseline"><a href="#dom-textmetrics-hangingbaseline">hangingBaseline</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-alphabeticBaseline"><a href="#dom-textmetrics-alphabeticbaseline">alphabeticBaseline</a></code></dt>
+   <dt><var title="">metrics</var> . <code title="dom-textmetrics-ideographicBaseline"><a href="#dom-textmetrics-ideographicbaseline">ideographicBaseline</a></code></dt>
    <dd>
 
     <p>Returns the advance width of the text that was passed to the
@@ -3485,6 +3509,63 @@
   must then create a new <code><a href="#textmetrics">TextMetrics</a></code> object with its
   <code title="dom-textmetrics-width"><a href="#dom-textmetrics-width">width</a></code> attribute set to
   the width of that inline box, in CSS pixels.
+ 
+    </p><dt><dfn id="dom-textmetrics-actualboundingboxleft" title="dom-textmetrics-actualBoundingBoxLeft"><code>actualBoundingBoxLeft</code></dfn> attribute</dt>
+
+   <dd>
+    <p>The distance parallel to the baseline from the alignment point given by the <code title="dom-context-2d-textAlign"><a href="#dom-context-2d-textalign">textAlign</a></code> attribute to the left side of the bounding rectangle of the given text, in CSS pixels; positive numbers indicating a distance going left from the given alignment point.
+    </p><p class="note">The sum of this value and the next (<code title="dom-textmetrics-actualBoundingBoxRight"><a href="#dom-textmetrics-actualboundingboxright">actualBoundingBoxRight</a></code>) can be wider than the width of the inline box (<code title="dom-textmetrics-width"><a href="#dom-textmetrics-width">width</a></code>), in particular with slanted fonts where characters overhang their advance width.</p>
+
+   </dd>
+
+   <dt><dfn id="dom-textmetrics-actualboundingboxright" title="dom-textmetrics-actualBoundingBoxRight"><code>actualBoundingBoxRight</code></dfn> attribute</dt>
+
+   <dd>
+    <p>The distance parallel to the baseline from the alignment point given by the <code title="dom-context-2d-textAlign"><a href="#dom-context-2d-textalign">textAlign</a></code> attribute to the right side of the bounding rectangle of the given text, in CSS pixels; positive numbers indicating a distance going right from the given alignment point.</p>
+   </dd>
+
+   <dt><dfn id="dom-textmetrics-fontboundingboxascent" title="dom-textmetrics-fontBoundingBoxAscent"><code>fontBoundingBoxAscent</code></dfn> attribute</dt>
+
+   <dd>
+    <p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the top of the highest bounding rectangle of all the fonts used to render the text, in CSS pixels; positive numbers indicating a distance going up from the given baseline.</p>
+    <p class="note">This value and the next are useful when rendering a background that must have a consistent height even if the exact text being rendered changes. The <code title="dom-textmetrics-actualBoundingBoxAscent"><a href="#dom-textmetrics-actualboundingboxascent">actualBoundingBoxAscent</a></code> attribute (and its corresponding attribute for the descent) are useful when drawing a bounding box around specific text.</p>
+   </dd>
+
+   <dt><dfn id="dom-textmetrics-fontboundingboxdescent" title="dom-textmetrics-fontBoundingBoxDescent"><code>fontBoundingBoxDescent</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the bottom of the lowest bounding rectangle of all the fonts used to render the text, in CSS pixels; positive numbers indicating a distance going down from the given baseline.</p></dd>
+
+   <dt><dfn id="dom-textmetrics-actualboundingboxascent" title="dom-textmetrics-actualBoundingBoxAscent"><code>actualBoundingBoxAscent</code></dfn> attribute</dt>
+
+   <dd>
+    <p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the top of the bounding rectangle of the given text, in CSS pixels; positive numbers indicating a distance going up from the given baseline.
+    </p><p class="note">This number can vary greatly based on the input text, even if the first font specified covers all the characters in the input. For example, the <code title="dom-textmetrics-actualBoundingBoxAscent"><a href="#dom-textmetrics-actualboundingboxascent">actualBoundingBoxAscent</a></code> of a lowercase "o" from an alphabetic baseline would be less than that of an uppercase "F". The value can easily be negative; for example, the distance from the top of the em box (<code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> value "<code title="dom-context-2d-textBaseline-top"><a href="#dom-context-2d-textbaseline-top">top</a></code>") to the top of the bounding rectangle when the given text is just a single comma "<code title="">,</code>" would likely (unless the font is quite unusual) be negative.</p>
+   </dd>
+
+   <dt><dfn id="dom-textmetrics-actualboundingboxdescent" title="dom-textmetrics-actualBoundingBoxDescent"><code>actualBoundingBoxDescent</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the bottom of the bounding rectangle of the given text, in CSS pixels; positive numbers indicating a distance going down from the given baseline.</p></dd>
+
+   <dt><dfn id="dom-textmetrics-emheightascent" title="dom-textmetrics-emHeightAscent"><code>emHeightAscent</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the top of the em square in the line box, in CSS pixels; positive numbers indicating that the given baseline is below the top of the em square (so this value will usually be positive). Zero if the given baseline is the top of the em square; half the font size if the given baseline is the middle of the em square.</p></dd>
+
+   <dt><dfn id="dom-textmetrics-emheightdescent" title="dom-textmetrics-emHeightDescent"><code>emHeightDescent</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the bottom of the em square in the line box, in CSS pixels; positive numbers indicating that the given baseline is below the bottom of the em square (so this value will usually be negative). (Zero if the given baseline is the top of the em square.)</p></dd>
+
+   <dt><dfn id="dom-textmetrics-hangingbaseline" title="dom-textmetrics-hangingBaseline"><code>hangingBaseline</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the hanging baseline of the line box, in CSS pixels; positive numbers indicating that the given baseline is below the hanging baseline. (Zero if the given baseline is the hanging baseline.)</p></dd>
+
+   <dt><dfn id="dom-textmetrics-alphabeticbaseline" title="dom-textmetrics-alphabeticBaseline"><code>alphabeticBaseline</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the alphabetic baseline of the line box, in CSS pixels; positive numbers indicating that the given baseline is below the alphabetic baseline. (Zero if the given baseline is the alphabetic baseline.)</p></dd>
+
+   <dt><dfn id="dom-textmetrics-ideographicbaseline" title="dom-textmetrics-ideographicBaseline"><code>ideographicBaseline</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by the <code title="dom-context-2d-textBaseline"><a href="#dom-context-2d-textbaseline">textBaseline</a></code> attribute to the ideographic baseline of the line box, in CSS pixels; positive numbers indicating that the given baseline is below the ideographic baseline. (Zero if the given baseline is the ideographic baseline.)</p></dd>
+  
 <!--ADD-TOPIC:Security-->
   If doing these measurements requires using a font that has an
   <span>origin</span> that is not the <span title="same
@@ -3497,7 +3578,7 @@
   Otherwise, it must return the new <code><a href="#textmetrics">TextMetrics</a></code> object.
   <a href="#refsCSS">[CSS]</a>
   <!--INSERT FINGERPRINT-->
-  </p>
+  <p></p>
 
   <p>The <code><a href="#textmetrics">TextMetrics</a></code> interface is used for the objects
   returned from <code title="dom-context-2d-measureText"><a href="#dom-context-2d-measuretext">measureText()</a></code>. It has one

Received on Thursday, 18 October 2012 22:43:14 UTC