You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Maria Carolina Arce Terceros <ca...@gmail.com> on 2006/06/05 14:47:27 UTC

Problems with fonts, and rotation after resizing an SVG

Hello,

I have two problems regarding resizing an svg. I'm resizing it through
changing the width and height.

The first one is that the fonts it contains do also resize instead of
preserving the size they where created with, this beahaviour is not
always desirable, is there any way to avoid this?

The second problem I have is that I need to rotate one of the graphic
elements in my svg, if I do not resize it this works fine, but if I
resize it then the rotate tranformation stops working... I guess this
has something to do with the coordinates, but I do not understand
because I'm using a view box, and from what I read this preserves the
original coordinates... am I wrong? (Maybe the fact that the width and
the height are greater than the viewbox maximum affects this?)

Thanks for you help!

Carolina

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Problems with fonts, and rotation after resizing an SVG

Posted by Maria Carolina Arce Terceros <ca...@gmail.com>.
Thomas,

Thanks a lot for your answers!

Regarding the rotation, the problem was, that once again I was using a
namespace instead of using null for the rotate transform. So it worked
only when I did not resize the SVG. When I changed it for null it
started working fine.

Thanks for your help!

Carolina

On 6/5/06, thomas.deweese@kodak.com <th...@kodak.com> wrote:
> Hi Carolina,
>
> "Maria Carolina Arce Terceros" <ca...@gmail.com> wrote on 06/05/2006
> 08:47:27 AM:
>
> > I have two problems regarding resizing an svg. I'm resizing it through
> > changing the width and height.
> >
> > The first one is that the fonts it contains do also resize instead of
> > preserving the size they where created with, this beahaviour is not
> > always desirable, is there any way to avoid this?
>
>    The short answer is no, this is the way SVG is designed.
> The longer answer is that you can manually compensate for this
> by scaling the fonts down as an inverse of the document scale.
>
> > The second problem I have is that I need to rotate one of the graphic
> > elements in my svg, if I do not resize it this works fine, but if I
> > resize it then the rotate tranformation stops working...
>
>    This seems very odd, how are you rotating the graphic element?
>
> > I guess this has something to do with the coordinates, but I do not
> understand
> > because I'm using a view box, and from what I read this preserves the
> > original coordinates... am I wrong? (Maybe the fact that the width and
> > the height are greater than the viewbox maximum affects this?)
>
>    The viewbox establishes the coordinate system for the root
> of the SVG document.  The exact way this is mapped to the width
> and height is controlled by the preserveAspectRatio attribute but
> in general the coordinate system is fairly constant.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Problems with fonts, and rotation after resizing an SVG

Posted by th...@kodak.com.
Hi Carolina,

"Maria Carolina Arce Terceros" <ca...@gmail.com> wrote on 06/05/2006 
08:47:27 AM:

> I have two problems regarding resizing an svg. I'm resizing it through
> changing the width and height.
> 
> The first one is that the fonts it contains do also resize instead of
> preserving the size they where created with, this beahaviour is not
> always desirable, is there any way to avoid this?

   The short answer is no, this is the way SVG is designed.
The longer answer is that you can manually compensate for this
by scaling the fonts down as an inverse of the document scale.

> The second problem I have is that I need to rotate one of the graphic
> elements in my svg, if I do not resize it this works fine, but if I
> resize it then the rotate tranformation stops working... 

   This seems very odd, how are you rotating the graphic element?

> I guess this has something to do with the coordinates, but I do not 
understand
> because I'm using a view box, and from what I read this preserves the
> original coordinates... am I wrong? (Maybe the fact that the width and
> the height are greater than the viewbox maximum affects this?)

   The viewbox establishes the coordinate system for the root
of the SVG document.  The exact way this is mapped to the width
and height is controlled by the preserveAspectRatio attribute but
in general the coordinate system is fairly constant.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org