caption word wrap problem in Chinese (UTF-8)

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
secrectcode

caption word wrap problem in Chinese (UTF-8)

Post by secrectcode »

Hi there,

I need to output an image with Chinese word, and wrap automatically inside a box.
This is how I do:

./convert -background black -fill white -font wts11.ttf -pointsize 20 -size 100x100 -encoding utf8 caption:"一二三四五六七八九十" caption.gif

The string after caption "一二三四五六七八九十" are Chinese words mean one to ten.

And the result I get
Image

Supposedly, the string 六七八九十 should on the second lines, but it seems not wrap at all.
I guess it's the same bug as
viewtopic.php?f=3&t=12923
For English, words are white space separated making word wrapping easy, in Chinese (and this is only a rough guess) each Chinese symbol can regarded as a word so word wrap can be done on either side of any Chinese symbol.
It seems that the bug is not solved. I'll upload the font later.
[updated: to reproduce this bug, you can download the font in http://cle.linux.org.tw/fonts/wangfonts/wts11.ttf
it's opensource font, free for download]

My im version is : ImageMagick 6.5.4-2 2009-07-06 Q16 OpenMP
OS: fedora
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: caption word wrap problem in Chinese (UTF-8)

Post by magick »

We have a patch for the problem you reported in ImageMagick 6.5.4-3 Beta available by sometime tomorrow. Thanks.
secrectcode

Re: caption word wrap problem in Chinese (UTF-8)

Post by secrectcode »

magick wrote:We have a patch for the problem you reported in ImageMagick 6.5.4-3 Beta available by sometime tomorrow. Thanks.
Thanks for the quick response. I'm looking forwarding to getting the patch.
Thanks!
Post Reply