java 1.5 中文显示文件

系统字体配置、中文显示和输入法问题
回复
slowfish
帖子: 6
注册时间: 2005-04-08 22:01
送出感谢: 0
接收感谢: 0

java 1.5 中文显示文件

#1

帖子 slowfish » 2005-04-09 23:19

/usr/lib/j2sdk1.5-sun/jre/lib/fontconfig.properties


就是这个文件 使用的 newsong 体

ubuntu5.04能用.


代码: 全选

# @(#)linux.fontconfig.properties   1.2 03/10/28
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
#

# Version

version=1

# Component Font Mappings

allfonts.chinese-gbk=-misc-simsun-medium-r-normal--*-%d-*-*-p-*-gbk-0
allfonts.chinese-gb2312=-misc-simsun-medium-r-normal--*-%d-*-*-p-*-gb2312.1980-0
allfonts.chinese-cn-iso10646=-misc-simsun-medium-r-normal--*-%d-*-*-p-*-iso10646-1
allfonts.chinese-big5=-misc-fzmingti-medium-r-normal--*-%d-*-*-p-*-big5-0
allfonts.chinese-tw-iso10646=-misc-fzmingti-medium-r-normal--*-%d-*-*-p-*-iso10646-1
allfonts.chinese-big5hkscs=-misc-fzheiti-medium-r-normal--*-%d-*-*-p-*-big5hkscs-0
allfonts.lucida=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1

serif.plain.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
serif.plain.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.plain.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
serif.plain.latin-1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.plain.latin-1.motif=-b&h-luxi serif-medium-r-normal--*-%d-*-*-p-*-iso8859-1

serif.bold.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
serif.bold.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.bold.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
serif.bold.latin-1=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.latin-1.motif=-b&h-luxi serif-bold-r-normal--*-%d-*-*-p-*-iso8859-1

serif.italic.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
serif.italic.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.italic.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
serif.italic.latin-1=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.latin-1.motif=-b&h-luxi serif-medium-i-normal--*-%d-*-*-p-*-iso8859-1

serif.bolditalic.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
serif.bolditalic.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.bolditalic.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
serif.bolditalic.latin-1=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.latin-1.motif=-b&h-luxi serif-bold-i-normal--*-%d-*-*-p-*-iso8859-1

sansserif.plain.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
sansserif.plain.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.plain.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
sansserif.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.plain.latin-1.motif=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1

sansserif.bold.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
sansserif.bold.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.bold.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
sansserif.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.latin-1.motif=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1

sansserif.italic.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
sansserif.italic.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.italic.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
sansserif.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.latin-1.motif=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1

sansserif.bolditalic.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
sansserif.bolditalic.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.bolditalic.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
sansserif.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.latin-1.motif=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1

monospaced.plain.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
monospaced.plain.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.plain.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
monospaced.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.plain.latin-1.motif=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1

monospaced.bold.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
monospaced.bold.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.bold.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
monospaced.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.latin-1.motif=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1

monospaced.italic.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
monospaced.italic.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.italic.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
monospaced.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.latin-1.motif=-b&h-luxi mono-medium-i-normal--*-%d-*-*-m-*-iso8859-1

monospaced.bolditalic.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
monospaced.bolditalic.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.bolditalic.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
monospaced.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.latin-1.motif=-b&h-luxi mono-bold-i-normal--*-%d-*-*-m-*-iso8859-1

dialog.plain.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialog.plain.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.plain.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialog.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.plain.latin-1.motif=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1

dialog.bold.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialog.bold.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.bold.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialog.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.latin-1.motif=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1

dialog.italic.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialog.italic.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.italic.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialog.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.latin-1.motif=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1

dialog.bolditalic.japanese-x0201=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialog.bolditalic.japanese-x0208=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.bolditalic.korean=-hwan-baekmuk gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialog.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.latin-1.motif=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1

dialoginput.plain.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialoginput.plain.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.plain.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialoginput.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.plain.latin-1.motif=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1

dialoginput.bold.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialoginput.bold.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.bold.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialoginput.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.latin-1.motif=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1

dialoginput.italic.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialoginput.italic.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.italic.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialoginput.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.latin-1.motif=-b&h-luxi mono-medium-i-normal--*-%d-*-*-m-*-iso8859-1

dialoginput.bolditalic.japanese-x0201=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0
dialoginput.bolditalic.japanese-x0208=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.bolditalic.korean=-hwan-baekmuk batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0
dialoginput.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.latin-1.motif=-b&h-luxi mono-bold-i-normal--*-%d-*-*-m-*-iso8859-1

# Search Sequences

sequence.allfonts=latin-1
sequence.allfonts.Big5=latin-1,chinese-big5
sequence.allfonts.Big5-HKSCS=latin-1,chinese-big5hkscs
sequence.allfonts.GB18030=latin-1,chinese-gbk,chinese-cn-iso10646
sequence.allfonts.GBK=latin-1,chinese-gbk
sequence.allfonts.GB2312=latin-1,chinese-gb2312
sequence.allfonts.EUC-KR=latin-1,korean
sequence.allfonts.x-euc-jp-linux=latin-1,japanese-x0201,japanese-x0208
sequence.allfonts.UTF-8.ko.KR=latin-1,korean,japanese-x0208,japanese-x0201,chinese-gbk
sequence.allfonts.UTF-8.ja.JP=latin-1,japanese-x0208,japanese-x0201,chinese-gbk,korean
sequence.allfonts.UTF-8.zh.CN=latin-1,chinese-cn-iso10646,japanese-x0208,japanese-x0201,korean
sequence.allfonts.UTF-8.zh.TW=latin-1,chinese-tw-iso10646,japanese-x0208,japanese-x0201,korean
sequence.allfonts.UTF-8.zh.HK=latin-1,chinese-tw-iso10646,japanese-x0208,japanese-x0201,korean

