imagemagick convert: japanese text broken in freebsd

cuongvt freebsd at
Sat Dec 13 20:20:24 PST 2008

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:
convert origin.jpg -fill white -font
/usr/X11R6/lib/X11/fonts/TrueType/msgothic.ttc -pointsize 125 -stroke blue
-strokewidth 1 -draw "text 20,130 'がくせい'" straight.jpg
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"
<html xmlns="" lang="ja" xml:lang="ja"
/* ファイルはUTF-8で保存してね */
$im = new Imagick('sf.jpg');
$idraw = new ImagickDraw();
/* フォント設定 */
/* フォントサイズ設定 */
/* gravity設定 */
$im->annotateImage($idraw, 0, 0, 0, "日本語");
/* $idraw->clear(); 2008/09/30追記:destroyと同様にClearDrawingWandを呼ぶので必要なし */
/* $im->clear(); 2008/09/30追記:destroyと同様にClearMagicWandを呼ぶので必要なし */

View this message in context:
Sent from the freebsd-questions mailing list archive at

More information about the freebsd-questions mailing list