Warning: imagettfbbox(): Could not read font in XXX on line X
今天在做图形验证码的时候,在windows运行好好的代码在CentOS下却无法运行了。报了如下警告
Warning: imagettfbbox(): Could not read font in /mnt/hgfs/web/test/clicaptcha.class.php on line 15
通过查看文章得知,需要使用的字体类型是TrueType fonts

原本默认的是使用的SourceHanSansCN-Normal.otf字体,如下图,通过file命令查看得知是属于OpenType类型,虽然在windows下是可以的,但是在CentOS下却出现了,兼容性问题,所以我有找了一个TrueType字体进行替换,替换后就好了

Warning: imagettfbbox(): Could not read font in XXX on line X的更多相关文章
- [可能没有默认的字体]Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename...
Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename... [可能没有默认的字体] 例: //putenv('G ...
- Warning: Multiple build commands for output file /xxx
xcode中 有时候会报一个警告: [WARN]Warning: Multiple build commands for output file /xxx 要解决这个问题很简单: 1.选择你的工程 2 ...
- Error running 'xxx': Command line is too long. Shorten command line for xxx
跑单元测试时,报错如下: Error running 'xxx': Command line is too long. Shorten command line for xxx 解决方案: 在项目所在 ...
- Warning: Received `false` for a non-boolean attribute `xxx`.
React对boolean类型的attribute的识别方式问题,可以采用以下方法解决: xxx={value ? 1 : 0} 改成数字的写法,不用布尔值. 具体可以参考:https://githu ...
- warning : json_decode(): option JSON_BIGINT_AS_STRING not implemented in xxx
先来一段json_decode官方说明 mixed json_decode ( string $json [, bool $assoc = false [, int $depth = 512 [, i ...
- PHP “Warning: session_start()...”、"correct (..\..\php5\Temp) in Unknown on line 0" 的解决方法
运行php的时候出现了一下警告: Warning: Unknown: open(D:/Program Files/php5/temp1\sess_l5b1a48m6kmb1g0t5cs33690v0, ...
- mysql 帮助手册 以及 warning: World-writable config file 以及 ERROR 1840 (HY000) at line 24:
1. mysql --help 2.报错 报错Warning: World-writable config file http://www.jb51.net/article/99027.htm 最近在 ...
- BEAMER中 Package Listings Warning: Text dropped after begin of listing on input line xx
Latex Beamer 模板 frame 中使用 listings package时总出现标题所示错误,无法前进.解决方法是在\begin{frame}后加上一个选项,即:\begin{frame} ...
- pyhon SyntaxError: Non-ASCII character '\xe8' in file xxx on line xx, but no encoding
import math if __name__ == '__main__': name1 = raw_input("请输入您的编号:") print name1 完整的 ...
随机推荐
- css三列布局之双飞翼pk圣杯
三列布局:两边定宽,中间自适应! 看到这个问题,我第一眼想的就是两边定宽float左右,中间加一个margin宽度自适应或者直接设一个overflow:hidden触发bfc机制,这样也可以,看上去也 ...
- springboot练习
https://www.jianshu.com/p/9a08417e4e84 1.@Controller和@RestController的区别? Spring4之后加入的注解,原来在@Controll ...
- Navicat Premium 出现2059错误解决办法
1,登陆后可查询默认加密规则,键入 use mysql; select user,plugin from user where user ='root'; 解决办法: 1,更新用户密码:ALTER U ...
- session随笔
·由于cookie中不能保存很多信息,于是Session出现来完成这个功能. ·Session的作用就是在服务器保存一些保存一些用户的数据,然后传递给用户一个名字为JSESSIONID的Cookie, ...
- 201771010142 张燕& 杨蓉庆 实验十一 集合
实验十一 集合 实验时间 2018-11-8 一 理论知识 一般将数据结构分为两大类:线性数据结构和非线性数据结构.线性数据结构:线性表.栈.队列.串.数组和文件.非线性数据结构:树和图. 线性 ...
- 递归打印lua中的table
在lua中,table是比较常用的数据形式,有时候为了打印出里面的内容,需要做一些特殊处理. 废话不多讲,直接粘代码: print = release_print -- 递归打印table local ...
- 第三周助教工作总结——NWNU李泓毅
本周点评作业数量:第一部分是第一篇博客的剩余部分,给出了共计22份作业的具体分数.第二部分是第二篇博客的已提交部分共计19份作业. 这是我的博客地址:https://www.cnblogs.com/N ...
- 移动端canvas文字图片合成并生成图片(canvas宽度自适应移动端屏幕)
这是我之前做的一个关于文字图片合成的代码,供大家参考,不足支出还望体谅:具体的注释在代码里都有,有什么不懂了可以留言互相交流.<!DOCTYPE html> <html lang=& ...
- centos7搭建Cisco上网方式
1.下载脚本 wget https://git.io/vpnsetup-centos -O vpnsetup.sh 2.修改 vi vpnsetup.sh 替换为你自己的值: YOUR_IPSEC_P ...
- uni-app 顶部导航点击更换图标
更换顶部导航的iconfont.ttf图标,先在配置文件配置好按钮: pages.json文件 "buttons": [ { "text": "\ue ...