linux下解决生成文件全部为"口"问题
2014-12-25 09:16
573 查看
JFreeChart默认字体有"Arial", "Dialog", "Dialog", "SansSerif", "Tahoma"
而需要用到是宋体等中文字体时,JVM找不到相关字体文件,所以会显示乱码,解决方法如下。
方法一:
复制所使用的中文字体文件(如simsun.ttc)到此目录中(如果没有fallback目录,请手动建立。)
$JAVA_HOME/jre/lib/fonts/fallback
为何要建立fallback目录参照sequence.fallback的说明:
If the runtime environment has a directory lib/fonts/fallback and this directory contains valid TrueType or Type 1 fonts, the runtime automatically adds these fonts as fallback fonts for 2D rendering.
On Windows, if there is a system EUDC (End User Defined Characters) font registered with Windows, the runtime automatically adds this font as well as a fallback font for 2D rendering
方法二:
将Linux系统的字体目录作为JDK下面的一个字体目录连接。
ln -s $FONTS_PATH/FONT_DIR $JAVA_HOME/jre/lib/fonts/fallback
来源:http://blog.sina.com.cn/s/blog_6826662b01018tbo.html
而需要用到是宋体等中文字体时,JVM找不到相关字体文件,所以会显示乱码,解决方法如下。
方法一:
复制所使用的中文字体文件(如simsun.ttc)到此目录中(如果没有fallback目录,请手动建立。)
$JAVA_HOME/jre/lib/fonts/fallback
为何要建立fallback目录参照sequence.fallback的说明:
If the runtime environment has a directory lib/fonts/fallback and this directory contains valid TrueType or Type 1 fonts, the runtime automatically adds these fonts as fallback fonts for 2D rendering.
On Windows, if there is a system EUDC (End User Defined Characters) font registered with Windows, the runtime automatically adds this font as well as a fallback font for 2D rendering
方法二:
将Linux系统的字体目录作为JDK下面的一个字体目录连接。
ln -s $FONTS_PATH/FONT_DIR $JAVA_HOME/jre/lib/fonts/fallback
来源:http://blog.sina.com.cn/s/blog_6826662b01018tbo.html
相关文章推荐
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- 【C# 基础】— 解决 "winForm 引用 Adobe PDF Reader控件不显示pdf 文件" 问题
- Linux下如何生成core dump 文件(解决segment fault段错误的问题)
- 解决Linux下Qt编译出现"cannot find -lGL"以及无法安装libgl1-mesa-dev的问题
- 解决问题:vs 使用命令行参数调试时出现"当前项目设置指定将使用特定的安全权限对该项目进行调试.在此模式下,命令行参数将不会传递给可执行文件."
- "你没有权限在此位置保存文件 请与管理员联系的问题解决"
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- "404 - 找不到文件或目录" 问题解决
- 解决"安卓端没有生成对应的apk文件"的问题
- 解决Linux出现"Device eth0 does not seem to be present"问题
- 解决Linux出现"Device eth0 does not seem to be present"问题
- driverstudio生成的项目在编译过程的"ntstrsafe.h"找不到问题的解决
- linux 解决 " command not found: shopt "的 "~/.bashrc" 配置问题
- 解决错误Unknown CMake command "QT4_WRAP_CPP"(CMAKE对应Qt在Linux/Windows兼容问题)
- linux 下解决home目录下的文件全部显示到Desktop问题
- 解决linux下“XX不在 sudoers 文件中。此事将被报告"的问题
- linux定时备份mysql数据库,及解决crontab执行时生成数据库文件为空的问题
- linux定时备份mysql数据库,及解决crontab执行时生成数据库文件为空的问题