中文字体怎么加粗倾斜,现在只有英文可以

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
小白问道
Posts: 4
Joined: 2017-10-09T05:46:49-07:00
Authentication code: 1151

中文字体怎么加粗倾斜,现在只有英文可以

Post by 小白问道 »

用imagickDraw文字生成图片时,使用中文字体不能加粗倾斜,怎么实现中文字体加粗或倾斜这个功能呀?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 中文字体怎么加粗倾斜,现在只有英文可以

Post by fmw42 »

You need to use a font file that has bold type face and is UTF-8 compliant. Alternately, try using -strokewidth to make the characters thicker.

You have not specified your IM version and platform nor what your command line is. Please always provide that.
小白问道
Posts: 4
Joined: 2017-10-09T05:46:49-07:00
Authentication code: 1151

Re: 中文字体怎么加粗倾斜,现在只有英文可以

Post by 小白问道 »

谢谢,中文字体加粗可以这样设置, 那怎么中文字体倾斜该怎么处理呀?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 中文字体怎么加粗倾斜,现在只有英文可以

Post by fmw42 »

小白问道
Posts: 4
Joined: 2017-10-09T05:46:49-07:00
Authentication code: 1151

Re: 中文字体怎么加粗倾斜,现在只有英文可以

Post by 小白问道 »

Imagick::STYLE_ITALIC 这个不能对中文字体倾斜
小白问道
Posts: 4
Joined: 2017-10-09T05:46:49-07:00
Authentication code: 1151

Re: 中文字体怎么加粗倾斜,现在只有英文可以

Post by 小白问道 »

-i .... italic ................ italic slant angle in degrees; -45<=float<=45; default=0 这个命令好像不能对中文字体倾斜
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 中文字体怎么加粗倾斜,现在只有英文可以

Post by fmw42 »

You need to use a font file that has italic type face and is UTF-8 compliant. Alternately, you can use -annotate to slant text. See http://www.imagemagick.org/Usage/text/#annotate
Post Reply