kapok

垃圾桶,嘿嘿,我藏的这么深你们还能找到啊,真牛!

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  455 随笔 :: 0 文章 :: 76 评论 :: 0 Trackbacks
http://www.the7f.com/archives/56.html

大家常常说JBuilder在中文系统中存在光标错位的问题,都认为这是JBuilder的一个Bug,其实这实在是冤枉JBuilder了!大家讨论出来的解决方法无外乎两种:
1、将编辑器的字体改为宋体,用这种方法带来的问题是,在宋体下的英文字体实在难看,阅读起来不太顺眼;
2、就是将编辑器字体的粗体属性去掉,这样也影响代码的可读性。 其实,造成JBuilder光标错位的问题并不是Borland的错误,而是Java的宗
师——Sun的罪过!大家一定知道i18n吧?在不同的区域设置中,JDK自动调用与之相对应的properties文件,而在JDK中,Sun所推出的与中文系统相对应的properties文件存在问题,在它之中没有区分英文字体的正常、粗体和斜体,从而导致了以上所说的问题,解决的方法很简单,只要将这个properties文件修改正确就可以了。

修改方法如下:
在jre/lib目录中找到font.properties.zh文件,编辑这个文件并修改成如下内容:
# @(#)font.properties.zh1.16 00/10/06
#
# AWT Font default Properties for Chinese Windows
#


dialog.plain.0=Arial,ANSI_CHARSET
dialog.plain.1=u5b8bu4f53,GB2312_CHARSET
dialog.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

dialog.bold.0=Arial Bold,ANSI_CHARSET
dialog.bold.1=u5b8bu4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

dialog.italic.0=Arial Italic,ANSI_CHARSET
dialog.italic.1=u5b8bu4f53,GB2312_CHARSET
dialog.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED


dialog.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

dialog.bolditalic.0=Arial Bold Italic,ANSI_CHARSET
dialog.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
dialog.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

dialoginput.plain.0=Courier New,ANSI_CHARSET
dialoginput.plain.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

dialoginput.bold.0=Courier New Bold,ANSI_CHARSET
dialoginput.bold.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

dialoginput.italic.0=Courier New Italic,ANSI_CHARSET
dialoginput.italic.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED



dialoginput.bolditalic.0=Courier New Bold Italic,ANSI_CHARSET
dialoginput.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

serif.plain.0=Times New Roman,ANSI_CHARSET
serif.plain.1=u5b8bu4f53,GB2312_CHARSET
serif.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED


serif.bold.0=Times New Roman Bold,ANSI_CHARSET
serif.bold.1=u5b8bu4f53,GB2312_CHARSET
serif.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

serif.italic.0=Times New Roman Italic,ANSI_CHARSET
serif.italic.1=u5b8bu4f53,GB2312_CHARSET
serif.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

serif.bolditalic.0=Times New Roman Bold Italic,ANSI_CHARSET


serif.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
serif.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

sansserif.plain.0=Arial,ANSI_CHARSET
sansserif.plain.1=u5b8bu4f53,GB2312_CHARSET
sansserif.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

sansserif.bold.0=Arial Bold,ANSI_CHARSET
sansserif.bold.1=u5b8bu4f53,GB2312_CHARSET
sansserif.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

sansserif.italic.0=Arial Italic,ANSI_CHARSET
sansserif.italic.1=u5b8bu4f53,GB2312_CHARSET
sansserif.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

sansserif.bolditalic.0=Arial Bold Italic,ANSI_CHARSET
sansserif.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
sansserif.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED


sansserif.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

monospaced.plain.0=Courier New,GB2312_CHARSET
monospaced.plain.1=u5b8bu4f53,GB2312_CHARSET
monospaced.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

monospaced.bold.0=Courier New Bold,GB2312_CHARSET
monospaced.bold.1=u5b8bu4f53,GB2312_CHARSET
monospaced.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

monospaced.italic.0=Courier New Italic,GB2312_CHARSET
monospaced.italic.1=u5b8bu4f53,GB2312_CHARSET
monospaced.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED

monospaced.bolditalic.0=Courier New Bold Italic,GB2312_CHARSET
monospaced.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
monospaced.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED



# name aliases
#
#alias.timesroman=serif
#alias.helvetica=sansserif
#alias.courier=monospaced

# for backward compatibility
#timesroman.0=Times New Roman,ANSI_CHARSET
#helvetica.0=Arial,ANSI_CHARSET
#courier.0=Courier New,ANSI_CHARSET
zapfdingbats.0=WingDings,SYMBOL_CHARSET

