原来,从1.0.14开始,加了个 source\org\jfree\chart\StandardChartTheme.java
里边写死字体都用 Tahoma , 没找到这个字体, 生成的图中,中文就变成方块了。
解决办法:
要么在机器上安装Tahoma字体,要么修改代码,将字体该回去。
将 新采用的Tahoma字体改为原来的 SansSerif
this.extraLargeFont = new Font("Tahoma", Font.BOLD, 20);
this.largeFont = new Font("Tahoma", Font.BOLD, 14);
this.regularFont = new Font("Tahoma", Font.PLAIN, 12);
this.smallFont = new Font("Tahoma", Font.PLAIN, 10);
this.largeFont = new Font("SansSerif", Font.BOLD, 14);
this.regularFont = new Font("SansSerif", Font.PLAIN, 12);
this.smallFont = new Font("SansSerif", Font.PLAIN, 10);
第二处:source\org\jfree\chart\plot\Crosshair.java 中也用到了Tahoma字体,最好改掉吧。
1741



被折叠的 条评论
为什么被折叠?



