天下無雙
阿龍 --质量是流程决定的。

1.打开mantis\plugins\MantisGraph\core\graph_api.php

   找到下面一段,将'arial.ttf'直接改为‘simhei.ttf’,也可改为其它的中文字体。

        if( isset( $t_font_map[$t_font] ) ) {
            $t_font = $t_font_map[$t_font];
        } else {
            $t_font = 'simhei.ttf'; //'arial.ttf';
        }

2.刷新就可以正常显示了。

 

 

其它参考部分,测试未通过,不知道原因

地址:http://blog.csdn.net/wirror800/archive/2010/05/23/5618334.aspx 

1.1.8之后的版本安装配置

默认的系统使用自己绑定的mantis graph, 我们也可以选择安装使用jpgraph。

1、安装JPGRAPH及改程序

(1)安装:JpGraph 3.0.7,从http://www.aditus.nu/jpgraph/jpdownload.php下载最新版本,记得看清对应的PHP版本。解压缩其中子目录src至mantis\library目录下,改名为jpgraph

(2)修改文件mantis\library\jpgraph\jpgraph_ttf.inc.php:

       elseif( $aFF === FF_SIMSUN ) {

            // Do Chinese conversion

            if( $this->g2312 == null ) {

                include_once 'jpgraph_gb2312.php' ;

                $this->g2312 = new GB2312toUTF8();

            }

            return $this->g2312->gb2utf8($aTxt);

        }

改为

       elseif( $aFF === FF_SIMSUN ) {

            // Do Chinese conversion

        return $aTxt;

        }

2、后台设置:

(1)安装插件:管理--》管理插件--》安装MantisGraph插件

(2)修改程序:

  *文件mantis\plugins\MantisGraph\pages\config.php(记得本文件改完后用Ultraedit用ASC-II至UTF-8的转换功能保存为UTF-8格式文件,与总体字符集保持一致):

$t_current_font_selected = array(

        'simsun' => false,  //增加这一行

        'arial' => false,

//--------------------------------------

        Sans-serif:<br />

        <label><input type="radio" name="font" value="simsun"<?php echo print_font_checked( 'simsun' )?>/>宋体</label><br /> //增加这一行

        <label><input type="radio" name="font" value="arial"<?php echo print_font_checked( 'arial' )?>/>Arial</label><br />

//---------------------------------------------------------------------

   *文件mantis\plugins\MantisGraph\pages\config_edit.php:

if ( plugin_config_get( 'font' ) != $f_font ) {

        switch ( $f_font ) {

                case 'simsun':    //增加这一行

                case 'arial':

//----------------------------------------------------------------------

   *文件mantis\plugins\MantisGraph\core\graph_api.php:

                $t_font_map = array(

                        'simsun' => FF_SIMSUN,   //增加这一行

                        'arial' => FF_ARIAL,

3、设置并启用:

(1)管理--》管理插件--》点击“MantisGraph 1.0”名字进入设置界面,

(2)Graph library to use选择“Jpgraph”,Font选择“宋体”

(3)点击“更改配置”后再看看统计报表中内容,是否已如你所愿。

MantisGraph插件的中文化文件,放在mantis\plugins\MantisGraph\lang目录下即可。

posted on 2010-10-13 16:48  阿龍  阅读(2051)  评论(0编辑  收藏  举报