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">静脉用药</tspan> <tspan
x="0" dy="1em">仅供配制</tspan> <tspan x="0"
dy="1em">根据方案的指导使用</tspan>
<tspan x="0" dy="1em">避光</tspan> <tspan x="0"
dy="1em">贮存于 2 ° C - 25 ° 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