You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Michael Lindeboom <mi...@bms.com> on 2006/02/16 20:52:42 UTC

Blurry Chinese Characters

I am using Batik to dynamically generate text in various languages. In 
one case I am using the Arial Unicode MS font to generate chinese 
characters. I am making JPEG images of the text which is then used as a 
label. I am wondering why the JPEG images of chinese characters 
generated by Batik seem so blurry. I am setting the JPEG image quality 
to "1"   What things can I try to improve the image quality?

Below is an example of data I am working with if you would like to see 
for yourself.

<svg>
  <text startOffset="0" 
style="opacity:1;text-anchor:start;font-family:Arial Unicode MS;"> 
<tspan x="0" dy="1em">&#x9759;&#x8109;&#x7528;&#x836F;</tspan> <tspan 
x="0" dy="1em">&#x4EC5;&#x4F9B;&#x914D;&#x5236;</tspan> <tspan x="0" 
dy="1em">&#x6839;&#x636E;&#x65B9;&#x6848;&#x7684;&#x6307;&#x5BFC;&#x4F7F;&#x7528;</tspan> 
<tspan x="0" dy="1em">&#x907F;&#x5149;</tspan> <tspan x="0" 
dy="1em">&#x8D2E;&#x5B58;&#x4E8E; 2 &#xB0; C -  25 &#xB0; C 
</tspan></text>   
</svg>


Michael

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


Re: Blurry Chinese Characters

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Michael.

Michael Lindeboom:
> I am using Batik to dynamically generate text in various languages. In 
> one case I am using the Arial Unicode MS font to generate chinese 
> characters.

Getting rendered images of Chinese characters was how I originally
became interested in SVG. :-)

> I am making JPEG images of the text which is then used as a 
> label. I am wondering why the JPEG images of chinese characters 
> generated by Batik seem so blurry. I am setting the JPEG image quality 
> to "1"   What things can I try to improve the image quality?

What do you mean by blurry?  I tried rasterising the document below into
a JPEG, and it seems OK to me.  There is an amount of anti-aliasing, but
I don't think it is blurry.  Now, if I set
text-rendering="geometricPrecision" then they become blurry (due to the
fact that Batik won't try to pixel align the glyphs).  If you set
text-rendering="optimizeLegibility" then the glyphs won't be
anti-aliased at all.

Try those options and see what difference it makes.

Cameron

-- 
 Cameron McCormack			ICQ: 26955922
 cam (at) mcc.id.au			MSN: cam (at) mcc.id.au
 http://mcc.id.au/			JBR: heycam (at) jabber.org

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