DotProject 2.1.4 甘特图乱码解决

环境:redhat ap 5.2 x86php

dotproject 2.1.4html

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

解决:htm

打开
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/'下设置相应的中文字体,其余字体均设置并对应完整。co

OKredhat

相关文章
相关标签/搜索