|
楼主 |
发表于 2006-6-3 01:23:39
|
显示全部楼层
Ê天È于搞了,把java卸载Í°安Å了一下重新配置,终于把中文显示搞出来了。
因为是个菜鸟,所以用的都是笨办法。并且都是参考别人的建议设置的,照做而已。不过仍然不敢独享,与大家分享一下:
一、安装simsun.ttf字体
我的simsun.ttf被安装到了/usr/X11R6/lib/X11/fonts/drakfont/ttf这个目录下面,可费了我老大劲才找到啊。不知道你的是否安装在同一目录?
二、修改/etc/profile文件
在文件的最后加上这一句:
export JAVA_FONTS=你的simsun.ttf安装目录
三、修改/usr/lib/jre-1.4.2_09/lib/font.properties.zh_CN.Redhat文件
(注:参考的东东中大多是修改font.properties.zh或者font.properties.zh.turbo。不过忘了在哪里看到说SUN的JAVA把Mandriva当作REDHAT,所以就想到修改font.properties.zh_CN.Redhat这个,在我的机子上是奏效的。)
我的font.properties.zh_CN.Redhat代码如下:
# %W% %E%
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#
# Component Font Mappings For RedhatLinux 8.0/zh_CN
#
serif.0=-b&h-luxi serif-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
serif.italic.0=-b&h-luxi serif-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
serif.bold.0=-b&h-luxi serif-bold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
serif.bolditalic.0=-b&h-luxi serif-bold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
sansserif.0=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1
sansserif.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
sansserif.italic.0=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.italic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
sansserif.bold.0=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1
sansserif.bold.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
sansserif.bolditalic.0=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
monospaced.0=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
monospaced.italic.0=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.italic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
monospaced.bold.0=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.bold.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
monospaced.bolditalic.0=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialog.0=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1
dialog.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialog.italic.0=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1
dialog.italic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialog.bold.0=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1
dialog.bold.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialog.bolditalic.0=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialoginput.0=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialoginput.italic.0=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.italic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialoginput.bold.0=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.bold.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
dialoginput.bolditalic.0=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.1=-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
# Missing Glyph Character
#
default.char=274f
# Component Font Character Encodings
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.io.CharToByteUnicodeBigUnmarked
fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.io.CharToByteUnicodeBigUnmarked
fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.io.CharToByteUnicodeBigUnmarked
fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.io.CharToByteUnicodeBigUnmarked
fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.io.CharToByteUnicodeBigUnmarked
# Exclusion Ranges
#
# XFontSet Information
#
fontset.serif.plain=\
-b&h-luxi serif-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.serif.italic=\
-b&h-luxi serif-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.serif.bold=\
-b&h-luxi serif-bold-r-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.serif.bolditalic=\
-b&h-luxi serif-bold-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.sansserif.plain=\
-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.sansserif.italic=\
-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.sansserif.bold=\
-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.sansserif.bolditalic=\
-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.monospaced.plain=\
-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.monospaced.italic=\
-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.monospaced.bold=\
-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.monospaced.bolditalic=\
-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialog.italic=\
-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialog.bold=\
-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialog.bolditalic=\
-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialog.plain=\
-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialoginput.italic=\
-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialoginput.bold=\
-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialoginput.bolditalic=\
-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.dialoginput.plain=\
-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
fontset.default=\
-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
filename.-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0=/usr/X11R6/lib/X11/fonts/drakfont/ttf/simsun.ttf
注意最后一行中的路径是自己的simsun.ttf安装目录
四、把除了font.properties.zh_CN.Redhat以外的font.properties.*文件移动到一个新建的目录里。
到此为止,我的终于出现了可爱的中文,欣喜难当,谨以此文献给如我一般的菜鸟:) |
|