# font filenames for reduced initialization time
#
filename.u5b8bu4f53=SIMSUN.TTF

filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF

filename.Courier_New=COUR.TTF



filename.Courier_New_Bold=COURBD.TTF
filename.Courier_New_Italic=COURI.TTF
filename.Courier_New_Bold_Italic=COURBI.TTF

filename.Times_New_Roman=TIMES.TTF
filename.Times_New_Roman_Bold=TIMESBD.TTF
filename.Times_New_Roman_Italic=TIMESI.TTF
filename.Times_New_Roman_Bold_Italic=TIMESBI.TTF

filename.WingDings=WINGDING.TTF
filename.Symbol=SYMBOL.TTF

# Default font definition
#
default.char=2751

# Static FontCharset info.
#
#fontcharset.dialog.0=sun.io.CharToByteCp1252
fontcharset.dialog.1=sun.io.CharToByteGBK
fontcharset.dialog.2=sun.awt.windows.CharToByteWingDings


fontcharset.dialog.3=sun.awt.CharToByteSymbol

#fontcharset.dialoginput.0=sun.io.CharToByteCp1252
fontcharset.dialoginput.1=sun.io.CharToByteGBK
fontcharset.dialoginput.2=sun.awt.windows.CharToByteWingDings
fontcharset.dialoginput.3=sun.awt.CharToByteSymbol

#fontcharset.serif.0=sun.io.CharToByteCp1252
fontcharset.serif.1=sun.io.CharToByteGBK
fontcharset.serif.2=sun.awt.windows.CharToByteWingDings
fontcharset.serif.3=sun.awt.CharToByteSymbol

#fontcharset.sansserif.0=sun.io.CharToByteCp1252
fontcharset.sansserif.1=sun.io.CharToByteGBK
fontcharset.sansserif.2=sun.awt.windows.CharToByteWingDings
fontcharset.sansserif.3=sun.awt.CharToByteSymbol

#fontcharset.monospaced.0=sun.io.CharToByteCp1252
fontcharset.monospaced.1=sun.io.CharToByteGBK
fontcharset.monospaced.2=sun.awt.windows.CharToByteWingDings
fontcharset.monospaced.3=sun.awt.CharToByteSymbol



# Exclusion Range info.
#
exclusion.dialog.plain.0=00a0-f8ff
exclusion.dialog.italic.0=00a0-f8ff
exclusion.dialog.bold.0=00a0-f8ff
exclusion.dialog.bolditalic.0=00a0-f8ff

exclusion.dialoginput.plain.0=00a0-f8ff
exclusion.dialoginput.italic.0=00a0-f8ff
exclusion.dialoginput.bold.0=00a0-f8ff
exclusion.dialoginput.bolditalic.0=00a0-f8ff

exclusion.serif.plain.0=00a0-f8ff
exclusion.serif.italic.0=00a0-f8ff
exclusion.serif.bold.0=00a0-f8ff
exclusion.serif.bolditalic.0=00a0-f8ff

exclusion.sansserif.plain.0=00a0-f8ff
exclusion.sansserif.italic.0=00a0-f8ff
exclusion.sansserif.bold.0=00a0-f8ff
exclusion.sansserif.bolditalic.0=00a0-f8ff



exclusion.monospaced.italic.0=00a0-f8ff
exclusion.monospaced.bold.0=00a0-f8ff
exclusion.monospaced.bolditalic.0=00a0-f8ff

# charset for text input
#
inputtextcharset=GB2312_CHARSET


保存后,一切问题就解决了!
这种方法也适用于任何相同的问题。

TrackBack  [ Copy ]
http://www.the7f.com/trackback.php?id=56
评 论
dennis  dennis at dennis dot com  2005-03-07 14:26:30
您好!谢谢您的分享. 我用这个方法解决 Zend Studio 4.0 的类似问题. 可是输入中文时变成乱码. source file editor 的 charset 我设的是 utf-8. 没有改之前是可以输入中文的. 请教如何修改才可,谢谢!
砖头  topsam at gmail dot com  2005-03-07 14:36:42
zend Studio 4.0 不需要这样修改。。。。
1.把编码设置为utf-8
2.把“editor”里面的字体增加一个自定义名的配置文件,字符设置为d什么input就可以了。
中文为宋体,英文仍为courier new,4.0对utf-8已经称得上完美了。
posted on 2005-03-14 11:19 笨笨 阅读(973) 评论(0)  编辑  收藏 所属分类: ALLJB

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


网站导航: