Solve JFreeChart and some Java programs do not display Chinese correctly on Linux

xiaoxiao2021-03-06  102

Seeing a lot of online problems in the Java program in Linux can't correctly display Chinese, I recently made a BS application. After deploying Tomcat to Linux, the chart made with JFreeChart does not display the Chinese font. After my exploitation, the following Steps, you can successfully solve this problem .1.Copy Xfree86-libs-4.2.1-13.73.3.i386.rpm, TTFM-1.0-6.i386.rpm to Linux, install these 2 RPMs with RPM -i file name Package .2.copy GBSN00LP.TTTTF to% JDK in the directory% / jre / lib / fonts / below .3. Modify the% JDK's directory% / jRE / lib / fonts / below the fonts.dir file, the first line value plus 1, in the last line plus: GBSN00LP.TTTF -ARPHIC TECHNOLOGY Co.-AR PL SUNGTIL GB-Medium-R-Normal - 0-0-0-C-0-ISO10646-14. Modify% JDK's directory The font.properties file below% / jre / lib / directory (if the system is a Chinese environment, then font.properties_en). Replace the font name to -Arphic Technology Co.-AR PL SUNGTIL GB-Medium-r-Normal- -0-0-0-0-c-0-iso1064-1, add in the end of the file: filename.song_medium_r = gbsn00lp.ttffilename.song_medium_i = gbsn00lp.ttffilename.song_bold_r = gbsn00lp.ttffilename.song_bold_i = gbsn00lp.ttffilename. fangsong_medium_r = gbsn00lp.ttffilename.fangsong_medium_i gbsn00lp.ttffilename.fangsong_bold_r gbsn00lp.ttffilename.fangsong_bold_i gbsn00lp.ttffilename.kai_medium_r gbsn00lp.ttfappendedfontpath =% jdk directory = = = =% / jre / lib / fonts participate in the discussion forum: http: // www . matrix.org.cn / forum.asp More Technical Articles: HT TP: //www.matrix.org.cn/Article.aspmatrix Java Portal: http://www.matrix.org.cn Original Address: http://www.matrix.org.cn/Article/1068.html

Ezerg Programming

转载请注明原文地址:https://www.9cbs.com/read-101224.html

New Post(0)