呆呆向前冲的blog

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  78 随笔 :: 43 文章 :: 5 评论 :: 74 Trackbacks

1. JBuilderX的光标不能对齐的问题源于Sun的JDK本身的问题,其实和Borland公司没有任何关系。解决的最好办法就是替换JBuilderX/jdk1.4/jre/lib目录下的font.properties.zh文件。这是一个关于字体的描述文件。只需要把这个文件替换如下内容,就可以了。
 
# @(#)font.properties.zh     1.10 02/03/07
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#
 
# Component Font Mappings
#
dialog.plain.0=Tahoma,ANSI_CHARSET
dialog.plain.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
 
dialog.bold.0=Tahoma Bold,ANSI_CHARSET
dialog.bold.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
 
dialog.italic.0=Tahoma Italic,ANSI_CHARSET
dialog.italic.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
 
dialog.bolditalic.0=Tahoma Bold Italic,ANSI_CHARSET
dialog.bolditalic.1=\u5b8b\u4f53,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=\u5b8b\u4f53,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=\u5b8b\u4f53,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=\u5b8b\u4f53,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=\u5b8b\u4f53,GB2312_CHARSET
dialoginput.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
 
 
serif.plain.0=Tahoma,ANSI_CHARSET
serif.plain.1=\u5b8b\u4f53,GB2312_CHARSET
serif.plain.2=WingDings,SYMBOL_CHARSET
serif.plain.3=Symbol,SYMBOL_CHARSET
 
serif.bold.0=Tahoma Bold,ANSI_CHARSET
serif.bold.1=\u5b8b\u4f53,GB2312_CHARSET
serif.bold.2=WingDings,SYMBOL_CHARSET
serif.bold.3=Symbol,SYMBOL_CHARSET
 
serif.italic.0=Tahoma Italic,ANSI_CHARSET
serif.italic.1=\u5b8b\u4f53,GB2312_CHARSET
serif.italic.2=WingDings,SYMBOL_CHARSET
serif.italic.3=Symbol,SYMBOL_CHARSET
 
serif.bolditalic.0=Tahoma Bold Italic,ANSI_CHARSET
serif.bolditalic.1=\u5b8b\u4f53,GB2312_CHARSET
serif.bolditalic.2=WingDings,SYMBOL_CHARSET
serif.bolditalic.3=Symbol,SYMBOL_CHARSET
 
#####################################
 
#serif.plain.0=Times New Roman,ANSI_CHARSET
#serif.plain.1=\u5b8b\u4f53,GB2312_CHARSET
#serif.plain.2=WingDings,SYMBOL_CHARSET
#serif.plain.3=Symbol,SYMBOL_CHARSET
 
#serif.bold.0=Times New Roman Bold,ANSI_CHARSET
#serif.bold.1=\u5b8b\u4f53,GB2312_CHARSET
#serif.bold.2=WingDings,SYMBOL_CHARSET
#serif.bold.3=Symbol,SYMBOL_CHARSET
 
#serif.italic.0=Times New Roman Italic,ANSI_CHARSET
#serif.italic.1=\u5b8b\u4f53,GB2312_CHARSET
#serif.italic.2=WingDings,SYMBOL_CHARSET
#serif.italic.3=Symbol,SYMBOL_CHARSET
 
#serif.bolditalic.0=Times New Roman Bold Italic,ANSI_CHARSET
#serif.bolditalic.1=\u5b8b\u4f53,GB2312_CHARSET
#serif.bolditalic.2=WingDings,SYMBOL_CHARSET
#serif.bolditalic.3=Symbol,SYMBOL_CHARSET
 
#############################
 
sansserif.plain.0=Tahoma,ANSI_CHARSET
sansserif.plain.1=\u5b8b\u4f53,GB2312_CHARSET
sansserif.plain.2=WingDings,SYMBOL_CHARSET
sansserif.plain.3=Symbol,SYMBOL_CHARSET
 
sansserif.bold.0=Tahoma Bold,ANSI_CHARSET
sansserif.bold.1=\u5b8b\u4f53,GB2312_CHARSET
sansserif.bold.2=WingDings,SYMBOL_CHARSET
sansserif.bold.3=Symbol,SYMBOL_CHARSET
 
sansserif.italic.0=Tahoma Italic,ANSI_CHARSET
sansserif.italic.1=\u5b8b\u4f53,GB2312_CHARSET
sansserif.italic.2=WingDings,SYMBOL_CHARSET
sansserif.italic.3=Symbol,SYMBOL_CHARSET
 
sansserif.bolditalic.0=Tahoma Bold Italic,ANSI_CHARSET
sansserif.bolditalic.1=\u5b8b\u4f53,GB2312_CHARSET
sansserif.bolditalic.2=WingDings,SYMBOL_CHARSET
sansserif.bolditalic.3=Symbol,SYMBOL_CHARSET
 
