diff -Naur dotproject.old dotproject diff -Naur dotproject.old/lib/jpgraph/src/jpgraph.php dotproject/lib/jpgraph/src/jpgraph.php --- dotproject.old/lib/jpgraph/src/jpgraph.php 2004-01-29 15:13:02.000000000 +0900 +++ dotproject/lib/jpgraph/src/jpgraph.php 2005-01-23 01:52:02.093530584 +0900 @@ -24,7 +24,7 @@ // Directory for jpGraph TTF fonts. Must end with '/' // Note: The fonts must follow the naming conventions as // used by the supplied TTF fonts in JpGraph. -DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/"); +DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/TTF/"); // Cache directory specification for use with CSIM graphs that are // using the cache. @@ -199,6 +199,13 @@ DEFINE("FONT2",96); // Deprecated from 1.2 DEFINE("FONT2_BOLD",95); // Deprecated from 1.2 +DEFINE("FF_JPN_START", 40); +DEFINE("FF_JPN_END", 50); +DEFINE("FF_GOTHIC", 40); +DEFINE("FF_MICHO", 50); +DEFINE("FF_JPN_DEFAULT", FF_GOTHIC); +DEFINE("TF_JPN_DEFAULT", "ipam.ttf"); + // Tick density DEFINE("TICKD_DENSE",1); DEFINE("TICKD_NORMAL",2); @@ -4645,6 +4652,19 @@ $x = round($x); $y = round($y); + // For Japanese + if (preg_match("/".mb_detect_encoding($txt)."/","ascii,SJIS,EUC-JP,JIS,UTF-8")){ + $txt = mb_convert_encoding($txt, "UTF-8", "auto"); + if ($this->font_family < FF_JPN_START || $this->font_family > FF_JPN_END) { + $this->font_family = FF_JPN_DEFAULT; + } + if (preg_match("/\./", TF_JPN_DEFAULT)) { + $this->font_file = TTF_DIR . TF_JPN_DEFAULT; + } else { + $this->font_file = TTF_DIR . TF_JPN_DEFAULT . '.ttf'; + } + } + // Do special language encoding if( LANGUAGE_CYRILLIC ) $txt = LanguageConv::ToCyrillic($txt); diff -Naur dotproject.old/modules/tasks/gantt.php dotproject/modules/tasks/gantt.php --- dotproject.old/modules/tasks/gantt.php 2004-02-02 14:13:51.000000000 +0900 +++ dotproject/modules/tasks/gantt.php 2005-01-23 01:50:35.159746528 +0900 @@ -198,7 +198,8 @@ if($hide_task_groups) $level = 0; - $name = strlen( utf8_decode($a["task_name"]) ) > 25 ? substr( utf8_decode($a["task_name"]), 0, 22 ).'...' : utf8_decode($a["task_name"]) ; + //$name = strlen( utf8_decode($a["task_name"]) ) > 25 ? substr( utf8_decode($a["task_name"]), 0, 22 ).'...' : utf8_decode($a["task_name"]) ; + $name = $a["task_name"] ; $start = substr($a["task_start_date"], 0, 10); $end = substr($a["task_end_date"], 0, 10); $progress = $a["task_percent_complete"];