各位好:
在使用Jpgraph时,为了在图片上显示中文,使用了“$graph->title->setFont(FF_SIMSUN,FS_BOLD,30);”,但是一旦使了这句后,总是显示不出来图片,显示的是x号,怎么回事?怎么解决?谢谢
在使用Jpgraph时,为了在图片上显示中文,使用了“$graph->title->setFont(FF_SIMSUN,FS_BOLD,30);”,但是一旦使了这句后,总是显示不出来图片,显示的是x号,怎么回事?怎么解决?谢谢
在其手册中有的,我记得中文不超过5种。SIMSUN,是这个吗?
<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');$datay1=array(13,8,19);
$datay2=array(0,0,0);// Create the graph.
$graph = new Graph(350,250);
$graph->SetScale('textlin');
$graph->SetMarginColor('silver');// Setup title
$graph->title->Set("我是中国人");
$graph->title->setFont(FF_SIMSUN,FS_BOLD,30);
// Create the first bar
$bplot = new BarPlot($datay1);
$bplot->SetFillGradient('AntiqueWhite2','AntiqueWhite4:0.8',GRAD_VERT);
$bplot->SetColor('darkred');// Create the second bar
$bplot2 = new BarPlot($datay2);
$bplot2->SetFillGradient('olivedrab1','olivedrab4',GRAD_VERT);
$bplot2->SetColor('darkgreen');// And join them in an accumulated bar
$accbplot = new AccBarPlot(array($bplot,$bplot2));
$graph->Add($accbplot);$graph->Stroke();
?>
jpgraph 显示中文的问题不是早就修正过了吗?怎么还有中文问题?