Re: Cannot change text rotation centre in SVGs

Hi all,

Thanks for all of your comments on this issue. It all actually came
from this bug that I reported against Inkscape
https://bugs.launchpad.net/inkscape/+bug/383290 As it uses SVG as its
native file format it is restricted to what SVG is capable of.

Dirk, do you have a link to the bug report for this problem>

Antonio

On 31 March 2013 04:13, Dirk Schulze <dschulze@adobe.com> wrote:
>
> On Mar 30, 2013, at 9:07 AM, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de> wrote:
>
>> Dirk Schulze:
>>> 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.
>>
>> I think, this is not related to the transform attribute, but the rotate
>> attribute for text elements, that can take a list of rotations about the
>> current text position, for a list in doubt for every glyph.
>> As Helder already mentioned, there are some limited options
>> for authors to have influence on the current text position.
>> If nothing of this is applied, indeed such a glyph or glyph group
>> is effectively rotated around its bottom left corner.
>
> Ah right. I did not think about the rotate attribute. Thanks for pointing this out.
>
> Greetings,
> Dirk
>
>>
>> See:
>> http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElementRotateAttribute
>>
>>>
>>>> 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".
>>
>> I think, CSS Transforms currently has no property related to the rotate
>> attribute for text elements. Therefore this seems not to be related.
>> Respectively one has to set each glyph in a separate element that
>> is transformable.
>>
>> However due to the efforts to have more properties in SVG representing
>> the same as currently attributes, may there will be such a property with
>> a list of rotations?
>> Could be a good idea to give authors more/simpler options to define the
>> center of rotation of every glyph relative to the box of the glyph.
>> Currently one has a few horizontal values with text-anchor and maybe
>> vertically some control with *baseline* properties (did not check this -
>> could be maybe more tricky to get the intended effect, because it
>> shifts the glyph as well, therefore presumably one has to use more than
>> one glyph.)
>>
>>
>>
>> Olaf
>>
>
>



-- 
============================
antonio@hellocatfood.com
http://www.hellocatfood.com
============================

Received on Sunday, 31 March 2013 18:03:35 UTC