LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3991|回复: 5

slackware中自带的jdk和显示中文字体

[复制链接]
发表于 2003-11-1 08:26:32 | 显示全部楼层 |阅读模式
前段时间一直为slackware下java中文字体配置烦恼,昨天一怒之下删了重装,却意外的发现slackware里面带有jdk啊,版本1.4.2_01。以前居然一直没发现。
好像linux集成jdk要sun公司的许可吧,slack有吗??:cool:
 楼主| 发表于 2003-11-1 13:06:16 | 显示全部楼层
中文字体问题也解决了。终于弄明白了为什么前端时间中文字体配置不好了,因为我又另外装了一个jdk,系统有两个jdk,但是字体配置文件确读取的原始的那个。

这是我的font.properties.zh,放到/usr/lib/java/jre/lib下面。

# @(#)font.properties.zh.Turbo.linux        1.4 02/06/10
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#

# Component Font Mappings
#
serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

monospaced.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialoginput.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

# Missing Glyph Character
#
default.char=274f

# Component Font Character Encodings
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.awt.motif.CharToByteX11GBK

fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.awt.motif.CharToByteX11GBK

fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.awt.motif.CharToByteX11GBK

fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.awt.motif.CharToByteX11GBK

fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.awt.motif.CharToByteX11GBK

# Exclusion Ranges
#

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

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

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

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

fontset.sansserif.plain=\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.sansserif.italic=\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.sansserif.bold=\
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.sansserif.bolditalic=\
-b&h-lucida-bold-i-normal-snas-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

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

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

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

fontset.dialog.italic=\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.dialog.bold=\
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.dialog.bolditalic=\
-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.dialog.plain=\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

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

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

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

fontset.default=\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

appendedfontpath=/usr/lib/X11/fonts/ttf-zh
发表于 2004-3-17 23:28:39 | 显示全部楼层

没看懂啊

我怎么没看懂怎么配置啊,
我的netbeans还是不能显示中文啊
 楼主| 发表于 2004-3-20 10:33:46 | 显示全部楼层
晕,我协得很清楚了阿。。
把下面代码保存为font.properties.zh文件,放到你jre的lib目录中。
[PHP]
# @(#)font.properties.zh.Turbo.linux 1.4 02/06/10
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#

# Component Font Mappings
#
serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

monospaced.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialoginput.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.1=-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

# Missing Glyph Character
#
default.char=274f

# Component Font Character Encodings
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.awt.motif.CharToByteX11GBK

fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.awt.motif.CharToByteX11GBK

fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.awt.motif.CharToByteX11GBK

fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.awt.motif.CharToByteX11GBK

fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.awt.motif.CharToByteX11GBK

# Exclusion Ranges
#

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

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

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

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

fontset.sansserif.plain=\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.sansserif.italic=\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.sansserif.bold=\
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.sansserif.bolditalic=\
-b&h-lucida-bold-i-normal-snas-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

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

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

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

fontset.dialog.italic=\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.dialog.bold=\
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.dialog.bolditalic=\
-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

fontset.dialog.plain=\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

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

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

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

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

fontset.default=\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-misc-simsun-medium-r-normal--*-%d-*-*-c-*-gbk-0

appendedfontpath=/usr/lib/X11/fonts/ttf-zh
[/PHP]
发表于 2004-3-20 18:10:56 | 显示全部楼层
这个也加精,晕
好老好老的问题啊
发表于 2006-8-3 17:56:26 | 显示全部楼层
正在试这个--请问还需要装中文字体才能用这个吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表