DotProject 2.1.4 甘特图乱码解决

环境:redhat ap 5.2 x86

dotproject 2.1.4

在 /var/www/html/下解包并安装,加中文包,设置为中文,甘特图乱码。

解决:

打开
lib/jpgraph/src/jpg-config.inc.php文件
在38行:
// define('CACHE_DIR','/tmp/jpgraph_cache/');
// define('TTF_DIR','/usr/share/fonts/truetype/');
// define('MBTTF_DIR','/usr/share/fonts/truetype/');
放开,并改为本机对应目录:
define('CACHE_DIR','/tmp/jpgraph_cache/');
define('TTF_DIR','/usr/share/fonts/chinese/TrueType/');
define('MBTTF_DIR','/usr/share/fonts/chinese/TrueType/');

在文件lib/jpgraph/src/jpgraph_ttf.inc.php中
第305行有字体定义,
jpgraph_ttf.inc.php:        FF_VERA =>    array(FS_NORMAL =>'Vera.ttf',
jpgraph_ttf.inc.php:            FS_BOLD  =>'VeraBd.ttf',
jpgraph_ttf.inc.php:            FS_ITALIC =>'VeraIt.ttf',
jpgraph_ttf.inc.php:            FS_BOLDITALIC =>'VeraBI.ttf' ),
jpgraph_ttf.inc.php:        FF_VERAMONO => array(FS_NORMAL =>'VeraMono.ttf',
jpgraph_ttf.inc.php:            FS_BOLD =>'VeraMoBd.ttf',
jpgraph_ttf.inc.php:            FS_ITALIC =>'VeraMoIt.ttf',
jpgraph_ttf.inc.php:            FS_BOLDITALIC =>'VeraMoBI.ttf' ),
jpgraph_ttf.inc.php:        FF_VERASERIF=> array(FS_NORMAL =>'VeraSe.ttf',
jpgraph_ttf.inc.php:            FS_BOLD =>'VeraSeBd.ttf',

在'/usr/share/fonts/chinese/TrueType/'下设置相应的中文字体,其他字体均设置并对应完整。

OK

转载于:https://my.oschina.net/L11758207/blog/11165

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值