W3C home > Mailing lists > Public > public-svg-wg@w3.org > October to December 2010

Re: getComputedTextLength question

From: Alex Danilo <alex@abbra.com>
Date: Wed, 17 Nov 2010 15:07:20 +1100
Message-Id: <8SG0CL.4VE4HHE6L9DI@abbra.com>
To: Patrick Dengler <patd@microsoft.com>
Cc: "'SVG Working Group WG'" <public-svg-wg@w3.org>
Hi Patrick,

	Yes I believe it should.

	If textLength is specified, then the UA will adjust the positioning
to match length to the authored value (at least it's supposed to).

	So, this means you should probably return the value after the
UA has done it's adjustments, as opposed to what the font engine returns.

Alex

--Original Message--:
>(it does not look like this request made it through to the WG. Resending)
>
>The definition for getComputedTextLength() does not indicate that textLength should be taken into account, which seems to be important.  Should it?
>
>
>float getComputedTextLength()
>The total sum of all of the advance values from rendering all of the characters within this element, including the advance value on the glyphs (horizontal or vertical), the effect of properties ˇkerning˘, ˇletter-spacing˘ and ˇword-spacing˘ and adjustments due to attributes ˇdx˘ and ˇdy˘ on ˇtspan˘ elements. For non-rendering environments, the user agent shall make reasonable assumptions about glyph metrics. 
>Returns
>The text advance distance.
>
>
>
>
>
Received on Wednesday, 17 November 2010 04:08:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 17 November 2010 04:08:05 GMT