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

WBOY
Release: 2023-03-02 08:14:02
Original
2535 people have browsed it

<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>
Copy after login
Copy after login
<code>   这样设置字体weight没用,用的ttf的字体,写的出来的图片没用效果,weight都是一样的。。。是什么问题
</code>
Copy after login
Copy after login

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>
Copy after login
Copy after login
<code>   这样设置字体weight没用,用的ttf的字体,写的出来的图片没用效果,weight都是一样的。。。是什么问题
</code>
Copy after login
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!