xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Mogestad" <tobias.moges...@codesense.com>
Subject Anti-aliased texts
Date Fri, 19 Oct 2001 14:33:28 GMT

I'm having difficulties producing readable texts with lower font-sizes
while using the text-rendering option optimizeSpeed (to switch off anti-

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"
<svg xml:space="preserve" width="300" height="200">
<style type="text/css" xml:space="preserve"><![CDATA[
  text {
  <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>


Grateful for any advice and/or explanation!

/Tobias Mogestad

View raw message