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
<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>
<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>