Date: Sat, 13 Dec 2008 20:20:23 -0800 (PST) From: cuongvt <freebsd@vuhanhnhu.com> To: freebsd-questions@freebsd.org Subject: imagemagick convert: japanese text broken in freebsd Message-ID: <20997257.post@talk.nabble.com>
next in thread | raw e-mail | index | archive | help
Hi, I know that IM support japanese text. On Freebsd 7.0 with latest imagemagick built from port (6.4.7) and msgothic.ttc copied from windows partition, imagick extension of PHP installed by pecl. in terminal (zsh) I type: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D convert origin.jpg -fill white -font /usr/X11R6/lib/X11/fonts/TrueType/msgothic.ttc -pointsize 125 -stroke blue -strokewidth 1 -draw "text 20,130 '=E3=81=8C=E3=81=8F=E3=81=9B=E3=81=84'" s= traight.jpg =3D=3D=3D=3D=3D=3D=3D=3D IM did not informed any error, but the result is japanese text broken (question marks). However, if I ran PHp script (see below), japanese displayed in image fine. What is the reason and how can I solve that? thansk and regards, Below is PHP script: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"ja" xml:lang=3D"ja" dir=3D"ltr"> <head> <title>sample373</title> </head> <body> <?php /* =E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AFUTF-8=E3=81=A7=E4=BF=9D=E5= =AD=98=E3=81=97=E3=81=A6=E3=81=AD */ $im =3D new Imagick('sf.jpg'); $idraw =3D new ImagickDraw(); /* =E3=83=95=E3=82=A9=E3=83=B3=E3=83=88=E8=A8=AD=E5=AE=9A */ $idraw->setFont("/usr/X11R6/lib/X11/fonts/TrueType/msgothic.ttc"); /* =E3=83=95=E3=82=A9=E3=83=B3=E3=83=88=E3=82=B5=E3=82=A4=E3=82=BA=E8=A8=AD= =E5=AE=9A */ $idraw->setFontSize(32); /* gravity=E8=A8=AD=E5=AE=9A */ $idraw->setGravity(Imagick::GRAVITY_CENTER); $im->annotateImage($idraw, 0, 0, 0, "=E6=97=A5=E6=9C=AC=E8=AA=9E"); $im->writeImage('sample373a.jpg'); /* $idraw->clear(); 2008/09/30=E8=BF=BD=E8=A8=98=EF=BC=9Adestroy=E3=81=A8= =E5=90=8C=E6=A7=98=E3=81=ABClearDrawingWand=E3=82=92=E5=91=BC=E3=81=B6=E3= =81=AE=E3=81=A7=E5=BF=85=E8=A6=81=E3=81=AA=E3=81=97 */ $idraw->destroy(); /* $im->clear(); 2008/09/30=E8=BF=BD=E8=A8=98=EF=BC=9Adestroy=E3=81=A8=E5= =90=8C=E6=A7=98=E3=81=ABClearMagicWand=E3=82=92=E5=91=BC=E3=81=B6=E3=81=AE= =E3=81=A7=E5=BF=85=E8=A6=81=E3=81=AA=E3=81=97 */ $im->destroy(); ?> </body> </html> --=20 View this message in context: http://www.nabble.com/imagemagick-convert%3A-= japanese-text-broken-in-freebsd-tp20997257p20997257.html Sent from the freebsd-questions mailing list archive at Nabble.com.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20997257.post>