sequence.fallback=lucida,chinese-big5,chinese-gbk,japanese-x0208,korean

# Exclusion Ranges
exclusion.japanese-x0201=0390-03d6,2200-22ef,2701-27be
exclusion.japanese-x0208=0390-03d6,2200-22ef,2701-27be

# Font File Names

filename.-misc-fzmingti-medium-r-normal--*-%d-*-*-p-*-big5-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-misc-fzheiti-medium-r-normal--*-%d-*-*-p-*-big5hkscs-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-misc-fzmingti-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-misc-simsun-medium-r-normal--*-%d-*-*-p-*-gbk-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-misc-simsun-medium-r-normal--*-%d-*-*-p-*-gb2312.1980-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-misc-simsun-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/arphic/newsung.ttf

filename.-hwan-baekmuk_batang-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-hwan-baekmuk_gulim-medium-r-normal--*-%d-*-*-p-*-ksc5601.1987-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=/usr/share/fonts/truetype/arphic/newsung.ttf
filename.-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0=/usr/share/fonts/truetype/arphic/newsung.ttf

# AWT X11 font paths
awtfontpath.chinese-big5=/usr/share/fonts/truetype
awtfontpath.chinese-big5hkscs=/usr/share/fonts/truetype
awtfontpath.chinese-gb2312=/usr/share/fonts/truetype
awtfontpath.chinese-gbk=/usr/share/fonts/truetype
awtfontpath.chinese-chinese-cn-iso10646=/usr/share/fonts/truetype
awtfontpath.chinese-chinese-tw-iso10646=/usr/share/fonts/truetype
awtfontpath.japanese-x0201=/usr/share/fonts/truetype
awtfontpath.japanese-x0208=/usr/share/fonts/truetype
awtfontpath.korean=/usr/share/fonts/truetype
[/code]
slowfish
帖子: 6
注册时间: 2005-04-08 22:01
送出感谢: 0
接收感谢: 0

#2

帖子 slowfish » 2005-04-09 23:22

虽然像是使用了 simsun 但其实 还是 newsong
头像
max0000
帖子: 310
注册时间: 2005-04-08 14:54
送出感谢: 0
接收感谢: 0

#3

帖子 max0000 » 2005-04-12 12:27

我的ubuntu只要把字体文件Simsun.ttf拷贝到JRE的字体目录JavaHome/lib/fonts下,汉字就出现了。

Sun公司对JRE1.5.0版的中文字体设置的官方说明上提到,jre能自动搜索这个目录中的字体文件的。

但是我的jdk1.5在运行程序时会不时退出,提示:
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xb1b6e949, pid=10527, tid=2978667440
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode, sharing)
# Problematic frame:
# C [libX11.so.6+0x4c949] XFreeFontSet+0x17
#
# An error report file with more information is saved as hs_err_pid10527.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
而且这和汉字无关。

我的一个图像处理软件ImageJ自带了j2re1.4,如果我先运行一下它。接下来用1.5运行程序就不会出现问题了。这是为什么?求达人讲解。

另外,我不是学电脑的,如果太菜,请勿见笑!
头像
oneleaf
论坛管理员
帖子: 10218
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 102 次

#4

帖子 oneleaf » 2005-04-12 12:35

试试更新的java1.5.1我以前在1.5.0也碰到崩溃过。
当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
max0000
帖子: 310
注册时间: 2005-04-08 14:54
送出感谢: 0
接收感谢: 0

#5

帖子 max0000 » 2005-04-12 13:15

我的一个图像处理软件ImageJ自带了j2re1.4,如果我先运行一下它。接下来用1.5运行程序就不会出现问题了。

这个现象是什么问题?
头像
oneleaf
论坛管理员
帖子: 10218
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 102 次

#6

帖子 oneleaf » 2005-04-12 13:16

不太了解。可能跟CLASSPATH有关?
当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
max0000
帖子: 310
注册时间: 2005-04-08 14:54
送出感谢: 0
接收感谢: 0

#7

帖子 max0000 » 2005-04-13 17:40

java1.5.1哪里找得到呀?sun上只有1.5.0的。
头像
id_sonic
帖子: 339
注册时间: 2005-04-08 18:08
来自: Chongqing
送出感谢: 0
接收感谢: 0
联系:

#8

帖子 id_sonic » 2005-04-23 17:21

按照楼主的 fish 的方法 只发现 /usr/lib/j2re1.5-sun/lib/fontconfig.properties 这个文件存在 没有发现 /usr/lib/j2re1.5-sun/jre/ 这个目录


我安装了 simsun 字体, 怎么中文不能显示, 用的 zh_CN.utf-8
目前是 tinkpad r400 上的 debian 用户
my blog Trust Dating
头像
oneleaf
论坛管理员
帖子: 10218
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 102 次

#9

帖子 oneleaf » 2005-04-23 18:53

楼主是/usr/lib/j2sdk1.5-sun/ 楼上是/usr/lib/j2re1.5-sun

将你的simsun.ttc link 到 /usr/lib/j2re1.5-sun/lib/fonts
再执行:/usr/lib/j2re1.5-sun/lib/fonts# mkfontscale;mkfontdir
当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
id_sonic
帖子: 339
注册时间: 2005-04-08 18:08
来自: Chongqing
送出感谢: 0
接收感谢: 0
联系:

#10

帖子 id_sonic » 2005-04-23 19:34

多谢指点
目前是 tinkpad r400 上的 debian 用户
my blog Trust Dating
回复

回到 “字体美化和中文支持”