[Vtigercrm-commits] [vtiger-commits] r4399 - in /vtigercrm/branches/4.2: jpgraph/jpg-config.inc jpgraph/jpgraph.php modules/Potentials/Charts.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 22 23:58:09 EST 2006


Author: mfedyk
Date: Wed Mar 22 21:58:05 2006
New Revision: 4399

Log:
Jpgraph fixes for Traditional Chinese, by kiange. closes #37

Modified:
    vtigercrm/branches/4.2/jpgraph/jpg-config.inc
    vtigercrm/branches/4.2/jpgraph/jpgraph.php
    vtigercrm/branches/4.2/modules/Potentials/Charts.php

Modified: vtigercrm/branches/4.2/jpgraph/jpg-config.inc
==============================================================================
--- vtigercrm/branches/4.2/jpgraph/jpg-config.inc (original)
+++ vtigercrm/branches/4.2/jpgraph/jpg-config.inc Wed Mar 22 21:58:05 2006
@@ -64,6 +64,10 @@
 // either FF_CHINESE or FF_BIG5
 DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
 
+// For Traditional Chinese with UTF-8 encode
+// Download from http://twpug.net/modules/wfdownloads/visit.php?cid=33&lid=566
+DEFINE('TCHINESE_UTF8_FONT','fireflysung.ttf');
+
 // Special unicode cyrillic language support
 DEFINE("LANGUAGE_CYRILLIC",false);
 

Modified: vtigercrm/branches/4.2/jpgraph/jpgraph.php
==============================================================================
--- vtigercrm/branches/4.2/jpgraph/jpgraph.php (original)
+++ vtigercrm/branches/4.2/jpgraph/jpgraph.php Wed Mar 22 21:58:05 2006
@@ -83,6 +83,7 @@
 DEFINE("FF_SIMSUN",30);
 DEFINE("FF_CHINESE",31);
 DEFINE("FF_BIG5",31);
+DEFINE("FF_TCHINESE_UTF8",32);
 
 // Japanese font
 DEFINE("FF_MINCHO",40);
@@ -3087,6 +3088,7 @@
 	    FF_VERASERIF => array(FS_NORMAL=>'VeraSe.ttf', FS_BOLD=>'VeraSeBd.ttf', FS_ITALIC=>'', FS_BOLDITALIC=>'' ) ,
 	    FF_SIMSUN =>  array(FS_NORMAL=>'simsun.ttc',  FS_BOLD=>'simhei.ttf',   FS_ITALIC=>'',   FS_BOLDITALIC=>'' ),
 	    FF_CHINESE => array(FS_NORMAL=>CHINESE_TTF_FONT, FS_BOLD=>'', FS_ITALIC=>'', FS_BOLDITALIC=>'' ),
+	    FF_TCHINESE_UTF8 => array(FS_NORMAL=>TCHINESE_UTF8_FONT, FS_BOLD=>TCHINESE_UTF8_FONT, FS_ITALIC=>TCHINESE_UTF8_FONT, FS_BOLDITALIC=>TCHINESE_UTF8_FONT ),
  	    FF_MINCHO =>  array(FS_NORMAL=>MINCHO_TTF_FONT,  FS_BOLD=>'',   FS_ITALIC=>'',   FS_BOLDITALIC=>'' ),
  	    FF_PMINCHO => array(FS_NORMAL=>PMINCHO_TTF_FONT,  FS_BOLD=>'',   FS_ITALIC=>'',   FS_BOLDITALIC=>'' ),    
  	    FF_GOTHIC  => array(FS_NORMAL=>GOTHIC_TTF_FONT,  FS_BOLD=>'',   FS_ITALIC=>'',   FS_BOLDITALIC=>'' ),    

Modified: vtigercrm/branches/4.2/modules/Potentials/Charts.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Potentials/Charts.php (original)
+++ vtigercrm/branches/4.2/modules/Potentials/Charts.php Wed Mar 22 21:58:05 2006
@@ -40,6 +40,7 @@
 DEFINE("FF_SIMSUN",30);
 DEFINE("FF_CHINESE",31);
 DEFINE("FF_BIG5",31);
+DEFINE("FF_TCHINESE_UTF8",32);
 
 
 function calculate_font_family($locale)
@@ -50,6 +51,8 @@
 	{
 		case 'cn_zh':
 			return FF_SIMSUN;
+		case 'zh-tw':
+		    return FF_TCHINESE_UTF8;
 		case 'tw_zh':
 			if(!function_exists('iconv')){
 				echo " Unable to display traditional Chinese on the graphs.<BR>The function iconv does not exists please read more about <a href='http://us4.php.net/iconv'>iconv here</a><BR>";





More information about the vtigercrm-commits mailing list