Home  >  Article  >  Backend Development  >  How to set fontweight in imagick? Using setFontWeight is useless. Is it related to the font file? The font file is ttf

How to set fontweight in imagick? Using setFontWeight is useless. Is it related to the font file? The font file is ttf

WBOY
WBOYOriginal
2016-12-01 00:56:592564browse

<code> $text_img = new ImagickDraw();
 $text_img->setFont($font);
 $text_img->setGravity(Imagick::GRAVITY_NORTH);
 $text_img->setFillColor(new ImagickPixel($color));
 $text_img->setFontSize($font_size);
 $text_img->setFontWeight(100);
 
 
 
</code>
<code>   这样设置字体weight没用,用的ttf的字体,写的出来的图片没用效果,weight都是一样的。。。是什么问题
</code>

Reply content:

<code> $text_img = new ImagickDraw();
 $text_img->setFont($font);
 $text_img->setGravity(Imagick::GRAVITY_NORTH);
 $text_img->setFillColor(new ImagickPixel($color));
 $text_img->setFontSize($font_size);
 $text_img->setFontWeight(100);
 
 
 
</code>
<code>   这样设置字体weight没用,用的ttf的字体,写的出来的图片没用效果,weight都是一样的。。。是什么问题
</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn