2010.09.27 Monday
jpGraph 日本語化対応
1.フリーの日本語TrueTypeフォントをインストール
/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
2.jpgraph/jpg-config.inc.php の修正
3.jpgraph/jpgraph_ttf.inc.php の修正
リンク:
・jpGraph.....本家サイト
・Linuxサーバ奮闘記|JpGraph
・Shinta's Web Site|HPでグラフを作ろう!
#apt-get install ttf-sazanami-gothic ttf-sazanami-mincho↓この位置にインストールされます
/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
2.jpgraph/jpg-config.inc.php の修正
136行目: define('MINCHO_TTF_FONT','ipam.ttf');
define('PMINCHO_TTF_FONT','ipamp.ttf');
define('GOTHIC_TTF_FONT','ipag.ttf');
define('PGOTHIC_TTF_FONT','ipagp.ttf');
↓
define('MINCHO_TTF_FONT','sazanami/sazanami-mincho.ttf');
define('PMINCHO_TTF_FONT','sazanami/sazanami-mincho.ttf');
define('GOTHIC_TTF_FONT','sazanami/sazanami-gothic.ttf');
define('PGOTHIC_TTF_FONT','sazanami/sazanami-gothic.ttf');
3.jpgraph/jpgraph_ttf.inc.php の修正
// 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/truetype/');
define('MBTTF_DIR','/usr/share/fonts/truetype/');
リンク:
・jpGraph.....本家サイト
・Linuxサーバ奮闘記|JpGraph
・Shinta's Web Site|HPでグラフを作ろう!