W3C home > Mailing lists > Public > www-svg@w3.org > September 2015

Possible to resize text to max size within a box?

From: Mats Blakstad <mats.gbproject@gmail.com>
Date: Wed, 16 Sep 2015 23:22:22 +0200
Message-ID: <CAP=1PAWWAqKfStpJOPyLMGiDsG+MU6Ax33TuWt7-tS8zNf4sbw@mail.gmail.com>
To: www-svg@w3.org
Hi

I've tried to read the documentation for SVG2 draft.

On ‘textLength’ it says "This attribute is not intended for use to obtain
effects such as shrinking or expanding text."

Is it possible within SVG2 in another way to simply set the length/width of
a text, and then make the text size shrink/expand to fit it as good as
possible?

Like in the example here:
http://jsfiddle.net/tubededentifrice/u5y15d0L/2/

This could be great if the SVG-element is responsive, but also if you use
different/dynamic texts inside SVG and you want to control that if fits
within a certain area.

Is it possible to do something like that within the current framework?
Received on Wednesday, 16 September 2015 21:22:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:42 UTC