xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hardy <vincent.ha...@sun.com>
Subject Re: Anti-aliased texts
Date Fri, 19 Oct 2001 14:54:55 GMT
Tobias,

I think what is happening is that Adobe is using font hinting to handle
small font sizes and we are not. Therefore, they are giving a better
result at small font sizes. The best option is to rasterize with
antialiasing
on, but I do not know of any good way to reduce the blurring that
this causes.

Vincent.

Tobias Mogestad wrote:
> 
> Hi,
> 
> I'm having difficulties producing readable texts with lower font-sizes
> while using the text-rendering option optimizeSpeed (to switch off anti-
> alias).
> 
> Rendering the SVG in the Adobe viewer (2.0) the text looks fine down
> to font-sizes as low as 8 pts, but when rasterized through batik (tried
> it with version 1.0b and 1.1) or when viewing the SVG through batik's
> SVG browser the results are pretty poor.
> I'm running JVM 1.3.1 and I've tested it under both Windows and Linux.
> I've even tried using the font converter and included the font itself
> in the SVG, but with identical results.
> 
> Are there any way of improving the quality of the rasterized text and
> make it look more like Adobe's interpretation of the font?
> Or must anti-alias be switched on for the rasterizer to produce better
> looking text?
> And in that case, are there any way of minimizing the blur effect it has?
> 
> I've attached two png images that illustrates the problem:
> adobe20.png - Screenshot from Adobe's viewer.
> batik11.png - Produced by the batik rasterizer.
> 
> Below is the SVG code behind the images:
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!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 xml:space="preserve" width="300" height="200">
> <defs>
> <style type="text/css" xml:space="preserve"><![CDATA[
>   text {
>     font-family:Arial;
>     text-rendering:optimizeSpeed;
>   }
> ]]></style>
> </defs>
>   <text x="10" y="30" font-size="18pt">Example Text Font Size 18</text>
>   <text x="10" y="60" font-size="14pt">Example Text Font Size 14</text>
>   <text x="10" y="90" font-size="12pt">Example Text Font Size 12</text>
>   <text x="10" y="110" font-size="10pt">Example Text Font Size 10</text>
>   <text x="10" y="130" font-size="9pt">Example Text Font Size 9</text>
>   <text x="10" y="145" font-size="8pt">Example Text Font Size 8</text>
>   <text x="10" y="160" font-size="6pt">Example Text Font Size 6</text>
> </svg>
> 
> ------------------------------------------------------------------------
> 
> Grateful for any advice and/or explanation!
> 
> /Tobias Mogestad
> 
>   ------------------------------------------------------------------------
>                   Name: adobe20.png
>    adobe20.png    Type: PNG Image (image/png)
>               Encoding: base64
> 
>                   Name: batik11.png
>    batik11.png    Type: PNG Image (image/png)
>               Encoding: base64
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

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


Mime
View raw message