W3C home > Mailing lists > Public > www-svg@w3.org > March 2013

Re: Cannot change text rotation centre in SVGs

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 30 Mar 2013 07:45:43 -0700
To: Antonio Roberts <antonio@hellocatfood.com>
CC: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <A1A63D23-D4C2-433E-8B19-E8121F8E9848@adobe.com>

On Mar 26, 2013, at 7:56 AM, Antonio Roberts <antonio@hellocatfood.com> wrote:

> Currently, when you rotate text it rotates using the bottom left of
> the text as its centre.

That is not correct. Currently it uses (0,0) of the coordinate space of the text, which is (if no transform on the ancestor) the top left of the viewport.

> Would there ever be the possibility of
> allowing the text rotation centre to be either of the corners of the
> bounding box or the centre?

With CSS Transforms there will be a 'transform-origin' presentation attribute that allows you to set the origin. In your case it would be transform-origin="center center".

You can already try these properties prefixed on WebKit on basic shapes. Text seems to have a bug. I filed a bug report after your comment here.


> -- 
> ============================
> antonio@hellocatfood.com
> http://www.hellocatfood.com
> ============================
Received on Saturday, 30 March 2013 14:46:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:41 UTC