ivaneeo's blog

自由的力量,自由的生活。

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
1.首先,把windows的simsun.ttc文件考到指定目录,重命名为simsun.ttf.


2.注册字体:到JAVA_HOME下的jre/lib/fonts下.编辑fonts.dir.具体如下:第一行的数字加一.在最后一行加入一句: simsun.ttf -default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.
可选字体的还有: simsun.ttf -SungtiL GB-medium-r-normal--0-0-0-0-c-0-gb2312.1988-0
                      simsun.ttf -misc-SimSun-medium-r-normal--*-%d-*-*-c-*-iso10646-1


3.修改JAVA_HOME下的jre/lib/的font.properties文件(这里的font.properties文件最好做备份).
($cp -v font.properties.zh_CN.Sun font.properties)

修改的地方有三处:
A.类似如下的 serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0
看到xxxx.1=后面的字体全部改成已经注册的字体.

B.类似如下的 fontset.serif.plain=\
-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0
fontset.serif.plain=\后的第二行字体全部改成注册的字体.

C.最后一行:appendedfontpath=/usr/share/fonts/truetype.这里的/usr/share/fonts/truetype是simsun.ttf的考到的目录名.

具体文件如下:
# @(#)font.properties.zh_CN.Sun.linux    1.1 03/07/14
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
#

# Component Font Mappings For Linux zh_CN
#
serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

sansserif.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

monospaced.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialog.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialoginput.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.1=-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

# Missing Glyph Character
#
default.char=274f

# Component Font Character Encodings
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.io.CharToByteGBK

fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.io.CharToByteGBK

fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.io.CharToByteGBK

fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.io.CharToByteGBK

fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.io.CharToByteGBK

# Exclusion Ranges
#

# XFontSet Information
#
fontset.serif.plain=\
-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.serif.italic=\
-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.serif.bold=\
-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.serif.bolditalic=\
-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.sansserif.plain=\
-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.sansserif.italic=\
-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.sansserif.bold=\
-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.sansserif.bolditalic=\
-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.monospaced.plain=\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.monospaced.italic=\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.monospaced.bold=\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.monospaced.bolditalic=\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialog.italic=\
-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialog.bold=\
-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialog.bolditalic=\
-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialog.plain=\
-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialoginput.italic=\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialoginput.bold=\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialoginput.bolditalic=\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.dialoginput.plain=\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

fontset.default=\
-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.

filename.-default-simsun-medium-r-normal--*-100-*-*-c-*-gb2312.1980-0.=/usr/share/fonts/truetype/simsun.ttf

appendedfontpath=/usr/share/fonts/truetype



posted on 2005-08-11 13:38 ivaneeo 阅读(623) 评论(0)  编辑  收藏 所属分类: debian-企鹅中最像牛

只有注册用户登录后才能发表评论。


网站导航: