W3C home > Mailing lists > Public > www-svg@w3.org > October 2011

Re: text to path conversion API proposal

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 21 Oct 2011 15:54:38 -0400
Message-ID: <4EA1CDFE.8010908@mcc.id.au>
To: Charles Pritchard <chuck@jumis.com>
CC: Dirk Schulze <vbs85@gmx.de>, www-svg@w3.org
On 21/10/11 3:51 PM, Charles Pritchard wrote:
> Cameron, would a measure text method be an appropriate addition to this
> proposal?
> It would return width and dominant baseline offset for the text.

I think that would be a separate proposal, but that kind of information 
would be useful to expose, yes.

Note that you can already get the width of a run of text by having it in 
a <text> and using getComputedTextLength() and getSubStringLength() on 
text content elements:

http://www.w3.org/TR/SVG/text.html#__svg__SVGTextContentElement__getComputedTextLength

Baseline information isn't currently exposed.
Received on Friday, 21 October 2011 19:55:19 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:49 GMT