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

Re: Firefox donīs show very small font size

From: Ken Stacey <ken@svgmaker.com>
Date: Fri, 20 Jun 2008 03:07:33 +1000
Message-ID: <485A9255.5050605@svgmaker.com>
To: www-svg@w3.org

Boris Zbarsky wrote:
> Keep in mind that scaling a 6px font by a factor of 2 using an affine 
> transformation is NOT the same as using a 12px font.

Like this ?

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 30">
  <text x="0" y="1" transform="scale(12)" font-size="1">1px * 12</text>
  <text x="0" y="25" font-size="12">12px</text>
</svg>

The 1px font-size scaled by 12 looks the same as the 12px font-size.  As 
you would expect.

It "shouldn't" matter what the font-size is nor the scaling.  The only 
thing that matters is the font-size in initial viewPort coordinates (eg 
screen pixels) after applying the CTM.  Then the viewing agent renders 
that size.

There are limitations in Firefox - the viewPort font-size is rounded, 
and there is the limit placed on nscoord (as described by Robert 
O'Callahan earlier).

I think that Klaus' font-size is victim of the nscoord limit.  If you 
just play with the font-size in Klaus' recent message, (using Firefox 
2.0.0.14) the text is not rendered at 0.032, but is rendered at 0.033.

Klaus, is it unreasonable for you to multiply all your coordinates by 1000?

<svg xmlns="http://www.w3.org/2000/svg"
      viewBox="9502.27 -47240.23 108.06 0173.79">
<title>Map of Liechtenstein</title>
  <rect x="9502.2" y="-47240.23" width="108.06" height="173.79" 
fill="silver"/>
  <circle cx="9522.09" cy="-47139.35" r="2" />
  <text x="9522.09" y="-47139.35" font-size="4">Vaduz</text>
</svg>

Ken
Received on Thursday, 19 June 2008 17:08:15 GMT

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