在websphereV7.1版本上,打印组件模版加载Linux字体问题。
程序部署到客户的服务器上部分字体显示串行
经检查,最大可能就是客户的系统缺少中文字体的支持。最后找到了问题的来源,是客户系统的JVM中缺少相应中文字体的支持。具体解决方法如下:
解决办法:
首先在xp的C:\WINDOWS\fonts下找到simsun.ttc字体文件
将其复制至linux系统中/usr/share/fonts/zh_CN/TrueType 下
/usr/share/fonts
│ fonts.cache-1
│
└─zh_CN
│ fonts.cache-1
│
└─TrueType
fonts.cache-1
fonts.dir
fonts.scale
simsun.ttc
test88:~ # cd /usr/share/fonts/zh_CN/TrueType
字体扫描
test88:/usr/share/fonts/zh_CN/TrueType # mkfontscale
建立字体索引文件
test88:/usr/share/fonts/zh_CN/TrueType # mkfontdir
更新字体缓存
test88:/usr/share/fonts/zh_CN/TrueType # fc-cache -f
切换到WebSphere服务器启动目录
test88:/usr/share/fonts/zh_CN/TrueType # cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
停止WebSphere server1服务
test88:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin # ./stopServer.sh server1
启动WebSphere server1服务
test88:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin # ./startServer.sh server1
程序部署到客户的服务器上部分字体显示串行
经检查,最大可能就是客户的系统缺少中文字体的支持。最后找到了问题的来源,是客户系统的JVM中缺少相应中文字体的支持。具体解决方法如下:
解决办法:
首先在xp的C:\WINDOWS\fonts下找到simsun.ttc字体文件
将其复制至linux系统中/usr/share/fonts/zh_CN/TrueType 下
/usr/share/fonts
│ fonts.cache-1
│
└─zh_CN
│ fonts.cache-1
│
└─TrueType
fonts.cache-1
fonts.dir
fonts.scale
simsun.ttc
test88:~ # cd /usr/share/fonts/zh_CN/TrueType
字体扫描
test88:/usr/share/fonts/zh_CN/TrueType # mkfontscale
建立字体索引文件
test88:/usr/share/fonts/zh_CN/TrueType # mkfontdir
更新字体缓存
test88:/usr/share/fonts/zh_CN/TrueType # fc-cache -f
切换到WebSphere服务器启动目录
test88:/usr/share/fonts/zh_CN/TrueType # cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
停止WebSphere server1服务
test88:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin # ./stopServer.sh server1
启动WebSphere server1服务
test88:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin # ./startServer.sh server1