Chinaunix首页 | 论坛 | 博客
  • 博客访问: 812462
  • 博文数量: 770
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4950
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-09 17:49
文章分类

全部博文(770)

文章存档

2011年(1)

2008年(769)

我的朋友

分类:

2008-10-10 11:08:39

j2sdk的字体配置文件是在$JAVA_HOME/jre/lib下的一个叫fonts.properties的文件

编辑这个文件指明你的字体和字体路径。
当然这个目录下可能有很多类似fonts.properties.Redhat6.1之类的文件,都可以删除。留一个修改过的就可以了。

我没有在linux做java开发,所以只装了j2re。

我的fonts.properties文件内容如下,你可以参考一下:

# @(#)font.properties.linux        1.7 02/03/07
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#

# Component Font Mappings For RedhatLinux 8.0/zh_CN
#
serif.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
serif.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

serif.italic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
serif.italic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

serif.bold.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
serif.bold.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

serif.bolditalic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
serif.bolditalic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

sansserif.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
sansserif.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

sansserif.italic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
sansserif.italic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

sansserif.bold.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
sansserif.bold.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

sansserif.bolditalic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
sansserif.bolditalic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

monospaced.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
monospaced.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

monospaced.italic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
monospaced.italic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

monospaced.bold.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
monospaced.bold.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

monospaced.bolditalic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
monospaced.bolditalic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialog.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialog.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialog.italic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialog.italic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialog.bold.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialog.bold.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialog.bolditalic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialog.bolditalic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialoginput.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialoginput.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialoginput.italic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialoginput.italic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialoginput.bold.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialoginput.bold.1=-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

dialoginput.bolditalic.0=-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1
dialoginput.bolditalic.1=-misc-simsun-medium-r-normal-*-14-*-*-*-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.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=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.serif.italic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.serif.bold=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.serif.bolditalic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.sansserif.plain=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.sansserif.italic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.sansserif.bold=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.sansserif.bolditalic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.monospaced.plain=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.monospaced.italic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.monospaced.bold=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.monospaced.bolditalic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialog.italic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialog.bold=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialog.bolditalic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialog.plain=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialoginput.italic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialoginput.bold=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialoginput.bolditalic=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.dialoginput.plain=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

fontset.default=\
-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0

filename.-misc-simsun-medium-r-normal-*-14-*-*-*-c-*-gb2312.1980-0=/usr/share/fonts/local/simsun.ttf
filename.-microsoft-tahoma-medium-r-normal-*-16-*-*-*-p-*-iso8859-1=/usr/share/fonts/local/tahoma.ttf      
--------------------next---------------------

阅读(316) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~