Discuss whether GDFONTPATH ​​can be supported by PHP under winxp_PHP tutorial

WBOY
Release: 2016-07-21 15:04:31
Original
724 people have browsed it

I encountered a problem while learning PHP.
Use the GD library to draw and set the font path variable:
putenv('GDFONTPATH=c:windowsFonts');
$ fontname='arial';
$bbox=imagettfbbox($font_size,0,$fontname,$button_text);

Tip: The font file cannot be found, but there is clearly one in the Fonts folder. Is the GDFONTPATH ​​environment variable not supported by Windows?
Many people on the Internet have encountered this problem. Unfortunately, I have also encountered it. My test results are that it is really not supported in Windows.
What to do? The problem should be solved, okay, what if we don't use this GDFONTPATH? Of course it cannot be referenced, but what if we manually put the fonts we want to use into the project folder?
Just tried it, this is what I did and it worked. Although it is a bit overwhelming.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327777.htmlTechArticleI encountered a problem while learning PHP. I used the GD library to draw and set the font path variable: putenv('GDFONTPATH=c: windowsFonts'); $fontname='arial'; $bbox=imagettfbbox($font_size,0,$fontname,$but...
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!