Re: Text measurement

>
> Hi,
>
> i'm actually having a hard time finding information about how to measure a
> string (or a sentence) once a font has been applied.
>
> that is, what is the length of a sentence (in px or so) once it is written
> in a certain font of a certain weigth ?
>
> thanks for your help
> regards,
>
> Nathalie Dumas,
> Departement ASI,
> INSA ROUEN
>
>
>

Hi,

You can use the getComputedTextLength() method on a text or tspan element
to get the size in px.

-- 
Jean-Philippe Braun
http://svgfr.org

Received on Tuesday, 23 March 2004 10:09:53 UTC