環境: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