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

你可能感兴趣的:(2.1.4,dotproject,甘特图乱码)