Maison  >  Article  >  développement back-end  >  imagick里面怎么设置fontweight,用setFontWeight没用,是和字体文件有关吗?字体文件是ttf

imagick里面怎么设置fontweight,用setFontWeight没用,是和字体文件有关吗?字体文件是ttf

WBOY
WBOYoriginal
2016-12-01 00:56:592525parcourir

<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>
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn