How to set fontweight in imagick? Using setFontWeight is useless. Is it related to the font file? The font file is ttf
Release: 2023-03-02 08:14:02
Original
2568 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
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
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31