RE: Zooming

Jon,
I agree this is the correct implementation, but users like myself would
still like to be able to scale the image in the x direction and not have the
text stretch but yet adjust the x coordinate. 

example:  there is a rectangle with a label on top of it that is left
justified.  now if the rectangle is scaled (transform="scale(3, 1)) in the x
direction the label would also need to be moved (not stretched) in the x
direction.  This is the problem I face. There is a property in the adobe
viewer release notes that is not yet implemented called "font-stretch".
Would this help when adobe implements it?

The only work around that I can think of is to scale everything in the "x"
direction except the text then move the x coordinate of each and every
"text" appropriately.

thanks for your help,
Justin

-----Original Message-----
From: Jon Ferraiolo [mailto:jferraio@Adobe.COM]
Sent: Friday, June 09, 2000 9:15 AM
To: Justin Friedl
Cc: 'www-svg@w3.org'
Subject: Re: Zooming


Justin,

I believe the latest Adobe SVG Viewer goes pretty far in correctly
implementing the March 3 spec regarding units and transformations. Look at
the following file.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" 

"http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"
>
<svg width="100%" height="100%">
  <g transform="scale(3)">
    <rect x="2" y="2" width="196" height="196"
          style="fill:red; stroke:blue"/>
    <text x="100" y="100" style="font-size:24pt; text-anchor:middle">
      24pt text
    </text>
  </g>
</svg>

You will see that the text stays at 24pt even though it is surrounded by a
scale(3) transformation.

If you specify different scale factors for X and Y, the Adobe viewer will
end up with stretched text. I believe this is the correct interpretation of
the March 3 spec. The whole notion with CSS units is that you convert to
user space, and then render in user space. Thus, the 'font-size:24pt' is
first converted into 'font-size:N', where N is what 24pt maps to in current
user space. Then, the text is drawn as if 'font-size:N' were specified,
which means that non-uniform scaling will cause the text to display
stretched.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 11:30 AM 6/9/00 -0400, Justin Friedl wrote:
>		I tried using 'px' or 'pt' on the font-size but that only
>works on zooming and not on scaling.  
>		any suggestions
>		thanks in advance
>		Justin
> 

Received on Friday, 9 June 2000 12:49:41 UTC