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

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 小白问道 » 2017-10-09T05:52:18-07:00

用imagickDraw文字生成图片时,使用中文字体不能加粗倾斜,怎么实现中文字体加粗或倾斜这个功能呀?

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-10-09T19:27:22-07:00

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 小白问道 » 2017-10-09T23:04:30-07:00

谢谢,中文字体加粗可以这样设置, 那怎么中文字体倾斜该怎么处理呀?

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-10-09T23:28:42-07:00


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

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

Post by 小白问道 » 2017-10-10T00:05:49-07:00

Imagick::STYLE_ITALIC 这个不能对中文字体倾斜

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

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

Post by 小白问道 » 2017-10-10T00:18:40-07:00

-i .... italic ................ italic slant angle in degrees; -45<=float<=45; default=0 这个命令好像不能对中文字体倾斜

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-10-10T09:14:03-07:00

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