monospaced.plain.0=Courier New,GB2312_CHARSET
monospaced.plain.1=\u5b8b\u4f53,GB2312_CHARSET
monospaced.plain.2=WingDings,SYMBOL_CHARSET
monospaced.plain.3=Symbol,SYMBOL_CHARSET
 
monospaced.bold.0=Courier New Bold,GB2312_CHARSET
monospaced.bold.1=\u5b8b\u4f53,GB2312_CHARSET
monospaced.bold.2=WingDings,SYMBOL_CHARSET
monospaced.bold.3=Symbol,SYMBOL_CHARSET
 
monospaced.italic.0=Courier New Italic,GB2312_CHARSET
monospaced.italic.1=\u5b8b\u4f53,GB2312_CHARSET
monospaced.italic.2=WingDings,SYMBOL_CHARSET
monospaced.italic.3=Symbol,SYMBOL_CHARSET
 
monospaced.bolditalic.0=Courier New Bold Italic,GB2312_CHARSET
monospaced.bolditalic.1=\u5b8b\u4f53,GB2312_CHARSET
monospaced.bolditalic.2=WingDings,SYMBOL_CHARSET
monospaced.bolditalic.3=Symbol,SYMBOL_CHARSET
 
# name aliases
#alias.timesroman=serif
alias.helvetica=sansserif
alias.courier=monospaced
 
 
# Font File Names
#
filename.\u5b8b\u4f53=SIMSUN.TTC
 
filename.Tahoma=tahoma.ttf
filename.Tahoma_Italic=tahoma.ttf
filename.Tahoma_Bold=tahombd.ttf
filename.Tahoma_Bold_Italic=tahomabd.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
 
# Missing Glyph Character
#
default.char=2751
 
# Component Font Character Encodings
#
fontcharset.dialog.1=sun.io.CharToByteGBK
fontcharset.dialog.2=sun.awt.windows.CharToByteWingDings
fontcharset.dialog.3=sun.awt.CharToByteSymbol
 
fontcharset.dialoginput.1=sun.io.CharToByteGBK
fontcharset.dialoginput.2=sun.awt.windows.CharToByteWingDings
fontcharset.dialoginput.3=sun.awt.CharToByteSymbol
 
fontcharset.serif.1=sun.io.CharToByteGBK
fontcharset.serif.2=sun.awt.windows.CharToByteWingDings
fontcharset.serif.3=sun.awt.CharToByteSymbol
 
fontcharset.sansserif.1=sun.io.CharToByteGBK
fontcharset.sansserif.2=sun.awt.windows.CharToByteWingDings
fontcharset.sansserif.3=sun.awt.CharToByteSymbol
 
fontcharset.monospaced.0=sun.io.CharToByteGBK
fontcharset.monospaced.1=sun.io.CharToByteGBK
fontcharset.monospaced.2=sun.awt.windows.CharToByteWingDings
fontcharset.monospaced.3=sun.awt.CharToByteSymbol
 
# Exclusion Ranges
#
#exclusion.dialog.0=0100-20ab,20ad-f8ff
#exclusion.dialoginput.0=0100-20ab,20ad-f8ff
#exclusion.serif.0=0100-20ab,20ad-f8ff
#exclusion.sansserif.0=0100-20ab,20ad-f8ff
#exclusion.monospaced.0=0100-20ab,20ad-f8ff
 
exclusion.Tahoma.plain.0=00a0-f8ff
exclusion.Tahoma.italic.0=00a0-f8ff
exclusion.Tahoma.bold.0=00a0-f8ff
exclusion.Tahoma.bolditalic.0=00a0-f8ff
 
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.plain.0=00a0-f8ff
exclusion.monospaced.italic.0=00a0-f8ff
exclusion.monospaced.bold.0=00a0-f8ff
exclusion.monospaced.bolditalic.0=00a0-f8ff
 
# Text Input Character Set
#
inputtextcharset=GB2312_CHARSET
 
2. JBuilder 2005其实也有这种字体的问题。比如本来么有问题的文件,如果在Jbuilder里面保存一下,结果就会出现异常的编码字符出现。解决的办法也是将上面的font.properties.zh文件替换成如上的内容。同时,在Project->Project Properties->General->Encoding中选择”GB2312”的编码,然后关闭工程,重新打开即可。
JBUILDER的光标定位不准确的最佳解决方案是:
进入%JBUILDER_HOME%/bin目录下,用写字板编辑jbuilder.config,把下面的配置加进去: 
vmparam -Dprimetime.editor.useVariableWidthFont=true
posted on 2005-06-30 16:19 呆呆向前冲的blog 阅读(217) 评论(0)  编辑  收藏 所属分类: 工作:Java技术

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


网站导航: