Home > php教程 > php手册 > body text

探讨GDFONTPATH能否被winxp下的php支持

WBOY
Release: 2016-06-13 11:46:24
Original
1214 people have browsed it

php学习中遇一问题,
使用GD库绘图,设置字体路径变量:
putenv('GDFONTPATH=c:\windows\Fonts');
$fontname='arial';
$bbox=imagettfbbox($font_size,0,$fontname,$button_text);

提示:找不到字体文件,但是Fonts文件夹下明明有,是不是GDFONTPATH环境变量不被windows支持?
这个问题网上很多人都有遇到,很不幸,我也碰到了,我的测试结果是,真的不能在windows里面支持。
怎么办呢?问题总该要解决的,好,如果我们不用这个GDFONTPATH呢?当然引用不到,但是我们如果自己把想要用到的字体手动放到项目文件夹呢?
刚快试下,我就是这样做的,成功了。虽然有点胜之不武。


 

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