写著 '关于在linux下的汉字美化的文章已经很多了。而实际上linux的java应用程序的汉字显示,就更不能让人接受,而且此类文章极少。本人现给出美化方法,适用于redhat8.0/9.0,sun j2sdk 1.4
关于在linux下的汉字美化的文章已经很多了。而实际上linux的java应用程序的汉字显示,就更不能让人接受,而且此类文章极少。本人现给出美化方法,适用于redhat8.0/9.0,sun j2sdk 1.4:
1. 将windows的simsun.ttc拷到/usr/share/fonts/zh_CN/TrueType文件夹下。
2. 假设安装sun的j2sdk至/usr/java/j2sdk
修改jre/lib下原有的font.properties.zh_CN.Redhat8.0的文件并另存为font.properties.zh,或者干干脆自己创建一个font.properties.zh文件亦可。并保存font.properties.zh文件中的内容如下:
# %W% %E%
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#
#
# Component Font Mappings For RedhatLinux 8.0/zh_CN
#
serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.italic.0=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.italic.0=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.1=-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1
# 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-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.serif.italic=
-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.serif.bold=
-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.serif.bolditalic=
-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.sansserif.plain=
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.sansserif.italic=
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.sansserif.bold=
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.sansserif.bolditalic=
-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.monospaced.plain=
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.monospaced.italic=
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.monospaced.bold=
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.monospaced.bolditalic=
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialog.italic=
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialog.bold=
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialog.bolditalic=
-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialog.plain=
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialoginput.italic=
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialoginput.bold=
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialoginput.bolditalic=
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.dialoginput.plain=
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.default=
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/simsun.ttc
不包括本行(注意将zysong,偷换成了simsun,你也可将zysong的名字都改掉)'
本文地址:http://com.8s8s.com/it/it12006.htm