W3C home > Mailing lists > Public > www-svg@w3.org > June 2000

Re: Zooming

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Fri, 09 Jun 2000 09:14:35 -0700
Message-Id: <200006091611.JAA02248@mail-345.corp.Adobe.COM>
To: Justin Friedl <justin.friedl@aspentech.com>
Cc: "'www-svg@w3.org'" <www-svg@w3.org>
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:11:59 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:18 GMT